How to switch between USB charging and built-in battery power supply
There are a few proven ways to let a device run from USB when present and fall back to the battery when not—without browning out the system or back-feeding the USB port.
There are a few proven ways to let a device run from USB when present and fall back to the battery when not—without browning out the system or back-feeding the USB port.
Learn how to use the USB power supply with detailed documentation, including pinouts, usage guides, and example projects. Perfect for students, hobbyists, and developers integrating the
PDF version includes complete article with source references. Suitable for printing and offline reading.
Connect the USB Power Supply to an AC Outlet: Plug the device into a standard wall outlet (100-240V AC). Connect the USB Device: Use a compatible USB cable to connect your device to the USB port of the power supply. Verify Power Delivery: Ensure the connected device powers on or begins charging.
Connect the USB Device: Use a compatible USB cable to connect your device to the USB port of the power supply. Verify Power Delivery: Ensure the connected device powers on or begins charging. For development boards like Arduino, confirm the onboard power LED is lit.
The USB Power Supply is a device designed to convert AC power from a standard wall outlet into a low-voltage DC output, typically 5V, suitable for charging or powering USB-compatible devices.
A USB Type-C® port with USB Power Delivery (PD) is becoming the standard port for charging single- and multi-cell battery-powered devices. Applications such as wireless speakers, power banks and power tools have been transitioning from proprietary charging ports, legacy USB ports and barrel-jack ports to a standardized USB PD port.