Log in

View Full Version : Reading battery voltage Raspberry Pi


Ngang
28-07-2016, 12:20
Hi, I'm working on a project with the Raspberry Pi 2. It's hooked up to a servo HAT and a battery pack. Is there a way to read the voltage on the battery? Maybe by reading how much goes into the Pi?

euhlmann
28-07-2016, 12:44
The Pi does not have analog inputs by default. However, by using an ADC you can read analog voltages. I've had good results with the MCP3008 (https://www.adafruit.com/product/856) in the past (although I wouldn't recommend using Adafruit's tutorial code for it - use the Pi's actual SPI libraries; they should be more reliable)