Introduction: "DCC Like" Model Train RF Control

About: Love learning from and contributing to the DIY community. New to creating but more awesome projects soon.

Intro to my complete model train control solution

This is just one piece of the complete model train control system I am building from the ground up. This project has a previous version here if you would like to check it out. If you like this project please consider voting for it in the Microcontrollers contest. Also, subscribe to follow as I bring more projects online in the near future.

About this system

This system will use an nRF24L01 to communicate with the trains. Essentially creating a DCC system but at a fraction of the cost. It also PWM on board the train for very efficient speed control. This system is easily scalable because one rf module in the control panel can control 6 trains. I am looking into ways to shrink the electronics for train cabs with less internal space and will send out an update when I have that working.

If you are new to rf here is some background on the nRF24L01.

I also plan to add an emergency brake feature using something similar to this.

Supplies

For Control Panel

  • Arduino Uno or Mega ( I use mega b/c it will also run turnouts in the future)
  • 1 nRF24L01
  • 3 potentiometer
  • 3 switches

For inside train cab

  • Arduino Nano
  • ST L6202 H-bridge
  • 1 nRF24L01
  • 5volt linear voltage regulator
  • 3 diodes
  • 3 22nf capacitors
  • 1 100mf capacitor
  • 1 100 ohm resistor
  • 1 1kohm resistor
  • 1 1500uf capacitor

Step 1: Old System Problems and Solutions

I have used a couple of controllers on my layout. These being the gold Tyco variable voltage controller and the white Bachmann controller. The Tyco had to go because it uses variable voltage instead of PWM to control motor speed. This results in poor operation at low speeds. The Bachmann is much better and I think it might do PWM but does not solve the issue of controlling multiple trains on the same track. Looks like we need a DCC system. But those are expensive to move into and all my trains are old and do not support DCC. I also don't like the user interface on DCC. I want something much simpler so it looks like I get to develop my own system. I have made an attempt at this before, check that system out at PPM cab Control. Next, I will walk you through how I solve the problems just outlined.

Step 2: Circuit

To prepare the original train I just cut the wires going from the wheels to the motor so that the new circuit can go in between. I also removed the incandescent bulb. Will replace with led straight from the linear voltage regulator to prevent its overheating when dropping below its minimum current rating at an idle.

Look at the diagram in the image for the wiring. I use the old laptop power supply(also pictured) to provide 2.1A @ 19volts to the rails. This is just a direct connection. Ideally need a fuse but I have not added this yet. The large 1500uf capacitor is a keepalive and you can adjust its value till it fits your train's power consumption. A different h-bridge can be used just make sure it can handle the voltage of the system and the current of the motor.

My H-bridge is mounted on the green PCB then used hot glue to insulate the overlapping connections from each other and the metal train chassis. My completed system is seen in the image setting next to the train chassis. The plug goes straight to the wheels. Make sure to keep the left wheels and the right wheels separate(one pos and one neg).

Step 3: Control Panel

This image shows the potentiometers and direction switches mounted. Each set controls a different train. So in my current system I can control 3 trains at the same time on the same rails. Download the code if you would like to add this to your layout. If you have more than 6 trains an easy way to identify them would be to set the address to the train's number. Then use a tablet(app in image coming soon) or serial monitor to tell the Arduino which train is on which potentiometer and direction switch pair. I will make documentation on how to do this as I add it to my layout.

Step 4: Final Notes

See the system at work in the video above.

I think this is a very adaptable system and hope to add some automation failsafe on the train to make the system dummy-proof so anyone can take the wheel without breaking something. In the end I think it will go far beyond regular DCC control. As stated before if you like this please vote for it by clicking the vote button below. Also if you want to see more of my projects subscribe to my account so that you can catch the new stuff coming soon.

Thanks, and enjoy.

Microcontroller Contest

Participated in the
Microcontroller Contest