RFM98W @ Atmega328p - power consumption

Hi All,

I’ve created my own LoRa sender/recevier with: Atmega328p, BME280 as sensor and RFM98W as transmitter.
My setup: Read the sensor every 4 minutes, if values has changed, send it over LoRa.
I could measure 9 uA during sleep, and around 20-30 mA during LoRa activity (4 dBm, current Limit 45 mA, duration of code execution is 0.25 seconds). Since I have only a multimeter, i can’t measure current peaks really good.

Taking this into account, my calculation shows that 2xAAA battery should be enough for 1 year:
1 second 30 mA, 239 seconds 9 uA --> 0,13 mAh. On 1000 mAh cells, it should last 320 days.

Unfortunately, the batteries are empty after 30 days.

So I measured the voltage via software (https://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/) and I could see that the voltage drops quickly.
BatteryVoltage
Any ideas how the expected lifetime of the battery is 10x smaller than expected?

Thank you in advance,
mcgreg

1 Like

Some of your measuremts must be wrong.

I have a very similar sensor doing much the same thing, except transmitting every 15 minutes @ 14dBm. After 6 months of operation the 155mAhr battery had dropped from 4218mV to 3898mV. Its dropped only 30mV in the last month. A set of AAA Lithium energizers could therefore last 18 years.

Is this a TTN transmitter ?

Hi @LoRaTracker,

I know! this is also what I expected, years, not few weeks!
it’s not an TTN transmitter. I use it only locally: LoRa Atmega Sender --> LoRa ESP32 Receiver --> local MariaDB

This is how I measured it

MultimeterAtmega

This TTN forum is for things related specifically to TTN, a better place to ask your questions would be over in the Arduino forums, but do post a full circuit daigram …

I know. My plan is to make a TTN device, but I got stuck before that. Sorry if that forum is wrong, I thought this is the most suitable for my issue.

You think the wiring is wrong? But as I said, I can receive the data correctly.
LoraWiring

No, but the Arduino forum would expect you to post a circuit diagram (and the code).

However you still need to work out which of your measurements is wrong.

As a general point 2xAAA batteries may not be a good choice for powering a node unless they are Lithium types. A standard so called ‘1.5v’ AAA Alkaline is down to 1.2v halfway through its life which is a bit on the low side for some devices.

Thank you. I’ll try my luck there.

I will rework my design to TTN, in the Arduino forum nobody seems to know what is going wrong. See you soon.

I did not see a post about the issue in the Arduino forums …

https://forum.arduino.cc/index.php?topic=698653.0

I have used a similar setup, but ran into the problem that when the AAA batteries become even a bit lower in voltage, the Atmega will reset due to the voltage dropping below 2.7V (default brown out voltage) when doing an uplink due to the relatively large peak current.
Depending on the firmware, it might then continuously start up, try to join, reset etc. etc.
That will drain the battery quickly.

I thought about it too. That’s why I’m sending a LoRa Packet on Restart (in the Setup() Routine). But this isn’t the issue.

Ah … see it now.

Did you work out which of your measurements was in error ?

Think about it; if the batteries only last 1\10th of the time calculated from your measurements, either the battery has only 1\10th the capacity you think it has, or the measurements\times you took are wrong.

Since I tested it with different batteries (2xAA Alkaline, 2xAAA Eneloop, 2xAA Eneloop) i’m confident that this isn’t the issue.
Either I measure incorrectly, or there are some peaks in between which I can’t capture with my multimeter. I guess i measure incorrectly, since I’m not a electrical engineer.
But on the other hand, 9 uA in sleep and 20-30 mA in LoRa transmission fits exactly into the specs of the components.

The main suspect would be the sleep current, was the 9uA the sleep current for the entire working setup ?

I hope so. Further above I posted the drawing how I measured it. Should be ok, right?

The post with the picture of a breadboard\battery and ‘This is how I measured it’ ?

@mcgreg There are many possible things… Multimeter is not good enough always because of changing internal resistor. Use CurrentRanger or 10ohm resistor in series together with osciloscope and chech your power consumption during transmission and sleep. My RFM95W takes up to 130mA in transmission. Your I2C bus can drain current through pull-up resistors if something is changed on Arduino side.
Also problem can be in batteries. Not all baterries are the same. They are in the same package and some can have just half or double capacity. It depends also what is their cut off voltage. Maybe it is not going in sleep all the time.

First thing is to know real consumption during few cycles. After than you can start looking where is the problem. :smiley:

I’m doing master theseis survey about LoRaWAN development and testing (your experiences, habits and practices).
I will be thankful if you fill this survey. It will take you just couple of minutes and it means to me a lot! :smile:
Thanks :grin:

Yes, exactly this picture

Thank you. Unfortunately I don’t have a osciloscope. I would love to know the real consumption for few cycles, so let me know how to achieve it with limited equipment.