Low Power: How much current? [Solved]
-
I am using v1.6.5. I burned the bootloader for Pro Mini, still no change.
Sleep mode: 17.9uAFYI, when upgrading from v1.4 to v1.5 of MySensors lib, DO NOT overwrite all the files, Delete the folder, add the new v1.5 I had a lot of errors just now
I switched to v1.5 with v1.6.5 and I am getting 2uA in oState now. Now I am trying to play with the new sleep settings. will give an update soon.
-
The new sleep library is all over the place and I cannot make heads or tails of it.
I am using IDE 1.6.5 and MySensors v1.5 and I am getting 2uA in sleep mode with my modified BinarySensorSwitch sketch.
I want to be able to shutdown the radio pin and LOW all the pins but I don't know where to add it. Anywhere I add, the radio stays high forever basically. Any idea's?
-
Notionally, I should think it would fit well as a subclass of the RF24's powerDown method.
-
The new sleep library is all over the place and I cannot make heads or tails of it.
I am using IDE 1.6.5 and MySensors v1.5 and I am getting 2uA in sleep mode with my modified BinarySensorSwitch sketch.
I want to be able to shutdown the radio pin and LOW all the pins but I don't know where to add it. Anywhere I add, the radio stays high forever basically. Any idea's?
@brolly759 said:
I am using IDE 1.6.5 and MySensors v1.5 and I am getting 2uA in sleep mode with my modified BinarySensorSwitch sketch.
I want to be able to shutdown the radio pin and LOW all the pins but I don't know where to add it. Anywhere I add, the radio stays high forever basically. Any idea's?
Does your wiring change at all when you switch from the first scenario to the second? I'm guessing that in the first scenario you're powering the radio through vcc, but in the second you're powering it through a pin (what you're calling the "radio pin" and which you intend to set LOW in order to turn-off the NRF rather than "power down" sleep it). Is that right?
-
Subsequent to yesterday I ran Gammon's "Sketch J" on the very same Pro Mini that I had started this thread with (the one where I had soldered on 30 headers and which was drawing 17.2uA in the previous attempt at sleep with no watchdog timer). Instant results! Sleep current dropped to 125nA. I used a uCurrent Gold in conjunction with a Fluke 87V to take the measurement. That number is in good agreement with the 150nA reported by Gammon himself for a barebones arduino build. And, by the way, yes, I am running the current Arduino IDE 1.6.5 and the current libraries.
Ridiculously easy! As before, it's just 3 steps. For the third step, just use Gammon's sketch to put your Pro Mini into sleep powerDown. Easy! Don't bother with RocketScream or LowPowerLab sketch and library. Leave them out of it.
More good news: you already have the library Gammon's sketch uses--it's avr/sleep.h, so if you want to replicate this measurement test for yourself you won't need to download or install anything other than Gammon's sketch itself. You can find "Sketch J" here: http://www.gammon.com.au/power
As far as I'm concerned, this proves the Pro Mini is a perfectly viable low power platform. This particular measurement test was my due diligence before standardizing. Therefore, I'm done here.
Good luck to each of you on your various low power pursuits.
-
@Neverdie: I am so happy for you! you know what I mean now about those easy steps. it is very strange that I had difference with lowpowerlab. I have looked at the lib and saw the part about the powerdown but I am not familiar with this syntax yet. I prefer how sketch J looks. But I was so happy when I saw this <uA, lol!
but I can't wait to see Charles' ulpnode lib. He told me that it would be Mysensors compatible. it makes more sense now with new organization of Mysensors lib. great work @Hek and mysensors team! Mysensors is so fun ahahah! I am addict! -
@NeverDie I never had issues with Gammon's code on v1.6.5 . I had issues with the mysensors v1.4 library with v1.6.5 of Arduino IDE. My power problems went away when I switched to v1.5 of mysensors library. I have stopped troubleshooting for now as I am slightly burnt out but my last test on v.1.6.5 with v1.5 MySensors gave me strange results sometimes. If I edited any files in the sleep mode functions I would not be able to go back to sleep. I was draw a constant ~3mA.
Congrats though and welcome to the club. I think I am going to just combine nRF Mesh + gammon's code to make my own mesh network setup. (When I actually know programming) ;)
-
Does everything which is turned off in Sketch J automatically get turned on again during wake-up? Or, does it remain off? I notice that Sketch J repeats turning everything off again before going to sleep, each and every time. There are some things which I may not being using, like I2C and ADC, which it would make sense to leave turned off. Likewise, no reason to wakeup SPI on every 8 second cycle unless there's a reason to use the radio.
Furthermore, it would save valuable time at higher currents not needing to turn them off again. Anyone happen to know, or will I need to run experiments?
-
By the way, perhaps a good argument in favor of an external interrupt for waking up is that it could wakeup the arduico and the radio in parallel. If the arduino wakes itself up through WDT and subsequently wakes up the radio, then it has to waste time waiting at high currents while the radio wakes up.
Just a thought at present, as I don't know how feasible this would be.
-
In case anyone is curious as to what happens when an Arduino is waking up from sleep, this picture tells the story:

I powered an 8Mhz Pro Mini using a 5.1V battery (because it was convenient), and set it using "Sketch I" to wake up every 16ms and then immediately go back to sleep. The picture shows the Pro Mini draws about 500uA for about 2.1ms, then it surges up to about 6.5ma (I suppose at this point it is "awake"), and then voltage plummets back down again as it returns to sleep. When asleep it draws about 3.5uA. I measured the current using a 1ohm sense resistor, so in the picture 1mv=1ma. When measuring milliamps, I seem to get a much clearer picture (less noise) using a 1ohm sense resistor than I do using the UCurrent Gold.
In his write-up, Gammon warns that, depending on the sleep duration, this warm-up period can be as long as 65ms!
"Warning about wake-up timesVarious fuse settings make a big difference to the wake-up time. Some wake-up times are quite long (eg. 65 mS) because they are designed to allow the crystal clock to settle. If you are trying to save power, taking 65 mS to wake up, add 1 to a counter, and go back to sleep, is a lot. You would want to look at a "wake-up" fuse setting that is appropriate for the type of clock source you are using."
I wish he had been more clear about how the sleep settings affect the length of the wake-up period. Perhaps he or somebody else explains that elsewhere. -
Hello guys,
I'm reading your post, and that is amazing... you're fighting with u/nAmps.
However, I'm concerned about mAmps :)The lowest what I can get with Atmega328 + NRF24 on breadboard is 1mA.
What I've done:
Flashed Atmega328p with ATmegaBOOT_168_atmega328_pro_8MHz.hex
Uploaded BinarySwithchSleepSensor sketch with FDTI. Tried: API 1.4/1.5, IDE 1.0.6/1.6.5 (no difference)
Powered the sensor directly with 2xAA
Changed ext fuses to x07 (no BOD)
Connected NRF24 according to MySensors instructionsOn the breadboard I have only:
Atmega328p
NRF24
10k resistor on 1st/reset pin.With this set up minimum what I can get is:
Atmega328p w/o NRF - 3pin con - 0.1mA /not con - 3.4mA
Atmega328p with NRF - 3pin con - 1.09mA /not con - 1mAI'm using cheap multi-meter, however, with Gammon's J sketch - it shows 3uA without NRF.
I'm struggling almost a week, and can't understand, why you guys achieving such a great results while using almost the same setup (Mini 8Mhz is based on Atmega328p).
Your ideas and suggestions are most welcome. Thank you in advance!