








Home » Electronics » Turnout decoder for 64 servos
Content
Using servos instead of normal turnout motor can be a challenge for the electronics. Comparing to the normal versions, these decoders cant not only enable/disable some of the outputs. They need to have the following features.
This list is something that I have found out of experience. But now, all these features are included in my servo controller solution. So feel free to use it, and I hope you will get a good experience from using it.
I have created a very short movie that shows the movements of the servos and turnouts. I will give you an understanding about the operation on the track once they are installed.
This servo decoder is built up from a central card and a number of smaller daughter cards. Every central card can handle 16 daughter cards, and every daughter card can handle four servos and four signals. Yes, you heard right. It can also handle signals. So a full blown out solution, you have a controller for 64 servos and 64 signals. On my railroad, I actually have four central cards, as they are under different tables. But not all cards are full on daughter cards. One of them have only four daughter cards.
All configuration changes regarding turnout addresses, servo speed, servo endpoint and so on is handled thru an USB interface, connected to a Raspberry Pi. I use the Raspberry Pi as that is a normal Linux computer, and it was already available on my railroad as I use it for my Lightning Solution. For those of you that don’t know what a Raspberry Pi is, it’s basically a very small computer. Roughly the size of a normal turnout decoder. I will, somewhere in the future add a full image to my Raspberry Pi to this page for downloads. Will make it much easier for new users to get started. Send me a comment to this post if your interested.
Connection to the railroad for is done thru XpressNet. I know that alot of people will find that stupid, and argument that a standard DCC signal from the tracks are better. Usually the first one is the fact that you can only connect 31 devices to that bus, depending on version. Well, that is actually wrong. You can have 31 devices talking on the bus, but you can have a lot more devices connected and listening. So thats not a limitation. And there is also information about feedbacks available on the bus. Why do I wnt that? Lets say that you want to change a signal to red as soon as the trainentersthe next block. Very simple if you can listen to the feedback from that track, and turn it in the decoder compared to waiting for the signal to switch to red from example TrainController. And the last argument is why should I draw power from the DCC booster to handle turnouts? Let the booster do the one thing it’s designed to do. Feed power to the track.
The central board is built around a PIC 18F4550. One of the features in this chip is the USB connection, and I use it for communicating to the Raspberry Pi for configuration changes. The program is written in MikroC from MikroElektronika. Now, one of the features is that the serialnumber for the USB device must be unique, and I set it the current timestamp at compile time. A very easy solution for me atleast, as the cards will have a unique serial number from that. For that reason, I have included 4 different HEX files in the download package. The olny difference between them is the USB serial number. If you connect to cards with the same serial number, linux will ID them as the same device and try to multipath them. Not so good. So just use different HEX files, and your safe. If you need more than four unique serial numbers, drop a comment and I can compile some more.
To proper wire the solution, this is what you have to do.
The linux utility have a lot of functionality. You can do the following
For syntax and command help, run the following command
./servoSettings help
Yes, I know. The text “Isak är bäst på LEGO” is on the PCB. That’s Swedish and stands for “Isak is best at LEGO”. My son Isak helped me to etch the PCB’s (on a side note, etching PCB’s is a great activity to do with an 4 years old kid) and demanded that the text should be on the PCB. So now it is…
CentralCard V1.2 CAM
DaughterCard V1.5 CAM
4 x Servo DaughterCard HEX
16 x ServoCard Controller HEX
servoSettings.tar.gz