ul icon ur icon
Get EMPCCCC at SourceForge.net. Fast, secure and Free Open Source software downloads


EMPCCCC
This page last updated: December 21, 2012 as of January 2015

DCC devolution



Notes from geoff-bunza and the net



http://model-railroad-hobbyist.com/blog/geoff-bunza
http://sourceforge.net/projects/mrrwa/
http://www.trainelectronics.com/miscellaneous_projects.htm
http://railstars.com/software/cmdrarduino/
http://www.scuba.net/wiki/index.php/Arduino_Loconet
http://www.mynabay.com/arduino

The boards I use can be found here: http://tinyurl.com/lkhpkmd They're cheap, double sided with plated through holes. Most of the parts and especially the Arduino can be found to be Very inexpensive on EBay.

Arduino DCC Controller Sends DCC signals
Arduino uno & shield board
LMD18200 Heat Sink
IR Receiver module
I2C LCD Display
Two Pin Terminals
?:Tantalum cap 4.7uF: ?
2: 0.01 uF cap
red led
2: 2.7k resistors

////Arduino DCC receiver.. from DCC signals
///mobile gets power from track; decoder gets power from 5V wall wart

Track power with Rectifier and regulator
LM78L05ACZXCT-ND IC REG LDO 5V 0.1A TO92-3 0.44
LM7805 is BETTER -- more power - wothout the L before 05
1N5819FSCT-ND DIODE SCHOTTKY 40V 1A DO41 0.50
1N5819-TPCT-ND DIODE SCHOTTKY 40V 1A DO41 0.39
DF005M-ND RECTIFIER BRIDGE 50V 1.5A 4-DIP 0.45
P5149-ND CAP ALUM 22UF 25V 20% RADIAL 0.20

Digikey example parts A 5 Volt wall AC adapter powers everything.
160-1791-ND OPTOCOUPLER HS LOGIC OUT 8-DIP [6N137]or[1N4148] 0.73
1N4152 ... 1N4148 or ? DIODE
3 493-5914-1-ND CAP ALUM 220UF 25V 20% RADIAL 0.38
3 445-8421-ND CAP CER 0.1UF 25V 10% RADIAL 0.29
BC1018CT-ND CAP CER 270PF 50V 5% RADIAL 0.35
CF14JT10K0CT-ND RES 10K OHM 1/4W 5% CARBON FILM 0.10
CF14JT5K10CT-ND RES 5.1K OHM 1/4W 5% CARBON FILM 0.10
RES 1k ohm
Don't use lower Voltage Caps than 25V.
Most any Schottky diodes will work that can handle at least 400 ma.

Inside the optocoupler is a photodiode (like a LED) that turns on for half of the symmetrical (excepting pulse stretching) DCC signal. The resistor limits the current to the photodiode since the DCC signal switches fom +14 to -14 Volts (or close). The external diode is a fast switching diode which protects the optocoupler LED when the DCC signal is reversed. The LED can't handle the reverse voltage present in the DCC signal. The small capacitor (270pf) together with the resistor acts as a low pass filter, reducing the high frequency noise to the fast optocoupler, often found on the DCC bus.

---
The 1N4148 wll work just fine.. Remember that the 1N4148 's purpose to to protect (read limit) the reverse voltage of the Optocoupler diode. This happens because when the Optocoupler LED is reverse biased the 1N4148 is forward biased limiting the voltage across it and the Optocoupler LED to about 0.6 Volts. A visible LED will likely work here too. The Optocoupler LED will protect the visible LED in similar fashion.

arduino pro mini nano
tap power to RAW and the sketch runs correctly. VCC on the side of the Pro Mini is the output side of the voltage regulator. Inputting power to VCC is not advised as you are going around the safety features... Do so only with a KNOWN 5 volt source (or 3V for the 3V version) - at your own risk.

arduino pin 0 and 1
You can use those pins as GPIO when your sketch is running so long as you recognize that they will be set up as serial I/O during the initial bootloader period after reset. That means the TXO pin will be set up as an output with a high value by default, and the RXI pin will be in input mode with the internal 20-50K ohm pull-up resistor connected. If your projects use of the RXI pin causes it to change from the high state during the bootloader period, the bootloader will likely interpret that as a command from a programmer and attempt to interpret it. An unfortunate sequence of state changes on the RXI pin could keep the Pro-Mini in bootloader mode and your sketch would not run.

arduino pin A6 and A7
It is one of the vargarities of the Atmel mega328P processor that all pins can be used as digital outputs except pins A6 and A7, which can be analog inputs only.

ll icon lr icon
Copyright 1991..2015 by Ivan Lee Herring