Control Your Model Train Layout With Your TV REMOTE!
Intro: Control Your Model Train Layout With Your TV REMOTE!
In this instructable, I will show you how to make an IR remote control system for a model train. You will then be able to control your trains while relaxing on your couch. So, let's get started!
STEP 1: Collect All the Stuff!
Here is the parts list for electronic components:
An Arduino Mega
An AF motor driver shield
An SM0038 IR receiver
A 12 volt DC power supply
A 47 uF capacitor
Some jumper wires
STEP 2: Assemble the Electronics
Check the Arduino code for more info on the wiring connections, download it from the next step.
STEP 3: The Software
Upload this code to your Arduino board:
STEP 4: Make a Test Layout
Mame a simple loop of track to test your setup.
STEP 5: Get Your Locomotive
This is a Tomix EF210 N-scale electric locomotive which I bought from Japan. It comes as a set with two container wagons, check it out here.
STEP 6: Add It to Your Test Layout
STEP 7: Power Up the Setup and Get the Train Running!
I hope you will enjoy making this project. All the best for your build!
6 Comments
zaki67 5 years ago
may i use an arduino uno?
Regards
KushagraK7 5 years ago
zaki67 5 years ago
2. on code at MEGA :
int pwrpin = 50;//Remove this line if you are connecting your IR sensor's power to VCC.
int recvpin = 46;//Sensorpin
i change code at UNO :
int pwrpin = 12;//Remove this line if you are connecting your IR sensor's power to VCC.
int recvpin = 11;//Sensorpin
KushagraK7 5 years ago
You can connect the VCC terminal of the sensor to the +5-volt pin of the Arduino board and GND terminal of the sensor to the GND pin of the Arduino board. Also, the Adafruit motor driver shield mentioned in the project already uses almost all of the digital I/O pins of the Arduino UNO board, so you will need to change the 'recvpin' to either 9 or 10 since they are not being used by the motor driver shield.
Kink Jarfold 5 years ago
Pardon me, boy, is that the Chattanooga Choo Choo?
nice instructable, my friend.
KushagraK7 5 years ago
Are you talking about the music in the video? Well, anyway, thanks!