I'm working on a basic relay-based controller for a yogurt maker for my wife. It's nothing fancy, the usual drill of temp-sensor->mcu->relay that applies mains power to a crockpot when necessary to maintain (roughly) the right temperature for different stages of yogurt. That's not really the interesting part.
I was thinking about powering the controller and thinking to myself "it seems kind of silly to have a wall-wart plugged in to provide power to the controller when I already have 120vac in the thing going through the relay. Now, I may be making this memory up, but I seem to remember reading somewhere recently about a IC where you hook up 120vac on one end, and it gives you something close to normal project voltages (5-12) on the other end. I can't for the life of me think what it might be called, or where I read it. In my searches, I've come across things like "flyback converters" and "non-isolated off-line switching regulators", but it's not clear to me that these are what I should be looking for.
I need something that provides around 250mA-300mA, since it takes 200mA to keep the relay active, plus a little more to drive the microcontroller and display.
Am I making this kind of thing up? Or is it an incredibly stupid and dangerous idea? Or am I just missing the right search terms?
Thanks,
Andrew
You might want to read this:
http://ww1.microchip.com/downloads/en/A ... 00954A.pdf (http://ww1.microchip.com/downloads/en/AppNotes/00954A.pdf)
The other way to go about it is to use some DC:DC step down, but it will require a transformer (smaller body as it uses higher frequencies but still a transformer) ... something like http://www.national.com/pf/LM/LM5116.html#Overview (http://www.national.com/pf/LM/LM5116.html#Overview)
What about using something like a transformer to step down the voltage to say 9Vac. Then rectify the output, smooth it with a cap then stick it into something like an LM317T to give you a suitable voltage. Although with that current the LM317T will get quite warm.
My original goal was to avoid using a transformer entirely, for the space that they take up. The more I read about transformerless supplies, the more I think they aren't right for this project. It seems tough to get moderately high current like the >200mA that I need to drive the relay, and every bit of information about them is plastered with warnings about dangerous voltage being non-isolated and so forth. Since this is meant to drive a set of user buttons and a display in addition to the relay, I think I need to be concerned with isolation.
Since I have had little experience with doing my own AC-DC conversion, I'd rather bite the bullet and try and find a low-profile transformer I can squeeze into the enclosure. Another possibility is to get an on-chip isolated DC-DC converter, but that doesn't solve the current supply problem.
Thanks for your suggestions, everyone!
So I saw this awesome-looking crockpot controller for sous vide (http://http://www.over-engineered.com/projects/sous-vide-pid-controller/), and I thought that maybe a similar (TRIAC-based) approach might work for me. The TRIACs I looked at required only 10-30 mA at the gate.
Then I found Fairchild's FSAR001 (http://http://www.fairchildsemi.com/pf/FS/FSAR001B.html), which seems like the kind of all-in-one-ish 115VAC-DC converter I was originally looking for. It can provide ~35mA, which might just be enough. It's still not isolated, though, but I found some isolated DC-DC converters (Analog Devices ADuM5000 (http://http://www.analog.com/en/interface/digital-isolators/adum5000/products/product.html) and ADuM6000 (http://http://www.analog.com/en/interface/digital-isolators/adum6000/products/product.html)) that might provide isolation for the 5V supply for the controller, display, and user controls, if I remain convinced the isolation is necessary.
The parts are on the way, so when they come in (and when I have time) I can experiment a bit and see if it will do what I want. If I can't get enough current to drive the TRIAC and the display, I'll have to go back to the transformer idea. If this works, though, it should cut down my enclosure size requirements quite a bit.
I also really liked this guy's use of the IEC C14 connector, I have a ton of old powercords that match that, so if I can find the right socket, I think that will be a much better approach than just cutting up and extension cord and sticking one end in the enclosure for my AC power.
So, I don't know if anyone's interested, but I finally had an opportunity to try out the FSAR001 last night. I built a little experimenter board for it, but I was busy all day and didn't get a chance to take any pics; they will be forthcoming.
This device, remember, takes 80-265Vrms wall power and puts out a (relatively) clean 5V DC. According to the datasheet, the way this thing works is by monitoring the voltage of the AC waveform and charging a big electrolytic capacitor during the low voltage segments on the leading and trailing edge of the (half-rectified) wave. The controller then discharges the capacitor to sustain the 5V DC. It claims it can handle a maximum load of 35mA (more on that later).
[attachment=0]
[attachment=2]
[attachment=1]
The experimenter board followed the example circuit in the datasheet pretty closely. I used a poor-man's 10ohm 2W resistor (10 individual 100ohm 1/4W resistors in parallel, that big mess on the left), a 0.5A fuse (instead of the 4A suggested, built-in to the power jack) and everything else I needed I had on hand. Come to think of it, I had to make my own 13K resistor out of a 10K and a 3.3K in series (that mess on hte right, between the ceramic bypass capacitor and the terminal). Anyway, instead of soldering in the big electrolytic capacitor, I put in a set of terminals so I could experiment with different values of capacitor to see what current output I could get. The datasheet also seems to imply that some of the other resistors could be changed to tweak the "conduction angle", which is the width of the portion of the waveform that is charging the capacitor. Perhaps this could produce even higher current outputs? It wasn't as obvious how those should be modified, so I used the example values.
There is a graph showing the charging capacitor size vs. the output current that shows a perfect linear relationship, I = C/10, where I is in mA and C is in uF. Even though the datasheet only claims a max output of 35 mA, the graph clearly shows up to 50mA (using a 500uF electrolytic for the charging capacitor). This possibility inspired me to experiment a bit to see how much current I could draw with it.
I had a 680 uF cap on hand, so I put that on. Using a combination of 270ohm resistors in parallel, I tried the following loads and got the following current output:
[tt:]1x270 = 270R => 18.5mA
2x270 = 135R => 35-36.3mA
3x270 = 90R => 54.2-54.3mA
4x270 = 67R5 => 71.7-71.8mA[/tt:]
I stopped checking there. I plan to experiment more with a bigger load on the same capacitor to see how it hold up (according to the datasheet, remember, I should expect roughly 68mA with a 680uF capacitor). I also plan to try a bigger load on bigger capacitors (2400uF). There is supposedly a built-in current limit of 125mA, so I want to see how I do getting close to that.
I plan to ask some Fairchild engineers (they supposedly have a contact form for these sorts of questions) about the stated limits and what kind of problems I might expect to get into when intentionally exceeding them, so more on that when I get a response.
Been lurking for awhile now - I'm an old guy who has recently gotten back into the uC fun. So I'm essentially a complete punk noob* when it comes to the latest & greatest controllers/CPLDs/FPGAs, but perhaps I can help with this power supply.
I have actual product out in the 'real world' with these - if you can live without the isolation, this is a pretty solid design, up to about 200mA or so:
(heh - looks to spammy for a new user... OK how about this way?)
electronicdesign (dot) com/article/power/simple-off-line-power-supply-minimizes-cost7165 (dot)aspx
I've seen two of them operated in parallel. The most expensive thing is the high voltage cap.
Also, if you're not intent on using 'in hand' parts, it might help reduce the relay draw if you went to a high sensitivity relay.
*As in the last time I played with them in earnest a 6802 was cutting edge. The tools today are AWESOME and I'm having a majorly good time with my shiny new digital fiddling about... :)
[quote author="schazamp"]So, I don't know if anyone's interested [/quote]
Now that I know about this thread, I'll be following it. So far, I've operated on either pole - MickM's approach with ripping apart wall-warts or fully featured switch-mode supplies.
piort1600, thanks for the ED link.
[quote author="arhi"]You might want to read this:
http://ww1.microchip.com/downloads/en/A (http://ww1.microchip.com/downloads/en/A) ... 00954A.pdf[/quote]
arhi, have you experimented with anything like this first hand? This looks really promising for small, inexpensive, low power AC-DC conversion. Thanks for the link!
Okay, after some more experimentation, here are my findings:
[tt:]With 680uF:
70R 71.7-71.8mA
53R 89.5mA (surprisingly stable)
44R4 104.5mA briefly, after several seconds, then nothing[/tt:]
At 104.5mA, I seem to have exceeded the limits of the 680uF cap, so I upped it to 1200uF. I tried 44R4 again, and after about 7 seconds (presumably for the cap to charge up enough to generate a steady current) I was able to get 106.1mA out of it, quite stable.
I then tried 38R1, and after about 7s again, I saw 122.1-122.6mA briefly, but then it cut off, apparently due to the 125mA current limiting circuit. I was not able to get it started again with this load.
But it seems clear that with a big enough capacitor, it has no problem handling a load of 100mA or so.
This is more than enough to drive my controller, triac, and display stuff. The only question now remaining for me is how important is it to have isolation, since there's no transformer? Is it worth it to find a DC-DC isolation IC, or do I have very little to worry about?
Fantastic info on the FSAR001, thanks for sharing.
I can't seem to find a supplier for it right now, though. Somewhat related: has anyone considered setting up a standard R+C based transformer-less power supply for say 60V, and then adding a step-down switching regulator to it? That way you could dimension the supply for 5mA, for example, and then still get 50 mA @ 5V out.
Fairchild had it available for sampling a while back, but it looks like they're out of stock now.
I guess this is a *really* new addition from Fairchild. 28 week lead time from Mouser! Most of the other Fairchild distributors don't even have it on the books yet. The FC website sites it as being a replacement for "cap dropper" supplies. I guess searching for those might turn up something interesting.
So I'm still looking for a good explanation of the importance of using isolation when dealing with mains voltage. Is it just a matter of "it will kill you dead, don't do it"? Or would it be okay if the system had no direct user interface with physical controls (like if it were embedded somewhere with a wireless interface, or with an ethernet interface (or would the wired connection be no good)?
For a user interface, would some kind of DC-DC isolator (a-la ADUM6000 or the like) be enough for providing safety for a physical user interface (besides the obvious safe enclosure, GFI outlet, or what-have-you)? Or is this really a just-say-no situation?
[quote author="schazamp"]would it be okay if the system had no direct user interface with physical controls (like if it were embedded somewhere with a wireless interface, or with an ethernet interface (or would the wired connection be no good)?[/quote]
Ironically enough, I'm pretty sure ethernet does provide galvanic isolation :)
Because of my inexperience with safety standards, I can't give an exact/concise answer as to why isolation is a requirement. Here's some text from National Instruments (http://http://zone.ni.com/devzone/cda/tut/p/id/2827) that talks about how ratings relate to some of their products.
Here's another nice summary (also relating to DMM's):
http://http://www.transcat.com/PDF/Multimeters.pdf
Looking at UL certs that a random AC-DC converter (http://http://www.bellnix.com/products/acdc/list.html#an02) meets, UL 1950 pops up. Here's a paper from Tyco (http://http://docs.google.com/viewer?a=v&q=cache:wkSE1yDAXLUJ:www.circuitprotection.com/catalog/app/Telecom_UL1950-3rded.pdf+UL1950&hl=en&gl=us&pid=bl&srcid=ADGEESjxyiY2dNYdcvrSuF7EOP8Aie0s3dxKGSW6_nlgZ4SYu1bLNtYFOGqXXQIweQPIDS4bnkLY0F420FMoW8Fl3KnBZQQuwN3IIdDfqVGD5B95QYg2HoyuHT29vRD_d36suX-PyyNQ&sig=AHIEtbT-ShoDvKe0LrHNqXTjUD7U2lQbpg&pli=1) on the subject:
Overall, I get the impression it comes down to protecting the user from over-voltages on the mains line.
I'd also love to hear a concise answer wrt isolation/transformers from someone that knows their stuff!
The Fairchild FSAR001B is finally available from Mouser. Looks like
they got 5000 from Fairchild and have sold 3 so far.
I know this is an old thread but wouldn't this module VSK-S3-3R3U (http://http://products.cui.com/adtemplate_child.asp?brand=v-infinity&p=570278&c=43011&catky=764537&subcatky1=46887&subcatky2=809398) be the right choise for a one off proyect? Not the most efficient supply but you have a complete 2.3w AC-DC converter in lesss than 1sq-in. There are also other models with 6w - 20w output and diferent DC output voltages.
Of course, it depends on what you're doing. The CUI modules are UL approved and
generate quite a bit of power. $14.40/1 isn't that bad, although for a product demo
you may as well use a wall-wart.
The target market for the FSAR001B is different. Consider trying to get a microcontroller
and a few other chips powered up in something like a lightbulb base or inside an extension
cord. The typical solution involved an approved capacitor that's 25x15x8mm (I'm looking
at an X2 0.47uF on the bench) and a few other tricky components and unless your power
budget is exact, it wastes power and heats up.
It's a pretty specific chip and it took a LONG time to hit (useful) distribution.
there is also the Power Integrated Link-TN (http://http://www.powerint.com/en/products/linkswitch-family/linkswitch-tn) basically a buck converter made to work with very high voltages....up to 360mA..:D
We wrote about it in this app note post :) http://dangerousprototypes.com/2011/11/ ... converter/ (http://dangerousprototypes.com/2011/11/19/app-note-non-isolated-360ma-buck-dcdc-converter/)