The Things Node : new low power library development

Yeah, it’s related to RN module not responding (wake with autobaud may not be sufficient, I’m digging on it, thanks for testing.

@Charles it also happens, when running on batteries and then plugging in usb…

@HanspeterH
the problem was sometime the RN2xxx was not waked up and lock all, it’s now solved (at least don’t see any lock when shaking node)

You need the updated arduino-device-lib until PR #231 is merged

Thanks, I will test it tomorrow

@Charles So far I cannot reproduce the error any more, problem seems to be fixed.

1 Like

With the latest ultra LPP device and node library the node is using 560uA in standby.

that’s the Cayenne example with all sensors on right ?

Yes, 560uA measured in standby mode, during send its using 14mA

2 Likes

I am not an expert, so the following estimate may be wrong, i.e. I am not too sure about it:
From http://www.allaboutbatteries.com AAA batteries have an Energy stored of about 1150mAH. 3 Batteries in series have 4.5V but still an Energy content of 1150mAH which is 3600 x 1150 = 4140000 mAsec. The node running over N hours draws N times ((3600sec x 0.56mA) + (3sec x 14mA)) = 2058mAs (assuming sending 1 message/hour). Dividing available Energy by Energy used/hour i.e. 4140000mAsec / 2058 mAsec = 2011 hours or about 84 days or about a little more than 2 1/2 month. If my calculation is ok…??
This calculation assumes the node to be running until batteries are empty which is not the case, so practical usage time I assume is about half of above values.
Anyway its an estimate only assuming standard AAA batteries. For your own nodes there are better batteries available e.g. from

or other which I do not know.

energy consumption also depends on the payload length and the SF
so if you only send the temperature once an hour on SF 7 (because its around your house/gateway) the outcome will be different.

Yes, but even with a shorter payload of only 1 second airtime the difference is only 1 or 2 days lifetime, because the much bigger part of energy is used by the standby current. Other devices I have seen can go down to 4uA standby and claim a lifetime of several years e.g. 7 years, 1 message/hour by this device I have seen recently:
http://avelon.ch/produkte/i10/
sending temp and humidity and connects to ttn as well…

But as a educational node the ttn node is still quite ok…but I am wondering anyway about the high standby current with all sensors enabled. Somebody should verify my measurements of standby current, perhaps my DMM is wrong on low currents, its pretty old already.

probably use different (modern) MCU, different sensors ect so that’s difficult to compare
sometimes they completely shut the power off the sensors to when in deepsleep.
TTN node is also its a multisensor device… not only a dedicated temp/humidity device.

we are running a test on one 1.5 AA battery with an 328p/rn2483 sending temp/humidity every 5 minutes, started 24 oct. last year… its still running

But I agree, if you expect to get 5 years of temp sensoring outdoors you probably should buy a different device :sunglasses:

The latest version of node and device libs from charles seem to work so much better relating to battery usage as the original ones still being downloaded by all the initial ttn users and resulting in comments such as

words cannot describe how much I hate “TheThingsNode”.
since the battery won’t last more than a week, it’s probably not worth investigating further in this piece of crap.

Why are the @Charles version of the libs not made the standard ones? Why not recommend to all ttn node users to update their device?

I am sure that after more testing these will be merged/pushed… I am happy that is working so much beter now.
kudo’s to @Charles and you tnx for all the testing :sunglasses:

Would be interesting to know how sensors affect, because it’s 530uA more than not using them
Accelerometer CTRL_REG1 is programmed b0b11101000 so at 12.5Hz so should consume 27uA Max

Light Sensor is in power down mode when device sleep so shout be 0.2nA

Temp sensor MCP9804 should be between 200 and 400uA. But digging into the code and datasheet brings me that configTemperature(true); means enable temperature Alert. But threshold alert are not defined in sketch (so default 0° 30°C) nor a onTemperature() event so this is just a non sense and also prohibit sensor to go to sleep mode between read.

So to use temperature with alert monitoring (no power down of the temp sensor) setup should be

// Alert for below 18°C and over 22°c
node->configTemperature(true, R_DEGREES_0_0625, 18, 22);

// Same as above +  Critical Alert for above 50°C
node->configTemperature(true, R_DEGREES_0_0625, 18, 22, 50);

// Your alert callback
node->onTemperatureAlert(yourAlertCallback);

And if you want just read temperature (with sensor power down) setup should be

// No Alert for temperature
node->configTemperature(false);

In bot case you then can read temperature with

// if No Alert are programmed for temperature, temp sensor will auto go back to sleep mode after read
node->getTemperatureAsFloat()

http://ww1.microchip.com/downloads/en/DeviceDoc/22203b.pdf

I’ve updated CayenneLPP sketch to default temp sensor to Low Power

2 Likes

Before wondering too much about those 560uA somebody with a DMM capable of measuring uA type currents should check if my measurement of the standby current is correct or come up with an own measurement. Because my DMM is pretty old and may not be precise in measuring uA type current…
Before the measurement, the ttn node should be programmed with the CayenneLPP sketch using the newest device and node libraries from Charles

Your work is pretty essential for ttn and all of us, thanks a lot!
And know what: I just did a standby current measurement with the newest cayenneLPP with temp alarms off using your newest sketch and my DMM shows around 36uA!!! Recalculating lifetime results in 2.6 YEARS until batteries empty so in practice it will run more than a year wit a set of fresh 3 AAA batteries. This is my ESTIMATE! Difficult to test though…

1 Like

Excellent, thanks for the current measurement, this means that it was the temperature sensor, but I’m surprised not to see about 70uA (10 to 20uA added by accel). Is the accel is waking up the node?

@HanspeterH is still questioning his DMM. I did see @EEVblog active on the Gateway topic. Maybe they can measure using their special low current tool.

Is the lib finished now @Charles ?

then I can measure again if you want