2
\$\begingroup\$

I'm a CompE guy, so there's a lot about the power side of my field that I'm a little unsure about. I've been working on a project involving an MSP430 microcontroller and I'm at the stage in development where I'd like to enclose the project in a chassis. Ideally, I'd like to use one of the AC power cables that you'd normally see plugged into the back of a desktop PC, but I'm not sure the exact process for safely setting it up.

Here's how I'd imagine I'd set it up:

I'd set up some sort of AC power connector (like this) to the chassis: https://www.mouser.com/ProductDetail/Schaffner/FN9274B-10-05?qs=DPoM0jnrROUioa2xutjt5g%3D%3D

And then hook up some sort of AC/DC power module to convert the AC signal to DC. I figured this would need to provide an output voltage of 5V for the microcontroller and all of the various other boards in the circuit I plan on using (like multiplexors and whatever else, which range from 3.3 to 5 operating voltage. I figured this would work well for that: https://www.mouser.com/ProductDetail/RECOM-Power/RACM40-05SK-OF?qs=DPoM0jnrROWKLvH2LkawPg%3D%3D

But, is it really as easy as that? Surely there's more to consider that isn't exactly clear to me at the moment. Any help would be much appreciated!

\$\endgroup\$
7
  • 10
    \$\begingroup\$ Please don't work with mains power unless you know what you're doing--use a wall wart if you can in any way do so. \$\endgroup\$
    – Hearth
    Jul 23 '21 at 2:26
  • \$\begingroup\$ Can you elaborate a bit more? I'm not sure I understand what you're suggesting. I have a strong software background and only dabbled in circuits and electronics in undergrad. Since then, the most hardware I've ever worked with has been in VHDL, so the terminology is lost on me. Thanks for the quick comment tho :) \$\endgroup\$ Jul 23 '21 at 2:36
  • 2
    \$\begingroup\$ A "wall wart" isn't any sort of technical term, it's what everyone I've ever met calls these sorts of DC power supplies. \$\endgroup\$
    – Hearth
    Jul 23 '21 at 2:53
  • 2
    \$\begingroup\$ Yes. You may want to do PoL regulation, though; cheaper wall-warts tend to be noisy. \$\endgroup\$
    – Hearth
    Jul 23 '21 at 3:02
  • 1
    \$\begingroup\$ To answer the question, yes it really is as straightforward as you think. But the devil is in the details. I also agree, WallWart is the way to go if it will work for you. \$\endgroup\$
    – Kyle B
    Jul 23 '21 at 5:30
1
\$\begingroup\$

It’s a lot easier to get a PC ATX PSU from some old unit or online for $15.

\$\endgroup\$
1
\$\begingroup\$

Working with mains power is not a good idea if you can avoid it. Safety is the main reason--mains power can and will kill without a second thought--but anything connected to the mains also requires regulatory approval in most countries, and that regulatory approval is complicated and expensive to get. Mostly because of the safety concerns.

Better to let someone else handle the safety and regulatory stuff for you, and just buy a pre-built power supply that converts the AC mains power to some DC supply that's convenient for your application. If your device doesn't need a huge amount of power, a cheap wall wart (such as this one for instance) is likely the way to go. If you need a bit more power, you can get more expensive wall-warts with higher power ratings, or high-power desktop power supplies (similar to the sort usually used as laptop chargers) that go up to a hundred watts or so.

If you need a lot of power, it wouldn't be a bad idea to see if you could just use an ATX power supply (the sort used in desktop computers), as they tend to be relatively affordable as high-power PSUs go, simply due to the scale of production for them.


It's possible that the power provided by a cheap wall wart or desktop supply will be too noisy for your application, if your application demands low-noise power (precision analog stuff or PECL logic, for instance). In this case, you can clean it up a bit with post-regulation; the simplest way to do so is to get input power at a voltage slightly higher than your device needs, and then use a low-dropout linear regulator to regulate it down to the necessary voltage. (Do make sure you obey the regulator's dropout voltage requirements though!)

\$\endgroup\$
1
\$\begingroup\$

I'm assuming this is for a personal project. If this is for work, listen to the others and just use a wall wart. A wall wart is a good idea for personal projects too, unless you really want an AC inlet for convenience or aesthetics.

Your inlet has no ground pin. Are you sure that's what you want? What is your chassis made of? Also, that AC-DC module is rated for 6 amps. That's a lot; do you really need that much current?

A more expensive but possibly safer option would be to connect a fused AC inlet directly to a small transformer. Toroidal transformers are easy to mount. Be sure to use heat shrink to cover any soldered connections. This gives you an isolated low-voltage AC output, which can then be passed through a rectifier, capacitor, and regulator to get low-voltage DC. It won't be as efficient as a premade off-line converter, but you won't have any exposed circuits with mains voltage.

\$\endgroup\$
1
\$\begingroup\$

I/We R&D and build equipments containing "power bricks" (power modules). Those eventually gets all sort of cert for the world market.

Your approach is just right! There is no trick. No doubt, you would intuitively arrange the AC entry and the power brick like you would do with the MSP430 circuit you design, in good nice looking wiring. Though, there can be mistakes and consequences whatever you challenge, there's no progress without challenge. I am bumping you up, back to 0, for encouragement.

Just a couple of things I may emphasize, beside the high voltage caution,
(1) Do the grounding correct. That will save a lot of headaches later you can run into. That is true even if you use wall wart.
(2) If the AC wire has to run around the low-voltage circuitry, twist the pair, so the current flow balances out EMI.

\$\endgroup\$

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.