Step 2The Laws (of electronics)
The first law of interest states that the total voltage across any series of connected components in an electrical circuit is equal to the sum of the individual voltages across the components. This is shown in the main diagram below.
This is useful when using LEDs because your average battery or microcontroller output pin will never be exactly the right voltage to run your LED at the recommended current. For example a microcontroller will typically run at 5V and it's output pins will be at 5V when on. If you just connect an LED to the output pin of the micro, you'll see from the operating curve in the previous page too much current will flow in the LED and it will get hot and burn out (probably damaging the micro as well).
However if we introduce a second component in series with the LED we can subtract some of the 5V so that the voltage left is just right to run the LED at the proper operating current.
This is typically a resistor, and when used in this way is called a current limiting resistor. This method is used very commonly and leads to what is called 'ohms law'....so named after Mr Ohm.
Ohms law follows the equation V = I * R where V is the voltage that will appear across a resistance R when a current I is flowing through the resistor. V is in volts, I is in amps and R is in ohms.
So if we have 5V to spend, and we want 1.9V across the LED to get it to run at 20mA then we want the resistor to have 5-1.9=3.1V across it. We can see this in the second diagram.
Because the resistor is in series with the LED, the same current will flow through the resistor as the LED, ie 20mA. So rearranging the equation we can find the resistance we need to make this work.
V = I * R
so
R = V / I
substituting the values in our example we get:
R = 3.1 / 0.02 = 155ohms
(note 20mA = 0.02Amps)
Still with me so far...cool. Now look at diagram 3. It has the LED sandwiched between two resistors. According to the first law mentioned above, we have the same situation at the second diagram. We have 1.9V across the LED so it is running according to it's spec sheet. We also have each resistor subtracting 1.55V each (for a total of 3.1). Adding the voltages together we have
5V (the microcontroller pin) = 1.55V (R1) + 1.9V (the LED) + 1.55V (R2) and everything balances out.
Using ohms law we find the resistors need to be 77.5 ohms each, which is half the amount calculated from the second diagram.
Of course in practice you'd be hard pressed to find a 77.5ohm resistor, so you'd just substitute the nearest available value, say 75ohms and end up with a little more current in the LED or 82ohms to be safe and have a little less.
Why on earth should we be doing this resistor sandwhich to drive a simple LED.....well if you have one LED it's all a bit silly, but this is an instructable on charlieplexing and it comes in handy for the next step.
| « Previous Step | View All Steps | Next Step » |
![]() |
Add Comment
|















































