Battery Power Options for PIC as LED controller

Revolvr

New Member
Hi all
I could use some sage advice on a battery powered PICAXE device.

It is a nightlight that turns on sets of LED’s when it is dark and motion is detected. 2 sets of LEDs will fade on and off until motion is no longer detected, then turn off. At most it will power 24 LEDs at 20mA. There will be 2 strings of LEDs driven by two PWM signals.

I expect the device to be turned on at most twice a day, and probably operate no more than a couple of minutes.

Since it spends most of its life doing nothing I want to minimize the quiescent current to maximize battery life. I know how to do this with the PICAXE (it will NAP and wake up every second or so), but the question is what about the rest of the circuit?

Being battery powered I can arrange the batteries any way I want, providing from 3 to 12 volts. This has led me to datasheet hell where I have too many design options and not enough experience to judge one over the other.

So for now I decided on either 9 or 12V, mainly to power the LED strings easier, and using some kind of regulator to provide 5V to the PICAXE and to the PIR sensor (requires 5 to 12V). Then probably a constant current device for the LEDs.

A good option might be the linear LDO MCP1702. It has a low quiescent current and can supply enough current for the PIC, the PIR and a MOSFET driver for the LEDs if I go that route.

Another option would be a buck converter (such as the LM2596) but the ones I have looked at have efficiencies around 70% at low currents. But it could provide the power for the entire circuit.

So I guess I am looking for some thoughts on how to approach this.

Thanks
 

Buzby

Senior Member
I would just tap off the string of batteries, somewhere around 3 or 4.5v, to power the PICAXE and PIR.
 

westaust55

Moderator
If you have 24 LEDs in two strings that is 12 LEDs per string. At best for a Red LED the forward voltdrop is around 2 Volts - other colours have higher forward volt drop with some up to 3.5 to 4 Volts.

So you would need a power supply for the LEDs at 2 * 12 = 24 Volt which the PICAXE cannot handle plus you need a little extra voltage for volt fdrop across the series resistor (for current limit/control) - you could add a transistor as a switch rather than PICAXE IO direct.

Maybe post a schematic of what you have in mind showing in aprticular exactly how the LED's will be connected and including a series resistor for each series LED string for current control/limiting.
 

geoff07

Senior Member
A small solar panel (say 8w) to charge a small SLA battery (say 3.3Ah), an LDO reg for the 5v for the picaxe, mosfet drivers (4427) and mosfets to control the strings, but as already mentioned, more than two strings at 12v. Add an IR receiver and a remote from rev-ed and you have remote control as well for testing and fun. It works for my pond pump.
 

Haku

Senior Member
Thoughts:

A correctly wired LDR will use minimal power to make sure the PIR & Picaxe doesn't get any power during the day.

Once it gets dark the LDR setup will give power to the PIR (I have some that only use 40uA running and 60uA when triggered) with the output connected to a MOSFET that drives the Picaxe.

You'll need transistor/MOSFET for the Picaxe to turn on the string of LEDs.
 

Revolvr

New Member
Thanks for the replies. Couple of comments.

This will be a wall sconce, in a bathroom or hallway. Not much opportunity for solar power.

So with a few batteries in series I could pick off the voltage from an intermediate battery to power the PICAXE. Question: Does this mean some batteries will discharge faster than others? Is that a problem, other than not knowing which batteries to replace when the time comes. Same question but with rechargeables. The option of rechargables adds another complexity of which battery to pick off for the right voltage, that works both with NiMH and Alkaline?

As for the LEDs, I have done a few projects with the small 20mA LEDs, so that's what I was thinking. But I realized I was just stuck in a paradigm. Instead of a handful of small LEDs I could use a couple higher powered LEDs, say 100mA to 350mA. The nice thing with this is the forward voltage drop is the same as a single LED so the total voltage doesn't have to be above 5V. So I could use a higher power 5V regulator like the LT1529 to power the entire circuit.

I have not decided how to power the LEDs yet. I am planning on a constant current driver instead of a resistor, mainly because the total voltage range changes so much between fully charged, and near empty batteries.

I did discover something a few days ago I didn't realize existed, a CCR. This is a Constant Current Regulator that fits in the circuit just like a current limiting resistor, except that it allows a fixed constant current. It is basically a self regulating transistor. On Semi has these, look for part NS145020J and similar. I've never used these.

Yes I'll use a MOSFET to power the LEDs from the PWM signal. I have not picked the part yet. That's another datasheet nightmare. I will probably drive it thru a simple NPN/PNP totem pole. Not really necessary probably at the low frequency but I'm doing this as much to learn as anything.

Cheers
 

westaust55

Moderator
The PICAXE chips themselves will only draw a few milliamps (at best) so insignificant in the overall "picture" compared with the power the LEDs will consume when illuminated.
 

srnet

Senior Member
I would also do a power budget, so its clear how much power the LEDs are actually using.

What you need is a figure for the power used by the LEDs, averaged out over a 24 hour period.

There is not a lot to be gained in reducing the PICAXE and associated circuitry current consumption to an absolute minimum, if its only a very small part of the total power used.
 

Haku

Senior Member
MOSFET wise I found some very nice small SOT223 type that can be soldered to stripboard, BSP 75N, either through-hole style with a little care during soldering or flat to the metal side, they can be controlled straight from a Picaxe without needing a transistor or resistor, and won't break a sweat driving 24 ordinary white LEDs.

Also, this is a very useful LED calculator I use often for calculating resistor values for single and multiple LED arrays:
http://led.linear1.org/led.wiz
 
Top