Here is each variable broken down-
V = Voltage (measured in Volts (V), just like you see on batteries)
I = Current (measured in amps (A), or milliamps (mA), 1 Amp = 1000 mA)
R = Resistance (measured in Ohms (?), 1 Ohm = 1 volt / 1 Amp)
Now we can apply this to our problem. In the helmet example I have six resistors all rated at 20 mA. So we know our voltages (of the battery and the LEDs) and current requirments so we just need to find out what R is in the equation above. With a little algebra we get-
R = V / I
Now you might ask what value for 'V' do I use. In Ohms law you need to use the voltage drop
in the circuit. This means the voltage the battery supplies minus the voltage the LEDs require. That's easy enough but hang on, the LED's have two different voltages (red = 2.4 V and white = 3.4 V)! Well shoot, I'll just average what the LEDs ask for and call it good-
(3.4 +2.4) / 2 = 2.9 Volts
The only other bit need is the current. This is easy, just add up the current values (I) for each LED. Handy for me they were all 20mA-
6 * 20 mA = 120 mA
In order have the units match up right the current needs to be in amps, not milliamps. This is an easy fix, just divide the millimamp value by 1000.
120 mA / 1000 = 0.12 A
Now we are ready to plug all this into the rearranged Ohms Law-
R = (3.7 V - 2.9 V) / .12 A
R = 0.8 V / 0.12 A
R = 6.667 ?
Since the resistors are not made for every single possible value a resistance can be, its ok to use something close by. Generally, a resistor rated up to 10% over your calculated number is acceptable. Perfect, I'll just hook up a 3.7 volt LiPo battery with a 6.8 ? resistor and I should be just fine...right? Well here is what happened-
First try lighting the LEDs...what the?!
off you notice only three of the six lights are on and only the red
ones. That's strange. Remember when doing those calculations I assumed the average voltage drop for all the LEDs? By doing that I dismissed the fact that the two types of LEDs have different resistances. In electronics, the power (current) will take the path of least resistance. Just like it's easier for the water to rush out of the hole in our pool then to hold itself together inside the pool. From the picture it seems the red LEDs have a lower resistance then the white ones. To know for sure we look at Ohm's Law again-
For the three white LEDs-
R = V / I
R = 3.4 V / (3 * 20 mA)
three LEDs at 20 mA each
R = 3.4 V / 60 mA
R = 3.4 V / .06 A
remember we have to use amps for the equation to work
R = 56.667 ?
For the three red LEDs-
R = V / I
R = 2.4 V / (3 * 20 mA)
three LEDs at 20 mA each
R = 2.4 V / 60 mA
R = 2.4 V / .06 A
again, we need the current in amps for the equation to work
R = 40 ?
As we expected, the resistance was lower for the red LEDs then the white ones. So how is it possible to light both sets up? We'll need two resistors, one for the red set and one for the white set so that the battery detects the same power request from both sets of LEDs. Since the power will be flowing from my battery, to the white LEDs first then to the red ones, the resistors can be in line and I don't need two separate circuits (see the pictures below). Here is what happened on the second try-
Now we're talkin!
That's exactly what I was going for. It's a little hard to see exactly how this is set up, here is a diagram that is showing how its all wired together (I'll use a bigger battery for the actual usage, this picture was just easier to use)-
The parts and wiring
This is what an electronics diagram would look like if you drew out this circuit with the proper symbols for each part -
Ahhh!! What is that?!
You can see the LEDs have an icon that looks like a little arrow (the D1s and D2s). This is because the power can only travel one direction through the LED, all electronic 'diodes' act in this manner. LEDs come from the factory with one long leg and one short one (see this on the 'parts and wiring' picture?). The positive side of the battery (usually the red wire if it has a wire lead) needs to be hooked up to the long leg of the LED. You can see this on the battery in the diagram (BAT1), it has the + and - near it. If your LEDs aren't lighting up, check this first! The little squigely lines are the resistors (R1 and R2) and the straight black lines will be wires/connections. It's also nice to have red and black wires when you are connecting the parts...helps keep things straight.
...and they put him back together again...
Now that we have all that settled here comes the fun part, adding the LEDs to the helmet! I wanted this to be as low profile and as light as possible. Here is all the hardware I chose-
All the parts
As well here are links to all the parts on the SFE website (in case you want a closer look of course)-
You'll also need some hook-up wire
to connect the boards together.
I decided that it would be good to have a switch as well so that I could turn the lights off, say if I was riding in the daytime. Doing this changed my circuit drawing a little-
The circuit diagram
You can see the new component in the green outlined box. Having this blue print really helps keep things straight when you actually start putting things together. The different colored outline/boxes/curves in the above drawing will be different PCBs with the enclosed components on each.
Next I laid out where on the helmet where the different parts would sit and sketched out where the wires would go. I even went as far as holding the little PCBs on the helmet and tracing out their sizes-
You can kinda see the white marks
Next I took an old soldering iron tip and melted little notches in the styrofoam for the wires and boards-
The power of an old soldering iron!
This made measuring the wire to fit much easier. Which I did and had set to the side. As I made one board, I soldered the wire segments to it before I started on the next PCB.
Next up was soldering the battery connector, first resistor and switch to the first PCB (the green set in the wiring diagram). I kinda shot myself in the foot here picking such small components. Soldering all these little bits together on such a small board was a challenge, I actually had to re-do it once 'cause I melted the JST (battery) connector-
The front of the switch board...
...and the back of the board
To solder these parts together I referenced the wiring diagram quite often. I made sure to connect where the red (positive) lead of the battery plugged in, out the same leg of that connection on the connector to a resistor, then to a red wire coming off the board. Then I connected from the pin on the connector that connected the black (negative) battery wire to a black wire coming off the board.
Next on the blue print is the red box. For this set I took the green PCB and cut it in half since there were only going to be three LEDs on it-
...and the back.
You can see this looks very similar to the wiring diagram, a good example of hooking the LEDs up in parallel with solder.
Now on to the last PCB, the purple outlined box on the schematic. This one was a little tricky since there needed to be a resistor as well-
Next I mounted the battery. I decided to use Dual Lock
, a 3M product. This holds like no bodies business and doesn't get twigs and pine needles stuck in it like regular Velcro does.
The battery in place
The Dual Lock
Once I got all the boards mounted, wired together and checked to make sure they were working (ie flipped the switch), I hot glued all the wires in place to keep any hungry sticks at bay during my bomber night time down hill rides-
The wires hot glued near the switch circuit
And that wraps up this edition of making LEDs turn on, if you follow these simple instructions step by step they won't let you down