Low power usage of the Propeller, current draw, avoid using PLL, 3.6vNiMh/3.7vL
WBA Consulting
Posts: 2,935
I am still working on my plungelogger (here and here) final setup and after studying the current consumption charts in the data sheet, I still have some questions regarding low power usage of the Propeller chip. Unfortunately, all my propellers are demo boards or propsticks, so I can't strip down the circuitry to get accurate current measurements for my design. I do have the proto board from UPEW but it's allocated for a project so I didn't want to mess with it.
updated with comments based upon posts as of 10/8, everything answered, just going to finalize the project design and add some code features
1) Is there any reason a DIP40 would draw more current than a QFN or TQFP packaged part?
from everything I found it should be the same across all 3 chips
2) Anyone have experience with running a Prop off a coin cell (CR2032 for example) or 3.6vNiMh/3.7vLiPo battery pack?
Coin cells may not have the lifespan due to current usage, see Tracy's post with graph
Javalin's results with a 3.7v LiPo are very promising and my results with the 3.6v Cordless phone pack were excellent
3) Current draw of a uSD card? Based on the card itself? I am using the 1GB that comes with the Parallax uSD socket.
Sounds like it varies greatly card to card and testing with my cards is the only way to be clear
4) Would it be beneficial to store 10 values to an eeprom then do a bulk write to the uSD?
Seems so, especially if I manage the page size to EEPROM as well as to the SD writes. That's a little over my head right now, so I will look into that if my current measurements are in need of help
5a) Per the charts in the datasheet, it would appear that running the prop as slow as possible would save power?
Yes, but with certain sacrifices. I ran with RCFAST but only one sensor would work. Not sure why. Using 5mhz/PLL2x it works perfectly
5b) I have to use PLL to utilize the uSD card, correct?
Worked fine with RCFAST, but my 2nd sensor kept giving erroneus readings. Code adjustment needed apparently?
6) Which state do I put unused pins in so they are eliminated from current draw calculations? or does that matter?
For a fresh setup, all unused as outputs. For the demoboard, Tracy's post has full details (will try his recommendations when I get everything ready to test current.
7) To use the protoboard, I think all I need to do is remove the 3.3v regulator (VR2, LM1086) and I can feed coin cell power into the circuit for accurate testing?
Yes, or for the demo board do the obvious: Remove the Ivdd jumper and feed in 3.3v from off the board using Tracy's pin setups for unused pins. I will be trying this with some repurposed 3.6 volt NiMh cordless phone battery packs as soon as I modify the connectors.
thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
Post Edited (WBA Consulting) : 10/9/2009 6:25:05 AM GMT
updated with comments based upon posts as of 10/8, everything answered, just going to finalize the project design and add some code features
1) Is there any reason a DIP40 would draw more current than a QFN or TQFP packaged part?
from everything I found it should be the same across all 3 chips
2) Anyone have experience with running a Prop off a coin cell (CR2032 for example) or 3.6vNiMh/3.7vLiPo battery pack?
Coin cells may not have the lifespan due to current usage, see Tracy's post with graph
Javalin's results with a 3.7v LiPo are very promising and my results with the 3.6v Cordless phone pack were excellent
3) Current draw of a uSD card? Based on the card itself? I am using the 1GB that comes with the Parallax uSD socket.
Sounds like it varies greatly card to card and testing with my cards is the only way to be clear
4) Would it be beneficial to store 10 values to an eeprom then do a bulk write to the uSD?
Seems so, especially if I manage the page size to EEPROM as well as to the SD writes. That's a little over my head right now, so I will look into that if my current measurements are in need of help
5a) Per the charts in the datasheet, it would appear that running the prop as slow as possible would save power?
Yes, but with certain sacrifices. I ran with RCFAST but only one sensor would work. Not sure why. Using 5mhz/PLL2x it works perfectly
5b) I have to use PLL to utilize the uSD card, correct?
Worked fine with RCFAST, but my 2nd sensor kept giving erroneus readings. Code adjustment needed apparently?
6) Which state do I put unused pins in so they are eliminated from current draw calculations? or does that matter?
For a fresh setup, all unused as outputs. For the demoboard, Tracy's post has full details (will try his recommendations when I get everything ready to test current.
7) To use the protoboard, I think all I need to do is remove the 3.3v regulator (VR2, LM1086) and I can feed coin cell power into the circuit for accurate testing?
Yes, or for the demo board do the obvious: Remove the Ivdd jumper and feed in 3.3v from off the board using Tracy's pin setups for unused pins. I will be trying this with some repurposed 3.6 volt NiMh cordless phone battery packs as soon as I modify the connectors.
thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
Post Edited (WBA Consulting) : 10/9/2009 6:25:05 AM GMT
Comments
5a) Yes, my measurement for RCSLOW in repeated waitcnt loops was 6 microamps. With a LT linear 3.3V regulator I think I came in at 30 microamps.
5b) Don't know but RCFAST is faster than 5MHz PLL2x
6.) Inputs.
4) EEPROMs draw very little current when active. You would do well to write a "page" at a time (usually 128 bytes) which can be processed in a single write cycle. EEPROMs come in sizes up to 128K bytes and you can easily attach 4 to a pair of I/O lines to give you a total of 512K bytes.
6) If you set up unused I/O pins as inputs, you will need pullups or pulldowns to minimize the current drain. If you set them up as outputs, unconnected to anything, they won't need the pullups or pulldowns.
Varies widely based on the card. I believe 10ma when active isn't unusual. I've seen specifications for cards
that say "<75ma" which is getting up there. Note the cards have an automatic standby mode; I *think* the
current fsrw multiblock code will not prevent the cards from entering standby mode, but I could be wrong.
4) Would it be beneficial to store 10 values to an eeprom then do a bulk write to the uSD?
Any write to the uSD involves at least 512 bytes of writing (and some additional reading).
If it's a new file, then expect at least 2K of writing (two fat entries, one directory entriy,
and the data block.)
5b) I have to use PLL to utilize the uSD card, correct?
Not at all; you can run the uSD card even in RCSLOW (probably). The protocol is async.
I only say "probably" because RCSLOW might actually be slow enough to time out the card, but I suspect not.
Note that this will probably keep the SD card "active" for a much longer period of time, so your net
power draw could be significantly increased over "speeding up" for SD access and then slowing back
down.
6) Which state do I put unused pins in so they are eliminated from current draw calculations? or does that matter?
If they are totally unconnected, I would make them output at 0 state; I never like the idea of leaving CMOS
inputs floating where they can pick up all sorts of stray nonsense.
7) To use the protoboard, I think all I need to do is remove the 3.3v regulator (VR2, LM1086) and I can feed coin cell power into the circuit for accurate testing?
You might not even need to remove the regulator, but for accurate current measurement that's probably a good idea.
I'm not sure where the power LED is powered from, but if that lights you should remove it too.
Post Edited (rokicki) : 10/6/2009 10:38:27 PM GMT
-Phil
You will have to remove the regulator. Even feeding 3.3v into the regulators output causes it to draw 10mA.
I fed the output of the regulator to the prop via a pair of 2N7000 fets, so I can isolate the regulator when I want low power consumption and switch it in when I need more than 10mA.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
You have a demo board, so you can pull out the Ivdd jumper that supplies 3.3 V to the Prop, and measure the current there. (Yes, it is easy to miss seeing the jumper!) The dedicated pins on the Demo board have to be set to low current states. Here from a very early thread on power consumption:
- Pin A29 is best left as an input, because it has a pullup resistor for the eeprom SDA.
- Pins A24 to A26 are connected to the PS/2 keyboard interface via transistors/resistors with pullups to +5 volts. To measure the propeller current, you have to make those pins low outputs.
- If A25 or A27 are left as high outputs or as inputs, the propeller will draw parasitic power through the +5 volt pullups, and the current through the 3.3 volt Vdd supply will seem to be practically zero. That threw me for a minute. Wow, zero current operation!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I may look into using the voltage register of the SHT11 to detect when the voltage drops below a certain level and have the prop shutdown in that case to prevent corrupting the SD card data while the logger begins to die. The register trips at 2.47 volts and I would like to manage a 3 volt level as "dead battery", so if I add a diode inline (for a 0.6v drop) with the SHT11's VCC line, that should do the trick? If the SHT11 sees 2.46 volts and flips the low battery register, that means the battery voltage would be 3.06. (theoretically of course)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
Post Edited (WBA Consulting) : 10/8/2009 4:49:31 AM GMT
I have ran a prop at 4.2 volts without any apparent problems, so the fully charged voltage should be suffered ok.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Post Edited (Toby Seckshund) : 10/8/2009 10:34:20 AM GMT
As for writing to EEPROM then to SD (FLASH) I think you are doubling up the current used in programming 2 devices. When you are ready to write to the SD card in a block I sugest you ramp up the PLL and write quickly. Ensure you then disable the SD pins (there is a section in there to do this - look for the "Cluso" comment in the driver).
Lonesock can point you to the best size block to write to the SD card. Use as much as you can in hub to buffer this.
Some other low current tricks....
* If you have a spare pin, use it to stall cogs which are not doing anything by issuing a waitpeq
* Do not run any cogs that are not required
* I understand hub access increases power usage (which is why I suggested using a pin and waitpeq)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
The CR2032 is rated for lower currents, 200 microamps with a capacity of around 200 mAh. It's ability to handle pulses is severely limited. However, I've used it a number of times for projects with the BS2pe and SX at low duty cycle and, I too want to do that with the Prop. One of the projects is a data logger for wetness in baby diapers. It had to be tiny! (Same idea for a "wet suit" in the polar bear plunge, huh?!) The Onset HOBO loggers of course run on CR2032s for deployments of a year with a PIC. In the case of the Prop, it would run most of the time at less than 10 µA on RCslow, and then switch to RCfast or xtal modes for quick readings and other tasks.
The trick with pulse current is to put a capacitance reservoir across the battery. The CR2032 has an internal resistance of about 15 ohms, increasing with age. Quantitatively, the back-of-envelope equation is,
dt = C * dV / i
dt: time interval in seconds
dV: droop in Volts allowable
C: capacitance in Farads
i: current in Amps
E.g. C=330µF, dV=0.25V, i=0.01 A, then time = 8 milliseconds maximum for the Prop to do its thing and switch back to RCslow. The situation is better than that, because the battery does help with current at the same time.
Attached is the internal resistance and capacity diagram for the CR2032 from Energizer. Note that the capacity is severely reduced if you have to keep above the 2.7 volt brownout threshold during pulses.
There are not such restrictions on a bigger battery like the CR123 or an LiFeP. The LiFeP are nice due to greater safety than LiPo or LiCo and also have a lower operating voltage.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 10/8/2009 5:12:03 PM GMT
Yes. I've a "miniGPS" logger running off a spark fun 3.7v 1100ma/h LIPO. Charges via the USB - seems to work well. Current draw is 160mah so about 5 hours before the LDO reg falls over. Running the prop, gps, SD etc off of 3v to get maximum use of the battery. The LDO reg requires about .2v headroom before it cuts (not tested though).
> 3) Current draw of a uSD card? Based on the card itself? I am using the 1GB that comes with the Parallax uSD socket.
using the sandisk 1 / 2gb cards.· about 80ma/h when in use.
James
Javalin: Thanks for your logger description. Sounds a lot like mine, but using a bit more current. That's exactly the answer I was looking for so I can make use of these 3.6v packs. Since they measure above 4 volts at full charge, I will be using an LDO regulator to protect the prop. Which LDO are you using?
I tried out a few different thing on the demo board and here is what I found:
Demo board with 3.6v Pack input (measured 4.2v) fed into the 3.3 regulator input, running the attached program:
63.83mA spikes
22.94mA maximum
0.69mA minimum
5mA average
clkmode = xtal1 + pll2x, 5Mhz crystal
Reads two sensors and writes to SD every ~5 seconds. Use two LEDs to show wait status (2 on) and "about to measure/write" (1 on) status.
I don't think I will have any problems with power for my datalogger with any of the battery packs I was looking at. I will still might play with using EEPROM as well as storing readings in some manner then bursting to the SD. For now, I am really happy with the results.
I also changed the file extension back to ".txt" so that I can read the results on my freebie 2 year old Samsung phone.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010