SimplyTrains - The Premier Online Model Rail Site

Layouts     /     Hints & Tips     /     Links     /     Shopping Mall     /     Books & Videos     /      Contact Us


LIGHTEN UP YOUR LAYOUT WITH SOME LEDS

Some simple projects you can build.

Level of skills required;

Ability to identify, assemble and solder electronic components onto Vero board. Use a Volt meter (multi-meter). No special tools or test equipment required. All components are readily available from electronic retailers. All parts are fairly robust. Construction is fairly simple and there is every chance it will work first try for you. ie Low risk.

STOP!!

If you are unsure about electronics consult a qualified electrician.
This website cannot be held responsible for any electrical diagrams or mistakes on this site, we strongly advise you to consult a qualified Electrician.

The project is in two parts.

Step 1 requires the making of a dual voltage power supply ie A power supply that will supply Positive going 7.5 Volts, Negative going 7.5 Volts and a common reference Zero volts (Ground if you like). This only requires some 20 components, a transformer and a box to house the assembled bits.

Step 2 is to make a circuit board with five or six infra-red detector circuits on it using some 555 timer ICs and some resistors.

What am I trying to do?

Most of us are pretty familiar with LED (light emitting diodes) by now. They turn up in signals, loco headlamps, position indicators, warning lights etc etc. They have the great advantage that they are relatively cheap. Easy to use. Come in a wide range of colours and don’t generate heat.

A particularly useful LED is the Bi-Polar or Bi-colour LED. These usually provide a red or green light depending on the direction of the current flow through the LED. They come in two flavours;

a - a two terminal device, which I will be referring to in the following articles and

b - a three terminal device which has a common anode and requires a positive voltage to be applied to either if the other terminals to produce a red or green light. This latter type is NOT generally useful in the projects I will be describing.

On my layout I have some hidden sidings and I would like to know which way the turnouts have been set and whether any particular sections of the sidings are occupied. I have a control panel which includes a track schematic and I would like to have Bi-Colour LEDs, inserted in the track schematic, to tell me what is going on. ie. Which way a turnout is operated and whether a siding is occupied.

FIG.1 shows how I would like this to look.

Turnout Indicators

If your point motor has auxiliary change over contacts (such as a Peco point motor contact assembly or the larger NJ International point motor or Fulgerex type) you can insert a Bi-Colour LED into your track plan and use the contacts to switch current to the LEDs.

FIG. 2 is a typical circuit. Note that it only requires a single changeover contact (which is usually all that is available), two LEDs and two resistors. One Led will be Green and the other Red. When the contact changes over the current flow reverses through the LEDs and they will change colour. Pretty simple Huh?

However you will also notice that we require a Positive voltage and a Negative voltage and a common ZERO reference. This means that we have to build a suitable power supply! It’s not hard. You can do it and you will need it for the detector (occupancy) circuit we will build later. In any case you will get a neat DC power supply that could be used for powering other devices on your layout.

There are nearly as many power supply circuits as there are designers. FIG. 3 gives a typical power supply I built. It uses the 7805 (5 Volt Positive output) and the 7809 (5 Volt Negative output) voltage regulators. They are readily available and will supply up to about 1 Amp before they quit. That is a lot of LEDS. Unless you have a huge layout this should be ample. The power supply can be built up on Vero board inside a suitable metal box.

ALWAYS CONSULT A QUALIFIED ELECTRICIAN

Once you have built the power supply you can use it to power Bi-Colour LEDS for your turnout indicators or any other application that your imagination devises.

I used a transformer with a single 7.5 Volt A/C secondary. It is more likely that you will have a transformer with two 6 Volt secondaries. Determine what the common terminals are and use one six volt winding for the Positive side and the other six volt winding for the negative side. The common A/C point becomes the zero volt reference point. This has the advantage of giving you some 12 Volts A/C which you can rectify with a WO4 rectifier bridge and use it to power the Infra-Red emitters we will build for the occupancy detector. Nothing goes to waste.

Now for the occupancy detector.

This utilizes an infrared emitter and detector suitably located to show if a loco or wagon is standing on some pre-determined part of your hidden sidings. The idea is that the presence, or absence, of such a wagon will cause a Bi-Colour LED to change colour thus giving a positive indication on your track schematic. Just like the turnout indicator in FIG 1 does.

A simple circuit that can do this is to use an infrared emitting LED and a matching detector to operate a relay which, via a changeover contact, will reverse the polarity applied to a bipolar LED. See FIG. 2. This arrangement is suitable for one or two circuits, but even using the cheapest available relays, will quickly become expensive. Troubles may arise in obtaining reliable operation of the relays and, as each relay draws some 50mA to 80 mA of current, total DC current consumption also has to be considered.

There exists however, a cheap, robust, solid state relay, known as a 555 timer. This is actually an integrated circuit (IC) and is capable of many applications. The 555 timer IC is one of the most versatile integrated circuits made. Books have been written about its applications. It is available as an 8 pin or 14 pin chip. The latter is known as a 556 and is simply two 555 timers encapsulated in the one chip.(a four in one chip has also recently become available). It can operate from 4.5V to 16V DC (Vcc). Its output can source (supply) or sink (absorb) a load current up to a maximum of 200 mA and so can directly drive loads such as relays, LEDs, low power lamps etc. When used in the 'timing' mode, the IC can readily produce timing periods variable from microseconds to several hundred seconds. (grade crossing flashers?

ALWAYS CONSULT A QUALIFIED ELECTRICIAN

We are going to make use of one of the 555's simplest applications which is called a Schmitt trigger. This is a circuit arrangement whereby a device will switch (change state) each time an input voltage rises past or falls below two predetermined values. In this case 2/3 Vcc and 1/3 Vcc. When used as a Schmitt trigger the 555 IC behaves as a relay with a single changeover contact. It is this latter characteristic that is exploited for this application.

FIG. 4 shows the 'as built' connections to a 555 IC to make all this happen. This could be called a minimalist circuit as, excluding the infra red source, there are only four external components. The actual switching inside the device is performed by transistors but, for explanatory purposes, imagine that it contains a relay coil and a changeover contact. The 10V supply voltage comes from the dual voltage power supply and the LED load is connected between pin 3 of the 555 IC and the Centre Tap (zero volt point) of this supply. Thus, the direction of current flow through the LED will depend on whether the load (pin 3) is connected to +Vcc (pin 8) or Ground (pin 1). In either case 5 Volts, Positive or Negative as the case may be, is applied across the LED and R2. R2 is selected to give an 'average' current through the LED so that the red is not too bright, nor the green too dim. About 15mA to 20mA will be about right.

Switching of the output is obtained by raising and lowering the voltage applied to the Trigger input (pin 2) and the Threshold input (pin 6 which is tied to pin 2). ie. The input voltage has to alternately exceed 2/3 Vcc and fall below 1/3 Vcc. The infrared photo-diode D1 does this trick. When the diode is illuminated with infrared from a complementary infrared emitting LED . (or an incandescent lamp) it will conduct. This lowers its internal resistance to only a few Ohms and effectively applies Ground (pin 1) to the trigger which in turn will switch the output (pin 3) to Ground at pin 1 (remember that this 'ground' is 5V Negative with respect to the power supply centre tap). Current will pass through the LED which should, of course, emit green light. When the infrared beam is interrupted, by a car or a loco, the photo-diode D1 will cease to conduct. Its internal resistance will now be very high and Vcc (Positive Voltage) will be applied, via R1, to the input trigger. This will cause it to switch the output to Vcc pin 8 (which is 5V Positive with respect to the power supply centre tap). Current through the bipolar LED will now be reversed giving lots of red light. If the LED does not cooperate, reverse the connections to it. It is also necessary to connect pin 4 to pin 8 (Vcc). Pins 5 and 7 have no connection in this configuration.

It is worth noting that the 555 IC actually has two outputs. Pin 3 and pin 7. With a little tinkering, these outputs can be connected to logic chips to achieve, other, interesting results but this is way beyond the scope of this project.

Electricity is dangerous, always consult a qualified Electrician.

The IR detector is wired up as a Schmitt trigger. Terminal 3 (the output) is switched between terminal 1 (-5 Volts or ground in IC chip speak) and terminal 8 (+5 Volts or Vcc). This means that current flows in either direction through the LED. Thus giving green or red depending on whether or not the IR receiver is conducting (low resistance) or not (high resistance).

Note that pin 7 is also an ‘output’ and could be used to drive another device or a logic chip.

I advise buying the IR emitter and receiver as a ‘matched pair’. This may mean a different dropping resistor to suit the emitter’s characteristics

I built my prototype on a section of matrix board (Vero board). The photograph gives details of the layout and accompanying hardware. A printed circuit overlay, would greatly simplify construction. I used two 556 and one 555 ICs to give me five circuits. Five circuits were chosen as I wished to use ribbon cable (NOT rainbow cable) and insulation displacement plugs and sockets. A ten way (five pair) plug or socket can be safely and reliably compressed in a vice. Larger sizes require a special and expensive tool for the compression process.

The use of ribbon cable and insulation displacement plugs and sockets is something of a boon. The computer people have been using it for ages, and if you have any trouble identifying some of the items I have described, your local, friendly, computer shop should be able to help. Forms can be made up on the workbench. The two way header sockets (which also come in a range of sizes from two wire to at least ten wire) can be terminated by hand, using a prototype tool manufactured by Panduit. Thus a lot of soldering, which can be fatal to LEDs, is eliminated (hooray). The LEDs plug nicely into the two pin header sockets and if you have an inadvertent reversal in your wiring it is easily corrected with a flip of the plug.(or socket). Voltage drop should not be a problem on the average size layout.

The source of the infrared is up to you. I used infrared emitting diodes that matched the photo-diodes. This is fairly important and you should consult with your component supplier to get this right. Alternatively you could use incandescent lamps such as a flashlight bulb. This may be more reliable if you are transmitting over more than about 2 to 3 inches. If you use infra-red LEDs, remember that they need about 70mA, or even more, to be effective. This will soon load up your 12 Volt supply so remember to do some addition when you are designing a large installation.

ALWAYS CONSULT A QUALIFIED ELECTRICIAN

So there you have it. Building the prototype on the matrix board, was probably the hardest part. I guess that I spent several weeks overall on the construction and research. The latter being almost as rewarding as the construction. The power supply was the easiest to build. It went together on a Sunday. The detector system took a little longer as I got my head around the layout I needed on the Vero board. The equipment has been operating on my layout now for several years. There have been no failures.

What next?

Like a lot of us I use Peco, Electrofrog, turnouts on my layout and operate them with Peco point motors. Like all of us though, I am continually frustrated with the electrical connection between the running rails and the point blades which is essential to getting current through the blades to the frog. If you have a main line with two, three or four sidings feeding off it then there are two, three or four point blades, in series, that have to pass current to the last siding. Not conducive to good running. Literally. One answer, and usually a good one, is to use a Peco Point Motor Auxiliary contact set and switch the frog via the contact set. Nothing wrong with this but it does load up the point motor and can sometimes interfere with its operation. I might also want two contact sets. ie. for signals perhaps. Some modelers fit micro switches but this means fabricating brackets etc. and retrofitting may be difficult.

I also use a Capacitor Discharge device to operate my turnouts with current being fed through a diode matrix to operate, as required, two or more point motors at one time. If all these point motors have auxiliary contact sets on them it is a big ask. If I increase the power of the CD unit to drive a number of point motors the discharge causes a single point motor to go off like a rifle shot.

What is required is a circuit that will detect the Capacitor Discharge thunderbolt, remember the event and pass the signal on to a relay. This will eliminate a lot of those auxiliary contact sets and promote better running.

If there is enough feedback on the above circuits I will publish such a circuit in a later edition.


Once again many, many thanks to:

Roger John Henry

feel free to email with comments or questions.

ALWAYS CONSULT A QUALIFIED ELECTRICIAN


Copyright © 2003 SimplyTrains