5V supply to Pico

I know I’ve read it somewhere in the documents but can’t now find it. How do I have concurrent 5Vdc and usb power supplies to a Pico ? I think it involves a shottky diode and a resistor for the pin connected part.

Also for this project the Pico is located in a hard to get at location. Normally it is controlled by MQTT messages but occasionally the pico code will need an update which requires a usb cable connection.

I’m thinking of a usb cable that is permanently connected to the pico but only plugged into the pi when needed.

I’d be really interested if any one has any other suggestions rather than this Heath Robinson approach. It would be really great if there was a wireless method for programming the Pico.

Cheers

Toni

1 Like

@Toni135859

The usual way is to feed your external 5 V into VSYS through a Schottky diode, with all grounds common. That lets you plug USB in for programming without the external supply back-feeding into the USB rail. I wouldn’t add a resistor in the power path here - that’s generally not the right fix for supply sharing.

A couple of practical points:

  • USB 5 V comes in on VBUS
  • your external supply should go to VSYS
  • the Schottky diode goes in series with the external 5 V feed, pointing toward VSYS
  • expect a small voltage drop across the diode, so VSYS will be a bit under 5 V, which is normally fine for a Pico
  • make sure to include GND to any of the pins on board

For the update side, a permanently connected USB cable that you only plug into the Pi when needed is a pretty sensible approach, not Heath Robinson at all. You could even use an extension cable: Panel Mount USB Micro-B Extension Cable - 6 | Buy in Australia | CAB-15464 | Sparkfun | Core Electronics

WebREPL is available for the Pico - GitHub - micropython/webrepl: WebREPL client and related tools for MicroPython · GitHub
I have tinkered around with it a bit, but is no where near as reliable as OTA solutions through Arduino, or other languages.

Liam

Toni,
this topic is very well covered in section 3.5 of the Raspberry Pico 2W Datasheet, and shows exactly how to hook it up. That doc also shows a better option… using a P-channel MOSFET. My project uses this… with a LiPO charger as well.

I’ve been using webREPL just fine with my project. It’s a bit clunky, but I have not had any issues other than the need to use a Private window in Firefox. Chrome works I think without this.

Cheers,
T.

Thanks Trevor, I wasn’t aware of that document.

Do you have any experience with mpremote for transferring files from a pi to the pico?

Toni

1 Like

@Toni135859 I have used mpremote - yes, but not a lot. As i recall, you connect to a Pico or whatever via a COM port. In my case, I needed to update files on my Pico when it was installled outside… not anywhere near a COM port, so webrepl, working over WiFi, was the only viable solution.

I may be wrong - perhaps there is another way for mpremote to connect. mpremote has the advantage of being able to do useful stuff (like file management) from the command line, so with a bit of work, a script can be created to do something like “delete all log files” using wildcards etc.

If that is of interest, let me know… I’ll share what I coded. If you can connect laptop USB this is one way to do it, but if you have a USB connection, you can also use Thonny or (as I do) use VS Code.

FYI… webrepl is HUGELY faster at transmitting files to the device than VS Code - seriously faster like about 10 times faster! I hardly ever use Thonny, so not so familiar with its transmit performance.

Hope that is useful in helping you decide the best option

Cheers,
T