Learn & build · Electronics · Part II · Chapter 18

Power for the bench: a 5 V and 3.3 V supply

The 555 didn't care about its supply: anything from 4.5 to 16 V, and the blink rate stays put. Most chips are pickier. Sensors, logic and microcontroller boards want 5 V or 3.3 V, within a few percent, and some are destroyed a volt or two above that. This build turns a 9 V battery or a 9–12 V wall adapter into both, on one breadboard, and it's the first build where you choose the chip yourself.

Before you start. Linear and switching regulators, dropout and heat are chapter 10; thermal resistance θ is chapter 5 §3; the diode's drop is chapter 4 §1; and the eight build steps, schematic reading and breadboard planning are chapter 17. Chapter 21's amplifier runs from its 5 V rail, and chapters 22 and 23 face the same choices again (a microcontroller's bursts, a 12 V input).

1. The goal and the blocks

The goal: from anything between a 9 V battery and a 12 V adapter, make 5 V for up to a few hundred milliamps and 3.3 V for up to 250 mA, both steady while the battery sags, and survive the battery clipped on backwards. The blocks: protection against a reversed input; a 5 V regulator; a 3.3 V regulator; a light that says it's on. The interesting step is the third one of chapter 17's eight, choosing the parts, because here there are real choices to get wrong.

2. Choosing a regulator

Chapter 10 gave the two families: a linear regulator burns the extra voltage, \(P = (V_{in} - V_{out})\,I\), and a switching one passes nearly all the power through. Choosing between real parts means checking four numbers from each datasheet against your circuit: the input range (including the absolute maximum), the dropout (the least headroom it needs), the current, and the temperature the chip reaches, chapter 5's \(T = T_{room} + P\,\theta\). Try a few situations before you read on: which part would you pick for each?

🎯 Challenge: find the source and current where the 7805 → MCP1700 chain of this build stops being a good idea, and the part that takes over.

Three things to notice. The MCP1700 can't take 9 or 12 V at all: its input is rated to 6.0 V, and 6.5 V is its absolute maximum, so in this build it's fed from the 5 V rail. That also splits the heat between two packages. The 7805 gets hot quickly from 12 V: at 0.5 A it would have to burn about 3 W, which its TO-220 package (about 54 °C/W in still air, its datasheet says) can't shed without a heatsink. And a buck module barely warms in either case, at the price of switching noise and a module instead of a chip. For the currents most breadboard builds draw, tens of milliamps, the two linear chips are simple, quiet and cool enough.

To choose a regulator, check its input range (and absolute maximum), its dropout, its current, and its heat, \((V_{in} - V_{out})\,I\) times θ; when the heat is too much, chain two or switch to a buck.

3. Reading the typical application circuit

Every regulator's datasheet has a "typical application" figure: the chip with the few parts it needs around it. That figure is where a design starts. For these two, it's short: the 7805 wants a 0.22 µF capacitor on its input (when it's far from the supply's own filter capacitor) and 0.1 µF on its output, which helps but isn't required; the MCP1700 wants 1 µF ceramic on both sides, and the output one is required for it to stay stable. And here is the trap every first supply falls into: their pinouts are different. Compare them pin by pin.

You put the MCP1700 in the 7805's pin order: IN on its pin 1, GND on its pin 2, OUT on its pin 3. What happens?

The MCP1700's pin 1 is GND and pin 2 is VIN, the reverse of the 7805's 1 IN, 2 GND. Powered backwards, a chip conducts through paths never meant to carry current (chapter 17's hot 555). Look up the pinout for every part, every time, even when "it's just a regulator."

4. The schematic

Here's the whole supply, live. Hover the rails to read 8.3 V after the diode, 5 V and 3.3 V. Then pick each part: four of them are capacitors, and each has a different reason to be there.

Predict, then check by hovering: the battery is 9 V, and the 7805 needs 2 V of headroom. After D1's drop, how much margin is left before the 5 V rail starts to sag?

9 V − 0.7 V (D1, about 0.7 V at this build's few milliamps) = 8.3 V at the 7805's input; it needs 5 + 2 = 7 V, so about 1.3 V of margin. That's the whole budget, and a 9 V battery uses it up as it empties: at 7.5 V the simulator's 5 V rail is down to 4.8 V. For a long-lived 9 V supply, a Schottky diode (0.3 V) or an LDO in place of the 7805 buys that margin back.
Why does the 7805's input need its own capacitor if the battery is right there?
  1. A regulator is a feedback loop (chapter 10: an op-amp driving a transistor), and a loop can ring if what it pushes against changes too fast (chapter 9's feedback that comes back in step).
  2. The leads from a battery or an adapter are a loop of wire, and a loop of wire is a small coil (chapter 3): it resists fast changes of current.
  3. So when the load changes suddenly, the regulator's input briefly sees a coil, not a battery, and the voltage there jumps.
  4. A small capacitor right at the input pin gives those fast changes a local source, as a bypass capacitor does for a chip (chapter 5). That's why the datasheet asks for it only when the supply's own filter capacitor is "far" away (more than about six inches): the distance is the coil.

5. The breadboard

This time the rails mean different things. The top + rail is 5 V; the bottom + rail is 3.3 V; both − rails are ground, linked at the left. The raw input never touches a rail: it lives in column 2 and, after D1, column 7, so nothing can plug into it by accident. Many breadboards split each rail in the middle: check yours with a meter (chapter 15), and bridge it if you need the whole length.

Why does the MCP1700 take its input from a red jumper off the top rail, instead of sitting next to the 7805?

Layout follows the rails: each regulator sits beside the rail it feeds, with its capacitors right at its pins. The jumper from T+21 to g21 carries 5 V across the gap to its VIN.

6. The shopping list

RefPartWhy this one
U1LM7805 (TO-220)5 V, 1.5 A, up to 35 V in, 2 V dropout. Add a small clip-on heatsink if it will run above about 1 W.
U2MCP1700-3302E/TO (TO-92)3.3 V, 250 mA, 0.18 V typical dropout; 6.0 V maximum input. The "TO" ending is the package with legs.
D11N40071 A, 1000 V: reverse-polarity protection. A 1N5819 Schottky loses less voltage.
C10.22 µF ceramic (224), 25 V+The 7805's input capacitor.
C20.1 µF ceramic (104), 16 V+The 7805's output capacitor.
C3, C41 µF ceramic (105), 10 V+Required by the MCP1700 on both sides.
R11 kΩ, ¼ WAbout 3 mA for the power LED.
LED1green LEDOn = the 5 V rail is up.
BAT19 V battery and snap, or a 9–12 V adapterInto column 2 (+) and the − rail.

7. Check before you connect anything

A supply is the one circuit you must test with nothing else plugged in: a mistake here damages whatever is downstream. Black probe on the − rail.

8. What's wrong?

The 5 V rail reads 8 V, almost the input. The LED is very bright.

The regulator holds its output 5 V above its GND pin. With that pin floating, the datasheet warns, the output rises toward the input, and so does every chip on the 5 V rail. Check the middle leg's strip: it's the one wire that must never come loose.

The 5 V rail is fine, but the 3.3 V rail reads 0 V and the MCP1700 is hot.

With the flat face toward you, legs down, it's 1 GND, 2 VIN, 3 VOUT. Power off, turn it around in your head against its datasheet, and replace it if it got hot.

9. Make it yours

Where it breaks: "the 3.3 V rail is fine" while the battery dies

The 3.3 V rail can look perfect while the 5 V rail is sagging. In the simulator, a 7 V battery leaves the 5 V rail at 4.3 V, yet the MCP1700, needing only about 3.5 V, still gives 3.30 V. A 5 V chip on the top rail is now running out of its range while the 3.3 V side looks healthy. Measure the rail a chip actually uses, not the one that's convenient.

Next: two chips talking, a 555 clocking a 4017 counter, and what it takes for one chip's output to count as a 1 at the next one's input.

Previous: Reading a schematic: a 555 blinker · All chapters: Learn & build.

Last updated