Notifications
Clear all

Using VIN on the wittypi4 mini to measure battery voltage.

3 Posts
2 Users
0 Reactions
31 Views
(@terrafox)
Posts: 14
Active Member Customer
Topic starter
 

I plan to use the unpopulated power header on the wittypi4 mini to power my raspberry. My energy source is a 12v battery and a switching 12v to 5v DC-DC converter connected to the 5v and GND pins of the power header. I would like to monitor my 12v battery during operation. Other posts in this forum tells me that the VIN can handle about 60V.
I suspect there is a resistor divider on the input of the ADC converter. Will there be a current flow through these resistors at all times even when the wittypi4  is in the OFF state ?. If so, this will contribute to long term battery drain. I assume that the divider will have quite high resistance but what are the actual resistor values ?

 
Posted : 10/11/2026 3:13 pm
(@admin)
Posts: 850
Member Admin
 

Yes, Witty Pi 4 Mini has a resistor voltage divider connected between VIN and GND, with the midpoint connected to the MCU's ADC1 input.

The resistor values are:

  • R16: 560 kΩ
  • R17: 10 kΩ

The voltage divider is permanently connected, so there will be a small continuous current flowing through these resistors whenever a voltage is applied to VIN, even when the Raspberry Pi is powered off.

With a 12V battery, this current is approximately:

12V / (560 kΩ + 10 kΩ) = 21 µA

This corresponds to approximately 0.5 mAh per day, or 15.2 mAh over 30 days.

For most 12V battery applications, this consumption is negligible.

One additional consideration: if your 12V-to-5V DC-DC converter remains enabled while the Raspberry Pi is off, its own quiescent current may be significantly higher than the current consumed by the VIN voltage divider. It would be worth checking the converter's specifications if minimizing battery drain during long standby periods is important.

 
Posted : 10/11/2026 4:30 pm
(@terrafox)
Posts: 14
Active Member Customer
Topic starter
 

Thanks for a very good explanation. The voltage divider will not give a significant contribution to battery drain in my application.

 
Posted : 10/11/2026 5:02 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.