Thursday, April 13, 2017

Cheapest DCC Command Station with Loconet interface

In a previos post I talked about the DCC++ Command Station. This is an open project to build you own DCC command station using the Arduino platform. It's quite simple and easy to mount, and features a full DCC command station with PC interface and compatible with Rocrail and JMRI. This time I want to go a little bit further and be able to build a more standard command station with Loconet interface. There are very cheap and professional command stations like DR5000, for sure much better than this, but building things by your own provides satisfaction, right?

Clicking Here you can read the complete information in my previous post.

Both the protocol and interface of the basic command station project shown in my previous post aren't standard, and despite you can connect to the available Arduino I/O's some sensors, lights or switches, it's not enough for a medium sized layout. Anyway is a good command station to have apart from your layout to program and test locos. It's worth the 12€, for sure.

I took the source code of the DCC++ project (it's open an published in github) and tried (successfully) to add Loconet support, with some goodies like:

  • 3 Led to know the state of the command station (ON, OFF, SHORT CIRCUIT)
  • 2 Buttons to turn on and off the track current
  • 2 relays to switch to the programming track current automatically when a programming command is received
  • Display support, showing CV values when reading or writing and current consumption
  • External emergency button
My new sketch can only work on Arduino Mega. I had to discard Arduino UNO and Arduino NANO support as the program was too big for them, and I wanted to have a better performance with a lower cicle time.

The source code and the sketch to upload to Arduino MEGA can be downloaded from my public GitHub repository:


The PC interface support does not longer exist in this version of the command station, as my intention is to have a pure Loconet command station, exclusively dedicated to manage the trains. I prefer to have individual devices for each function, so for PC interface I use a dedicated Arduino UNO with an Ethernet shield. I'll post the information about how to mount the PC interface for a Loconet network in the next post. All this has the advantage that I can change any device without affecting the other Loconet devices or having to change any setup.

Having an independent PC Interface allows me, for example, to change my Intellibox Basic command station and use my new Arduino Based DCC++, or a DR5000. It's just disconnect one, and connect another. No changes in PC, software, or any other device.

So let's go with the connection diagram:


 You see the base is an Arduino MEGA with the Motor Shield on top and the bridge between pins 2 and 13, exactly as the original DCC++ project.

Then you have the 3 led to indicate "track power connected", "track power disconnected" or "error/fault/shortcircuit".

Two external buttons to turn on or off the track power, plus an extra external emergency button. Pressing this emergency button will provoque sending an emergency stop message through the loconet network, and not a normal power off message like with the normal buttons.

Relays are also optional, but if you use them the isolated track section will have normal current and will switch to programming current just when needed (read or write command received from Rocrail or the program you use). So you don't need to use manual switches or to have a separated track for it.

The display is not exactly the one from the photo, sorry but I couldn't find the right one in Fritzing software, but the connection schema is correct. I'm using an standard Keypad LCD shield from DFRobot (check it here). Two of the keys of the Keypad LCD shield can be used to turn on and off the command station, so the external buttons are not necessary.

Finally, a loconet shield board (like GCA185 from Giling Computer Applications) has to be used, connected to pins 47 and 48 instead of the usual 7 and 8 when you are using an Arduino UNO.

But there is an important issue with Loconet!
Any Loconet network needs a "Loconet Terminator" and a 12V power source to work. This is always provided by the command station, but in this case we need to add this. In this page from RR-Cirkits you can find information about it. 

You can use an old ATX PC power source to supply the 12V to Loconet and build your own "Loconet Terminator".  A "Loconet Terminator" is just a 15 mA pull up constant current source to 12V.:





If you have a LocoBuffer conected to the LocoNet it has also the option to provide this pull up termination by selecting 'Term" option.

Finally there is another solution to the previous issues, this is using a GCA101 from Peter Giling. This a board that provides you 3Amp power to Loconet, so you will never run out of power to connect more and more modules, and the board has also a jumper to activate the "Loconet Terminator" already included in the board. This board also provides you the PC Loconet interface to connect you layout to Rocrail.

This is the command station mounted in a simple electricity box, but we use it in the club and has been proved reliable enough to drive trains during all week end in exhibitions with no errors:



I hope to have more free time to post other Arduino based modules I have developed. Thanks for reading!!!





Friday, March 24, 2017

Tomix Shinkansen 500系 EVA digitalization

As explained in the 500 Type Eva Project web page, "2015 marked the 40th anniversary of Sanyo Shinkansen's completion inauguration, as well as the 20th anniversary of the start of the Evangelion TV series. To celebrate this double anniversary, the Shinkansen Evangelion Project was launched in November 2015. The Sanyo Shinkansen operates a 500 TYPE EVA train, created under the supervision of Mr. Hideaki Anno, Director of Evangelion, and designed by Mr. Ikuto Yamashita, Evangelion's mechanical designer. Additionally, while on board, passengers can enjoy content with the motif of the world of Evangelion."



You can see in the following posters how amazing is the design of this 500 Type Shinkansen, taking the image of the anime's main "EVA",  a humanoid mecha:




The design of this train is not only in the outside, but also in the inside. In Car No. 1, you can enjoy four attractions: Shinkansen X Evangelion Exhibit Panels; a Photo Spot; a Diorama; and Full-size Cockpit Riding Experience, a hands-on attraction:



Car No. 2 lets you experience an interior decorated with the "EVA design.":



Kato was the first announcing this model release, but it could only be purchased in August 2016 during an train event in Japan. It was also advised that the model was using the previous 500 Type molds so it was not an exact prototype to the original one. It was only an special decoration, and the cost was 30.000Yen. Nowadays is still not possible to acquire it in regular shops, just directly to Kato through their web page.

Before Kato's release date Tomix announced they were also releasing this model, but with new molds reproducing the original in a more accurate way. Tomix model was also reproducing the first car interior and the preorder price was below Kato price.

In febrary I received the Tomix model and now is time to convert it for DCC operation. I'll be using a Doehler&Haass DH10 decoder (bought in decoders.es). Let's start with the motor car:



I prepare the plates applying tin to the extrem part where I plan to solder decoder and interior lighting wires. As this train has 8 cars and I don't want to install 8 decoders, interior lighting will be directly connected to the rail power. 



I have to do two small holes for the decoder motor wires. Holes are done in the place where they coincide between the two springs of the motor:



Now I solder the red and black wires of the decoder to the pick up current plates, and two extra red and black wires (the extra part I cut from decoder wires) for the interior lights:




I was thinking how to attach the motor wires to the motor plates. If I want to solder them directly I have to remove the springs and dismount completely the motor. I'm not sure to solder them to the springs, may be the spring becomes rigid and I cannot close the car.... finally I will just wrap the decoder wire in the spring and put them in place, isolating the cooper strips so they are not in contact with the springs and therefore the motor current:




I checked the car works properly. Motor wires have been rolled in the spring firmly and keep isolated, there is no short circuit. Check always with your tester that motor wires are completely isolated from pickup current before putting it on the tracks. You can check it putting your tester tips directly in decoder pads, so gray wire has no continuity with red, black and orange. And the same with the other cables.

Now the motor works, I'm preparing the interior lighting. I'm using 12V white led strips.



I solder a diode rectifier to the led strip. MB6S rectifier model has the exact width of the led strip. I also add a 2.2kOhm resistor to lower the led intensity to the level I like:



And now everything is ready. Stick the led strip to the roof and add a little piece of doble sided tape under the decoder and motor wires, so they keep in place and hidden from the outside when you close the car:



Cab car is also quite standard. To open it you have to unscrew the closest screw to the front, do not pull the hull before:



Then you need to unscrew the bogies also to release the seats board and access to the light board. Be careful to do not lose the tiny springs of the bogies, they easily "jump" and you can spend a full day trying to find it again:



For the cab car I'm using a LaisDCC decoder. The motor wires can be configured in a way you can turn them on and off with the F0 (lights) button, can switch the polarity depending on the direction and the intensity is also adjustable. This has the great advantage that you don't need to make any kind of modification to the light board. No led switching, no extra resistors..... just isolate the board and connect the motor wires (orange and gray) to it.

Decoder must be configured with CV61=68 and desired intensity in CV133 (value from 0 to 255, but I always set a value of 20).



I make 4 little holes in the seats board to pass the decoder wires to the led board:



The light board has two metallic pads that you can desolder and this isolates the board, but to make it safer add kapton tape to the pick up current metallic strips.



So motor car and one of the cab cars are ready, I'll continue with the rest of cars later:



Sunday, January 15, 2017

New header for our modules' standard

Happy New Year everybody!!! This is my first post of 2017

We are ready to publish the revision 3 of our modular norms. Remember in the top horizontal menu, under "Modules" option, you will find always all the posts and the last version of the norms once approved.

A big change in this new version refers to the header construction and shape. Our adopted header was the same from the EuroN norm:

EuroN header (ClubNCaldes v.1)

Everybody told us that the squared hole (the one on the right side) was never used. In the original EuroN norms that hole is to pass two hidden tracks to cross under the modules. But if even having the tracks in sight sometimes is difficult to adjust them, having them hidden looks like it can cause many headaches and train derailments in a zone that you cannot see and has difficult accessibility. So we decided to get rid of it and center and enlarge the existing rounded hole that we use to pass the wires and connect one module to the other, and as a handle to move the module.

At the same time one of the club members had the idea to make a reversible module, so you can flip it and interchange North and South sides with no problems. Another friend wanted to make a staging yard of 6 tracks, but having a kind of norm or guide for it and to place the tracks. In this way any staging yard module (with 6 tracks) can be joined to the one from any other club member as everything has been constructed under the same norm.

These are the reasons to design a new header, fully compatible with EuroN and our previous header norm, but having the holes to place the metallic gauge in three different positions. The two outside positions allow to place 4 tracks so that the module is symmetric and North and Sound sides are interchangeable. A center position of the gauge allows to place two extra tracks centered in the module.


ClubNCaldes header v.3 (compatible EuroN)

I will upload the last norm version soon, as it contains more detailed information and step-by-step instructions to build the different Loconet modules using Arduino.