Measuring battery voltage in IOT - Page 1
Forum section: electronics / projects

author: dobsonr741
author_rank: Frequent Contributor
timestamp: November 01, 2023, 02:28:43 pm
content: I’m making a RPi Pico board based IOT device, that wakes up by a TPL5110 in every few minutes, makes some measurements and evaluates whether to transmit the results over radio or not. Another reason to transmit in those wakeups when the battery is approaching empty.The buck converter of the Pico is to be shut down/enabled by TPL5110 over the 3.3V_EN pin. How would you connect the always on battery voltage to the Pico’s ADC for measurements, with minimum part count and with no extra power consumption? Also not to stress the Pico with voltage applied to ADC in when it’s Vcc is zero.

author: tszaboo
author_rank: Super Contributor
timestamp: November 01, 2023, 02:34:28 pm
content: Is this a one-off project, or a series production product?

author: dobsonr741
author_rank: Frequent Contributor
timestamp: November 01, 2023, 02:43:46 pm
content: A one-off project. I expect it to the run off of a single 18650 cell for more than a year.

author: langwadt
author_rank: Super Contributor
timestamp: November 01, 2023, 02:47:19 pm
content: Quote from: dobsonr741 on November 01, 2023, 02:28:43 pmit already has that on Vsyshttps://datasheets.raspberrypi.com/pico/pico-datasheet.pdf

author: dobsonr741
author_rank: Frequent Contributor
timestamp: November 01, 2023, 03:10:29 pm
content: Good point. What I don't like about it that it takes 14uA.

author: Ian.M
author_rank: Super Contributor
timestamp: November 01, 2023, 03:31:33 pm
content: Use an ultralow quiescent current OPAMP as a buffer for the potential divider and increase the divider resistors by an order of magnitude and you should be able to get that down to under 2uA, maybe even under 1uA. The fly in the ointment is its then far more sensitive to surface leakage - you may need to slot the PCB under the resistors and even put a guard ring driven by the OPAMP output round its input node.The other approach is to disconnect the top end of the divider when not sampling, and sample infrequently enough that the divider current is negligible. Typically this is done with a small signal P-MOSFET, which requires level shifted drive, most conveniently provided by a N-MOSFET, using a complimentary dual pair to get them in the same package. Add two resistors for P gate pullup and N gate pulldown, and your BOM is only four resistors + one dual MOSFET (+ an extra I/O pin).

author: Andreas
author_rank: Super Contributor
timestamp: November 01, 2023, 03:33:37 pm
content: Hmm,why not switch the FET into the voltage divider?If you use a port pin to control the gate you can even save energy after having measured the analog value.Examlple see: T2, R23, R24 with GP4 as analog input.With best regardsAndreas

author: dobsonr741
author_rank: Frequent Contributor
timestamp: November 01, 2023, 04:46:31 pm
content: Great example! I’m planning to remove the offending parts on the Pico, and rebuild it on the host PCB as your example. I might even get away with 2 AA powering instead of 18650

author: langwadt
author_rank: Super Contributor
timestamp: November 01, 2023, 06:14:21 pm
content: Quote from: dobsonr741 on November 01, 2023, 03:10:29 pmmove R6 and C3 to the other side of Q1 ?

author: dobsonr741
author_rank: Frequent Contributor
timestamp: November 01, 2023, 06:51:50 pm
content: Yup, that would work! Thanks!