Warning: Use of undefined constant e - assumed 'e' (this will throw an Error in a future version of PHP) in /home/hackspace/pmwiki-master/pmwiki.php(470) : runtime-created function on line 1

Warning: Use of undefined constant e - assumed 'e' (this will throw an Error in a future version of PHP) in /home/hackspace/pmwiki-master/pmwiki.php(470) : runtime-created function on line 1

Warning: Use of undefined constant e - assumed 'e' (this will throw an Error in a future version of PHP) in /home/hackspace/pmwiki-master/pmwiki.php(470) : runtime-created function on line 1
Swansea Hackspace | Tutorials / CurrentLimit
Login - Register -

Current Limiting Resistors

When using an LED the amount of current through the device controls how bright it is, but unless controlled the LED will draw more current than it is rated for, will damage itself, and probably the device it is pulling from (eg a microcontroller) as well.

To control how much current, and thus which brightness our LED is, we use a resistor.

This circuit uses the fundamental Ohm's Law

e

The voltage across the resistor will be Vcc minus the Forward Voltage (Vf) of the LED, the amount of current to allow should be selected such that it is below the maximum the chip can supply, and below the maximum the LED can sustain.

From the PIC16F1544 data sheet we can see that a single pin can source or sink 25mA, and from the LED datasheet we can see its Steady Current is also 25mA. Also from the LED datasheet we get Vf of 2.2V, and our chosen Vcc is 5V. We will choose a moderate current below that limit, say 15 mA.

So if we rearrange the formula V=IR to find R then we get e

In this case that is: e

Which gives us a suggested R of 187 ohm.

Resistors only come in certain values, so we will pick 220 ohm as a convenient approximation.

- Last change October 29, 2013, at 10:22 PM
- Registered in England and Wales 08777436