Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:46 09 Aug 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

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

Author Message
Peter63
Senior Member

Joined: 28/07/2017
Location: Sweden
Posts: 204
Posted: 05:48am 08 Aug 2026
Copy link to clipboard 
Print this post

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
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9019
Posted: 07:36am 08 Aug 2026
Copy link to clipboard 
Print this post

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.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11727
Posted: 07:38am 08 Aug 2026
Copy link to clipboard 
Print this post

It's in the manual MM.SUPPLY
 
Peter63
Senior Member

Joined: 28/07/2017
Location: Sweden
Posts: 204
Posted: 08:11am 08 Aug 2026
Copy link to clipboard 
Print this post



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


 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9019
Posted: 08:14am 08 Aug 2026
Copy link to clipboard 
Print this post

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
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3341
Posted: 08:28am 08 Aug 2026
Copy link to clipboard 
Print this post

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
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9019
Posted: 08:30am 08 Aug 2026
Copy link to clipboard 
Print this post

  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

Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11727
Posted: 08:32am 08 Aug 2026
Copy link to clipboard 
Print this post

  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.
 
Peter63
Senior Member

Joined: 28/07/2017
Location: Sweden
Posts: 204
Posted: 09:13am 08 Aug 2026
Copy link to clipboard 
Print this post

  Quote  The WebMite is different, I also get 0.

thanks for the quick reply
 
Supertech

Regular Member

Joined: 13/11/2016
Location: Australia
Posts: 67
Posted: 01:39pm 08 Aug 2026
Copy link to clipboard 
Print this post

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...
 
Peter63
Senior Member

Joined: 28/07/2017
Location: Sweden
Posts: 204
Posted: 02:04pm 08 Aug 2026
Copy link to clipboard 
Print this post

  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
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9019
Posted: 03:40pm 08 Aug 2026
Copy link to clipboard 
Print this post

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.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Print this page


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