arduino-node-lib icon indicating copy to clipboard operation
arduino-node-lib copied to clipboard

Battery voltage sensor stops working if battery voltage drops below around 3 volts

Open HanspeterH opened this issue 7 years ago • 7 comments

After the battery voltage has dropped to some voltage (e.g. 2.9V), the readout always returns the same value for all following messages sent (hundreds) although the DMM measured battery voltage is much below the reported fixed value of 3280mV. Probably rather a HW problem. But the SW should not send wrong data. This makes the sensor useless. 22:30:571763 dev id:ttn-node-01payload:0CD0001008E9battery:3280event:"motion"light:16temperature:22.81 ... hundreds of messages later.. 11:26:122514 dev id:ttn-node-01payload:0CD6002908E3battery:3280event:"button"light:41temperature:22.75 actual DMM measured battery voltage: 2.0V In this case the SW should somehow indicate in the message, that the data is invalid.

HanspeterH avatar Feb 21 '18 10:02 HanspeterH

What is the code to read the battery level? Have you seen the new battery level LPP example?

johanstokking avatar Feb 21 '18 16:02 johanstokking

Yes I have seen it and charles seems to have included the new battery voltage readout logic already in the LPP sketch. Hopefully the sleep mode logic and the new battery voltage readout logic will be implemented in the basic sketch as well. I will test with the LPP sketch how long the ttn node will live with the improved code as soon as the ttn node with basic sketch is no longer sending its data, now running at 1.9V measured battery voltage and sensor data still looking good except voltage

HanspeterH avatar Feb 21 '18 18:02 HanspeterH

Great. Can you file a PR for the basic sketch if that's necessary?

johanstokking avatar Feb 22 '18 15:02 johanstokking

Hmm I tried to read about PRs but I am lacking the skills about github terms and logic. I got stuck at the very beginning about selection of a base branch. I simply do not know all those terms as an end user and being only an occasional programmer. If I would continue i am pretty sure to do something wrong or useless...

HanspeterH avatar Feb 23 '18 12:02 HanspeterH

@HanspeterH there are good tutorials, for example https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github

Very useful skill!

johanstokking avatar Feb 23 '18 13:02 johanstokking

Thanks, I will have a look...

HanspeterH avatar Feb 23 '18 13:02 HanspeterH

Fixed with PR #15 ;-)

hallard avatar Mar 01 '18 12:03 hallard