How to Make a 220V AC to 5V DC Converter Using 7805

Introduction

This guide will show you how to build a safe and reliable 220V AC to 5V DC converter using a step-down transformer and 7805 voltage regulator. This circuit is perfect for:

  • Arduino and Raspberry Pi projects
  • Powering sensors and microcontrollers
  • DIY electronics and school projects
  • Final Year Projects (FYP) for engineering students

Why This Design?

  • Safe isolation from mains voltage using a transformer
  • Stable 5V output for sensitive electronics
  • Simple and cost-effective solution
  • Widely available components (found at Hall Road, Lahore, or QKZEE Technologies)

Components Required

ComponentSpecificationPurpose
Step-down Transformer220V AC to 12V AC, 1ASteps down mains voltage — available on order, message us on WhatsApp
Bridge Rectifier1N4007 diodes (x4) or DB107 moduleConverts AC to DC — available on order, message us on WhatsApp
Filter Capacitor1000µF, 25VSmooths rectified DC — available on order, message us on WhatsApp
Voltage Regulator7805 ICRegulates to 5V — available on order, message us on WhatsApp
Capacitors100µF & 0.1µFNoise filtering — available on order, message us on WhatsApp
Heat SinkFor 7805Prevents overheating — available on order, message us on WhatsApp
PCB/BreadboardMB102 breadboardCircuit assembly — Rs 250
Fuse250V, 500mASafety protection — available on order, message us on WhatsApp

If you want a ready-made step-down module instead of building the mains circuit, see the LM2596 DC-DC buck converter module (Rs 165) — it takes a DC input and gives an adjustable DC output, with no mains wiring at all.

Step-by-Step Construction

1. Transformer Stage (220V AC to 12V AC)

  • Connect the primary side to 220V AC through a 500mA fuse for safety
  • The secondary side will output 12V AC (this will become DC after rectification)

2. Rectification (AC to DC)

  • Build a bridge rectifier using 4x 1N4007 diodes (or use a DB107 module)
  • This converts 12V AC to pulsating DC

3. Filtering (Smoothing DC)

  • Add a 1000µF, 25V capacitor across the rectifier output
  • This reduces ripple and provides about 12–15V DC

4. Voltage Regulation (12V to 5V)

  • Connect the 7805 regulator:
    • Input Pin → Filtered DC (~12–15V)
    • Ground Pin → Common ground
    • Output Pin → 5V DC output
  • Add a 0.1µF ceramic capacitor (C2) and a 100µF electrolytic capacitor (C3) at the output for stability. The 1000µF capacitor (C1) from step 3 is already the input capacitor — do not add a second one.

5. Heat Management

  • Attach a heat sink to the 7805 (especially if drawing >200mA)

Circuit Diagram

DIY 220V ac to 5V DC converter circuit using 7805 IC with capacitors and LED test load – perfect for Arduino and student projects qkzee

Safety Precautions

⚠️ Warning: Working with 220V AC can be dangerous!

  • Always disconnect power when making changes — never wire anything while it is plugged in
  • Use proper insulation for all connections
  • Consider using an enclosure for final projects
  • Double-check polarity of all components
  • Put the fuse on the primary (220V) side — it is the first line of defence if anything shorts
  • The 7805 gets hot under load — do not touch it while it is running, and always use a heat sink
  • If you want to switch mains loads on and off with an Arduino, use a relay module — see our relay module guide for the correct COM/NO wiring

Testing & Troubleshooting

  1. Check Transformer Output (should be ~12V AC)
  2. After Rectification (should be about 12–15V DC with ripple)
  3. Final Output (should be stable 5V ±0.25V)

Common Issues:

  • No output? Check fuse and transformer connections
  • Overheating? Reduce load current or improve heat sinking
  • Unstable voltage? Check capacitor values and connections

Applications

  • Arduino power supply
  • USB charger circuit
  • Sensor power modules
  • DIY lab power supply
  • School and university projects

Conclusion – Why This Project Works

Creating your own 220V AC to 5V DC power supply using a 7805 voltage regulator is simple, affordable and highly useful. Whether you're building a smart system for your FYP or tinkering with DIY electronics, this basic power supply module will be a reliable power source.

If you only need to step down a DC voltage (for example, 12V to 5V for an Arduino), you don't need the mains circuit at all — see our 12V to 5V converter using 7805 for the DC-only version.

Where to Buy the Parts

The MB102 breadboard (Rs 250) and the LM2596 buck converter module (Rs 165) are available at QKZEE Technologies, Shop 20, 1st Floor, Al-Khalil Center, Hall Road, Lahore, and online at qkzeetech.com with delivery all over Pakistan — see the links above. The transformer, bridge rectifier, 7805, capacitors, heat sink and fuse are available on order — message us on WhatsApp and we will arrange them for you.

Still Stuck?

If the output is 0V, or the 7805 gets hot immediately, message us — tell us the voltage at each stage (transformer output, after the rectifier, and at the 7805 output) and whether the fuse is intact, and we will help you find the fault.

Chat on WhatsApp Watch on YouTube

FAQs

Why does the transformer output say 12V AC but the DC after the rectifier is higher?

A 12V AC secondary gives about 12 × 1.414 ≈ 17V peak, minus about 1.4V lost in the bridge rectifier, so the filtered DC is roughly 12–15V depending on load. That is normal — the 7805 needs at least 7V at its input, so 12–15V is fine.

Can I use a 9V transformer instead of 12V?

Yes — a 9V AC secondary gives about 11V DC after rectification, which is still above the 7805's 7V minimum. The old post mixed 9V and 12V in different steps; this guide uses 12V throughout for consistency.

Why does the 7805 get so hot?

The 7805 burns the extra voltage as heat: (input voltage − 5V) × current. At 12V in and 500mA out, that is (12 − 5) × 0.5 = 3.5W — a lot of heat. Use a heat sink, and for currents above 500mA consider a switching module like the LM2596 instead.

Do I need the 100µF and 0.1µF capacitors?

Yes — the 0.1µF ceramic filters high-frequency noise and the 100µF electrolytic smooths the output. Without them the output can oscillate. The 1000µF capacitor is the main filter at the input (step 3) — do not add a second 1000µF at the 7805 input.

Is this safe to build as a student?

Only with an adult's supervision and only when it is unplugged while you wire it. Mains voltage can kill. If you are not confident, use a ready-made 5V adapter or the LM2596 module with a DC input instead — no mains wiring needed.

Can I power an Arduino from this?

Yes — the 5V output can power an Arduino through its 5V pin (not the barrel jack, which needs 7–12V). Keep the load under 500mA unless the 7805 has a good heat sink.

Conclusion

A 220V AC to 5V DC converter is one of the most useful power supplies you can build: transformer, bridge, filter cap, 7805, and two small output capacitors. Keep the voltages consistent — 12V AC in, about 12–15V DC after the filter, 5V out — use a fuse on the primary, and never wire it live. That is the whole project, and it works.