LM7805 USB Power Supply
Barrel-jack 9–12 V input, regulated 5 V output via USB-A jack.
Difficulty: Through-hole. Estimated build time: about 60 minutes. Estimated parts cost: about US$4.00. 10-line bill of materials. Compare supplier offers when available. A perfboard linear power supply that takes 9–12 V DC from a barrel jack, regulates it to a stable 5 V using an LM7805CT in a TO-220 package, and delivers that voltage through a USB-A socket.
Layout and solder power components
Mark the perfboard layout before soldering: barrel jack and USB-A socket at opposite ends, LM7805 in the middle. Solder the barrel jack first. Mount the LM7805 with its metal tab facing the edge of the board so you can attach a heatsink later. Confirm the pinout: pin 1 (input) faces the barrel jack, pin 3 (output) faces the USB jack, pin 2 (ground/tab) to the common GND rail.
Input filter capacitors
Solder a 0.33 µF (330 nF) ceramic or film capacitor between the LM7805 input pin and GND. Add a 47 µF electrolytic capacitor in parallel for bulk storage—positive terminal toward pin 1. The datasheet specifies 0.33 µF minimum; larger bulk values help if the source has long wires.
Output filter capacitors
Solder a 0.1 µF (100 nF) ceramic capacitor between pin 3 (output) and GND. Add a 47 µF electrolytic in parallel—positive terminal toward pin 3. These suppress high-frequency noise and improve transient response. Both are in the TI datasheet recommended circuit.
USB-A jack and power LED
Solder the USB-A jack: pin 1 (VBUS) to the 5 V output rail, pins 2 and 3 (data) are unused and can be left floating or tied together, pin 4 (GND) to the common GND. Wire a 470 Ω resistor from the 5 V rail to the LED anode; cathode to GND. This draws about 10 mA and confirms the output is live.
Test before load
Connect a 9 V DC supply to the barrel jack and measure the USB-A VBUS pin with a multimeter. It should read 4.85–5.15 V. If it reads the input voltage, the LM7805 is wired backwards. If it reads 0 V, check GND continuity. Only connect a USB device after confirming the voltage is correct—5.5 V+ will damage most USB peripherals.