I have a device that puts out 0-5v based on what it's doing. How can I use the raspberry pi to read those voltages? I would then have scripts do whatever is needed or maybe display via a webpage. I would like the pi to log the readings every second or every few seconds, just not sure how to start.

2 Answers 2


You need an ADC (Analogue to Digital Converter).

Google MCP3008 (a popular 10-bit 8 channel ADC) as an example.


You could use the ADC built into most* Arduino and connect to it using you RPi via a python script as depicted in this tutorial

image from http://www.uugear.com/portfolio/raspberry-pi-measures-voltage-via-arduino/

  • This was a great answer too. The other one was just more direct. I think I will end up doing this, cause I have to build a few systems once I get them up and going quickly.
    – ahackney
    Nov 3, 2017 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.