Design your own Compact 5V/3.3V SMPS Circuit for Embedded and IoT Projects
Learn how to design, simulate, and fabricate a compact, open-frame 5V/3.3V SMPS circuit using the TNY284DG IC for powering microcontrollers and IoT projects.
This project is sourced from another site, not written by us — this list is our best match of their components against what we stock, not a verified bill of materials. Always check the original blog (linked above) for the actual parts list before buying.
This list includes a generic resistor set
as a placeholder — it is not matched to the exact value or part number this circuit needs. The correct one is specified on the original source page linked above; check it before buying.
This switched-mode power supply (SMPS) circuit steps down and regulates AC mains voltage into reliable 5V and 3.3V DC outputs suitable for powering microcontrollers like the ESP32 and ESP8266. High-voltage AC enters through a 1A slow-blow fuse and a 2.2nF safety capacitor, passing through a DB107 diode bridge to rectify the AC into high-voltage DC. This DC is filtered by a 10uF/400V bulk storage capacitor and 2Meg resistors. The heart of the conversion is the TNY284DG switching IC working in conjunction with an EE16 transformer, which chops the high-voltage DC at high frequencies to transfer energy safely across an isolation barrier. On the secondary side, an SR360 diode rectifies the transformer output, while a 3.3uH drum core inductor and filtering capacitors (including a 1000uF/16V electrolytic and smaller 0805 surface-mount capacitors) smooth out the ripple to supply stable DC power. Voltage regulation is achieved via a feedback loop utilizing a TL431 precision programmable shunt regulator and a PC817 optocoupler, which optically isolates the low-voltage secondary side from the high-voltage primary side while communicating error signals back to the TNY284DG IC to maintain a steady output. Additional components like the UF4007 and P6KE diodes provide snubber and clamping protection against voltage spikes generated by transformer leakage inductance.
Why Build This
Design a custom, compact open-frame power supply tailored to fit directly inside small enclosures alongside IoT sensor nodes and Wi-Fi microcontrollers.
Gain hands-on engineering experience with AC-to-DC primary-side regulation, transformer isolation, and high-voltage circuit layout principles.
Eliminate bulky external wall adapters by integrating a robust 5V/3.3V regulated power source straight onto your custom embedded hardware.
Real-World Application
Providing a small-form-factor, direct-from-mains regulated DC power source integrated onto custom hardware or compact enclosures for IoT sensor nodes, Wi-Fi microcontrollers, and low-power embedded devices.
Skills You'll Learn
AC-DC power supply design
high-voltage PCB layout and creepage/clearance distance management
transformer-based energy transfer
closed-loop voltage regulation with optocouplers
schematic capture and board design in Autodesk Eagle
Safety Precautions
Working with SMPS circuits involves lethal AC mains voltages. Do not attempt to build this without prior experience. Always stay cautious of live wires and charged capacitors, use protective equipment, and ensure the open-frame board is properly enclosed and out of the user's reach during operation.
Technology Tags
SMPS
POWER SUPPLY
PCB DESIGN
AC-DC CONVERSION
TNY284DG
FLYBACK CONVERTER
IOT
EMBEDDED SYSTEMS
Frequently Asked Questions
The optocoupler provides galvanic isolation, allowing the low-voltage secondary side to safely send feedback signals to the high-voltage primary controller without compromising user safety or creating direct electrical continuity.
No. Because this circuit connects directly to AC mains voltage and features high-voltage DC storage capacitors, probing live boards poses a severe risk of electric shock or equipment damage. Always use proper isolation transformers, differential probes, and extreme caution.
The high-frequency switching enabled by the TNY284DG IC allows the EE16 transformer to be significantly smaller and lighter while still efficiently stepping down high voltages and providing necessary safety isolation.
Gallery
This page is part of Kitkraft's Project Hub — a curated collection of electronics & robotics projects gathered from the maker community to help students and hobbyists discover and learn to build. Kitkraft does not claim authorship of the original project, and makes no representation as to the accuracy, completeness or safety of third-party source material. The summary and "How It Works" explanation above are AI-generated, rewritten with reference to the original tutorial — not a reproduction of it. Full credit and a direct link to the original source are provided above. If you're the original creator and have a concern about how your work is represented here, please contact us and we'll address it promptly.