BLOCK POWER SWITCHING MODULE

UPDATED OCT 1, 2000

SWITCH ANY ONE OF FOUR THROTTLES TO ONE BLOCK - EXPAND TO 7 OR 10 THROTTLES - EXCELLENT FOR CTC PANELS!!! ILLUMINATED INDICATORS SHOW WHICH THROTTLE IS ACTIVE !!! THIS ARTICLE IS COMPLETE WITH PIC12C508 SOURCE CODE LISTING!!!

This has to be the coolest gadget I've come up with yet!!! OK, you know when you wire up a layout for multiple throttles and you have to connect a zillion wires and no matter how much attention you pay, you ultimately screw up and have to re-trace your steps AND THEN, you finally get it hooked up right, and switching from one throttle to another causes jumps and stops? (I know Dan, keep the sentences short, right?) No more! This circuit will help to effectively "organize" and greatly simplify your throttle wiring.

This is the second in what will be a series of projects based on the Microchip PIC series ICs. Since I've bought my PIC Microcontroller Development System from Sirius Microsystems, I've been having a great time figuring how to incorporate PICs into just about everthing I own! This system demonstrates a rather simple application for the PIC, almost too simple, but the alternative is to design a system using a lot of chips, diodes and resistors which greatly impedes the ability to keep PC layout simple, small and cost effective.

The first version of this circuit was a system that controlled 4 throttles assigned to 6 blocks. Each block used a PIC16F84 18 pin microcontroller. This system was up and running in my layout, but I've recently replaced it with the system you see here. Actually there are 3 systems...a total of 3 mainline throttles and 2 switching throttles distributed in 18 blocks. The original design ended up getting a little hairy when I lost track of my ribbon cable connections, so I simplified and revised the design to what you see here.

Each module controls one block. Each block can be common rail or isolated as the system uses DPDT relays. I've designed the system to be quick to build and economical. The system uses 2 amp relays which are economical and easily available. I used RZ12 type relays which have a 2 amp contact rating with a 12 volt coil. Multiply 18 blocks by 4 throttles. That's a total of 72 relays at about $3 each. OUCH. But not really, you see, the time I saved in wiring the system to my layout was well worth the cost. After all, I do this kind of work for a living and hand wiring a bunch of rotary switches sounds like work to me. Model railroading is supposed to be fun, right? Besides, I really do like the LEDs! Shiny things are cool too. I might have been a racoon in a past life.

Another advantage of this system is that I can select a throttle directly without having to dial through other possibly active throttle positions. An LED beside each selector switch lights up to indicate which throttle has been selected. There's nothing more tedious than soldering wire in an existing layout. You have to be a contortionist to get at anything and I'm not getting any younger! All connections to the modules are made using modular screw terminal blocks. Before installing the switching assemblies, gang several of them together to save costs on terminal blocks.

I arranged my switching modules in clusters of 6. I'll indicate which blocks each of the units control after I install them in my layout. Arranging the modules in a straight line configuration saves a lot of wiring time. A friend punched the individual custom stainless steel panels on a Strippit turret press.

Here's a close up of a couple of the modules. The LEDs are green T1 3/4 types. You could use different colors to indicate area like yards, locals and mailines. I had a ton of green ones kicking around, so that's why I chose green. In retrospect, I should have used chromed stainless pan head slotted scews.

Not too much to it, huh? I hard wired my modules before installing the whole panel into my layout. The wiring's not finished yet. The relay PCB assembly is soldered to the selector PCB assembly using two 5 pin right angle headers.

All the modules are bussed together with 24ga solid copper wire. That's OK for N scale, HO would need wire a bit heavier, maybe 20ga. The two connections at the bottom rear of each module is where the block feeder wires will be attached.

Now, when you look at the schematic diagram, you're probably going to wonder how I'm controlling 4 relays with four switches and only 6 I/O lines. Microcontroller magic, that's how. It's not really all that complicated, but the source code holds all the answers. The relays are switched with a ULN2003 darlington driver. This chip eliminates a pile of transistors, diodes and resistors and all the time it takes to install and solder them.

Here's how it works...press switch #1, relay #1 activates and applies throttle #1's output to the tracks as well as giving you a lit indication of which throttle is supplying the block. Same for #2, #3 and #4. Ya plant corn, ya get corn. Can't get much simpler than that, huh?

PARTS LIST

C1, C3 22uF 16V RADIAL ELECTROLYTIC CAP
C2 .1uF CERAMIC MONOLYTHIC CAP
D1 1N4003 RECTIFIER DIODE
D2 TO D6 1N4148 DIODE
LED1 TO LED4 GREEN T1 3/4 LED
IC1 78L05ACP REGULATOR
IC2 ULN2003 DARLINGTON DRIVER
IC3 PIC12C508
K1 TO K4 RZ12 RELAY
R1 1KOhm 1/8W RESISTOR
R2 10KOhm 1/8W RESISTOR
RN1 10KOhm X3 RESISTOR NETWORK
SW1 TO SW4 OMRON 12mm KEY SWITCH
1/2" Key Caps for the selector switches OMRON
Circuit boards & dress panel Contact me

You'll be able to get a hold of most of the parts needed for these modules at DIGIKEY. The programmed PIC (PIC12C508) is available from me for only $5 each. I'll also make the printed circuit boards available this fall.

If you wish to program your own PICs, click here for the SOURCE CODE LISTING.

PRINTED CIRCUIT BOARDS

Below are the printed circuit layouts. If you copy them from this page, you'll have to scale them properly. The correct size for the SWITCH PCB is 1.4"W X 2.0"H. The RELAY PCB is 2.3"W X 2.0"H. This is my first attempt at a graphics capture. It saves the hassle of scanning the board layouts and then manipulating the scans to give a reasonable representation of the original. I sure wish I could find a half decent PCB editor with bitmap file output!

The top layout is the solder side. It is shown as viewed through the component side (mirror imaged). The next layer is the component side. You don't need to etch the component side if you wish to build this circuit single sided. Just be sure to observe the component side connections and use jumpers to restore the connections on the solder side. The silk screen shows component location and drill holes.

CONSTRUCTION

Each module takes only 15 minutes to assemble and solder. Start by installing the resistors and diodes, then the ICs and capacitors. Next are the switches and right angle headers. Finally the relays. Be sure the electrolytic capacitors, ICs and diodes are oriented as per the component placement diagram (silk screen). Use a low wattage soldering iron and rosin core solder.

Do not solder the two circuit assemblies together unless ALL parts have been placed and soldered on each board. The 5 pin headers are used to connect the two assemblies together and are inserted and soldered first to the relay board. Then engage the pins into the selector switch board. The pins will be prevented from poking through the selector switch board due to the fact the switches cover the pin holes. Engage the pins as far as they will go and then, once you're satisfied they're in far enough, solder them to the selector switch board.

If the modules are to be placed far apart from one another, install PC mount terminal blocks in each for the throttle, power and block feeder connections. If you decide to cluster them, as I have, the modules can be mounted side by side and then bussed together as in the photos above. The latter method speeds up the final wiring and allows you to have a "control center" in your layout. I'll need 3 such areas in my layout with 6 modules per control center.

I used a piece of 1/8" styrene to make a control center panel. All 6 units were mounted onto the panel with the dress panel. Two 4-40 X 1/2" screws fasten the dress panel and selector switch PCB to the control center panel.

Here's the layout for cutting your own dress panels.

The dress panels may be made of metal, plastic, wood or whatever you choose. Pick a material at least 1/16" thick for rigidity, unless you're using metal, in which case 0.030" will suffice.

 


CROSSING SIGNALS APB SIGNAL SYSTEM 1.5A THROTTLE OCCUPANCY DETECTOR TURNOUT SWITCHING
         
3A THROTTLE BLOCK POWER SYSTEM E-MAIL & ORDERING RAILROAD LINKS MAIN INDEX