This page last updated: December 21, 2012 as of January 2015
- Command station... There can be only 1. Experimental Command station is used for experiments - off from actual train DCC.
- Decoder... Mobile and Stationary : too large to be used as actual locomotive decoder.
- Loconet... (YES anything here is understanding that Digitrax IS DCC)
- Command station...
- Experimental command station is built from the links below...
- Funny thing is : it uses an IR device to control it... I got those already. Then it sends commands onto the rails.
- Decoder(s) are built from the links below...
- geoff-bunza Dr Geoff blog has detailed instructions for building decoders, their code, and projects they are used for
- mrrwa is the Sourceforge site for the code
- Mobile... gets the power and info from the rails
- Athearn crane... Dr Geoff actually uses commercial decoders to drive the motors, lights, and sounds
- Army gun car... servos open the doors and swing the guns out
- The board is kinda large - use to power things from inside a boxcar... open doors, people wave, cargo dispensed...
- Only 3 wires got to the Arduino Power, Ground, and Command, so the board could be divided into 2 'parts' Power-Command and Arduino-servo-motor-light-driver ...
- Use as an alternate Arduino for the Mobile Missiles, etc...
- Stationary... powered by 5 Volt supply, gets DCC info from the rails
- RR crossing... Dr Geoff blog has detailed instructions for building
- Commands can be sent by JMRI... So a computer can run the train and all the switches
- switches : Arduino drives a servo to toggle the switch...
- Experimental Loconet is built from the links below...
- Arduino_Loconet... building instructions and code ... there is a bare board for sale - tho no link on how to get it... having 10 made to get 1 seems like a long way to go.
Notes from geoff-bunza and the net
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
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.
Copyright © 1991..2015 by Ivan Lee Herring