Blog · · 6 min read

USB, battery or wall adapter? How to power your hardware prototype

USB, AA cells, a lithium pack or a wall adapter? Compare how much power each source really gives, what it costs in design work and safety, and pick the right supply for your device.

Every device needs power, and the choice is made earlier than most people think. The power source decides the size of the housing, how long the device runs, which parts of the circuit need extra protection, and whether shipping it later becomes a puzzle. Picking it late means redesigning the board and the enclosure.

There are four common options for a prototype: power over USB, replaceable cells such as AA batteries, a rechargeable lithium pack, and an external wall adapter. This article compares them in plain numbers and ends with a short way to choose.

Start with the power budget

Before choosing a source, write down what the device draws. Two numbers matter.

  • Peak current: the highest current at any moment. Motors starting, a radio sending, a heater switching on or a bright LED flash all create peaks.
  • Average current: what the device uses over a typical hour or day, including the time it sleeps.

A thermometer that wakes once a minute may average a few microamps and peak at a few milliamps. A small fan or pump may draw half an amp all the time and more at start-up. These two devices need completely different supplies. If you have never estimated it, our article on battery life in low-power devices shows how to build the budget step by step.

Option 1: USB

USB is the default for many prototypes because the cable and the charger already exist. The voltage is 5 V, but the current you may draw depends on what the device and the port agree on.

  • An older USB 2.0 port promises 500 mA, and USB 3.x promises 900 mA.
  • USB-C can offer 1.5 A or 3 A at 5 V. The device only has to place two small resistors on the connector's configuration pins to ask for it. If they are missing, many USB-C chargers will not supply power at all, which is one of the most common mistakes on first boards.
  • USB Power Delivery negotiates higher voltages, such as 9 V, 15 V or 20 V, and up to 100 W, or up to 240 W with the extended range at 48 V. That needs a controller chip on your board that talks to the charger.

USB is ideal for anything that sits on a desk or near an outlet and needs up to a few watts. It is less suited to outdoor devices, because the connector is an opening in the housing that has to be sealed, as described in our article on waterproof enclosures.

Option 2: replaceable cells

AA and AAA cells are cheap, sold everywhere and easy to ship. A good alkaline AA holds roughly 2,000 to 3,000 mAh at a low, steady drain, but much less at high current. Its voltage falls from about 1.5 V when new to about 1 V near the end, so the circuit must keep working over that whole range.

That falling voltage is the hidden design work. Two cells in series give 3 V when new and only 2 V when nearly empty. Either the electronics accept that range, or a small converter keeps the voltage steady.

Lithium primary cells, the non-rechargeable kind used in smoke alarms and meters, hold more energy, stay usable in the cold and lose very little charge over years in storage. They are the usual choice when a device must run for a decade without a change. Some types cannot deliver high peaks on their own, so designers add a capacitor that supplies the short bursts.

Replaceable cells suit remote controls, sensors, toys and anything that runs for months on a small average current. They are a poor match for motors, heaters or bright displays.

Option 3: rechargeable lithium packs

Lithium-ion and lithium-polymer cells store a lot of energy in a small space. A single cell has a nominal voltage of about 3.6 to 3.7 V. It is full at 4.2 V for the common chemistry and should not be drained much below about 3.0 V.

That energy density comes with rules:

  • Charging needs a dedicated charger circuit that controls current and voltage. Never charge a lithium cell from a simple resistor or a bare supply.
  • Protection is required. Overcharge, deep discharge, short circuit and overheating must be prevented. Many cells include a small protection board. Your design should still limit current and watch the temperature while charging.
  • Mechanical care matters. A pouch cell must not be bent, punctured or squeezed by the housing, and it can swell as it ages. Leave room for that.
  • Shipping is regulated. Lithium batteries must pass a standard set of transport tests before they can be sent by air, and carriers have their own limits. Plan this before you order a hundred cells.

A rechargeable pack is the right choice for handheld or mobile devices that need real power for hours: tools, speakers, small robots, wearables. Combined with USB-C charging, it is what most people now expect from a gadget.

Option 4: an external wall adapter

If the device always sits near an outlet and needs more than a few watts, an external adapter is often the simplest and safest choice. Fans, pumps, heaters, LED strips and motors with real load fall here.

The key advantage is safety. When you buy a certified adapter, the dangerous mains voltage stays inside a box that has already been tested and approved. Your device only sees a safe low voltage, such as 12 V or 24 V. If you build mains power into your own housing instead, you take on insulation distances, fusing, testing and certification, which is a large project of its own.

Choose the adapter with margin. If your motor draws 2 A when it starts, an adapter rated for exactly 2 A will run hot or shut down. Keep in mind that the adapter's heat and your device's heat add up in a small space, which our article on enclosure temperatures helps you estimate.

Mixed solutions

Many products combine two sources. A device runs from USB and keeps a small backup cell for the clock. A controller uses a 12 V adapter for its fan and converts part of it down for the electronics. A handheld tool charges from USB-C but runs from its lithium pack. Each combination adds a few parts, but often makes the device better to use.

A short way to choose

  1. Desk or bench device up to a few watts: USB-C, with the two configuration resistors on the board.
  2. Small sensor or remote that runs for months or years: replaceable cells, or lithium primary cells for very long life.
  3. Handheld or mobile device with real power needs: rechargeable lithium pack with a proper charger and protection, charged over USB-C.
  4. Stationary device with motors, heaters or pumps: certified external wall adapter with current margin.
  5. Anything that would need mains inside the housing: avoid it in a prototype unless you are ready for the safety work.

How we handle it

On our platform, the power source is set during the concept and electronics steps. The requirements give the peak and average current, the place of use and the runtime. The electronics step then plans the supply, converters and protection, and the mechanics step makes room for cells, connectors and seals. The public project DIY BBQ Temperature Controller shows a device whose fan and probes share one supply. If your device has a motor, how to pick the motor type is a good next read.

Watch hardware get built by AI. Follow public projects on makemachine.ai, read every result in full and get an email when there is something new.

Get started See the live projects

More from the blog

Open-hardware projects built with AI