Electrical – Efficiently powering multiple LEDs from higher voltage than used for microcontroller

diodesledmicrocontroller

I need to control 12 LEDs that are powered by 6V (4 AAA batteries). I'm using a PIC18F25K40 microcontroller that will be powered by 3V (2 of the AAA batteries). Because of the different power supplies, I can't charlieplex. There are enough IO pins available to individually address the LEDs.

Because I will rely on persistence of vision, the LEDs will be powered ONE at a time, so I'm expecting it to be fine to arrange them in parallel with a single current-limiting resistor.

To turn on an LED, the corresponding IO pin will be set to Output LOW in order to sink current. To turn off an LED, the IO pin will be set as an input (high impedance). Schematic shown below.

The issue is that the PIC documentation says that any applied voltage to the pins must not exceed Vdd + 0.3V. With the LEDs off, a voltage of about 3.8V will placed on the pins. (6V – 2.2V = 3.8V). 2.2V is the forward voltage of the LEDs, and Vdd is 3V.

In order to address this, I'm adding a series diode to the current limiting resistor, in order to drop the voltage placed on the IO pin to be below 3V. (Shown in schematic).

My questions:

  1. Will this circuit function as intended (over the range of battery life 1.0V-1.5V)?

  2. Will a Zener diode be better for producing a definitive voltage drop?

  3. Are there better ways to accomplish this? (The PIC needs to remain powered by 2 batteries. Other parts of the system require 6V, so can't route the remaining 2 batteries to be in parallel with the first pair.).

Additional info:

The use of 4 batteries to power the LEDs is to spread the power consumption, as well as to ensure that the LEDs can still be powered even when the individual batteries deplete to below 1.1V. Otherwise 2 x 1.1V will barely meet the 2.2V forward voltage. Please note that the 6V is required for other parts of the system; not just for the LEDs.

Haven't been able to find Zener diodes of 1V. Using standard diodes will provide a 0.7V drop, which doesn't leave much margin for preventing damage, especially if the initial battery voltage is a bit higher than 1.5V each.

PCB space is VERY tight. Strong preference to keep part count to a minimum. ie. no room for a handful of transistors or additional power regulators.

Thanks in advance for the guidance!

enter image description here

Best Answer

What you suggest is very wasteful of the batteries, and also quite dependent on battery voltage. You need to re-think your whole power architecture.

The first thing I'd do is use a buck converter to make 3.3 V from the 4-6 V battery. Your PIC runs at full speed with as low as 3.0 V, so shooting for 3.3 V is good. Now use that 3.3 V to run the PIC and the LEDs.

Each LED drops 2.2 V, so that leaves 1.1 V for whatever else is in series with it and the 3.3 V supply. You want to control each LED individually, so use a separate transistor for each one:

If we figure the transistor will drop about 200 mV C-E when on, then there will be about 900 mV across R2. That means the current will be 19 mA. Unless you are trying to squeeze every last bit of brightness from the LED, I recommend using the next higher common size for R2 of 51 Ω. That still gives you over 17 mA, but leaves more margin for other values to be off a bit. You wouldn't be able to see the difference between 17.5 and 19 mA thru identical LEDs in a side by side comparison.

Figure worst case the transistor drops 750 mV B-E. That results in just under 1 mA. Worst case, we are asking for less than a gain of 25 from the transistor. There are many small signal transistors that can easily guarantee that at these voltages and currents.

Using this power scheme has several advantages over what you propose:

  1. It is more efficient. Since you are using batteries, this extends battery life. 3.3 V is closer to the LED voltage than 4 or 6 V, so less power will be wasted in the series resistor.

  2. It is consistent across the expected battery range of 4 to 6 V. The LEDs will be the same brightness regardless of the state of the battery.

  3. It uses the batteries evenly. Tapping into the middle of a battery pack is a bad idea as some batteries get drained more than others. Users will generally replace all batteries when things look like they stop working. With a tap, some of the batteries will have some unused energy in them when they get replaced. If the user replaces the battery groups separately, then you have a mix of fresh and worn batteries. All around, draining batteries unevenly is a bad idea.

Another issue is that you plan to drive one LED at a time, even though you say you have enough I/O pins to drive each individually. Don't do that.

To get the same overall brightness, you'd have to run the LEDs for 12x the current at 1/12 the time. Not only would the LEDs be less efficient at 12x the current, that is likely beyond the maximum pulse current spec. Just turn on each LED individually when you want it lit. As a bonus, it also simplifies the firmware.