Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : read the voltage on VBUS with PicoMite?

Posted: 05:48am
08 Aug 2026
Copy link to clipboard
Peter63
Senior Member

Is it possible to read the voltage on VBUS with PicoMite?
If you have battery-powered projects it would be convenient.

using firmware: PicoMiteHDMIWEB MMBasic USB RP2350A Edition V6.03.01

/Peter63
 
Posted: 07:36am
08 Aug 2026
Copy link to clipboard
Mixtel90
Guru


It's probably not a great idea.

VBUS powers VSYS via a Schottky diode. The actual voltage on VBUS isn't really needed, it will probably be somewhere around 0.4V higher than you measure on VSYS. You can measure VSYS as 2x the value on GP29 and you can tell if VBUS is present as GP24 will be high if it is.

Personally I wouldn't recommend running a PicoMite (especially a HDMIUSB version) on batteries as it has no low power mode. Not unless they are largeish capacity or only needed for a short time, like a UPS.
 
Posted: 07:38am
08 Aug 2026
Copy link to clipboard
matherp
Guru

It's in the manual MM.SUPPLY
 
Posted: 08:11am
08 Aug 2026
Copy link to clipboard
Peter63
Senior Member



print mm.supply
0

returns 0  

' read VBUS (VSYS) voltage
SetPin GP24,AIN ' Error : Invalid GPIO
'SetPin GP29,AIN ' Error : Invalid GPIO
Print Pin(GP24)
'Print Pin(GP29)
End


 
Posted: 08:14am
08 Aug 2026
Copy link to clipboard
Mixtel90
Guru


Certainly easier. :)
No more accurate though as there is no electrical connection (via a potential divider or otherwise) to VBUS. Only VSYS can be measured.

GP24 is a digital input, not ADC.

On a RP2350B the ADC pins don't follow the same rules at all. Those pins are only for the Raspberry Pi Pico and Pico 2 (official versions).
.
Edited 2026-08-08 18:25 by Mixtel90
 
Posted: 08:28am
08 Aug 2026
Copy link to clipboard
phil99
Guru


The WebMite is different, I also get 0.
> ? mm.supply
0
> option list
WebMite MMBasic RP2040 Edition V6.03.01

? mm.supply
4.494285714
> option list
PicoMiteVGA MMBasic RP2350A Edition V6.03.01

And a board with OPTION PICO OFF returns -1 as expected.
Edited 2026-08-08 18:28 by phil99
 
Posted: 08:30am
08 Aug 2026
Copy link to clipboard
Mixtel90
Guru


  Quote  The WebMite version also has some GPIO pins which are used for internal board functions:
• GP29 (Input/Output) wireless SPI CLK/ADC mode (ADC3) measures VSYS/3
• GP25 SPI CS (Output) when high also enables GPIO29 ADC pin to read VSYS
• GP24 (Input/Output) wireless SPI data / IRQ
• GP23 (Output) wireless power-on signal
The WebMite firmware does not allow these pins to be re-allocated
 
Posted: 08:32am
08 Aug 2026
Copy link to clipboard
matherp
Guru

  Quote  For modules with a pin allocated to measure the incoming supply voltage
such as the Pico and Pico2, MM.SUPPLY will return the voltage.
 
Posted: 09:13am
08 Aug 2026
Copy link to clipboard
Peter63
Senior Member

  Quote  The WebMite is different, I also get 0.

thanks for the quick reply
 
Posted: 01:39pm
08 Aug 2026
Copy link to clipboard
Supertech
Regular Member


This is a good explanation on said subject I came across, found here,

https://forum.core-electronics.com.au/t/pico-w-measuring-vsys/15158

Perhaps helpfully to all...
 
Posted: 02:04pm
08 Aug 2026
Copy link to clipboard
Peter63
Senior Member

  Quote  This is a good explanation on said subject I came across, found here,
https://forum.core-electronics.com.au/t/pico-w-measuring-vsys/15158

Perhaps helpfully to all...



Edited 2026-08-09 00:05 by Peter63
 
Posted: 03:40pm
08 Aug 2026
Copy link to clipboard
Mixtel90
Guru


Moaning about "brought to market too early" is pointless and very misleading. The fact is, the RP2040 has a fixed number of GPIO pins that can't be increased. If you want to introduce Wi-fi capability then it will need some of those pins to drive it. As the wired out GPIO pins can also be regarded as fixed, if you want any hardware compatibility, then you have to draw from the pool of "reserved" GPIO pins, there is simply no other option. The alternative is very simple - don't have Wi-fi. :)

The RP2350A is pin compatible with the RP2040 so exactly the same rules apply.

There is NO Raspberry Pi definitive module for the RP2350B yet so there are no rules. If RPi had decided to wait until the RP2350B module was available to get the additional pins then there would still be no W versions.
 


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026