Tiny 2040 safe VBUS power along with USB usage?

Hi! I’m looking for a safe way to have a Tiny 2040 project be powered by a 5v power supply (from the device the Tiny 2040 will interface with) and keep the USB-C usable without frying anything - especially as I want to be able to connect with USB while the device is powered by that supply.

I wonder how this kind of circuit would be possible - As the Pico has split VBUS and VSYS for that purpose, my fears about it not being particularly wise to plug the Tiny 2040 into USB alongside external power were stoked by the discussion here, but I wonder if there’s any recommended way to circumvent that - I’m considering using some active circuitry, say a MOSFET to shut down the supply to VBUS when USB is connected, but maybe there’s a simpler and safer way that anybody in the forum is aware of?

(Also I’d be interested to know from Pimoroni, if possible, what was the reasoning to break out VBUS instead of VSYS 😅 I imagine it would have been somehow safer to break out VSYS instead, in a similar vein to the Pico board with the Schottky diode protection, for most uses)


You will need to look at the schematic for the board you want to use. There MUST be a diode between VUSB and VIN. The schematic representation for the diode MUST show an arrow pointing toward VIN. You will apply your 5 volts to the VIN pin. The power from the USB will be on VUSB when you plug it in. The diode will prevent voltage from your 5 volt supply from backing up into your PC on the USB cable. You will want to put a 470 to 1000uf, 10 to 16 volt electrolytic capacitor on the VIN line to absorb any minor transients that may be generated.

One of the purposes of the diode is to protect the PC when voltages higher than 5.5 volts are applied to VIN. Check the documentation very carefully, some DC-to-DC converters used can handle voltages up to 12 volts or more. One use of this feature is for folks who use solar recharged batteries. Their voltage will vary depending on time of day and cloudiness.

I would not mess with VSYS. It is managed on the board. If something goes wrong you may let the magic smoke out. Good luck.

Part of my current issue is that we currently don’t have a schematic for the Tiny 2040 board, it would be great to be able to access it (nudge @pimoroni 😉) and check whether the diode exists, but using a multimeter between the 5V pin and pin 2 on the USB-C port brings up a straight short, thus looking like there’s no diode in between.

The Raspberry Pi Pico has pins for VBUS and VSYS, where VBUS is short with VUSB, which goes through a Schottky diode to VSYS, which then goes to the 3V3 regulator - so we can plug a parallel power supply to the VSYS pin (through a similar Schottky diode), to power the Pi Pico while USB is not plugged in, and no current goes back through to the computer in case a user plugs the USB cable in while the device is powered. I’ve attached the power section of the Pi Pico schematics with the pins and diode highlighted for reference.

There might also be some confusion in the pin names, from all sides 😅 I mentioned VBUS and VSYS in the context of the Pi Pico board, I apologize for the confusion with a more standard use of a VSYS rail.

If it helps any:

Your schematic calls it VBUS, my schematic calls the same point VUSB
Your schematic calls it VSYS, my schematic calls the same point VIN

Your idea to put a Schottky diode between your power supply and VSYS/VIN looks to be a solution to your needs. That assumes there is a Schottky diode mounted on the PCB. Using the diode scale on your DVM should show about 0.4 volt drop one way and an open the other way. If there is zero ohms between the USB connector and Pin 5/VIN of the DC-to-DC converter you may be screwed (technical term ;-)).

A while back I purchased a bunch of 0.1 ohm 1/4 watt resistors to monitor current draws. Minimum insertion loss, Voltage drop times 10 is amperage draw.

Good luck.

The following is all from me eyeballing the pictures of the Tiny 2040 board. Note that my eyeballs are 74 years old and pictures are … well pictures.

It does not look like there is a DC-to-DC convertor on the board, just a simple series 3.3 volt regulator. The one component that looks like a Schottky diode is way down by the other end of the board from the USB connector. Not where I would place it considering all the current for the board and regulator must pass through it.

As an alternate solution you may want to run your 5 volts through a 3.3 volt regulator then to the 3V pin on the Tiny 2040 PCB. A Schottky diode between your 3.3 volts and the boards 3.3 volts would not be required.

Good Luck

1 Like

Oh, the 3.3V regulator approach looks interesting, I’ll try that - thanks! And seeing as in my application I don’t need the Tiny 2040 feeding 5V back to the device, that looks like it can be pretty safe.

I’ll report back with my tests, soon - it might be useful for others as well.


Do a search on Amazon for “AMS117 3.3” for some prebuilt small regulators. “AMS117 5.0” for some 5 volt ones too. You can get a fist full for under $10.

Ahoy - the Tiny 2040 schematic is now available on the shop page.

1 Like


There is no isolation diode on the 5 volt pin. External 5 volts and USB connection to/from your computer is not advised. Your external 5 volts can backup into your computer. The external 3.3 volt regulator is a better solution.