Reading voltage from USB pin on Argon, is it possible?

Hi everybody !
I'm a computer science student at the University of Pisa and I'm currently working with Particle Argon for my thesis. I need to write a program that check the voltage of the USB port. Is it possible ? I know that there is a pin USB on the board, where I measure the voltage with the voltmeter, Is it possible to read this pin by program ?
thank you everyone in advance.

Not directly. You can connect the VUSB pin to an analog input, however you also need a resistor voltage divider or some other technique to reduce the 5V USB to 3.3V maximum for the ADC. There's a circuit in this recent post:

The other issue is that you will need to add a calibration factor. There's a Schottky diode between the USB 5V pin and VUSB that will produce a voltage drop of 0.1 to 0.2 V. It should remain relatively constant at room temperature so you can just calibrate it once.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.