Powering Your Raspberry Pi Pico W from Battery for Portable Operation

In this video lesson we discuss powering your Raspberry Pi Pico W projects from a battery, allowing portable operation of the project. Most all of our earlier lessons can be powered by battery, allowing the project to operate without being connected to the USB cable. In this lesson I discuss the important issues that must be considered when powering your project from battery, and particularly issues associated with powering your project from battery, but then needing to download the code. I want to explicitly explain how to do this in this lesson, so in future lessons when you see me with the battery connected to the project, you will know what I am doing.

To get started, I will demonstrate with this simple circuit, so go ahead and build this circuit:

Simple circuit to demonstrate a LED toggle

Then, we will be using this simple code:

In the video, we will explain the ins and outs of now powering a project like the one above using a battery supply. Note for now though, that the wire from pin 36 to the bottom power rail establishes that rail as a 3.3 volt rail, defined by the Pi Pico.

Now, if we want to power the project remotely, that is, remove the USB cable and power from the battery, we will need to supply a suitable voltage both to the nonblinking LED (The Blue One) and the Pi Pico itself.

You can power the Pi Pico by applying a voltage to the VSYS pin, which is physical pin 39. The voltage should be between 1.8 and 5.5 volts. So, we can  power the LED and the Pi Pico by connecting a suitable power supply. For our examples, I use the Sunfounder Breadvolt (AVAILABLE HERE).

However, when we connect the breadvolt to the breadboard, and we we intend to power the project by the Breadvolt, we need to adjust the wiring where instead of pin 36, we should connect pin 39 to the power rail. This is because in using the breadvolt as the power supply, it will define the voltage of the power rail, not the Pi Pico. The Pi Pico will be a USER of the rail, not the one who supplies voltage to it. So, to power the Pico, we need to connect pin 39 to the power rail instead of 36. So, in using the Breadvolt to power the project, we should use this circuit:

Notice that we now are connecting pin 39 to the Pi Pico

Now with this schematic, we can disconnect the USB, turn the breadvolt on, and  power the project (Pi Pico and the Blue LED) from the breadvolt.

Now the question arises, how would we now download code to the project? The bottom line is, it is never a good idea to have two different voltages supplies connected to the rail, or for that matter connected together. So, the simple solution is, turn the breadvolt OFF, before reconnecting the USB cable. Then download the code. Then disconnect the USB cable, and then turn the breadvolt back on.

What you will see, when the breadvolt is turned off, and the USB cable is reconnected to the project, VSYS will act as an output pin, powering the blue LED. Vsys pin is connected to the USB supply by a diode. There is a small voltage drop across the diode, so the voltage at the VSYS will be around 4.8 volts.

Please watch the video as we will be giving more specific examples of how to make this work.