Radio waking up for no reason.
-
Hi.
I'm working on low power pulse power meter based on atmega328p@3.3v/8MHz.
My plan is:
a: Send KWh for day/night meter every 100 pulses
b: power radio ON only on 100th pulse
For (b) reason I'm not using sleep(); as sleep(); is powering up radio every time cpu is woken up.
sleep(0); => 20mA x 8ms
PowerDown(); => 4mA x 0.5ms
Using sleep(0); my node battery would last approx 80 times shorter than without it.
d: Calculate average power consumption every 30 minutes.
e: For reason (d) I'm running on internal oscillator with 32.768kHz crystal feeding Timer2 in asynchronous mode.Now the problem.
Before I enabled TIMER2 overflow interrupt everything worked fine. Pin change interrupts work as intended, radio stays down until data is ready to be sent.
As soon as I enable TIMER2 interrupt, wake up from it (every 8 seconds) and radio gets turned on by receiveDone(); called from f****k knows where.
I know it's receiveDone(); because I'm using AVRStudio and DebugWire debugging.
i could call transportDisable();(that's what sleep uses to switch radio off) but it takes 4 ms to cycle radio power, 8-10 times more power used that needed.
-
Update:
After few hours with AVR dragon snooping execution paths I found that after each loop() radio is woken up by code executed after each loop().
My solution is to never leave loop() by creating infinite loop inside of it, so far, after 10 h everything runs stable.
8-10 years on a single 1/2AA Lithium thionyl battery seems possible
-
Over 4 years on, and my node ran continuously sending 4 messages every 5 minutes.
It's 700mAh LiFePo4 battery voltage dropped from initial 3.45V to 3.24V, according to LiFePo4 voltge/SoC tables It's just under 40% left.
700*60% = 420mAh. 100 mAH per year. using library 2.40 and blob message I could cut usage to ~25mAh/year, not bad
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Home Assistant/MySensors quirks
Development • 13 days ago • OldSurferDude 13 days ago -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
MQTT-Help me understand about the MQTT Gateway.
Development • 28 days ago • dpcons 17 days ago -
PJON and Minicore not working
Development • 8 days ago • Trand 8 days ago