Author Topic: Measuring battery voltage in IOT  (Read 725 times)

0 Members and 1 Guest are viewing this topic.

Offline dobsonr741Topic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Measuring battery voltage in IOT
« on: November 01, 2023, 02:28:43 pm »
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.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7702
  • Country: nl
  • Current job: ATEX product design
Re: Measuring battery voltage in IOT
« Reply #1 on: November 01, 2023, 02:34:28 pm »
Is this a one-off project, or a series production product?
 

Offline dobsonr741Topic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Measuring battery voltage in IOT
« Reply #2 on: November 01, 2023, 02:43:46 pm »
A one-off project. I expect it to the run off of a single 18650 cell for more than a year.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4611
  • Country: dk
Re: Measuring battery voltage in IOT
« Reply #3 on: November 01, 2023, 02:47:19 pm »
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.

it already has that on Vsys

https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf
 

Offline dobsonr741Topic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Measuring battery voltage in IOT
« Reply #4 on: November 01, 2023, 03:10:29 pm »
Good point. What I don't like about it that it takes 14uA.

 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12996
Re: Measuring battery voltage in IOT
« Reply #5 on: November 01, 2023, 03:31:33 pm »
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).
« Last Edit: November 01, 2023, 03:39:20 pm by Ian.M »
 

Online Andreas

  • Super Contributor
  • ***
  • Posts: 3283
  • Country: de
Re: Measuring battery voltage in IOT
« Reply #6 on: November 01, 2023, 03:33:37 pm »
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 regards

Andreas
« Last Edit: November 01, 2023, 03:36:06 pm by Andreas »
 

Offline dobsonr741Topic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Measuring battery voltage in IOT
« Reply #7 on: November 01, 2023, 04:46:31 pm »
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
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4611
  • Country: dk
Re: Measuring battery voltage in IOT
« Reply #8 on: November 01, 2023, 06:14:21 pm »
Good point. What I don't like about it that it takes 14uA.

move R6 and C3 to the other side of Q1 ?
 
The following users thanked this post: dobsonr741

Offline dobsonr741Topic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Measuring battery voltage in IOT
« Reply #9 on: November 01, 2023, 06:51:50 pm »
Yup, that would work! Thanks!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf