Hi,
Is there anyone who can explain how the “AT+BAT=?” command works?
- What is the reference of the voltage value it gives in response?
- How does it measure voltage?
- What is the reason for answering constantly 3V?
Thanks.
Hi,
Is there anyone who can explain how the “AT+BAT=?” command works?
Thanks.
Hi @whydont ,
AT+BAT corresponds to the voltage divider network of the WisBlock Baseboard. In RAK3172, it is connected to PB3.
This discussion might be helpful - Custom Li-ion battery voltage calculation in RAK4630 - #3 by newuser_rak4630
Thanks.
But why i’m getting 3.000000 V value constatly?
Are you using RAK3172? Also on what RUI3 firmware?
Few things that can affect AT+BAT reading.
If your device has no voltage divider and floating, what you see is not a valid reading. There is a special algorithm in RUI3 firmware implemented in RAK3172 to compensate on the input impedance requirement. Since there is no way to detect a floating pin, the output will be based on that implemented calculation/algorithm. I have no internal details of the equations/code used at the moment. If the 3.0V reading is critical on your application, maybe is a good idea to implement a voltage divider so that it will be pulled down if there is no analog input voltage.