The Rusty Spike

A Railroad Fan's Website


Completion: 1:24 Model of a Whelen Liberty Lightbar

And that’s a wrap. Well, almost. I need to bump up the amplification on the headlights and decal the model, but other than that, it is finished! The entire point of the exercise was a proof of concept on an accurate modern emergency vehicle lightbar, and boy oh boy did I learn a lot along the way. I’ll list those things after the video.

As the prototype of what is sure to be many incarnations to come, I dub this ’07 Ford Shelby GT500 my ‘Demonstrator‘! Please ignore the 8xAA battery pack on the side. Normally, this car can be powered by a 9V that fits nicely into the engine compartment, but I was plumb out of 9V batteries. Yes, there’s some in the house smoke detectors, but Murphey’s Laws have taught me a thing or two, so I left those 9Vs where they were 🙂 Anyways, using a 8xAA power supply tested the circuitry against a 12V source, so it’s all good! Enjoy:

Demonstrator: 1:24 Model Whelen Liberty Police Lightbar from claymore1977 on Vimeo.

Read More


Chasing Lights (74HC595 Register + TI Launchpad)

Okay ladies and gents, here’s a Chasing Light project using a single Shift Register (74HC595) and a TI Launchpad. (I’m currently following a line of research using the Shift Registers, but there is an easier way to do this with just a Launchpad alone.) It can be easily adapted for many uses. Examples include, but not limited to:

  • Theatre Signs
  • Airport Landing Strip
  • Eat At Dave’s Signs

This particular Launchpad project uses an external device called a Shift Register. Simply put, it’s a device that remembers the 1 or 0 you just put into. If you put another 1 or 0 into it, it shifts all the existing saved 1’s and 0’s over one slot and adds your newest value in. It can hold 8 values, hence the term 8-bits.

Here’s what it looks like when its all put together on a breadboard:

Chasing Lights v1.0 from claymore1977 on Vimeo.

Read More


Update: 1:24 Model of a Whelen Liberty (44″) lightbar

The lightbar project work continues!ModelWhelenLightbar-Crop01 All the proper ohm value SMD resistors *finally* arrived in the mail, and a few short evening work sessions later, the resistors are in place, dud LED light modules replaced and leads carefully soldered in… we have an operational Lightbar!

Now, the front 3 Red and 3 Blue are electrically different than the rear 3 Red and 3 Blue, so add in the working center takedown and 2 alley lights, there are 15 independent LED modules on this bar. However, the software that was on the MSP430 I hooked them up to only was written for the front 3 Red and 3 Blue only, so the bar is not flashing at its full potential…. yet!

Here’s a short video that’s a bit out of focus. I didn’t catch the focus issue when I uploaded it because it was well past midnight 🙂 Once I update the software I’ll film a higher quality version.

1:24 Model Whelen Liberty Police Lightbar from claymore1977 on Vimeo.


In Lieu of a Breadboard: PCB LED Test Harness

PCB LED Test BoardHere is a project idea for some of you. If you are anything like me and you are experimenting with an Arduino or TI Launchpad for the purposes of your model railroad, then you likely find yourself adding and removing LEDs and associated resistors to/from breadboards over and over again. So it dawned on me: Why not solder some LEDs and appropriate resistors for a 3.3V source onto a spare PCB project board and slap some headers on there? Well, since I was waiting for some parts for other MSP430 projects, I did just that!


Read More


Basic Electricity 101: DC Circuit Analysis

Now assuming that you read through Section 1, we are going to continue on trucking through Basic DC theory and apply even more realistic real world examples. Lets get it on.

Section 2.1: Series Resistive Circuits.

ALL elements comprising a circuit have resistance. Period. ALL elements of a circuit that consume power have resistance. And since resistance is the thing that converts current to heat, we need to make sure we know how to calculate where our resistence in our circuit is. Too much current flowing through a too thin a wire (thin wire has higher resistance per foot) could generate enough heat in the wire to melt it. Thankfully, working with resistance values in circuitry is not all too difficult.

To add resistances in series with each other, just add them together:

Rt = R1 + R2 + R3 + … R x

Example #2.1:


A grain of wheat bulb is rated for 40mA at 14V and you want to put three of them in series but have these questions:

  1. What is the internal resistance of each bulb?
  2. What is the rated Wattage (brightness) for each bulb?
  3. What Wattage will each bulb actually be operating at?
  4. What is overall current draw off my battery?

Lets field the first question first:

R = E / I     Ohm’s Law solved for Resistance

R = 14V / 0.040A     Value substitution

R = 350Ω     Answer in Ohms

Okay, so the light bulb has an ideal resistance of 350Ω, now we solve for the rated wattage for that bulb:

P = I * E     Power Eqn

P = 0.040A * 14V     Value substitution

P = 560mW     Answer in Watts.

Actual Wattage for the bulbs in the circuit isn’t a 1 step solution. We need Voltage applied to each bulb and current run through the bulb, which may or may not be rated voltage and current. First thing’s first, we need to solve for overall circuit parameters:

Since we know the ideal resistances of the bulbs, add them together:

Rt = R1 + R2 + R3     Series addition of Resistance

Rt = 350Ω + 350Ω + 350Ω     Value substitution

Rt = 1050Ω     Answer in Ohms

Now total circuit current(Q#4):

I = E / R     Ohm’s Law solved for Current

I = 12V / 1050Ω     Value substitution

I = 11.4mA     Answer in milliAmps

We have all the data we need to move on to Q#3, but lets calculate the voltage drop across one of the bulbs for practice:

E = I * R     Ohm’s Law solved for Voltage

E = 11.4mA * 350Ω     Value substitution

E = 4.0V     Answer in Volts

Alright, lets update our schematic with all these fancy numbers!


Okay, lets calculate the ACTUAL Wattage the bulbs will be at:

P = I * E     Power Eqn

P = 11.4mA * 4V     Value substitution (remember, its the voltage applied to the bulb, not the overall circuit voltage!)

P = 45.6mW     Answer in Watts.

Rated at 560mW, but glowing at 45.6mW…. that’s only 8% brightness! Yuck!

Section 2.2: Parallel Resistive Circuits.

Parallel Resistances are a tid bit more annoying to add together:

Rt = 1 / ((1 / R1) + (1 / R2) + (1 / R3) + … (1 / Rx))

Example #2.2:


Okay, the series arrangement of your bulbs just didn’t work the way you wanted, so now you are going to try them in Parallel but still have these questions:

  1. What Wattage will each bulb actually be operating at?
  2. What is overall current draw off my battery?

Actual Wattage for the bulbs in the circuit still isn’t a 1 step solution. We need Voltage applied to each bulb and current run through the bulb, which may or may not be rated voltage and current. First thing’s first, we need to solve for overall circuit parameters:

Since we know the ideal resistances of the bulbs, add them together:

Rt = 1 / ((1 / R1) + (1 / R2) + (1 / R3))     Series addition of Resistance

Rt = 1 / ((1 / 350Ω) + (1 / 350Ω) + (1 / 350Ω))     Value substitution

Rt = 116.7Ω     Answer in Ohms

Now total circuit current(Q#2):

I = E / R     Ohm’s Law solved for Current

I = 12V / 116.7Ω     Value substitution

I = 102.9mA     Answer in milliAmps

Here we need to take a small break and talk about how current reacts in branches of a circuit. Quite Simply, it acts much like water flowing through a piping system. On our schematic, I have labeled 3 junctions where current splits (A, B and C). Now we know that 102.9mA is flowing into junction A from the battery, but we dont know how much is flowing out of the other two branches. We DO know that the current flowing out the other two branches of the junction MUST equal what is flowing into the junction(just like water flowing through a Tee in a piping system). This is where we do individual circuit branch calculations. Lucky for us, all of our branches are the same so we only have to do it once! We need to figure out how much current is flowing through Bulb A (the leftmost one):

I = E / R     Ohm’s Law solved for Current

I = 12V / 350Ω     Value substitution

I = 34.3mA     Answer in milliAmps

Well you may have noticed that 34.3mA is 1/3 of our total circuit current of 102.9mA. Logically following, if full circuit current is flowing into junction A from the battery and 1/3 of it is flowing out the branch that contains Bulb A, then 2/3 of the current must be continuing on to junction B.

One thing to note is that the voltage is not divided at the junctions. Since voltage doesn’t ‘flow’ it can’t be split up in this fashion. Each branch of this circuit has the full 12V applied across it.

Alright, lets update our schematic with all these fancy numbers!


Okay, lets calculate the ACTUAL Wattage the bulbs will be at:

P = I * E     Power Eqn

P = 34.3mA * 12V     Value substitution

P = 411mW     Answer in Watts.

411mW is still not the rated 560mw, but its nearly 75% of rated wattage and that will be much MUCH brighter than 8% of rated wattage! The reason we will not be able to reach rated Wattage with any circuit configuration is because we are using a 12V source when the bulb is rated for a 14V source. In all actuality, manufacturers do this on purpose for exactly the case we have been calculating with. We are running our bulb at 25% less that maximum and we are likely to see 2x-3x longer bulb life because of it.

Pro/Con breakdown of our Series and Parallel examples:

Series Pro:

  • Lower overall current draw
  • Lower overall heat.
  • Simpler wiring.

Series Con:

  • Difficult to get individual loads up to ratings.
  • If one bulb goes out, all bulbs go out.(Google for
    “troubleshooting those damned Christmas lights”)

Parallel Pro:

  • All branches receive full circuit voltage and therefore can
    pull maximum available current
  • System Resillience. If one branch fails open (Not shorted)
    then all other branches remain operational.

Parallel Con:

  • Can quickly lead to incredibly complex wiring.
  • Current load can reach levels that may be dangerous for the
    gauge wiring you are using. In our example, the wires running from the
    battery would probably have to be of larger size than that of and
    individual branch.

Section 2.3: Diodes and Light Emitting Diodes (LEDs)

Alright, now on to a subject that I think is probably the most beneficial to the average model railroader: Diodes. A diode is nothing but a solid state device that allows current to flow through it in one direction but not the other. If a diode has the voltage applied to it in the proper polarity, then it is said to be forward biased. If a diode has the voltage applied to it incorrectly, then it is said to be reversed biased.

This is the schematic symbol for a diode:


The arrow represents the direction that the diode will allow current to flow, in this case left to right.

A reverse biased diode will not allow current to flow through it. Like all things electrical, this too has its limits. I had a Navy Chief tell me once, “Son, if you put enough voltage on anything, it’ll conduct. Bricks. Wood. Cats. All conductors when matched against 1 million volts (lightning).” Following true to the statement, a diode has a limit of reversed biasing voltage that it can handle before it breaks down and fails. Oddly enough, this can be VERY useful. A Zenier diode actually is designed to work this way. Zenier diodes are the key part of voltage regulators, but we will talk about them much later.

A forward biased diode conducts with very little resistance. Due to the way it is built, diodes almost always drops 0.7 – 0.9 volts. This is key to understanding how they affect a circuit and can also be a very useful feature (great for current detectors)!

Example #2.3:


In the given circuit, calculate how much current will the 10W bulb draw.

Alright, just looking at the circuit we can see that the only other component is a diode. Tracing around the circuit from the battery, we can see that if the diode drops the 0.7V – 0.9V it is supposed to, then the light drops the remaining 11.3 – 11.1. Lets assume worst case senario and the diode frops 0.9V. First things first, we need to solve for the internal resistance of that light bulb:

P = (E)2 / R     Power Eqn

R = (E)2 / P     Solve for Resistance

R = (12)2 / 10W     Value substitution

R = 14.4Ω     Answer in Ohms.

Now that we know the resistance of the light, we can solve for amp draw of the light: (remember, the light is only being exposed to 11.1V due to the 0.9V dropped by the diode.)

I = E / R     Ohm’s Law solved for Current

I = 11.1V / 14.4Ω     Value substitution

I = 771mA     Answer in milliAmps

Well lets hit the power and see if we are right:


172 microAmps!?!?! Oh wait, look at the diode. Its in backwards! Lets fix that and try again:


Well lets hit the power (again) and see if we are right:


Pretty close! Looks like this diode is dropping 0.827V instead of our assumed 0.9V and that is what caused out amperage to be off ever so slightly… but we still sucessfully illustrated how a diode functions in a dc circuit!

Example #2.4:

In this example, we explore the use of a variant of the diode, the Light Emitting Diode (LED). Functionally the same when it comes to the current flow stand point, but the amount of current that can flow through it while forward-biased is now severly llimited. A diode as described in example 2.3 can easily handle up to 2 or more amps, whereas the average LED is rated for 20mA max. That being said, one must take care to keep LED current below its limits as they are not as forgiving of overcurrent situations as light bulbs are.

Notice that the schematic symbol for the diode has changed. Two little arrows are added to symbolize light being emitted, hence, Light Emitting Diode.

Take a look at these two diagrams. Can you figure out why the first one doesn’t work, but the second one does?


I hope its pretty obvious as I tried this trick on you once already. The diode is installed backwards in the first one, but correct in the second. Lets try to recreate the numbers that the multimeters in the second picture are giving us. We need to treat the LED as if it doesnt have any resistance and ‘throttle’ current flow with a dropping resistor. Our target current flow is 20mA and we are assuming that the LED will drop 0.75V:

R = E / I     Ohm’s Law solved for Resistance

R = 11.25V / 20mA     Value substitution

R = 562.5Ω     Answer in Ohms

562.5Ω is what we need to have exactly 20mA flowing through the LED. Now LEDs are typically very bright and we also don’t like running our lights and LEDs at 100% anyways, so lets pick 660Ω resistance. (Besides, I couldn’t find any other resistor closer to 562.5Ω 🙂 )

I = E / R     Ohm’s Law solved for Current

I = 11.25V / 660Ω     Value substitution

I = 17.05mA     Answer in milliAmps

Look at that, nailed the calculation. Good job! Personally, on my layout I use 1,000Ω (or 1kΩ) resistors because it makes the math easier(12V/1,000Ω = 12mA) and keeps the LEDs at a good brightness.

Example #2.5:

Lets revisit our old friend from the DC Cab Bus days: the DPDT toggle switch. For those of you know familiar with our friend, DPDT stands for Double Pole Double Throw. 2 seperate circuits, 2 positions each. When wired a specific way, a DPDT switch can take normal 12V DC and reverse the polarity of it and was used very extensively in pre-DCC Loopback control.

Take a look at these illustrations and keep your eye on the voltmeters on either side of the DPDT as it throws:



Voltage polarity on the battery side of the switch remains constant where as voltage polarity on the other side of the switch is variable.

Now when I was wiring up my 2 light signals on my very first layout (I was 10), I said to myself, “Man, running 4 wires to each signal from my power pack is really annoying, plus all the toggle switches are putting a hole in my allowance! There has got to be a better way!” A week later it hit me, why not use a modified version of the loopback control DPDT theory:



With the switch in the control panel reversing the polarity, I can consolidate down to two wires and instead of two resistors, I only need one! Not to mention the mess of wires I helped to eliminate on the back of the signal itself. Basicly solder the opposite leads of the LEDs to each other and then I only have to run 2 wires down the mast. If it is a metal mast then you can solder one set to the mast and only have to run ONE wire down the mast. It was then when I knew that LEDs rock.

Now, granted, a sophisticated layout will not drive their signals with DPDTs, but rather with automatic circuitry, so I have devised a circuit that I call a Red Stable LED Amp (RSLA), that can take a simple on/off signal (One wire digital On/Off) from just about anything and drive a two LED config like the one above. (I’ll will post this simple circuit later)

Well I thank you all for your attention! I do not know at this time what section 3 will cover and I hope that I will get a responce either via email or Model Railroader Magazine Forums as to what else people would like to see explained. If you have any comments or improvement ideas please don’t hesitate to use the webmaster mailto at the bottom of the page.