How To read battery level in sensor nodes using connectport x4?

I want to know that how to code in python to read battery life in sensor nodes using connect port X4?

You’ll need some type of external 0-20vdc input. The XBee within the X4 has a ‘battery voltage’, but this is AFTER the various internal regulators so should always read 3.3vdc.

On my own solar systems, I use an Xbee AIO Adapter - which is a royal pain in the %$@ to use - but it works. Since a 12vdc battery/panel will see voltages closer to 20vdc at the panel when the battery is not charging, I use a simple resister network (like 10K and 10K), which turns a 0-20vdc signal into something closer to 0-7vdc.

So i can link in 3 voltages:

  • panel voltage
  • battery voltage
  • load voltage (to the X4)

Of course, if you are reading the AIO via the X4, then when LVD (low-voltage disconnect) turns off the X4 because the battery hits for example 11.3vdc, then you’ll loss any meaningful data.

Hello. Is there a particular sensor you’re wanting to find this information from?