Introduction

Welcome back to the good old days, when pop was a nickel and a kit was something that you built all by yourself. This isn’t a snap together plug and play ‘kit’. We supply the parts, show you the schematic, and make some suggestions. You build it yourself.

This is not an ‘entry level’ kit, but you don’t need a degree in electronics to put it together. If you’ve reached the point where you need this kind of circuit in your layout then you’re already an ‘advanced’ model maker and should have little trouble assembling it.

The payoff is twofold: Most important is that you can take pride in that you built it yourself, starting from scratch, with only the components supplied. Secondly, you don’t have to pay an arm and a leg to add some real pizzazz to your layout.

More stuff is on the drawing board:

Add a warning bell to the crossing lights;

Add a smoothly lowering crossing gate;

(Both will be in the same price range as this one.)

Caution: Nearly all of the components in this kit are polarity sensitive with the exception of the resistors and one of the capacitors. Connecting them backwards, even momentarily, is likely to destroy them. Likewise, connecting the circuit directly to an AC (alternating current) supply will destroy nearly everything in the circuit. (Parts and instructions for converting AC to DC are included.)

All of the pictures in this document can be copied and pasted into your PC’s photo editor so you can enlarge them if you wish, or simply click on the picture and drag one of the corners to enlarge it in the document. Be careful to keep a copy of the original .doc file somewhere so that you can always restore it to its original format.

Note: You’ll notice that aside from the 5V regulator, there are no components directly connected

to the micro’s socket, just wiring. We chose to build it without a circuit board to keep it as small as possible and to keep the cost as low as possible. You could build it on a piece of perf-board, but that would only serve to make attaching the wires even more difficult. Investing in a printed circuit board is a possibility, but wouldn’t help a whole lot as there still would be all that wiring to connect. If you alread have a 5V power supply then the circuit board wouldn’t help much. With a pre-wired harness with plugs and sockets it’d be close to plug-n-play, but the size would

make it difficult to hide and the cost would go way up.

Microprocessor Assembly

Here we’ll tackle what may be the more difficult part of assembling the heart of the project, the micro-processor anditspower supply.First, examine the I.C. socket as shown here:

Notice the little notch in the socket.This notch identifies the pin #1 end of the socket.The pins are numbered #1 thru #4 down the left side and #5 thru #8 up the right side, with pin #8 at the top and across from pin #1.Be very careful to not to get this confused when you’re looking at the bottom side, the pin numbering will be the mirror image. Always check and double check, then check still again before starting any connection.

Top View (Pins Down) Bottom View (Pins Up)

While we’re getting oriented, take a look also at the following diagram for the little voltage regulator.

The input to the regulator will be from your 12V DC source.Actually, it can be anything from just over 7V to almost 30V.It should be a filtered supply, not just rectified AC.This is not the output to the track, but should be a fixed output intended for accessories. The 12V DC supply will be connected to the Input and Gnd pins of the regulator and the microprocessor will be connected to the regulator’s Output and Gnd pins. More on this later.

First, looking at the base of the regulator and with the flat side up, bend the left-most lead downward.Be careful not to bend any of the leads right next to the device, always grip the base of the lead with a plier so that the bend is made slightly away from the device and doesn’t stress the plastic package.Nowplacethedevice along the bottom of the I.C. socket as shown here:

Again referencing the bottom of the regulator, the leftmost (output) lead will be connected to pin #8 of the socket and the center (Gnd) lead will be connected to pin #4 of the socket.The right-most (Input) lead will lie along the groove down the middle of the socket base.Solder-tack the Gnd lead to pin #4, then form and tack the Output lead to pin #8.

It’s a good idea to slide an insulating sleeve over the regulator’s input lead;hereI used some insulation stripped off a piece of wire.

There are two small capacitors included in the kit.Shown hereare the little .1µfd film capacitorin the blue package and the larger 1µfd electrolytic in the black package.Note that the electrolytic is polarized: the lead nearer the light colored stripe on the package must be connected to the low side (Gnd) with the other lead to the + side.The two capacitors are shown here positioned near where they are to be connected.

The blue .1µfd capacitor is connected to pin #4 and pin #8 of the socket, the Gnd and +5V connections for the micro.

The black 1µfd electrolytic capacitor will be connected with the negative lead (near the stripe) to pin #4, and the positive lead to the input terminal of the regulator. Orient the leads of the electrolytic cap to ensure comfortable spacing between them. Don’t trim the excess lead length yet, we’ll need that to connect the wires to the +12V and Gnd supply.

This concludes the assembly of the microprocessor module. The overall schematic is shown on the next page, showing how to connect the wiring from the track detectors and to the red LED pairs. Double check all connections before insterting the micro into the socket. Be sure to verify that you’ll be connecting to a filtered DC source between 7 and 24 volts. The circuit shown on the last page can be used to convert an AC supply to DC adequate to drive the module. (That circuit can also be used to correct an unfiltered or noisy DC source.)


Flashing Red LED assembly

Carefully remove the simulated red lamps from the crossing sign. On the (Atlas – 42200) model shown here, these were easily popped out with a small screwdriver

Notice that one leg of each of the red LEDs is slightly longer than the other. It’s a good idea to cut off still more of the shorter leg so as to make the difference even more obvious.

While the LEDs are rather rugged, it’s always wise necer to stress the leads close to the package of any solid state device. Likewise, since the package is made of plastic, use care to not to overheat it while soldering. If possible, use a clamp, needle-nose pliers or even just a clip between the device and the solder joint. In any case, make the solder joint and remove the heat quickly.

Looking at the LED from the base, hold the LED so that the long lead is at the top.Hold each lead close to the package with a small plier tip and bend the leads 90° to the right. Do this with both LEDs so that they will appear identical.

Carefully insert the LEDs into the crossing sign so that each longer lead overlaps the corresponding shorter lead. Clip the leads so that they fully overlap but do not extend beyond the device.

Solder tack the two pairs of overlapping leads to hold them in position and then connect and solder the two wires.

(Solder tacking means bonding using the smallest amount of solder possible.)

If you choose, you can twist the two wires together with an electric drill. Be careful not to get too many twists, probably three or four per inch would be sufficient. Strip off about a half inch of insulation, then pass each wire through and wrap the bare end several times around the LED lead pairs. Remember to make the solder joint and remove the heat quickly, using a very small amount of solder.

Note that with this back-to-back arrangement the LED pair is not polarized and the two black wires are interchangeable, there is no +/- wire polarity to complicate the hookup.

Clip one of the two wires somewhere below the sign base so you can insert and hide a 1.0K ohm current limiting resistor. The resistor can be inserted anywhere in the wiring that it can be conveniently hidden as long as there’s a resistor in series with each LED pair, as illustrated here.


After having built several of these, it appears as though #5 actually has fewer connections and is shown here. It has the added advantage of hiding two resistors in one place instead of hiding two resistors in two different places. The two pieces of heat shrink tubing aren’t necessary if the connections are insulated and securely positioned in plastic or other non-conducting material. (Clean modeling clay works quite well and adheres to most surfaces, although itmay eventually dry out and come loose.)

(Note: In this photo it appears as though thewiring to the fartherest LED pair is tightly twisted. This is merely an artifact caused by the low resolution.)

Notice the color coding of the 1.0 Kohm resistors, Brown – Black – Red – Gold.

Also note that although the two resistors are slightly staggered, they could be staggered still more so as to eliminate the possibility of an accidental short circuit even without being insulated.

Track Occupancy Detectors

The track occupancy detectors use an infrared light beam directed towards a compatible infrared phototransistor and so arranged that any object passing between them will block the light beam. Both the IRLED (Infrared Light Emitting Diode) and the IRTx (IR phototransistor) are made with a lens that creates a light beam on the order of 10 degrees. The infrared light is not visible to the naked eye.

In this picture the IR phototransistor is shown at the top and though it appears to be black, it’s actually dark red to block much of the visible light spectrum. The IRLED appears as having a blue tint. (Some will have a clear lens.)

Photo Transistor LED

In our circuit, both the emitter of the IRTx (the longer lead) and the cathode of the IRLED (theshorter lead) will be oriented towards the Gnd connection. The IRLED will be connected in series with a 470 ohm (yellow, violet, brown & gold bands) current limiting resistor. It makes no difference whether the resistor is in the Anode of Cathode leg.

The Anode (+) (longer lead) of the IRLED willbe connected through a 470 ohm (yellow, violet, brown & gold bands) current limiting resistor to an output pin of the micro (pin #6) via the red wire.

The collector of the IRTx (the shorter lead)will be connected directly to an input pin of themicro (pin #2 or pin #3) via the blue wire.

Both the east-bound and the west-bound detector circuits are wired identically and it doesn’t matter which is connected to pin #2 or #3 of the micro.

While the IRTx is quite immune to visible light, ordinary incandescent light bulbs only emit a small portion of their energy in the visible light spectrum with most of their emitted energy being in the infrared range. Likewise, sunlight is rich in infrared energy. The output of the IRTx will be proportional to the sum of all the infrared light reaching it and the output of a 60 watt bulb or direct sunlight can completely swamp the light from the IRLED. To prevent this, the IRTx needs to be shaded from all except the infrared light from the IRLED.

The shading need not be extreme, simply mounting the IRTx inside a building or structure with it peeking out a window or vent might be sufficient. Even better might be to press the IRTx into a half-inch length of 1/8 inch brass tubing (or something similar) and mount it inside some type of structure. (Note that light entering the back side of the IRTx will also affect the output so it’ll need to be painted or covered.)

Another possibility is show in the photo below: Here a piece of ¼ inch Plexiglas is drilled though the long direction with a .116 drill bit to provide a press-fit for the body and countersunk with a .159 bit to accommodate the flange of the device. (I used a milky type for no reason other than it was on-hand and easier to photograph.) This could probably be camouflaged with a bush of some type or hidden inside an artificial rock, etc. The milky Plexiglas does almost nothing to block the light and would need to be painted.

The IRLED lens produces a light beam sufficiently broad that aiming it isn’t critical, but the long tunnel to reach the IRTx makes it quite narrow and it’ll need to be aimed rather carefully toward the IRLED. Both devices need to be oriented such that the light beam will pass through the lower portion of any rolling stock. If they were placed low enough to where only the undercarriage could block the light then it would be quite likely that a stopped train wouldn’t be blocking the light beam and the flashers would time out with a train on the tracks. Likewise, if it were mounted too high then an empty flat-car wouldn’t be detected.

For trouble shooting purposes, a digital multimeter can be connected across the IRTx. In darkness the output will be very near 5 volts, and will range near zero volts with a strong light source. You should see a noticeable increase in the output level when the IRLED is blocked. While the IRLED is blocked, any levels less than 5 volts would be due to stray ambient light sources: passing your hand over the device will prove this. It’s not necessary to block all the stray light, as long as the level change from the IRLED can be easily detected.

Power Supply

This circuit requires a DC (direct current) power source. The little plug-in supplies are now quite common and aren’t terribly expensive. Just about any of them that have DC outputs from 6 to 18 volts will work quite well. This circuit will only draw around 30 milliamps at most and most of the plug-ins will handle many times that.

Be very careful to identify which is the positive (+) lead. Measure the output with a multimeter with the redprobe (+) to the lead that you’ve identified as the positive output and the blackprobe (–) to the other lead. (Make sure you’ve set up the meter properly, DC Volts and a range that will include the expected voltage.) If you’re correct then your meter should read the output correctly, otherwise the meter will show a minus sign if it’s a digital meter, or the needle will move backwards on an analog meter.

Note that many of the plug-in supplies will have an AC (alternating current) output. These can also be used, but you’ll have to build a little rectifier/filter circuit with the diode and capacitor that are included in the kit.

Many of the power packs for the train will include an accessory output that can be used. If it happens to be DC in the range of 9 to 18 volts you’re all set to power the circuit. Many of the older power packs had a 12 volt AC output, but all the newer ones seem to have a 19 volt AC output. Either can be used, but you’ll need a little rectifier/filter circuit to convert it to DC, as shown here.

The DC output from this circuit is capable of providing power to a number of circuits up to a couple hundred milliamps, providing that the AC source is capable of that much current as well. If you’re planning on connecting a number of this type of electronics you may want to construct some sort of distribution panels with screw terminals, etc. For just a few DC loads something like this might be adequate: