Summary
Choosing the right power source is one of the most important parts of building an electronics project. A board may work perfectly from USB but become unstable when connected to a battery or external adapter. Choosing the wrong voltage can even damage components.
This guide explains how to select a power supply for DIY projects, with practical voltage and current requirements for common boards such as Arduino, ESP32, and Raspberry Pi.

Quick Reference: What Power Supply Do You Need?
| Board | Typical Input Voltage | Recommended Supply | Typical Current Requirement |
|---|---|---|---|
| Arduino Uno | 5V USB / 7–12V barrel input | 5V USB, 1A+ | ~50–100mA for board, more with peripherals |
| Arduino Nano | 5V USB | 5V USB, 1A+ | ~20–50mA for board |
| ESP32 Dev Board | 5V via USB/VIN | 5V, 1A+ | ~80–250mA typical, higher peaks possible |
| Raspberry Pi 3 | 5V | 5V, 2.5A+ | Up to ~2.5A depending on load |
| Raspberry Pi 4 | 5V | 5V, 3A | Up to ~3A depending on peripherals |
| Raspberry Pi 5 | 5V | 5V, 5A recommended | Up to ~5A with demanding peripherals |
Quick rule: Match the required voltage exactly, then choose a power supply capable of delivering at least the required current. A supply with a higher current rating is generally fine; supplying excessive voltage is not.
Components and Supplies
What Voltage and Current Mean
Before choosing a power supply for DIY projects, it helps to understand two basic specifications.
Voltage
Voltage is the electrical potential supplied to the circuit and is measured in volts (V).
If a component requires 5V, supplying 9V directly to it can damage the component unless the circuit has an appropriate voltage regulator.
Current
Current is the amount of electrical charge flowing through the circuit and is measured in amperes (A) or milliamperes (mA).
For example, a 5V, 2A power supply can provide up to 2A at 5V. A circuit that only needs 500mA will draw approximately 500mA rather than automatically receiving the full 2A.
This is why using a power supply with a higher current capacity is generally acceptable, while using the wrong voltage can be dangerous.
How to Choose a Power Supply for Arduino
Arduino boards are relatively easy to power, but the correct input depends on how you're connecting the board.
Arduino Uno
The Uno can typically be powered through:
- USB at 5V
- DC barrel jack
- VIN pin
When using USB, a regulated 5V supply is appropriate.
The barrel jack and VIN input allow a higher external voltage because the board's regulator reduces it to the voltage required by the microcontroller.
However, higher input voltage also causes the onboard regulator to dissipate more heat, particularly when the board is powering additional components.
Arduino Nano
The Nano is commonly powered through its USB connection using 5V.
Its relatively low power consumption makes it suitable for battery-powered and compact projects, although connected sensors, displays, motors, and other modules can increase the total current requirement significantly.
If you're still deciding which Arduino board fits your project, our Beginner's Guide to Choosing the Right Arduino Board explains the differences between common Arduino boards and their typical applications.
How to Choose a Power Supply for ESP32
ESP32 development boards commonly accept 5V through their USB connector, with an onboard regulator providing the 3.3V required by the ESP32.
- The ESP32 itself has relatively low average power consumption, but wireless activity can create short current peaks.
For a typical development project, a regulated 5V supply rated for at least 1A provides useful headroom.
If you're powering several sensors, displays, relays, or other peripherals from the same supply, calculate their combined requirements rather than sizing the supply around the ESP32 alone.
Don't Power 5V Devices From the 3.3V Pin
The ESP32's 3.3V output is intended for compatible low-power peripherals. It should not be treated as a general-purpose 5V power source.
If a sensor or module requires 5V, provide an appropriate 5V supply instead.

How to Choose a Power Supply for Raspberry Pi
Raspberry Pi boards generally have higher power requirements than microcontroller boards.
Raspberry Pi 3 and 4
A regulated 5V supply is required. Raspberry Pi 4 commonly uses a 5V, 3A supply, particularly when USB peripherals and other accessories are connected.
Raspberry Pi 5
The Raspberry Pi 5 has substantially higher power requirements. A 5V, 5A-capable supply is recommended for demanding configurations and peripherals.
Undersized supplies can result in:
- Unexpected shutdowns
- System instability
- USB peripheral problems
- Performance limitations
- Low-voltage warnings
For Raspberry Pi projects, choosing the power supply based only on the board itself can therefore be misleading. USB devices, displays, cameras, storage, and other peripherals also contribute to the total load.
How to Calculate the Required Current
When several components share the same supply, add their expected current requirements.
Simple Formula
Required Current ≈ Board Current + Sensor Current + Actuator Current + Other Peripheral Current
Then add some headroom.
For example, imagine a project contains:
- ESP32: 200mA
- OLED display: 30mA
- Two sensors: 40mA total
- Relay module: 70mA
Total:
200 + 30 + 40 + 70 = 340mA
A 5V supply rated for 1A would provide reasonable headroom for this example.
Motors and other inductive loads need additional consideration because their startup or stall current can be substantially higher than their normal operating current.
Power Supply Reference for Common DIY Components
| Component | Typical Voltage | Power Consideration |
|---|---|---|
| LED | 2–3.3V | Use a current-limiting resistor |
| HC-SR04 | 5V | Low current |
| DHT11 | 3.3–5V | Low current |
| OLED display | 3.3–5V depending on module | Low current |
| Relay module | Usually 5V | Higher current than basic sensors |
| Servo motor | Usually 4.8–6V | Current varies significantly with load |
| DC motor | Depends on motor | Requires suitable motor driver and supply |
| WS2812B LEDs | 5V | Current increases substantially with LED count |
The board and peripherals should not automatically be powered from the same pin. Check the current capability of the board's regulator and GPIO power outputs before connecting multiple devices.
How to Power Motors and Other High-Current Components
Motors are one of the most common causes of power-related problems in DIY electronics.
A small Arduino may be able to control a motor through a motor driver, but that doesn't mean the Arduino should power the motor directly.
A better arrangement is:
Power Supply → Motor Driver → Motor
while the Arduino provides the control signals to the driver.
The same principle applies to:
- Pumps
- Solenoids
- High-power LEDs
- Multiple servos
- Relay banks
Separate power supplies can also be used for high-current loads, provided the grounds and control connections are designed correctly.
Linear Regulator vs Switching Power Supply
The type of regulator also matters when converting one voltage to another.
Linear Regulator
A linear regulator is simple and inexpensive but dissipates excess voltage as heat.
For example, converting 12V to 5V at significant current can generate considerable heat.
Buck Converter
A buck converter efficiently reduces a higher voltage to a lower voltage and is generally preferable when the voltage difference or current requirement is substantial.
For battery-powered projects, switching regulators can significantly improve efficiency and operating time.
Choosing a Battery for DIY Projects
A battery is effectively another type of power source, but selecting one requires additional considerations.
Check:
- Battery voltage
- Capacity in mAh or Ah
- Maximum discharge current
- Required regulator
- Expected operating time
For example, a 12V battery should not be connected directly to a 5V Raspberry Pi. An appropriate buck converter or regulated power module is required.
Similarly, the battery's current capability must be sufficient for the peak load.

Common Power Supply Mistakes
Using the Wrong Voltage
This is one of the most serious mistakes. Always verify the input voltage before connecting a supply.
Underestimating Current
A board may work normally until additional sensors, displays, or motors are connected. An undersized supply can then cause resets or unstable operation.
Powering Motors From the Arduino
Use an appropriate motor driver and separate motor power source when necessary.
Ignoring Startup Current
Motors, servos, and other loads can briefly draw much more current during startup or under heavy load.
Using Unregulated Supplies
Sensitive electronics generally require a stable, regulated supply rather than an unregulated source with a nominal voltage that varies substantially.
How to Choose the Right Power Supply
A simple selection process is:
- Identify the required voltage for every component.
- Calculate the total current required by the board and peripherals.
- Account for peak or startup current from motors, servos, and other loads.
- Choose a regulated supply with the correct voltage.
- Add reasonable current headroom rather than operating continuously at the supply's limit.
- Use a regulator or converter when your battery or adapter voltage doesn't match the electronics.
When you're ready to source the hardware, you can browse suitable power supply modules and adapters</u> based on the voltage and current requirements of your project.
Final Thoughts
Selecting a power supply for DIY projects becomes much easier once voltage and current requirements are treated separately. The voltage must match what the circuit requires, while the supply's current rating should be high enough to handle the complete load, including peak demand.
For common boards, 5V is the key supply voltage for Arduino Uno, many ESP32 development boards, and Raspberry Pi systems, but their current requirements differ considerably. Raspberry Pi boards generally need substantially more current, while motors and servos may require dedicated supplies.
Before powering any project, check the specifications of the board, peripherals, and actuators together. A correctly sized supply improves reliability and prevents many of the frustrating resets, overheating issues, and component failures that beginners encounter.





