power microcontroller from mains

Status
Not open for further replies.

Thread Starter

Travm

Joined Aug 16, 2016
363
Trying to find a safe way to do this.
What other options are there beyond a transformer? transformers are somewhat expensive.
Isolation is important because what i'm planning to do with it will require an interface with buttons and things that I do not want charged with 120v at any time.
Is a transformer the only way?
 

Thread Starter

Travm

Joined Aug 16, 2016
363
Wall Wart, $5.00.
Max.
impractical in this situation.
Ironically the transformer i'm looking at is $6.50.

What i'm trying to do is add a microcontroller to an existing piece of 120vAC equipment. There is room for a transformer, but its not practical to plug in a wall wart, when the equipment has its own power source, I want the MCU to use the same power source.

This is a vote for transformer no?
 

Thread Starter

Travm

Joined Aug 16, 2016
363
Is $6.50 going to blow the budget?;)
Is there any low voltage DC in the equipment?
Max.
No, $6.50 will be fine. its actually in my cart just now.

I'm just wondering if that is the best way to do it. Or if there are other smart ways to achieve the safety and isolation I want and need.

No low voltage stuff inside.
 

ElectricSpidey

Joined Dec 2, 2017
2,758
Then use a small PS that has a power cord, and cut off the plug and connect it to the equipment supply terminals.

Or purchase an open chassis supply.
 

Thread Starter

Travm

Joined Aug 16, 2016
363
Then use a small PS that has a power cord, and cut off the plug and connect it to the equipment supply terminals.

Or purchase an open chassis supply.
That is an option I didn't consider, but would be much more expensive I think. I suppose I could buy a cheap wall wart and smash the housing then solder wires from the power contacts to the power lines inside.
None of this sounds cheaper or easier than just using the $6.50 transformer though...
Is it better in some way? a transformer, rectifier circuit, couple capacitors would achieve the same? I guess i would have to do it right in that case rather than using proven hardware.
 

Thread Starter

Travm

Joined Aug 16, 2016
363
How are you going to power the transformer?

Why can't you power a wallwart the same way?
I could, but i would have to open the housing and solder wires from the equipment power in, to the wall wart terminals and mount the wall wart pcb somewhere inside the enclosure. I feel like that would be exceedingly hackish.

Transformer power would be from the contact inside the eqiupment where the plug first distributes AC power inside. So basically just to a standard AC plug.
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
With a linear transformer you need a bridge, cap, regulator, Digikey has 120v to 5v USB adaptors the size of an Ice cube, if necessary cut the case off and adapt it?
Max.
 

Thread Starter

Travm

Joined Aug 16, 2016
363
With a linear transformer you need a bridge, cap, regulator, Digikey has 120v to 5v USB adaptors the size of an Ice cube, if necessary cut the case off and adapt it?
Max.
nice, that would certainly be cheap.
Looks too small to use a transformer though, would it be safe?
 

WBahn

Joined Mar 31, 2012
29,976
I could, but i would have to open the housing and solder wires from the equipment power in, to the wall wart terminals and mount the wall wart pcb somewhere inside the enclosure. I feel like that would be exceedingly hackish.

Transformer power would be from the contact inside the eqiupment where the plug first distributes AC power inside. So basically just to a standard AC plug.
I'm still unclear what the issue is. Why can't you mount a small wallwart or other DC-DC converter in the exact same place you would mount this transformer and all of the associated circuitry and power it from the exact same points that you would have powered the transformer? Why is doing what you would have to do with the transformer any less "hackish"?
 

Thread Starter

Travm

Joined Aug 16, 2016
363
I'm still unclear what the issue is. Why can't you mount a small wallwart or other DC-DC converter in the exact same place you would mount this transformer and all of the associated circuitry and power it from the exact same points that you would have powered the transformer? Why is doing what you would have to do with the transformer any less "hackish"?
There isnt an issue. Just a knowledge gap on my part.
There is no reason i cant mount a wall wart inside the unit. This wouldn't be really any different than building a small power supply from a transformer though would it?

The only reason i consider it less hackish is that I would be building from new parts, rather than disassembling and discarding peices of a wall wart to mount the electronics inside. I suppose realistically its all about the same.

The original question was more along the lines of "are there other ways to achieve the safety isolation in powering a low voltage system from mains besides a transformer?"

Power requirements are small, just a few LED"s a couple transistors, a couple triacs, I estimate less than 200ma. A wall wart would absolutely work.
 

tranzz4md

Joined Apr 10, 2015
310
To answer your original questions:
- switching mode inter alia
- no

But then, you don't like the answers you get, do you?!

"Microcontroller" isn't exactly an unknown or undefined term; it's just an overused and misused one. Some people think it's the generic term for Raspberry pi, others realize it's something which is now primarily packaged as an SMD.

#6 is probably the most pragmatic answer. Until we get better info you won't get better answers. (probably not then either)
 

spinnaker

Joined Oct 29, 2009
7,830
There isnt an issue. Just a knowledge gap on my part.
There is no reason i cant mount a wall wart inside the unit. This wouldn't be really any different than building a small power supply from a transformer though would it?

The only reason i consider it less hackish is that I would be building from new parts, rather than disassembling and discarding peices of a wall wart to mount the electronics inside. I suppose realistically its all about the same.

The original question was more along the lines of "are there other ways to achieve the safety isolation in powering a low voltage system from mains besides a transformer?"

Power requirements are small, just a few LED"s a couple transistors, a couple triacs, I estimate less than 200ma. A wall wart would absolutely work.
There isnt an issue. Just a knowledge gap on my part.
There is no reason i cant mount a wall wart inside the unit. This wouldn't be really any different than building a small power supply from a transformer though would it?

The only reason i consider it less hackish is that I would be building from new parts, rather than disassembling and discarding peices of a wall wart to mount the electronics inside. I suppose realistically its all about the same.

The original question was more along the lines of "are there other ways to achieve the safety isolation in powering a low voltage system from mains besides a transformer?"

Power requirements are small, just a few LED"s a couple transistors, a couple triacs, I estimate less than 200ma. A wall wart would absolutely work.

And around we go. You have been already given the answer. Wall wart. It is the cheapest, easiest solution. How on earth is a wall "hackish"??? Thousands of some very fine consumer electronics use them.
 

GopherT

Joined Nov 23, 2012
8,009
And around we go. You have been already given the answer. Wall wart. It is the cheapest, easiest solution. How on earth is a wall "hackish"??? Thousands of some very fine consumer electronics use them.
My iPhone and Samsung S8 each have a wall wart for charging. They are super hackish devices. I can't believe Apple is trying to sell those things when they look like a DIY project from a third grader.

As far as safety, most parents let their kids handle these dangerous wall warts and thousands (maybe millions) of people are killed by them each day. Bad parents!
 
Last edited:

AlbertHall

Joined Jun 4, 2014
12,345
Only a transformer will provide the kind of isolation you need. There are two slightly different ways of getting transformer isolation.
1. An iron-cored transformer. Connect the mains to the primary and connect a rectifier, capacitor and regulator to the secondary.
2. A ferrite cored transformer which works at much higher frequency than the mains (100kHz ish), is much smaller, cheaper, and lighter for the same power. Then some fairly complicated circuitry to convert the mains to the high frequency and much the same stuff on the secondary except the capacitors can be smaller because of the high frequency.

Type 2 is known as a switch mode power supply and is now very common and most wall warts are now of this kind.
 

Thread Starter

Travm

Joined Aug 16, 2016
363
Does your tv have a second plug for a wall wart? This thread just got very stupid. Seems to be how this forum rolls unfortunately.
 
Status
Not open for further replies.
Top