It’s time to finally drop the warm embrace of our USB tether and help our Pico MIDI become independent. In this post, for our Raspberry Pi Pico based MIDI pedal, we go through how to use external power.
Using USB is all great, but our pedals are usually powered by 9V power supply, and sometimes it is just more convenient to use that. In a slight twist, there’s no code in this post, it’s all hardware.
Keep on reading or, as usual – you can skip directly to the video and come back later for more details if you wish so.
Here’s the ToC:
A lot can be learned from Raspberry Pi Pico datasheet. I’m not going to pretend to be very clever, but I will say, I read a bit of the datasheet at least ?. It’s actually all there – have a look at section 4.5 Powering Pico.
In that section, there are couple of options presented. I’ll naturally go with using P-MOSFET which was my preference for reverse polarity protection. Here’s an excerpt from the datasheet:
The principle is very simple – VBUS will be positive if USB cable is connected and powered, this will turn off the transistor and isolate external power supply so USB power is used. VBUS is driven effectively to ground (see 4.4 Powerchain in the datasheet) if USB is disconnected, the transistor is ON and external power supply is used.
Have a read of the datasheet – it gives some cautions and advices for the suitable P-MOSFET. I had a suitable one: IRF9Z24 – a power P-MOSFET with 0.2ohm on resistance and with a lot for max current. To be honest, that’s the only one I had around ?. Anyway, it is going to do the job.
When choosing a transistor, we probably won’t need to supply more than 200mA. It’s probably not a good idea to use a transistor that has 200mA max current, we should go with something more robust. In the end it really depends on intended usage and max consumption.
Here’s updated schematic for our pedal with added support for external power supply:
In order to support 9V external power supply I decided to go the simplest route of them all – good old LM7805. While some versions of Raspberry Pi Pico have a linear regulator that could support voltages over 5V, the buck-boost converter won’t. So just stay safe, and under 5.5V supply is safe.
The added circuitry looks pretty similar to any LM7805 circuit out there ? . One thing to note is inclusion of 1N4001 diode for reverse polarity protection. Remember that pedal power supplies use negative centre – that’s not so common in the rest of the power-supplies, so I consider this diode essential.
There’s no issue with using diode like this, we’re not worried about headroom for our audio, we’re using this for our digital circuitry. And that’s the final version of our schematic. There’s not much else to say, or at least I can’t think of it at the moment.
Oh, actually, one more thing. There are many 7805 linear regulators out there, just make sure the one you’re using can supply enough current. Voltage of your power supply can be higher, 12V or 18V will work just fine, and if you’re not going to use negative centre power supply, adjust the schematic accordingly.
See the video to convince yourself that this works ?.
Here’s a quick demo of what I covered:
External power supply is in the books. Next on our journey is packaging everything up and finally getting a pedal. Subscribe so you don’t miss out ?