Quantcast
Channel: Raspberry Pi Forums
Viewing full articles (7807 articles)
Browse article index
↧

General • Measuring vsys voltage on Pico W

$
0
0
I've been getting the vsys voltage using this, with CircuitPython:

Code:

from board import VOLTAGE_MONITORdef get_vsys():    try:        global vsys_voltage        pin = analogio.AnalogIn(VOLTAGE_MONITOR)        adc_reading  = pin.value        adc_voltage  = (adc_reading * pin.reference_voltage) / 65535        vsys_voltage = adc_voltage * 3        pin.deinit()    except Exception as e:        print("get_vsys problem: ", e)
I use it to measure the voltage of the li-ion battery that's running my Pico W. Now I've hooked a sensor up to ADC2, and the vsys readings are inflated.

Before it would read the li-ion voltage, typically 3.6 to 4.2 volts. Now I get readings like 8.63 or 8.67. If I remove the sensor from ADC2, the vsys reading goes back to normal.

Is there any way to get an accurate vsys reading while using ADC2?

Statistics: Posted by david3 — Thu Sep 17, 2026 11:55 am — Replies 4 — Views 44


↧

Viewing full articles (7807 articles)
Browse article index

Latest Images

Trending Articles



Latest Images