Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8035

General • Re: Can I Read Input Voltage (VSYS) from Pin 35 on Raspberry Pi Pico2W?

$
0
0
Dear hippy,

Thank you very much for your valuable information. Thanks to you, I was able to find the relevant article.

Original English excerpt:
"Note that on Pico W, the WiFi chip is connected to the ADC reference voltage via a multiplexer, and this can cause ADC readings to be inaccurate or noisy, especially when WiFi is active. This is a hardware limitation."

日本語訳
「Pico W では、WiFiチップがマルチプレクサ経由でADCのリファレンス電圧に接続されており、特にWiFiが動作中はADCの値が不正確になったりノイズが増えたりすることがあります。これはハードウェア上の制約です。」

Here is the script I used, which successfully publishes to MQTT using Wi-Fi. I am able to measure the voltage very stably within about ±0.02V.

Code:

Pin(25, Pin.OUT, value=1)Pin(29, Pin.IN, pull=None)time.sleep(0.1)  # Wait 0.1 secondsraw = ADC(3).read_u16()voltage = raw * 3.3 / 65535vsys = voltage * 3 Pin(29, Pin.ALT, pull=Pin.PULL_DOWN, alt=7)Pin(25, Pin.OUT, value=0, pull=Pin.PULL_DOWN)return vsys

Thank you for your precious time!

Statistics: Posted by chanken — Mon Jun 16, 2025 6:44 am



Viewing all articles
Browse latest Browse all 8035

Trending Articles