Author Topic: high moteino r4 power consumption during sleep at 3Vin [answered]  (Read 8223 times)

ned

  • NewMember
  • *
  • Posts: 5
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #15 on: January 05, 2015, 09:09:40 AM »
If I replace LowPower.powerDown() with delay(), then I measure around 7mA continuously.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #16 on: January 05, 2015, 09:15:23 AM »
Yep that is not right. It should be around 15-20mA. So either your DMM is faulty or you're not measuring it correctly.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #17 on: January 05, 2015, 10:41:51 AM »
How about a controlled current test:
Measure the current with your DMM that goes through 10K and 100K resistors from a 5V source. You should get ~500uA and ~50uA respectively.

ned

  • NewMember
  • *
  • Posts: 5
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #18 on: January 05, 2015, 07:28:21 PM »
Well this is embarrassing. I did those tests and the DMM looks fine, even measures down to 5uA with 1M resistor. I tested the original code again with the same hardware setup and now I'm getting 25uA in sleep mode. I'm pretty certain that everything is the same but I must have done something differently. Sorry for all the trouble! I assume that the MCU completely reset with each code upload? So it can't retain any settings from a previous code right?

Is 25uA the lowest I can get? I've read others achieving lower values in sleep mode, but not sure what I need to do software wise to reach that.

Thanks again.


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #19 on: January 05, 2015, 08:06:32 PM »
Cool.
Don't expect much accuracy with a $35 DMM :)
I'd say 25uA is pretty good. I am usually getting around 10uA on the bare Moteino with nothing on it measuring with a Fluke 87V. Still others will say there is a burden resistor in the DMM etc ... yes and you can't get absolute accuracy unless you use much more expensive gear or use an accurate ammeter like the EEVBlog uCurrent kit.

mattmunee

  • NewMember
  • *
  • Posts: 11
    • MTRTech Wikia
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #20 on: June 23, 2015, 11:03:53 PM »
Hi all,

I am having problems minimising my current draw in sleep mode. I'm new to this so I guess I've made a simple mistake, but can't for the life of me find what I've done wrong. I think I've read everything on this forum on similar issues. Details of my test below:

-Moteino R4, with RFM69W, no flash, no peripherals attached
-test code: as for the OP TacticalSnack. I also included radio.sleep()
-5V to Vin (I also tried 3.5V to Vin, with no change in current)
-equal results with two identical new Moteino R4's

I can't get the current draw below 1.5mA in sleep mode. Any ideas?

cheers

Well, I should probably start my own thread, but I seem to be having this same problem.  I've tried to run a sketch which ONLY puts the avr to sleep.  No serial or radio objects are ever instantiated, and I draw roughly 1.5mA on two different Moteinos (R4).  I'm powering with 5V through the FTDI PWR pin, which should be identical to using the VIN pin.  My multimeter is inline with the PWR signal, using a pair of jumpers.  It's a cheapish $35 meter, but I've also used it to measure uA levels using the same voltage supply and a 10k resistor.  As was suggested, I also ran the built in Blink sketch, and I draw roughly 8mA.  Any idea what could be causing this high consumption?
Fail fast. Fail often.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #21 on: June 24, 2015, 07:36:31 AM »
I seem to be having this same problem.  I've tried to run a sketch which ONLY puts the avr to sleep.  No serial or radio objects are ever instantiated, and I draw roughly 1.5mA on two different Moteinos (R4).  I'm powering with 5V through the FTDI PWR pin, which should be identical to using the VIN pin.  My multimeter is inline with the PWR signal, using a pair of jumpers.  It's a cheapish $35 meter, but I've also used it to measure uA levels using the same voltage supply and a 10k resistor.  As was suggested, I also ran the built in Blink sketch, and I draw roughly 8mA.  Any idea what could be causing this high consumption?
If you only sleep the AVR you might be missing the radio and flash. Those and anything else attached should be slept otherwise they will be in IDLE/STANDBY modes which draws some current (not so much on the FLASH MEM which draws only a few dozen uA if in IDLE mode).
The most important is the radio, instantiate it and sleep it as shown in this sketch, and let us know your findings.

mattmunee

  • NewMember
  • *
  • Posts: 11
    • MTRTech Wikia
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #22 on: June 25, 2015, 08:58:09 PM »
Thanks for the reply, Felix.  I ran the attached sketch with no edits.  For the record, there is no flash chip installed.  I get 1.36mA.  Thoughts?
Fail fast. Fail often.

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #23 on: June 25, 2015, 09:16:03 PM »
Thanks for the reply, Felix.  I ran the attached sketch with no edits.  For the record, there is no flash chip installed.  I get 1.36mA.  Thoughts?
I suggest that you change line 134 to:
Code: [Select]
while (1)
{
 LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
}
if you really want to measure the power while sleeping.  Otherwise you'll measure the average power between sleeping for 8 seconds and running whatever code is in that sketch.

Tom

mattmunee

  • NewMember
  • *
  • Posts: 11
    • MTRTech Wikia
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #24 on: June 27, 2015, 01:43:43 PM »
So, today everything works fine in terms of power consumption (kind of).  I've finally reached ~25uA when asleep!  I'll post more about that in the other forum.  I have noticed some weird behavior a couple of times, when I've switched power sources.  Every once in a while, the sketch will consume ~1.3mA.  My test code is below.  It seems like I may accidently be touching a different pin with my probes which puts it into a weird state, but I haven't nailed down exactly what it is that's causing it.  Generally if I go back and switch sketches and switch back, the behavior goes away.  I guess I won't worry about it too much now, but if anyone has thoughts on this, it would be helpful. 

I don't think I'm crazy though, since ned stated basically the same thing that I'm seeing.  He started with 1.5mA, then he was unsure what he changed, and all of a sudden he was getting 25uA. 


#include <LowPower.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:
  LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

}
Fail fast. Fail often.

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: high moteino r4 power consumption during sleep at 3Vin [answered]
« Reply #25 on: June 27, 2015, 03:30:13 PM »
So, today everything works fine in terms of power consumption (kind of).  I've finally reached ~25uA when asleep!  I'll post more about that in the other forum.  I have noticed some weird behavior a couple of times, when I've switched power sources.  Every once in a while, the sketch will consume ~1.3mA.  My test code is below.  It seems like I may accidently be touching a different pin with my probes which puts it into a weird state, but I haven't nailed down exactly what it is that's causing it.  Generally if I go back and switch sketches and switch back, the behavior goes away.  I guess I won't worry about it too much now, but if anyone has thoughts on this, it would be helpful. 

I don't think I'm crazy though, since ned stated basically the same thing that I'm seeing.  He started with 1.5mA, then he was unsure what he changed, and all of a sudden he was getting 25uA. 


#include <LowPower.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:
  LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

}
This code is not instantiating the RFM69 device and putting it in sleep mode (as advised several comments back), therefore you're totally dependent on how the radio powers up into an unknown state.

Tom