O
Oliver Dain
Guest
I'm building a project with a microcontroller where any of 8 pins could go
high and light an LED. The LEDs are rated at 0.7V and 50mA so I can't just
run the pin through the LED to ground. I could run each pin through an LED
and then through a resistor to ground to make sure I meet the current/voltage
rating of the LEDs, but this seems inefficient because I'm wasting power in
the resistors and I'll need many components. From the parts standpoint it
seems like it'd be nice to get rid of all the resistors. One thing I thought
of was using a single Zener rated at 4.3V. All the LEDs could then go to then
share the Zener which would go to ground like this:
+5----------------------------
| | |
LED1 LED2 LED3
| | |
|---------|----------|
|
zener
|
gnd
This seems like it might work, but its difficult to figure out what the
current through each LED would be and it seems like the current per LED might
change as more or less LEDs were turned on. Is there a better way to do this?
Thanks,
Oliver
high and light an LED. The LEDs are rated at 0.7V and 50mA so I can't just
run the pin through the LED to ground. I could run each pin through an LED
and then through a resistor to ground to make sure I meet the current/voltage
rating of the LEDs, but this seems inefficient because I'm wasting power in
the resistors and I'll need many components. From the parts standpoint it
seems like it'd be nice to get rid of all the resistors. One thing I thought
of was using a single Zener rated at 4.3V. All the LEDs could then go to then
share the Zener which would go to ground like this:
+5----------------------------
| | |
LED1 LED2 LED3
| | |
|---------|----------|
|
zener
|
gnd
This seems like it might work, but its difficult to figure out what the
current through each LED would be and it seems like the current per LED might
change as more or less LEDs were turned on. Is there a better way to do this?
Thanks,
Oliver