I want to know if it is possible to design a power supply for a circuit that can operate from DC and AC using the same input terminals.

Thus, the output should be xxV DC (5-24 or whatever is decided on), and on the input side the consumer can connect whatever he has available - 120V AC, 230V AC or 24V DC.

A transformerless AC to DC power supply can work for at least the AC side, but the ideal one looks to be the capacitive type which would not allow DC to get through, am I correct?

There is also an resitive transformerless design, not ideal at all since it is very ineffecient.

Capacitive Transformerless Power supply

Any ideas? Thanks!

  • \$\begingroup\$ Do you need isolation? What current do you need? The circuit you show is not isolated (and thus dangerous), and only suitable for low currents (20mA general ballpark). \$\endgroup\$
    – marcelm
    Oct 10, 2016 at 17:30

1 Answer 1


I want to know if it is possible to design a power supply for a circuit that can operate from DC and AC using the same input terminals.

Yes, this could be called an off-line switched-mode converter however, it is usually not a good idea to omit the transformer because: -

  • It offers protection to the low side voltage due to it isolating the dangerous live voltages
  • It offers higher power solutions

enter image description here

The above picture shows how it works. It should be noted that "AC line" can actually be a DC line input. The isolation transformer is in the block labelled "DC-DC convertor".

Another name for this topology is "fly-back converter". The bridge rectifier at the front end ensures AC and DC power inputs are adequately converted to fairly "steady" DC voltages.

If you have a good argument for not using a transformer then I'd like to hear it but, be prepared, it's unlikely that you will.

  • \$\begingroup\$ Hi Andy! I wanted to know if there is a viable alternative to using a transformer or SMPS that results in a smaller footprint and smaller component cost. Thank you for the circuit diagram, I will investigate it carefully and study the advantages and disadvantages. I don't think I have a good reason, but I am curious and would like to at least know how it works! :=D \$\endgroup\$
    – AJBotha
    Apr 15, 2015 at 10:18
  • 1
    \$\begingroup\$ I understand where you are coming from and there is ultimately a space constraint on SMPSs but maybe you can give an idea how small is small and how much value can be attributed to safety? \$\endgroup\$
    – Andy aka
    Apr 15, 2015 at 10:45
  • \$\begingroup\$ Well I am not sure how small is small (relative to a SMPS), but if safety is not rated very highly (product is concealed in plastic enclosure and generally out of reach or whatever), does this not ultimately have less components, are easier to design, and results in lower cost and a smaller footprint? I have never seen a device that has a transformerless PSU. \$\endgroup\$
    – AJBotha
    Apr 15, 2015 at 11:01
  • \$\begingroup\$ I once designed a power supply for a microphone activated light switch. Electronics and electret microphone were concealed inside the switch so were as safe as could be. It was transformerless because it didn't have an output connection to the outside world but, in your question you show an output connection so I was playing safe with respect to the safety issue and assumed you thought the output was safe (and of course it isn't). \$\endgroup\$
    – Andy aka
    Apr 15, 2015 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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