0
\$\begingroup\$

I work with a lot of ESP8266 microcontrollers, and often need to power them from 240V AC mains. This generally involves either a wall-wart or a dedicated isolated module such as the HLK-PM03.

However, it occurred to me that - in situations where isolation from the mains supply is not a requirement - I could maybe use a simple buck circuit.¹

I came up with this circuit:

circuit

The resulting 6V-or-so could then be passed through an LDO to produce a stable 3.3V supply.

Assuming I use a 250V-rated triac to chop the mains supply into pieces, is there any good reason this circuit wouldn't work and/or be unsafe?²

In addition, would I need to use an inductor and capacitor rated for 250V? Under normal circumstances, they would spend most of their time seeing low voltage.


¹ I toyed with the idea of capacitive droppers, but the current requirements of the ESP8266 are too high for that to be feasible.

² I am well aware of the importance of isolation, thank you. This is for use in situations where mains-referenced power is not a concern.

\$\endgroup\$
12
  • 1
    \$\begingroup\$ How are you generating your triac drive signal? How does the feedback work? \$\endgroup\$
    – BeB00
    Commented Feb 9, 2021 at 2:09
  • \$\begingroup\$ Why would mains isolation not be an issue? Stuff that runs on 5V won't survive even a little boop of 120V. Even if there's no human risk, troubleshooting and replacing burnt out components sucks compared to the cost of isolation. The microcontrollers and labor are so cheap you just don't care? \$\endgroup\$
    – K H
    Commented Feb 9, 2021 at 2:27
  • 2
    \$\begingroup\$ By the time you get it to work you will have spent more time and money than you would on using someone's off-line supply chip. And for that much of a step-down ratio, you want to use a flyback transformer, so isolation comes for free. Essentially, you'll be building your own wall-wart. \$\endgroup\$
    – TimWescott
    Commented Feb 9, 2021 at 2:29
  • \$\begingroup\$ @BeB00 any output voltage between 5V and 15V is acceptable, so I hoped I could just adjust it once and have it run without feedback. Plus there's a zener to cap the voltage. Would it really drift so far as to kill the zener? \$\endgroup\$ Commented Feb 9, 2021 at 3:32
  • 1
    \$\begingroup\$ There are chips especially for this purpose. They can be found in the cheapy wifi light bulbs. \$\endgroup\$
    – Kartman
    Commented Feb 9, 2021 at 3:55

1 Answer 1

2
\$\begingroup\$

is there any good reason this circuit wouldn't work and/or be unsafe?

There are a few designs that can do this but I wouldn't recommend a triac type because of peak currents into the 120 mH inductor and the sheer physical size needed for the 120 mH inductor: -

enter image description here

The above regulates to 5 volts DC from an AC voltage range of 85 volts to 265 volts. It can probably be coerced into producing 3.3 volts directly too. The source is here.

Then there is this from Power Integrations: -

enter image description here

Source information here.

These are the preferred methods for non-isolated buck converters and note how much smaller the inductor needs to be in these designs.

$$\color{red}{\boxed{\text{These designs are dangerous in that they don't isolate high voltage mains}}}$$

The preferred method is to use a flyback design not only because the circuit provides inherent isolation properties but, because a step down transformer can deliver much more current to the output for a given (small) transformer size: -

enter image description here

Circuit from here and note the construction size: -

enter image description here

Pretty much all the space above would be taken up by a suitably dimensioned 120 mH in the OP design.

$$\color{blue}{\boxed{\text{There is very little sense in not using an isolating flyback design}}}$$

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.