Author Topic: coin cell powered R4  (Read 17658 times)

davegravy

  • Jr. Member
  • **
  • Posts: 56
  • Country: ca
coin cell powered R4
« on: April 21, 2016, 09:48:56 PM »
After trying to power my project from two 3v coin cells in series (need 3.5V min for my sensor), and getting only 2 transmissions out of it (1min apart) before it became unresponsive due to voltage drop, I found and read this thread:

https://lowpowerlab.com/forum/index.php?topic=1340.0

I'm a newb and am probably trying to do stuff that is more advanced than I'm currently able to... So I have some followup questions!

1) Is the R4 a practical platform to achieve a low duty cycle coin-cell powered sensor? The other PCB designs in that thread are more optimized for compactness, but I feel like there are hardware-based power optimizations going on. If so can someone try to explain them?

2) My sleeping current in listenmode is 20uA with BOD and ADC off. There are big spikes in current consumption once per second that account for much of this. Is this normal?

3) I read the recommendation to use BOD in place of a cap/supercap. I assume this doesn't mean to avoid BOD_OFF in LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF), but means BOD should be ON while awake. Do I need to explicitly turn BOD on after listenModeEnd() or does it come on by default?

4) The thread mentions setting BOD "bits" to 1.8V.  Can the moteino actually survive voltage drops as low as 1.8V without impacting execution?  If not, what's the benefit to this over the default BOD setting (2.7V?)

5) What battery voltage is considered "acceptable" to send a transmission without killing the supply voltage?

6) It's mentioned that no ACKs are used in communication, but I understand sendWithRetry is necessary to use ATC, correct? Is lower transmit power worth giving up for the shorter transmit time that no ACKs gives?

7) I haven't observed an issue with startup voltage dips yet, but the thread mentions running at 1MHz instead of 8Mhz during startup to keep consumption low, and I think says it upclocks to 8Mhz afterwards. Is this something that can be controlled via software dynamically? I see there are "fuse settings" for clock rate but they seem like static settings... Are there code examples of how to do this?

Thanks in advance!

Dave
« Last Edit: April 22, 2016, 12:05:16 AM by davegravy »

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: coin cell powered R4
« Reply #1 on: April 22, 2016, 08:12:54 AM »
You fell off the front page too soon...

After trying to power my project from two 3v coin cells in series (need 3.5V min for my sensor), and getting only 2 transmissions out of it (1min apart) before it became unresponsive due to voltage drop, I found and read this thread:

https://lowpowerlab.com/forum/index.php?topic=1340.0

I'm a newb and am probably trying to do stuff that is more advanced than I'm currently able to... So I have some followup questions!
EDIT: IMO 1min transmission cycles are too fast to get any useful life out of a coin cell.  The duty cycle is too high.  If I have periodic reporting with a coin cell, I'll use 10 minute intervals as a minimum.
Quote

1) Is the R4 a practical platform to achieve a low duty cycle coin-cell powered sensor? The other PCB designs in that thread are more optimized for compactness, but I feel like there are hardware-based power optimizations going on. If so can someone try to explain them?
The R4 design is usable with coin cell IFF you remove the MCP1703 voltage regulator, reprogram the fuses to work with internal 8MHz RC clock, and remove or replace the flash memory with a lower power flash chip.  Also, only Joe Lucid seems to be able to reliably run an RFM69HW on a coin cell.  The rest of us mortals use RFM69W devices.
Quote

2) My sleeping current in listenmode is 20uA with BOD and ADC off. There are big spikes in current consumption once per second that account for much of this. Is this normal?
IMO this is too high to operate on a coin cell.   You need to have your sleeping current in single digit or less (and operating between 2.8-3.0V).
Quote

3) I read the recommendation to use BOD in place of a cap/supercap. I assume this doesn't mean to avoid BOD_OFF in LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF), but means BOD should be ON while awake. Do I need to explicitly turn BOD on after listenModeEnd() or does it come on by default?

4) The thread mentions setting BOD "bits" to 1.8V.  Can the moteino actually survive voltage drops as low as 1.8V without impacting execution?  If not, what's the benefit to this over the default BOD setting (2.7V?)
I believe the BOD discussion is outdated.  Other techniques are now used to manage coin cell operations.  Further, BOD off requires a mod to the LowPower library if you're using Arduino IDE 1.6 or later (search this forum) for how.
Quote

5) What battery voltage is considered "acceptable" to send a transmission without killing the supply voltage?
If using a RFM69W, I wouldn't TX if the voltage from a single cell is less than 2.7V.  I wouldn't use two coin cells in series, its wasted energy - use a bigger coin cell.
Quote

6) It's mentioned that no ACKs are used in communication, but I understand sendWithRetry is necessary to use ATC, correct? Is lower transmit power worth giving up for the shorter transmit time that no ACKs gives?
You can use sendWithRetry with 0 retry count.  This will wait for a single Ack and give up if none received.  This does consume a bit more power but if you're particular on WHICH packets get sent sendWithRetry() you'll get ATC control but not waste power on multiple TXs.
Quote

7) I haven't observed an issue with startup voltage dips yet, but the thread mentions running at 1MHz instead of 8Mhz during startup to keep consumption low, and I think says it upclocks to 8Mhz afterwards. Is this something that can be controlled via software dynamically? I see there are "fuse settings" for clock rate but they seem like static settings... Are there code examples of how to do this?
I'll take a look at what I have, but I'd suggest reading up on the various fuse settings and check out the AVR fuse calculator: http://www.engbedded.com/fusecalc/ to learn what choices are available...

EDIT: You will also need to update the Moteino BOARDS.TXT file to include a new section for an 8MHz version (CPU Freq=8MHz, upload speed=57600, and new fuse settings).

Tom
« Last Edit: April 22, 2016, 08:32:46 AM by TomWS »

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: coin cell powered R4
« Reply #2 on: April 22, 2016, 08:34:48 AM »
After trying to power my project from two 3v coin cells in series (need 3.5V min for my sensor)
What sensor are you using and how is it wired (switched power or not)?

Tom

davegravy

  • Jr. Member
  • **
  • Posts: 56
  • Country: ca
Re: coin cell powered R4
« Reply #3 on: April 22, 2016, 10:03:11 AM »
Thanks kindly for the insight, Tom!

Quote
EDIT: IMO 1min transmission cycles are too fast to get any useful life out of a coin cell.  The duty cycle is too high.  If I have periodic reporting with a coin cell, I'll use 10 minute intervals as a minimum.

Just to clarify I intend to provide regular updates on a 1hr interval. The 1min was in testing.  I'd like to have the user able to request an unscheduled update, have the node detect if there's insufficient battery voltage to service the request, and act accordingly. Maybe I misunderstood but that seems to be what you accomplished (or maybe it was Joe).

Quote
The R4 design is usable with coin cell IFF you remove the MCP1703 voltage regulator, reprogram the fuses to work with internal 8MHz RC clock, and remove or replace the flash memory with a lower power flash chip.  Also, only Joe Lucid seems to be able to reliably run an RFM69HW on a coin cell.  The rest of us mortals use RFM69W devices.

Is it insufficient to power the M4 directly via the 3.3V pin? Doesn't this effectively bypass the regulator? I'm currently sleeping the flash -  I understood there's not a lot to be gained by completely removing it, but it sounds like that may not be true.
 
Quote
I believe the BOD discussion is outdated.  Other techniques are now used to manage coin cell operations.  Further, BOD off requires a mod to the LowPower library if you're using Arduino IDE 1.6 or later (search this forum) for how.

Sorry, I'd understood that options were a) use large bulk caps or b) use BOD (1.8V) and monitor VCC health - using it as a condition for making transmissions. If there's a newer/better approach, i'm eager to learn about it. Are there some keywords or something you can give me to search with? Google's not being friendly to me on this one.

Quote
What sensor are you using and how is it wired (switched power or not)?
Vegetronix VH400 moisture sensor. +ive supply is wired direct to 6V battery rail, gnd supply goes to a digital pin 5 which switches power (same digital pin completes the circuit for a 1MOhm-1MOhm voltage divider used to monitor battery voltage). Sensor requires 400ms power before output stabilizes so I've been doing
Code: [Select]
LowPower.powerDown(SLEEP_XX, ADC_OFF, BOD_OFF)
for that time. It draws around 7mA.

I should note that with my existing power profile and 1hr updates, I calculated an average current of 23uA - that should mean my 190mAH battery lasts 8 months I think. To me that's close to acceptable and I mainly need to sort out resilience against the high battery ESR.

Thanks again Tom.

Dave

snorp

  • Jr. Member
  • **
  • Posts: 62
  • Country: us
Re: coin cell powered R4
« Reply #4 on: April 22, 2016, 10:32:17 AM »
<snip>
Further, BOD off requires a mod to the LowPower library if you're using Arduino IDE 1.6 or later (search this forum) for how.

This is fixed in github, so you if you use that no modification is necessary. Don't use the "library manager" thing in the IDE.

davegravy

  • Jr. Member
  • **
  • Posts: 56
  • Country: ca
Re: coin cell powered R4
« Reply #5 on: April 22, 2016, 01:44:35 PM »
I suppose I could bypass the regulator and power the moteino from the first 3V lithium and supply the VH400 from 6V stacked on top

Like this: http://goo.gl/udrF6v

The lower 3V battery will presumably drain faster than the upper, so it's not ideal, but the best I can think of without a 3V only supply and step-up converter (which I assume would have a significant power cost associated with it).

davegravy

  • Jr. Member
  • **
  • Posts: 56
  • Country: ca
Re: coin cell powered R4
« Reply #6 on: April 23, 2016, 12:42:01 AM »
In my reading it looks like a lot of people are getting false current readings due to measurement technique.

Using a mains-powered voltage supply, I'm measuring current draw of my moteino by putting a 10 ohm shunt resistor between the +IVE supply and the Vcc node, and measuring voltage across it with a scope (differential, and which accurately measures voltages below the uV range).

Is this a valid approach?

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: coin cell powered R4
« Reply #7 on: April 23, 2016, 06:04:56 AM »
If you apply 6v to a tri-State gpio pin you'll get a nice current through the esd diodes of the 328p. You need to switch gnd with an n-fet instead. Often even that isn't enough since the sensor output will get pulled up to 6v when gnd is disconnected. Then you need a second p-fet to switch +6v instead.

Other than that I think this should work with 2 coin cells. The rfm69hw also should not be a problem. But you should not run it at max power. And I'd recommend modifying the rfm69 lib to always return true in canSend. Sitting 1s in rx could kill your coin cell.


emjay

  • Full Member
  • ***
  • Posts: 119
  • Country: nl
Re: coin cell powered R4
« Reply #8 on: April 23, 2016, 06:17:25 AM »
@davegravy,

Yes, a valid method. Here is exactly the same technique in use http://jeelabs.org/2013/05/10/maxing-out-the-hameg-scope/index.html  It is handy if the 'scope has some averaging capability since at the uA level, the signal has a little noise superimposed.


davegravy

  • Jr. Member
  • **
  • Posts: 56
  • Country: ca
Re: coin cell powered R4
« Reply #9 on: April 23, 2016, 12:19:44 PM »

Is it insufficient to power the M4 directly via the 3.3V pin? Doesn't this effectively bypass the regulator?
 

Answering my own question.. according to https://lowpowerlab.com/forum/index.php/topic,671.msg4238.html#msg4238

Quote
Note that the LDO must be completely removed, just bridging its Vin to Vout or leaving Vin open circuit with power on Vout will still have a quiescent drain.
« Last Edit: April 23, 2016, 02:03:46 PM by davegravy »

davegravy

  • Jr. Member
  • **
  • Posts: 56
  • Country: ca
Re: coin cell powered R4
« Reply #10 on: April 24, 2016, 10:08:48 AM »
If you apply 6v to a tri-State gpio pin you'll get a nice current through the esd diodes of the 328p. You need to switch gnd with an n-fet instead. Often even that isn't enough since the sensor output will get pulled up to 6v when gnd is disconnected. Then you need a second p-fet to switch +6v instead.

Seems like you're right - I am losing a few uA through my power switching configuration, and VH400 output does go high. A little confused if you are saying I need to switch GND and +6V or just +6v. I think if I just used a high-side switch... like:

http://electronics.stackexchange.com/a/67349

... and be ok. Problem is I've never seen pullup/down resistors in the MOhms range, which is what I'd need to keep current draw < 1uA.  I need to brush up on MOSFET theory to figure out what implication that'd have.

EDIT: Found this http://www.eetimes.com/document.asp?doc_id=1272463 While these are normally ON designs, at least it seems like high resistor values aren't generally a problem.

EDIT2: Also, usefull info on selecting MOSFETs with low leakage http://electronics.stackexchange.com/questions/98597/low-drain-source-mosfet-leakage
« Last Edit: April 24, 2016, 12:28:16 PM by davegravy »

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: coin cell powered R4
« Reply #11 on: April 24, 2016, 12:43:34 PM »
Just curious:  Is there any advantage to making your load switch from separate parts instead of just buying a single integrated load switch chip?  One of the recent threads (elsewhere on this forum) did talk about the ability to tweak rise and fall times for less abrupt switching by resistor selection on a semi-integrated chip (n and p channels on one chip that you then have to finish wiring yourself) or equivalently using entirely separate parts as you are suggesting, but if your goal is just a fast on-off switch with minimal quiescent current, then the SI1869DH (https://lowpowerlab.com/forum/index.php?topic=1579.0) just seems smaller and easier and, if need be, can even switch as much as 20v. 

[Edit: i.e. it seems like a good "go to" chip to keep on hand for use in all sorts of projects. ]

« Last Edit: April 24, 2016, 01:16:29 PM by WhiteHare »

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: coin cell powered R4
« Reply #12 on: April 24, 2016, 12:50:04 PM »
Yeah I meant exactly the high side p-fet controlled by logic n-fet setup. 5 meg pull-ups are no problem.

davegravy

  • Jr. Member
  • **
  • Posts: 56
  • Country: ca
Re: coin cell powered R4
« Reply #13 on: April 25, 2016, 03:13:51 PM »
... but if your goal is just a fast on-off switch with minimal quiescent current, then the SI1869DH (https://lowpowerlab.com/forum/index.php?topic=1579.0) just seems smaller and easier and, if need be, can even switch as much as 20v. 

That simplifies things quite a bit.

My new approach is to ditch the 2nd battery, use a larger single cell, and use a boost converter to get >3.5V needed for the VH400. If I understand correctly, that lets me remove the Moteino regulator, and instead of needing a voltage divider circuit into an analog input pin, I can then just read VCC directly.

The TPS61222DCKR is 90% efficient at my operating condition, which translates to 770uA waste for the 400ms that the sensor is powered up. If I'm sampling once per hour, that's an average current increase of 85nA... i.e not much.



joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: coin cell powered R4
« Reply #14 on: April 25, 2016, 04:03:38 PM »
Well in that case you can just switch the booster itself via the en pin. No load switch necessary. One thing to keep an eye on is input current. Coin cells are not good at providing larger currents for long periods of time. You'll need more than the specified current of the humidity sensor because you're converting the voltage up. Probably still ok - in particular with a cr2450 - but it's a pretty big load for a coin cell.