Measuring a BBB's own supply voltage

Hi,

Is there a way to measure a BBB’s supply voltage from within the Linux OS? I was thinking about connecting one of the VDD_3V3 pins to a analog GPIO input and measuring that but I’m not sure if that’s a good idea or even possible.

Thanks,

Chris

If you added an external power measurement device that is read via one of the serial ports. That would only measure the power of the code that is reading the power device. I am not sure if you are looking for na average or just a single point in time.

Gerald

Hi,

Is there a way to measure a BBB’s supply voltage from within the Linux OS? I was thinking about connecting one of the VDD_3V3 pins to a analog GPIO input and measuring that but I’m not sure if that’s a good idea or even possible.

This is possible as long as you use an resistor divider because the maximum analog voltage must not exceed 1.8 volts.

Regards,
John

The analog input AIN7 is connected on-board to the 3.3V power line over a 50/50 voltage divider. Just get the input of AIN7 to measure the (half) board voltage.

One solution to fetch AIN7 inputs is libpruio. Check out the (pre-compiled) examples, ie trigger to show a graph of the inputs at AIN4 and AIN7 in a window. Or example 1, which exports 13 lines of sampled ADC values. AIN7 is in the last column, scaled as 16 bit value (0xEE40 * 2 * 1.8 V / (4095 * 16) = 3.35 V)