loading

A home made G-scale DMU train runs on brass track around the garden. Unfortunately, the lack of good contact is quite a nuisance to smooth running. To avoid the need for electrical contact, I have converted the train to run off a 6000 maH battery pack (recharger for phones etc).

The DC motor runs around 250 mA so the Lenz standard decoder 10231 at 1 Amp output is fine. I also installed a MRC 1662 DCC diesel sounder in parallel with the 10231.

The transmitter is simply a RFu328 mounted on strip board and a series of push buttons to select functions along with a potentiometer to control speed.

The receiver is another RFu328 that decodes the wireless transmission and converts data into standard NMRA DCC format. It is in fact, small version of my DCC controller (see other instructable).

A small scale DCC booster is included using the SN7544110ne quad h-bridge chip which suits the motor in use.

To get a push-pull output swing of 20 volts (+- 10v), the DCC signal is fed into one input and an opposite, complimentary signal is fed into the other input. The resulting output provides the DCC output for the motor and all functions. More detail to follow

Step 1: Transmitter

The circuit diagram is attached.

Components used:

RFu328 Arduino / SRF wireless module : £16 (Wireless Things Ltd)

AMS1117 step down from 4.5v to 3.3v : £2.55 (ebay)

Push buttons (NO momentary) 10 off : £10.62 for pack of 10 from Farnell

Potentiometer 4k7

3 x AA batteries

On/Off switch and LED

Total cost of components for transmitter, including box, approximately £40

The Arduino code is attached.

send_dcc_via_rf_to_loco_jun2016.ino

Step 2: Receiver

The circuit diagram of receiver is attached.

Components used:
RFu328 Arduino / SRF wireless module : £16 (Wireless Things Ltd)

AMS1117 step down from 4.5v to 3.3v : £2.55 (ebay)

Step up from 5v to 12v at 6 Watt : £3.00 (ebay)

SN754410NE 4 Channel Half-H Bridge Driver IC : £2.30 (ebay)

EasyAcc 6000 mAh Ultra-Slim External 5 volt Battery : £13.99 (Amazon)

Total cost (not including DCC decoders) is around £38

The Arduino code is attached.

receive_dcc_via_rf_to_loco_jun2016

Alrighty, going to try using blue tooth control via cell phone. I'm essentially using the same route you used for RC but instead of mrc will be using a dcc sound decoder.
Another question I have is any way to replace the wireless module with say blue tooth and use engine driver or something similar to run it via a smart phone?
<p>Yes any other wireless comm would work as the DCC part is generated onboard the train. All you need to transmit is the instructions.You would probably have to make your own app on a phone - I do not know how Engine Driver transmits data.</p>
I have a question, seeing as the firm that produces the RF28 is no longer, is there a replacement you can suggest? Thank you!
<p>Please refer to my instructable 'Model Railway DCC Arduino wireless commands on a dead rail system' for details of the nRF24 replacement for the obsolete RF28.</p>
Thank you so very much! I look forward to trying this out.
<p>hello BillC35</p><p>Thanks for posting this great idea, I also have a lot of trouble with power/track and have tried various &quot;Deadrail&quot; solutions but have yet to find the ideal solution for my HO/OO locos ( not much space inside for battery/radio/cpu etc. ) </p><p>I have a bench project that uses Arduino MiniPro with H-bridge, battery powered via wired DCC. My aim is to use nRF24 (2.4Ghz) to replace the wired DCC and make it wireless. However Iam no software engineer and it's slow progress.</p><p>Basically I need a DCC track signal sniffer to transmit DCC and my Arduino loco decoder to receive it! I have been using the excellent DCCNMRA library for Arduino by Alex Shepard and also Geoff Bunza's DCC decoders but the DCC packet via wifi is giving me a headache ?. </p><p>Maybe this is a project you might like to fix with me? I have asked many rail modlers and they all say &quot;why can you wiz kids not fix this track/wheel power problem&quot; I see Bluetooth solutions but none with DCC &quot;bridge&quot; or just their own RF handsets!</p><p>I will follow your progress, good luck</p><p>MartinK</p>
<p>Hi Martin, With limited space in HO/OO locos it will be difficult to achieve a DCC wireless solution. You will need at least 2 x 1.5v batteries plus step up voltage circuit to supply 12 volts to the H-bridge. It should be possible to transmit the DCC signal by wireless to one of the bridge inputs and reversing the signal via a transistor to the other input to provide a 20+ volt peak to peak output that follows the received data. I will purchase a nRF24 module and check it out. Will let you know how I get on.</p><p>Thanks for you idea.</p>
<p>hello Bill</p><p>Thank you for your positive support, I have used LiPo 1 cell (with step up) and 3 cell LiPo battery with great success on my &quot;dead rail&quot; loco's, also with &quot;ON track charging&quot; powered track in stations etc . I see you are familiar with Geoff Bunza's projects, as I have his &quot;mobile decoder&quot; up and running (2 motors, 1 servo and several LED outputs) I assumed getting the DCC packet in (via pin 2) would be a just a binary input? Not needing the optoisolator circuit? </p><p>I have found a couple of Arduino programs on line that read the DCC track and out put to the serial window the Binary packets and also convert them the &quot;human readable&quot; form, it was one of these that I was trying to use with the nRF24 to transmit the DCC packet to the Arduino loco decoder.</p><p>Regards</p><p>MartinK</p>
<p>Hi Martin<br>I have found a way of using Arduino Mini Pro and nRF24 to transmit and receive DCC command station data. The on-board Arduino must run the basic clock sequence and only the packet data needs to be transmitted. I shall create another instructable soon with details.</p><p>Regards</p>
Hello Bill<br>You are a genius! I will keep an eye out for that post.<br><br>Regards<br>Martin
<p>Hi Guys</p><p>To add my 10c worth..I have used an ESP8266 based solution I developed in an HO loco using standard WiFi controlled from an Android phone app I wrote. No DCC required. (Got a lot of help from some pretty clever people on the web)</p><p>Have added the LiPo batteries and speaker to a wagon behind. I have pre-recorded sound on an SD card that is activated by function keys and motor drive. In theory can run in excess of 200 locos at the same time. I have currently built 10 locos with this solution. Cost per loco for the electronics is around $25 so no more expensive than a standard DCC decoder. The LiPo's charge from the track and give around 10 min running time if the track is switch off. Stops the annoying shorts over points etc. </p><p>One of the completed locos below. If you look carefully, you can see one of the ribbon cables between the loco and wagon. </p>
<p>hello Gavin</p><p>Thank you for sharing your project, it's great to hear from a fellow wireless/battery user it really is a fantastic solution, it's a shame a major manufacturer does not bring out a product (thus saving us many hours of work!) but then there would be no fun in that would there!</p><p>Have you posted your IOT project? I would like to take a look at it as I am currently working on an iPad app for layout/loco control using various manufacturers TCP Socket connections, it would not be a big job to add your command instruction set as you have with the Android platform.</p><p>I have the &quot;open sourced &quot; DDC++ on the bench with a view to using it to talk to all the industry's standard DCC decoders.</p>

About This Instructable

3,869views

49favorites

License:

More by BillC35:Garden Train - Arduino Wireless NMRA DCC Arduino - adjustable & smart battery charger  Model Railway DCC Arduino wireless commands on a dead rail system 
Add instructable to: