Voltage via software?

Is it possible to get the input voltage purely in software?

Seems like a normal Raspberry Pi at least has a “sufficient voltage” GPIO read:

https://www.raspberrypi.org/forums/viewtopic.php?p=582098&sid=acf25316ac46eb2f6ac40a42cf23a053#p582098

But can we get actual voltage?

Hi @incanus , I don’t think it would be possible to determine the exact voltage level. From what I know the GPIO on the RPI are digital only, and not capable of doing ADC conversion, which is what would be needed for determining the voltage level.

One of my colleagues suggested these two ADC https://www.aliexpress.com/item/32716184973.html or https://www.adafruit.com/product/1085 for measuring voltage

Hey @incanus just to clarify, do you mean the power supply input voltage? Either way there’s no way to measure that without using some external circuitry, either using one of the ADCs Shaun mentioned or, since you’re using a Fin, there are some ADCs on-board that you can access via the co-processor using the firmata library.

Depending on your supply voltage though, you would still have to build an external circuit to scale the supply voltage down to something within the range of the ADC though, if that is what you’re looking to do.

Yeah, we will probably go the ADC / voltage divider route. Just wondering in the meantime. Upon further reflection, it makes sense that without an onboard ADC this would not be possible.