You're reading ...
Project Progress

A DCC throttle for €6,-

It’s always nice to have a mobile handheld speed control. Some modern Command Stations have network capabilities and iOS or Android throttles are available. However … many of us prefer to have a physical knob in our hands in stead of swipe on a screen.

Throttle_04A very nice solution is the Mobile Control (ESU, Piko). It connects via the network, has a host of functionality, but it sets you back a whopping €300.

Throttle_05The Roco / Fleishmann Multimaus can be had for around €90,- (or maybe €60,- second hand). Since it generates DCC, it must be connected to the ‘DCC sniffer’ input of your Command Station (provided it has such an input).

Throttle_01This DCC sniffer input on my ECoS made me wonder about a low cost do it yourself solution. What if we could use an Arduino to generate DCC? Well … we can! Several Arduino DCC encoding solutions have already been published on the internet. I adopted one of them, added a bit of code and here it is … a handheld throttle for just €6,-.

REMARK 1: the throttle described here sends out a DCC signal, therefor it will only work in cooperation with Command Stations that have a so called ‘DCC sniffer’ input. The ESU ECoS has this input. Others may have it too, please check your CS specifications.

What the throttle does:

Speed of a loco can be controlled with the large knob.

Forward / backward is changed when the knob is rotated fully to the left and the knob switch is activated. The LED’s show the direction: forward = green, backward = red.

The loco address can be changed via push button 4. Consecutive presses step through a list of given addresses. There are no visuals that show which loco is selected. For an Arduino hobbyist it would not be difficult to add some LED’s for this, or even an LCD a display that shows current loco address and current speed step and direction.

Lights, F1, F2 can be switched on / off via push buttons 1,2,3.

Throttle_02

SCHEMATICS:

Throttle_Schematics

HARDWARE NEEDED: (prices based on Aliexpress)
– 1 Arduino Uno or Nano – €2,70
– 1 DCDC up-converter – €0,90
– 1 npn transistor (a BC547 will do fine)
– 1 red and 1 green LED
– 3 1k resistors
– 1 4k7 resistor
– 4 push buttons €1,60 (per 10)
– 1 10k potentiometer (*) with built in switch – €1,50
– 1 knob for the potentiometer – €0,10 – €5,00
– a piece of wood or a fancy plastic case that can serve as the housing

(*) It depends on your personal preference if you choose a linear or a logarithmic one. I chose logarithmic, it makes control of low speeds more accurate, which is nice for shunting work.

POWER SUPPLY options:
– USB cable connected to a PC or a mains USB power adapter.
– A 12V DC power adapter.
– 9V battery, held inside the throttle housing, means one cable less running from it.

SOFTWARE: this is link to the SOFTWARE DOWNLOAD.
Move the folder that’s inside the libraries folder to your Arduino libraries folder.
Move the folder RB_DCC_Throttle_28 to your Arduino sketches folder.

To configure the loco addresses, modify these two lines:
byte max_locs = 5;
byte LocAddress[] = {23,32,52,64,125};
Only short (one byte) addresses are allowed. Take care … use the address that you configured as the ‘loco sniffer address’ in your ECoS (or other command station).

REMARK 2: The DCC output of the throttle is not AC, it is a signal between 0V and 20V. Most DCC sniffer inputs have an internal opto-coupler. If the throttle does not work when connected, then most probably the opto-coupler does not see a positive voltage. Swap the DCC sniffer wires and all should be OK.

Have fun!

About RudyB

Hobbyist

Discussion

23 thoughts on “A DCC throttle for €6,-

  1. This is great what I would like build is multi channel control with 4 controls. Or would it be simpler to have 4 single throttles driving one DCC controller and motorshield

    Like

    Posted by Tagg Michael | November 22, 2021, 13:14
  2. Can the software also be downloaded outside of dropbox?

    Like

    Posted by frans gommers | August 7, 2020, 08:08
  3. Very interesting project!

    How hard would You say that it would be to adapt this into a LocoNet throttle? I assume that the physical interface isn’t too hard to design, but are there libraries for LocoNet comunication?

    Like

    Posted by Anders Wallén | January 15, 2020, 11:25
  4. Hi there really impressed! not sure you still look at this but this would be a really useful set up if it worked directly with a motor shield maybe with a nano. this would make a very cheap customisable controller for a single or low number of locos, i have been desperately looking for a cheap dcc throttle for some very simple layouts I have been just looking for the final piece can you help? Thanks M

    Like

    Posted by toothfairyreceipts | February 16, 2018, 11:37
  5. In the Video, from 3:10 to 3:13, Rudy says: “It is a little bit Medieval, but it works!”
    – Rudy, you are a FUNNY man.

    Rudy, as far as I can tell, your IDEAS have sparked a lot of activity by other Railway/Railraod Modellers. So, I wouldn’t worry about the way Version Zero of the hardware looks!!!

    Some people ‘Invent’, and others ‘Enhance’. Keep up the great work Sir!!!

    Like

    Posted by Warren | April 9, 2017, 03:11
  6. Can you use the output signal to drive a motor shield?

    Liked by 1 person

    Posted by Erik | February 8, 2017, 17:35
    • An Arduino output can drive a servo motor input signal, the servo power comes from a 5V supply. I don’t know your ‘motor shield’ but assuming it is one of the types that makes it easier to plug your 3 pin motor connectors in, I would say yes.

      Like

      Posted by RudyB | February 9, 2017, 13:33
      • So if I am correct your program issues DCC++ commands with a decoder address attached so that a decoder can respond when addresses by your program? That is interesting: this means you could use this as a mobile controller such as the ones developped by David Bodnar: http://www.trainelectronics.com/DCC_Arduino/DCC_Booster/
        In your setup the DCC signal output can then be fed to a motorshield on top of the Arduino; instead of a power booster you would then need a capable (2A+) power supply into your handheld unit or else connect your handheld unit to a remote booster which receives the signal from your unit and feeds this into the tracks…
        Let me know if this sounds feasible please?
        If so your setup opens a lot of possibilities with open source systems.

        Like

        Posted by Erik | February 9, 2017, 13:47
      • Yes, all your ideas sound feasible. The Arduino indeed sends out DCC commands for a certain address. Right now one of the push buttons is used to step through a list of hardcodd addresses so you can even control multiple locs. A further enhancement coild be to add an lcd display and maybe a nicer way to select locs. Other push buttons are used to toggle functions like light or sound. With a proper power supply and an H-bridge power FET circuit a mini DCC control can be made for very little money.

        Like

        Posted by RudyB | February 9, 2017, 15:53
      • I see an issue with the use of pin 3: a motorshield uses that, and pins 11,12,13 for dir and pwm. So your program would need to have pin 3 changed to another input: maybe pin 2?
        An alternative would be to keep your program but use a pro mini instead of an Uno -to save space and power- and send the DCC++ signal to a booster with motorshield elsewhere, near the track for example. Then no need for the DC-DC-upconverter either: the TTL DCC signal can go to the motorshield input, and the booster provides the 18V at the motorshield.

        Like

        Posted by Erik | February 9, 2017, 16:25
      • Unless used as a hardware interrupt input, pin numbers can freely be changed in the code of course.

        Like

        Posted by RudyB | February 9, 2017, 17:41
      • so if i understand correctly if you hook this up to a motor shield with power instead of the dc up converter this would be able to directly connect to the track and control a loco? I have a simple set up this would be ideal for. Can you get this to broadcast to all addresses instead of a list? i only have one logo. also how would you change the code to deal with a potentiometer with a centre detent. so left is backward and right is forward. also can you add more function buttons ?

        Like

        Posted by toothfairyreceipts | February 17, 2018, 08:55
      • You’ll need an H-bridge power unit. If you’d google on DCC++ I bet you will find solutions. A center pot would be possible. Broadcast to all addresses could be an issue, I would not know why you’d want that? Function buttons can be added. This was just a fun project, if you like the fun of doing it that is nice … a second hand MultiMaus with DCC power station, which can be had for around €50,- would be an easier solution though. :)

        Like

        Posted by RudyB | February 17, 2018, 09:50
  7. 1 LED, 2 LEDs not LED’s

    Like

    Posted by S. Peller | November 12, 2016, 18:48
  8. Rudy, excellent use of an arduino….I am about to start creating one however, can you show where the other end of the usb wire connects?

    Like

    Posted by mick | April 12, 2016, 21:35
  9. Excellent addition to the ecos CS Ruud, I really have to build one of these!

    Just as a comparison with the proprietory controllers you list…………does the Roco unit, that you say would cost around 60 euro, have output for connection to the ecos sniffer inputs? Or would I need to have the 10764 multicentrale controller and PSU as well? If so would be way more than what you say?

    Alf :o)

    Like

    Posted by Alf King | April 12, 2016, 13:13
    • You’ll need the Roco Multimaus that comes with a black box booster that powers the rails. In this case you connect it to the ECoS DCC sniffer input.

      Be aware that the ECoS DCC sniffer has some quirks. Function buttons often only register after a change of loco direction. It’s a known problem with the ECoS but I doubt if they will ever mend it in future firmware versions.

      Like

      Posted by RudyB | April 12, 2016, 16:18
  10. Dag Rudy,

    Wil it work with a z21.
    Kan ik het laten werken met een z21?

    Hans de Bruijn

    Like

    Posted by Hans de Bruijn | April 12, 2016, 11:13

Leave a comment

Archive of all posts