How long can a Propeller Protoboard operate on a 9 volt PP3 battery?
ElectricAye
Posts: 4,561
I can't make sense of what the Propeller data sheet has to say about power consumption for the Propeller, so I thought I'd ask for a ballpark estimate here.
I want to run a Propeller Protoboard in a repeat loop and provide a single PWM signal at roughly 500 Hz, ~5 % duty cycle.
The PWM signal drives an application that uses very little power, so that part of it is not a concern. I would like to know approximately how long a Protoboard will last on a 9 volt PP3 battery.
Hours? Days? Months? Right now I haven't got a clue.
I know some other microprocessors urge people not to use such batteries, but I've seen the 9 volt battery connectors on some other Propeller boards, so I thought I had better ask.
Thanks.
I want to run a Propeller Protoboard in a repeat loop and provide a single PWM signal at roughly 500 Hz, ~5 % duty cycle.
The PWM signal drives an application that uses very little power, so that part of it is not a concern. I would like to know approximately how long a Protoboard will last on a 9 volt PP3 battery.
Hours? Days? Months? Right now I haven't got a clue.
I know some other microprocessors urge people not to use such batteries, but I've seen the 9 volt battery connectors on some other Propeller boards, so I thought I had better ask.
Thanks.
Comments
I wouldn't use a PP3 battery on a chip like the Propeller.
I'd guess several weeks at least.
I guess I was going to use the 80 MHz clock rate. The PWM is driving the gate of an IRF3708 Mosfet.
Thanks, Leon. I'll put you down as a NO vote for the PP3's.
A lantern battery would be nice, but I'm told to make this as compact and lightweight as possible.
Do remember that, if you drive the FET directly, it won't switch as completely with the 3V gate voltage as you might hope and there'll be a lot of power used to charge up the substantial gate capacitance. You could use a gate driver, but that'll increase the power requirement.
Thanks, Mike, for providing a clue to the current consumption and for breaking down how to reduce it. Alas, it looks like the reality of the PP3 capacity is something I can't escape. I think I'll have to look into redesigning this to work with AA batteries. It's not the end of the world, I guess. Normally I work in a lab where I never worry about power consumption, so this portability issue is alien territory for me.
I frequently will run on 9V batteries, just for on the go. Rechargables work well, and the 50 hour metric Mike cited rings true. I get somewhere south of that on my Demo board or HYBRID board (coley's great prop I board.) That's doing video related things, and some audio / sound.
Leon is correct that you can get very low power microcontrollers quite cheaply, but you can go much further with the Propeller than you might think.
I have to ask, are you going to do any other functions other than the 500Hz PWM signal?
Duane J
Okay, I think I'm beginning to get a better feeling about this. I was just looking at an old post of yours that woke me up to the possibility of using the low speed clock until the Prop chip needed to wake up and use its 80MHz capabilities:
Quoted from here: http://forums.parallax.com/showthread.php?117006-Basic-Info&p=850393&viewfull=1#post850393
The Prop will be waiting for an optical pulse train which will be its summons to activate the PWM signal. So basically the Prop's only function would be to sit around doing nothing but waiting for that pulse train, after which it will activate a single pin with PWM, allow the PWM to go on for a few seconds, then shut down the PWM and sit around waiting until its next summons. I'm sure the Prop chip is overkill on this application but it's what I'm familiar with. I'm sure Leon is correct about other chips using less power, but at this stage I just want to prove the concept, and The Prop and the Basic Stamp are the only chips I (sorta) know.
Shhhhhh.... I don't think we're supposed to talk about things like that.
Yes, I might have to look at something like that, even with Mike's ideas of using the slower, lower-power clock activity.
Interesting. It does sound like magic! You sure that's legal?
No, no whacky zero-point-energy perpetual motion going on here. Just standard physics.
10V at 1A is the same energy as 1V at 10A (10 watts). Switching regulators convert one to the other.But there is a loss of energy of maybe 10 or 15% each time you do a conversion.
It means you don't have to worry about the volts so much. So with linear regulators, say you ran it off a 9V battery and the propeller drew 10mA at 3V, the battery would supply 10mA.
The ratio gets even better when you use more batteries. eg Use two batteries = 18V and linear regulators and the battery still has to supply 10mA. With a 3V chip and 18V on the batteries, 5/6th of the energy is actually being wasted in the regulator.
But with switchers, 18V to 3V is a 6:1 ratio. Current is 1/6th, ie 1.66mA being supplied. And then multiply by 100/85 for losses so it is more like 1.96mA. That compares very nicely with 10mA.
Another nice thing about switchers is that you get more energy out of the battery. If your 9V battery is down to 5V most people would consider that flat, but with a switcher it will keep running till it gets down to about 4V.
And there is an even better bonus - because switching regulators convert energy they hardly get warm, so you don't need lots of space on a board for heatsinking. That saves money and is about equal to the extra cost of a switcher. So the cost ends up about the same as a linear regulator.
Cool. Thanks for the detailed explanation. Might there be a specific manufacturer and/or part number you can suggest for Prop-related applications? I keep hearing about these switchers but have never played with one.
Thanks, you guys!
That done, here is the graph from the prop data sheet.
Find 5MHz over near the left end. Suppose your system waits with a
waitpeq for that optical stimulus. It then comes to life and fires up a counter module with a tuning word of 429497 to generate the PWM, goes into a waitcnt for the required time interval, and then stops the counter, and goes back to waiting for the next optical stimulus. Practically all its time is spent in waitxxx, in which case the graph suggests around 100 µA at clkfreq=5MHz. That is approaching the BASIC Stamp sleep current (~30µA). . Maybe that oversimplifies the task? There may be more precision or more processing required?
The next step down in power consumption would have the system operating most of the time at clkfreq=20kHz. In that state it can still be "executing" a waitpeq, waiting for the optical pulse, and then drop through to a clkset command to reactivate up to 5MHz. It takes about 10 ms to bring the crystal up to speed and then start the counter module to generate 500Hz for the required time, and then drop back to 20kHz. The down time current drain then will be on the order of 10 or 20 µA, better than the Stamp, and it will still be monitoring the pin in that state. Can the app tolerate the 10mS latency? The power supply has to be chosen carefully to match. Either run it off off something like a 3V primary cell, or use a super low Iq regulator, such as the MCP1700.
At 50µA average drain, a 500mAh battery has 10000 hours of life, over a year.
Ok, I've run my QuickStart board (doing a lot of LED action) for a week on 4 AA cells....
Does that help?
Tracy, your detailed explanation is truly amazing! Indeed, this application could easily tolerate a 10mS latency, etc. I'm inspired by your analysis of this. Because the PWM need only come alive a few seconds every few hours, this might be just the sort of thing I was hoping for. I need to study how the chip behaves at clkfreq=20kHz, how the counters work at such a low frequency, etc. but it seems to me that this ability to downshift power consumption via these clock changes might make the Prop even more attractive than a smaller chip that does not possess such a capability.
Many thanks for taking the time to spell this out for me!
It sure does help. It's always nice to hear some real world examples of the performance people get from these things. I've run Props on batteries before but never to the point where the batteries go dead. Thanks!
A 32768Hz crystal is easy to find, and you can X16 that for 524288Hz, or about ~524Khz. That would give you 128KIPS worth of processing power, which in PASM is better than what SPIN can usually do IIRC.
Yes, I think that's the way to go. The "pulse train" that is supposed to wake up the Prop could be something as simple as a bright flash of IR light, so I could probably use the WAITPEQ that people have already suggested, so no precision is necessary. The more I think about this, the more I like it.
I appreciate the offer, but I'm an old dog that has a hard time learning new tricks. In fact that's why I had originally agonized over this power consumption problem: I was afraid somebody was going to prod me to learn some other chip just because I couldn't find a way to get the Prop to play Power Consumption Limbo. Now, thanks to all the fine people who've responded to my yelps for help, the old dog has a bone of hope.
Yes, I agree. It took me ages to make the jump. But when I found how easy they were I had a hard time coming to grips with the idea that a regulator is an 8 pin DIP chip rather than something with a big heatsink on it. They come as surface mount too.
Thanks++ to the clever boffins at National Semiconductor.
Battery power is expensive, and IMHO the worst thing you can do with battery energy is waste it as heat!
Schematic also shows 0.1uF caps for other IC chips. The minimum circuit requirement for capacitors is just an input and output capacitor and you need them anyway for linear regulators.
I get these from futurlec
http://www.futurlec.com/Linear/LM2574N-3pr.shtml datasheet http://www.futurlec.com/Linear/LM2574HVN.shtml
http://www.futurlec.com/Power_Inductors.shtml and get the 330uH one (needs to be a power inductor so at least 500mA current, not the small RF inductors)
http://www.futurlec.com/Diodes/1N5819pr.shtml for the diode.
Other suppliers have these too.
Fascinating. I'll definitely take a look at these. Thanks for the links!
IQ Quiescent Current (Note 6) 5 mA 10 mA(Max)
ISTBY Standby Quiescent ON /OFF Pin= 5V (OFF) 50 μA 200 μA(Max)
The regulator there is using as much as a cog at 80MHz. That was the hard part of my old battery project; finding a regulator that didn't swamp out the savings I could get in running at lower frequencies. I'll have to go back and look again to see if I still have part numbers but I think I found a real nice one that handled the 3.3V side and used shutdown on the 5V part to knock it out of the equation when not in use.
It's not as flagrantly wasteful of batteries as it may have sounded...
And the run time would probably have been a lot longer on those batteries too.
They were first run through my Sony FinePix camera to the point that the
camera thought they were dead. THEN loaded into the battery pack for the Propeller
and ran a week.
I have the numbers in my notes somewhere (all are still packed up from our move though).
Come to think of it, I may have posted them in another thread?
Hold on a sec...
Yep.
"My Quickstart board has been running off of 4 AA cells.
I took the batteries out of my camera when the camera wouldn't run any more.
They showed 1.35 volts then.
They ran the QS for a nearly a month before they were too low to keep it going.
When I took them out they showed .95 .96 .97 and .98 volts respectively, or 3.86 total."
The last set I let run LED Pong 24/7. That's quite a bit of LED action.
The batteries lasted about a week.
The QuickStart board normally runs off of the USB cable, but has a pin on the header
for battery inout.
Here are efficiency curves for the LT3470, which is designed specifically as a micropower buck regulator.
You see, with a load current of 100µA and an input supply of 9V, the efficiency drops below 50%. Still not bad. The zero-load quiescent current is 25µA from the battery no matter what the input voltage. It achieves that by entering "burst mode" at low currents, where it turns on in bursts to keep the output filter capacitor charged within bounds, and it operates continuously to reach its 200mA top current when called for.
The Prop with a 5MHz clock and sitting in a waitxxx draws about 100µA, so the total current from a 9V battery with an LT3470 to supply 3.3V at 50% efficiency would be about
25µA + 100µA * 0.5 = 75 µA
25µA + (100µA * (3.3V/9V) / .5) = 98 µA
Compare that with an MCP1702 linear regulator with 2µA quiescent current, plus a Prop drawing 100µA, and the total battery current is 102µA. Or take the clock down to 20kHz, RCslow, the total current with an MCP1702 or with a 3V primary lithium battery can be well under 10µA, which is lower than the quiescent current of even the LT3470.
INDUCTOR RADIAL 330UH 0.73A $1.42
LM2574N-3.3GOS-ND $1.78
The module would send a SMS every few hours, so idle current is the key factor. I have no problems on wake up, i simply go to RCslow and accept the clock errors.
I started with a switching regulator, but idle current is too high. The 1700 requires two 2uF caps, but accepts a low input voltage. In this case 9V would be too high, and useless, being a linear regulator. A protected Li-ion like the ones sold by Parallax could be a nice option.
Massimo