Skip to main content

LM317 circuit

The LM317 is a very useful device for producing specific voltages for your layout.
 
You can buy it as a 3 pin device and by adding a few capacitors and two resistors you can set the output voltage to between 1.25 volts below the incoming supply voltage and 1.25 volts higher than ground.

The ratio of the resistors determine the output voltage based on the following formula.

 V out = 1.25V x { 1 + R2 / R1 }

The Output voltage is also affected to a small extent by the current flow in the adjust line.
Resistors are normally 5% tolerance so producing an exact fixed voltage can be problematic. It's for this  reason that one of the resistors is normally made a variable one to enable fine tuning.

You can make these yourself on a piece of strip-board,  but given the costs involved it is much cheaper to obtain them as a  built module.



I bought some warm white LED's which theoretically operate in the 3.0 Volt to 3.2 Volt range. Using the LM317 module I could set the voltage to 2.9 Volts to achieve a very pleasing almost gaslight effect. 

A word of CAUTION.  I used my Bench Supply with current limiting to establish the desired voltage on the LED. I then adjusted the LM317 module to provide the required output voltage before connecting things up on the layout.

Andy R







Comments

Popular posts from this blog

Train sequence / timetable using Arduino

                              Following discussions in a MERG Zoom meeting about potential projects for the Cumbria virtual area group I have started this blog to share my ideas for building a train sequence / timetable system based on an Arduino UNO. The trigger for this project was Andy Robb's article in the MERG journal (June 2020 edition). In it Andy describes using an UNO with a OLED display to produce an electronic station display board.  Having tried out Andy's version I started thinking about expanding the idea and have come up the following list of possibilities: 1. Replace my card index train sequence with an electronic version. 2. Have the train sequence synchronised with the on platform displays. 3. Display an analogue clock on the station display and have it display the train times. 4. Store the position reached in the sequence so that it starts where it left off on power up.  To mak...

Push button Ezypoints

 A few months ago I produced a batch of Ezypoint kits for our local members to overcome a shortage in the Kitlocker.  At that time the kit was produced on stripboard which some members find problematic. An additional PCB board normally available from MERG was not available either.  Alan Turner ( the PCB designer) had only a few boards available but graciously provided me with the gerber files to allow me to order PCBs directly from China . Having sourced all necessary components, the kits were duly made up. I find this simple kit is really useful for automation projects. A toggle switch provides either a HIGH or LOW on the PIC input pin to determine which of the two servo positions is selected. For a particular application, I wanted to use a push button to toggle the position on alternate presses of the button. This involved a rewrite of some of the code in the PIC. I initially developed the program using an Arduino as a means of testing the logic. When this was successfu...

Cumbria Group Meeting Friday 9th October

 Although this was only a coffee and chat meeting, eleven members joined us for an interesting session which basically covered what was on our workbenches. Some members suffered from technical gremlins on the Zoom session but hopefully they will have that sorted for next time. Andy Woolass had volunteered to be a guinea pig for building the latest version of an EzyBus Input Module. It was a fairly straightforward build but the lack of sufficient ground points for external connections was a suggested improvement. The original Input board which used an MCP23017 Module was originally supplied by Davy Dick for £2. Members trying to build their own using a provided PCB, sometimes fell foul of the different form factors of this Module which caused obvious fitting problems. It is for this reason the PCB has been redesigned to accept a more standard 28 Pin DIL device. The Kit will be available in the Kitlocker, but at £7.20 it is a little expensive. Various members showed Arduino developme...