Project
LED Resistor Calculator
Mark V. Dobrosielski mdobrosielski@ieee.org
Circuit characteristics
Parameter Value
Vbatt 5.0
Vled 1.9
Iled(max) 2.0
Iled(min) 2.0
# leds/branch 1
# branches 1
V Battery voltage
V LED forward voltage
mA Max desired LED current
mA Min desired LED current
# LEDs in series
# LEDs in parallel
Calculated (ideal) I & R values and suggested (real) resistor values
Parameter Value
Rf(ideal) 1550.0
Rv(ideal) 0.0
Imax(ideal) 2.0
Imin(ideal) 2.0
Rf(real) 1600
Rv(real) 0
ohm Calculated fixed resistor value
ohm Calculated variable resistor value
mA Max current using calculated resistor values
mA Min current using calculated resistor values
ohm Corresponding "real" fixed resistor value
ohm Corresponding "real" variable resistor value
Calculated circuit performance using selected resistors
Parameter Value Tolerance
Rf 1600 ohm 5.0 % Selected fixed resistor value & tolerance
Rv 0 ohm 10.0 % Selected variable resistor value & tolerance
Imax 2.0 mA Max current using selected resistors with worst-case tolerance
Imin 1.8 mA Min current using selected resistors with worst-case tolerance
Ibatt 2.0 mA Peak current battery needs to supply
Pf 0.01 W Power dissipated by fixed resistor at peak current
Pv 0.00 W Power dissipated by variable resistor at peak current
six LEDs.) The calculations are still
simple; you just have to do them a
bunch more times. That gets tedious
and that's exactly when people tend to
make mistakes.
To beat the tedium and the mistakes
that go with it, I've put together an
Excel spreadsheet that performs all
the necessary calculations — including
looking up "real" resistor values. It's a
real time saver!
Using the
Spreadsheet
you only have to do it once, but what if you want to see the
effect of different resistors in the circuit? What if you have
an array of LEDs and you want to determine the best way
to hook them up? (Figure 4 illustrates four ways to connect
The spreadsheet (available on the
Nuts & Volts website at www.nuts
volts.com) is broken down into three
sections. The first section, Circuit
Characteristics, is where you enter
your circuit parameters. The second
section, Calculated I & R Values and
Suggested Resistors, calculates the
needed resistor values and suggests
"real" resistors to use in the circuit.
The last section, Calculated
Performance Using Selected Resistors,
lets you plug in resistor values (the
suggested values or values of your
own choosing) and calculates LED
currents, power supply currents, and
resistor power dissipation. It also takes into account
resistor tolerance. Note: Values in blue boldface are
the only ones you should change. Plain black text
shouldn’t be changed. NV
Figure 5. View of the spreadsheet.
F
o
r
E
l
e
c
t
r
o
n
i
c
s
NUTS & VOLTS
E
v
e
r
y
t
h
i
n
g
Order online at:
www.melabs.com
Development Tools for PICmicro MCUs
microEngineering Labs, Inc.
Phone: (719) 520-5323
Fax: (719) 520-1867
Box 60039
Colorado Springs, CO 80960
grammer
ro
ble
Optional
USB Adapter
52
JANUARY 2005