Abstract: This HTML page will present the design of a DC voltage regulator that uses the DCC signal as it source. It will generate voltages suitable for powering micro-controller circuits..
Keywords: Voltage Regulators, 7805, 7808, Arduino Vin, DCC Voltages, Voltage rectifier, Bridge Rectifier, Filtering..
Audience: Model railway enthusiasts who wish to power a micro-controller from the railway tracks.
Any Model Train Layout that contains a micro-controller to perform tasks such as monitoring and control or even relaying the location of the trains will need a regulated voltage source of for example 3.3 volts, 5 volts or 9 volts. One source of this voltage will be the actual tracks that carry significant power to all parts of the layout.
This HTML page will develop a circuit that will take the DCC voltages from the tracks and generates a regulated voltage to power the micro-controllers.
The DCC (Digital Computer Control) voltages across the model railway tracks is shown below.
As shown the waveform is 26 volts peak to peak or 13volts peak. To convert the signal to DC (Direct Current) this project will use a bridge rectifier that consists of 4 diodes as shown. These come in a single package that can be mounted on a PCB (Printed circuit board). (A possible type is a DB104 with a rating of 400V and 1A) To reduce any ripples in the output voltage a capacitor is added to the circuit.
The output voltage of the bridge rectifier is found to be approximately 12.5 Volts which is close to the peak voltage of the input signal (less drops across the diodes). The next section will look at lowering the12.5 volts down to the lower voltages required by the micro-electronics.
As noted above the DCC will deliver 12.5 volts. The objective is to lower the voltage to match the micro-controller requirements. My projects use either an Arduino (UNO or NANO) or an ESP8266. All will run off 5 volts from a USB power supply although the ESP8266 uses an on board regulator to drop the working voltage to the required 3.3 volts.
The objective of this HTML page is to develop a circuit that has an input of 12.5 volts and provides an output of 5 volts.
The Arduino boards have provision for external voltage sources of up to +12 volts. The boards have circuitry that will select between the external or USB voltages. The Arduino also provides a 3.3 volt output for powering external devices. However there is a limit on the 3.3V current so with larger circuits an external 3.3 volt supply might still be necessary. (The LM3940 is a 5V to 3.3V (low dropout) that may be useful in powering 3.3V components from 4.5 to 5.5V input.)
A range of voltage regulators is covered by the number 78xx/LM340Tx(x) where xx is the output voltage. xx = 05 for a 5 volt regulator. Typical characteristics of these devices are:
Drop-out voltage (minimum difference between the input and output voltages when the device no longer regulates): 2 Volts
Maximum continuous current: 1A
Maximum power dissipation with no heat sink: 1.9W
In the final product there will be some compromises.
With a DCC voltage of 12.5V any regulator must be less than 10V if it is to meet the drop-out voltage limitation.
If a 7805 5 volt regulator is used the voltage across the regulator will be 7.5Volts (12.5-5) making the maximum
current 1.9/7.5 = 250mA before exceeding the power requirements.
The total continuous current for an Arduino UNO should be limited to less than 150mA so the power dissipation
of the regulator will not be a limitation with Arduino applications.
The design was tested using an 8 volt regulator to power a simple Arduino NANO project. The internal voltage regulator on the NANO will then drop the voltage from 8 volts to the 5V required. Note the on board voltage regulator (type UA78M05) will have a drop out voltage (2Volts?) so at a minimum a 7V regulator is required.
The voltage across the regulator will be 12.5 - 8 = 4.5 volts nominally and the maximum current, before exceeding the maximum power dissipation will be 1.9/4.5 = 420mA.
A voltage/current probe on the USB during program development indicated the current was less than 10mA so the current consumption was significantly less than the Arduino maximum and in turn significantly less than the regulator maximum.
The above photo shows a prototype board for a single track signalling. The red-amber-green leds at the top left will ultimately be the signals at the two ends of a long block of single track. The red and yellow wires at the left are wired to the DCC signal of the model railway track. The flat black chip is the bridge rectifier and the vertical chip the regulator. For high powered applications the regulator would be mounted on a heat sink. In this application it is not even warm to touch. On the lower right are two capacitors - a large capacitor to hold the charge and a smaller ceramic that has low inductance and is used to eliminate high frequency spikes.
Running up under the board are two parallel copper tracks which are the Ground and +8Volts. At the top are the links to the Gnd and Vin pins on the NANO. The NANO will generate 5volts on board. This is available 4th pin down on the right if required. The NANO also generates 3.3Volts on board. This is the second pin up from the bottom on the right and is used as the Vcc for the IR sensors in this project.
For large loads an external 3.3V regulator may be required. One solution is use two regulators - a 5V and 3.3V. The output of the 5Volt regulator will be the input to a LM3940 that will drop 5V to 3.3V.
That concludes an introduction to using the railway tracks as a power source for any electronics. The most critical thing in using the design is during hardware development to avoid shorting outputs or applying reverse bias to any components. See for example 10 Ways to Destroy An Arduino