HACKED! Servo Motor As Model Train Driver!

by KushagraK7 in Circuits > Electronics

3221 Views, 9 Favorites, 0 Comments

HACKED! Servo Motor As Model Train Driver!

IMG_0662.JPG

Getting started in model railways? Don't have enough budget to buy all those expensive train controllers? Don't worry! In this instructable, I will show you how you can make your own low-budget train controller by hacking a servo motor. So, let's get started!

Collect the Essentials

IMG_0612.JPG

So here is what you will need:

  • A standard servo motor(Plastic gear one is recommended since the mechanics of the servo motor will be unused.)
  • A screwdriver
  • A diagonal cutter
  • Some M-M jumper wires
  • A power feeder track(Use a suitable gauge of track that you have, I use N-gauge tracks)
  • Some F-F jumper wires

Take Apart the Servo Motor

lfhiffghgflgfgfakfg.PNG

Disconnect the Motor Wires

IMG_0616.PNG
IMG_0617.PNG

Take Out the Servo Driver

IMG_0618.PNG
IMG_0619.PNG

Remove the top gear housing and the output gear to expose the potentiometer. Push it down to free it from the servo motor's body and take the driver board out along with the potentiometer.

Add Female Connectors to the Output Wires of the Driver Board

IMG_0629.JPG
IMG_0630.JPG

Doing so will make it easier to connect the servo driver's output to the L298N motor driver's input pins.

Connect Jumper Cables to the L298N Motor Driver

IMG_0639.JPG

Take a pair of jumper cables with female connectors on one side and bare wires on the other and connect the bare wires to the 5 volts and GND of the motor driver board. Using a pair of male to male jumper cables, connect the 12-volt input of the motor driver board(also marked as VIN or VMOT) and the GND to be later connected to a 12-volt power supply. Then, take another pair of male to male jumper wires and connect to any of the two motor outputs. Click on the image for help.

Connect the Servo Driver Board

IMG_0640.JPG

Connect the output wires of the servo drive to the input pins of the motor driver corresponding to the motor output the power feeder track will be connected to. For example, if the outputs 3 and 4 are being used(see image), connect the servo driver's output to the input pins marked 3 and 4.

Connect the Servo Tester to the Servo Driver Board

IMG_0642.JPG

Connect the Servo Driver's Power Input to the 5 Volt Output of the Motor Driver

IMG_0644.JPG

Make the Test Layout

IMG_0645.JPG

The test layout is just a loop of track made using N-gauge Kato Unitrack.

Connect the Power Feeder Track to the Motor Driver

IMG_0646.JPG

Connect the Motor Driver's Power in to a 12-volt DC Power Supply

IMG_0647.JPG

Here, I have used a computer's power supply to power the whole setup but you can also use a 12-volt power adapter.

Get Your Train and Position It on the Tracks

IMG_0661.JPG

If you want, you can test your setup by just using the locomotive.

Power Up the Setup

IMG_0650.JPG

Calibrate the Driver

IMG_0651.JPG
IMG_0652.JPG

After powering on the setup, press the button on the servo tester once. The middle LED should light up and the servo tester will command the servo driver to move the motor at 90 degrees angle(As it would normally do in a regular servo motor). Adjust the potentiometer on the servo driver until the locomotive stops moving.

It's Done!

HACKED! Servo motor as a model train driver

What's Next?!

Since this model train driver uses a servo motor's driver board, it can easily be controlled using any microcontroller and can also be used with Wireless RC controllers to control the trains and even turnouts. Excited? Stay tuned for future projects related to this and all the best for your build!