How do i measure the battery voltage?
-
Can i just connect the + of the battery to a ADC input(with voltage divider). Any done this before? I'm using the pysense, pytrack boards but i assume this doesnt matter.
-
@misterlisty Sure, you can. Please keep in mind that the voltage divider draws current too, so use high resistor values. If you go for e.g. 330kOHm + 100kOhm, the current drawn is about 10µA. Soi better go for even higher values. Also, add a capacitor of ~10nF between the ADC input and GND, to keep the dynamic impedance low for the measurement cycle.
-
@robert-hh thank you
-
@misterlisty If you are using a Pysense or Pytrack you don't need to use the ADC input or add a voltage divider. That's already done on the board, and you can read it using the
read_battery_voltagemethod of the relevant library.I think it's also more accurate that the ESP32 ADC, though I haven't really compared them.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login