Close

Learned a thing about the pi pico vsys/vbus

A project log for Thumb Term

Battery powered Linux-terminal handheld with front and rear inputs, 4.3" DSI LCD, a Pi 3A+, and GPIO breakout. WIP.

dan-a8ksh4Dan (a8ksh4) 07/26/2023 at 17:220 Comments

I've been looking at documentation trying to figure out why uart doesn't work for me and got to looking at how VBUS and VSYS work on the Pi Pico.  Looks like VBUS is directly connected to the usb V+, and VSYS is behind a diode.  I believe this means that if you have battery connected to VSYS, it'll run the pico, but it won't power the usb port.  

One concern I'd have with a usb plugged into the pico is that it might feed 5v back to the battery and over-charging it.  For now, I've been using a usb cable to program the Pi Pico that has the positive wire disconnected.

An interesting thing is that the Pi Pico has VSYS connected to ADC 3 (gpio 29) with a by-3 voltage division.  I had soldered on a couple of external resistors to get a voltage on ADC2 (gpio 28), but it seems this is unnecessary!

>>> vsys = ADC(29)
>>> vbat = ADC(28)
>>> vsys.read_u16() * 3 * 3.3 / 65535
4.042179
>>> vbat.read_u16() * 2 * 3.3 / 65535
4.124358

I'm still having trouble with the UART connection between the Pi Pico and the Pi 3A+.  Will update when I get that working...

Discussions