AC Shield will take your breath (heart beat) away.

posted Dec 10th 2009 9:28am by
filed under: android hacks

[Ryanjmclaughlin] came up with the idea of a Arduino shield that uses TRIACs to switch four channels of AC power. The forum thread he started delves into several interesting discussions covering what it would take to convert this for use with 240v power and of course, a debate about safety.

A reader named [Victor] sent this tip to us and mentioned that this shield might significantly reduce the number of Arduino related projects we see. That’s because mixing high voltage alternating current with delicate 5v logic circuitry can be a bad idea. We’re not saying the creator of this didn’t know what he’s doing, but if you don’t you could fry up your Arduino, or your body.



68 Responses to AC Shield will take your breath (heart beat) away.

  • cgmark says:

    I would never use triacs to switch power with a micro unless there was a specific reason that a triac was required. I would use a relay which provides as good as isolation as using an optoisolator and you don’t have the risk of getting shocked by the tabs like on the triac in the picture. Also triac produce heat and switching large loads generates a lot of heat. Relays are a proven method that is used in millions of homes in everything from microwave ovens to central heat and air.

  • stunmonkey says:

    This is something that could finally make the Arduino truly useful instead of a pointless toy.

    I don’t see a problem with it, I think its great.

    The 5v guys tend to freak around serious current because they develop bad safety habits. Sort of like people who only handle Airsofts are incredibly dangerous and unwittingly careless when you hand them a real gun.
    Working with real current does take some getting used to, but it just isn’t that dangerous or hard to get in the habit of using best practices, and it opens up SO many new realms.

  • jomei says:

    well thats very basic.

    if you look at a commercial product there HAS TO BE a distance between the logic(5V) circuit and the 240V circuit.

    Obviously arduino users donÄt know about this…

  • cgmark says:

    @jomei
    Yeah that is something else I just noticed. Anytime you design a board with mixed low and high voltage you are supposed to isolate both areas to different parts of the board. Having connectors to the breadboard directly next to live triacs is an accident waiting to happen.

  • macpod says:

    Relays are good for on/off setups, but what if folks want to do something like dim an ac light?

  • macpod says:

    …I just wanted to point that out since you know how fond the Arduino crowd is of blinking led lights.

  • cgmark says:

    For light dimming I would not do it on a shield attachment. I would build it on a board to itself in a proper enclosure with screws on one side for the micro connection and screws on the opposite side for the loads. The tabs on a TRIAC are LIVE when connected to AC and pose a shock hazard so they should never be left just sticking up on a board.

  • GabrielSalvatori says:

    Great proof of concept. Would I ever use it? No. Never. Always be excessively careful when working with high voltages. That being said, if it’s ever updated and the problems fixed, I’ll be buying a few of these.

  • Sobachatina says:

    I like triacs. Relays are far more expensive- like 3-10x than triacs with drivers. Relays are slower, have limited lifetimes and capacitance in the driven line can cause arcing.

  • MaBerY says:

    FYI
    I just ordered 10 pieces of 39MF22 integrated Solid State relays.
    0.9A@600V With 4kV isolation and zero cross circuit.

    my case I need to control a Elevation/Azimuth CCTV motor for controlling an Sat dish or 13cm HAM antenna. This is a 24VAC unit so voltage is not a real issue. I probably design a separate PCB and not a shield just in case I need to control something at 230VAC

  • I would not do it like this, the triacs get hot so its smarter to align them so you can screw on some cooling tabs. The circuit is not unusual, its just to small to be safe imho.

  • threepointone says:

    yeah, there’s a right way and a wrong way to do it. i’d say you can design them on the same board if you do it right, and this isn’t being done right. unfortunately there’s no schematic or board layout image provided, but from what i can tell, the optoisolators are actually not performing a large part of their function here: the HV trace goes right across one of them, removing a lot of the inherent transient protection they’re supposed to provide. the layout is pretty terrible from the safety and protection standpoint, and honestly it’s not hard to do better.

  • stunmonkey says:

    Damn, if it isn’t optoisolated correctly, and with separate supplies to each side, that would be a ball of magic smoke waiting to happen.
    I have no issues controlling some seriously scary current with 5v, but that 5v comes tapped from a USB port on my control computer and is grounded back there, too, through its separate ground plane. Everything talks through an opto board.

    There should be no possibility of connection anywhere between 5v and working current, nothing shared. I’ve seen too much feedback up shared grounds or through an un-isolated chassis in badly set up systems.

  • I have been doing some research on my next cleaner/safer version of my grow box controller. Though codes still varies my city/state/country, the consistent rule I have seen is low voltage and high voltage can co-exist as long as the solid 16 gauge wire is used for both low/high voltage connections.

    That being said, for safety’s sake I would recommend moving the high voltage completely away from the low voltage since trying to “safely” reattach one wire while the system is live is definitely not recommended.

    With respect to HV this could be a “safe” solution, though I probably wouldn’t start selling these without setting up a LLC or have several pages of lawyer talk in the order form.

  • Matt says:

    Solid state relays are expensive, and mechanical relays are slow. I tried to make a Christmas light controller with mechanical relays, and the best I could get was 1hz flashing. I tried to go faster, but I quickly started frying relays. The relays were fast enough with no load, but they just couldn’t handle fast switching with a load.

  • Skitchin says:

    This is one of the rare cases where I have to agree with the safety crowd – electricity out of the wall is nothing to play around with, and 120V REALLY sucks to get shocked by. I got zapped around the age of 6 by a loose VCR plug. For those not familiar, the instant you touch it, the electricity tenses your muscles, more than likely making you hang on even tighter. I was stuck for atleast 5 seconds, let out a loud scream and eventually was able to sort of stumble back away. My lips were cold and pale for a good bit after..

    A circuit like this should really have a fuse, perhaps even a thermistor.

  • DaveDaveDave says:

    No doubt an opto isolator is required and this thing could be a lot safer. My first thought was to add what us tube guys call “Death Caps” for protection ;)

    But geez guys, some of you are REAL WIMPS when it comes to 120AC. Try building a tube amp with some nice hot 480VDC, and then integrate an Ardiuno into it!

    Dave

  • ZZZOOOLLLTTTTT! says:

    Quite honestly, this should never go to market, be used, or even be handled in it’s current form.

    First, use isolated tab triacs, it’s a no-brainer.

    Second, at least put a lexan shield around the entire high voltage area.

    Third, heat-sinking will be an issue, so include some in the design.

    Fourth, use proper isolation technique, such as routed slots between the high and low voltage sides.

    That being said, it is innovative, and if you fixed the safety issues, added a regulated 5V power supply, and had it properly potted in an enclosure with guarded screw terminals off the topside for the AC, I think it would work quite well.

  • Buzzkill says:

    Seriously @DaveDaveDave. This crew is a buncha wussies. 120v on a board like this? Why the hell not? With those triacs, we are not talking about 20 amp loads. You are looking at 1-2 amps max. And with no heat sink, closer to 1. This would be just fine for adding a little blinky flashy to something, or running a halloween prop, etc. Would I run 240V through it? Probably not. I have seen this tried on some of the DIY lighting automation sites. Unless you are going to reposition those triacs, you may end up with arcing which would end your blinky flashy fun pretty quickly.

  • ZZZOOOLLLTTTTT! says:

    mmm, tubes…..

    Plasma tweeters come to mind :D

  • cgmark says:

    If you want to do it and do it right use something like this layout.
    http://img294.imageshack.us/img294/5741/dimmer.png

  • dstrcto says:

    @Skitchin:
    Aren’t you glad we don’t use 120V DC, hehe… Needless to say, you need to know what you are doing here. DC is pretty easy stuff, AC gets tricky, and not knowing the basics of either will have consequences. Nonetheless, this is a semi-useful shield if it’s in the right hands.

  • jomei says:

    @skitchin

    “and 120V REALLY sucks to get shocked by”

    240V suck even more. 480V(between two lines@240V here in europe) even even more.

  • Darryl Smith says:

    The main problem is the TRIACs and their tabs. The simple way to improve safety is to use insulated tab TRIACs. These are a bit more expensive, but much safer. Whilst you are at it, also use zero switching opto’s

    Darryl

  • vic says:

    What’s wrong with using low voltage to trigger a higher voltage ? It’s being done all the time without any problems. He does it properly with optocouplers, as should be. Relays are easier but slower, more expensive, and limited in their applications. The real problem here is not the circuit design, it’s the way the high voltage traces slither between the low voltage ones, nullifying the isolation. Probably OK for 110V, but problematic for 240V. Next problem is that he’s selling it (or was, 9 months ago), and obviously does not respect the regulations regarding handling of mains voltage.

  • mosheen says:

    I’ve seen two AC projects this week missing the same thing: a fuse. That magic little glass device will keep your house from burning to the ground. Try to match it to your intended load too, not the absolute max of the circuit.

  • ianc says:

    I wouldn’t use this design. I would encase the 120ac board in a seperate plastic or metal (grounded) box with appropriate strain relief.
    I love those big grey plastic boxes you can get at home depot for outdoor electrical.
    Some kind of pin connector could connect to another box with the arduino and the low voltage stuff.

    ps

    How come I have never gotten shocked so bad that I couldn’t let go? I’ve been shocked many times, but I always jerk away from it? Is it because my hands are dry?

  • Lucassiglo21 says:

    you shouldn’t be so afraid, it has optotriacs, that’s pretty safe if you keep your hands off the tabs, fuses are a good idea, but the board is isolated from the electronics.
    this is much safer that another project i did, it used a transformerless power source and all the project was floating in the AC voltage, so i could switch the triac directly.
    if you keep your hands far from the wall voltage you shouldn’t have problems at all.

  • burnsy says:

    This could be the instigator of a great tutorial.

    Once circuit diagrams and board layout files are released, someone could redesign it safely, and make a tutorial going through all the changes they made, and why those changes needed to be made.

    Would help people use those principles in their later projects.

    I can’t do it, my head’s full of bits and buses.

  • brad says:

    @mosheen – Correct.

    Don’t forget to put them in your DC projects as well.

    A must if batteries are involved.

  • Lucassiglo21 says:

    you can’t use triacs with DC, they will remain in ON state until you cut the current.

  • Manfre says:

    @ianc, DC voltage contracts muscles making it very difficult to pull your hand away. An advantage of AC voltage is that it doesn’t share this property and is the reason you were able to jerk your hand away.

  • mosheen says:

    @Manfre
    I am an industrial electrician and that is incorrect. The only reason you’re able to pull away is luck. Let it catch you the right way with enough sweat and a good path to ground and your dead. 120vac will put you under, and 480 will burn the crap out of you….and put you under. Please be careful everyone. 120vac is so common we take for granted what it can do if you don’t respect it. GFCI outlets are a good idea for working with projects too.

  • Godi says:

    People just need to fucking die! Whatever happens to achieve that goal is fair play.

  • Thanks Mike and Hack-a-day for the post!

    This whole idea started with me wanting to dim an AC based light bulb with an Arduino at low cost. Triacs are really the simplest and lowest cost way to go. They are also very standard, I got much of the idea from an oven controller in my house that has a very similar circuit that uses a PIC to drive opto-isolators and triacs (CE certified, and there is not even a full case around the PCB!) Also, if you pull open an old rotary dimmer, some have a similar triac circuit.

    I was getting two worried about any testing over a few watts using a breadboard, because that was really not safe. So the shield idea came up to do a proof of concept for light dimming. Well the idea and circuit did work fine with the few lights I tested it with, never more than 1-2 amps for a few minutes at a time. (For all the worried people, don’t worry I only made 2 prototypes for my use!)

    Check out this thread (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230333861) for the code side of this project. Many people have worked on the code to get the Arduino to accurately dim AC devices!

    I have actually been working on many more revisions since. I think I am on about the fourth revision. The board is now a dedicated 2″x3″ board that with have a casing around it. (FYI, the prototype had e-tape and hot glue covering any exposed AC connections, not that that makes it too much safer.) There is much more isolation between the 5V and AC power with completely separate AC and 5V GND planes on both sides of the board. The nice thing about the board is that the components are cheap and can be made for $20-30 for 4 channels VS some of the much higher SSR based dimmers.

    Thanks for all the comments, I certainly understand both sides of the story. I myself used to work on concert lighting and sound, having to worry about getting zapped by 400 Amp 3-phase that you needed to hook up live! You need to be more careful with high voltages, but AC is also very common place. Just make sure you are comfortable with it and know what you are doing before attempting anything.

    I’ll post again in the Arduino forums and on my site when/if there is something worthy of having other people try out. Thanks

  • Sean says:

    We built several similar boards for an art project supporting 8 channels without problem. Our boards had screw terminals for each channel. These were NOT shields though.

    My main comment would be to take the plug off the shield and connect it via cord. I wouldn’t really want to be holding the Arduino and shield to provide the necessary counter-force while I plugged it in.

  • Loren says:

    So i take it one should not get drunk before using this?

  • ladz says:

    Solid state relays are the only way to go for hobby projects. They’re all over the bay for 5-10 bucks. Not even counting the advantage of zero-cross switching, the convenience, safety and reliability is well worth it.

  • kpetoh says:

    I second the proposal for some screw down terminals and physically isolated potted hi-volts.
    Unless we’re stuck in the 1930′s I see no need for relays; SCRs are the way to go.

  • salsa says:

    The safety concerns people have mentioned are quite valid, especially that the tabs should be isolated.

    The real issue, though, is mounting– a shield is really not a very safe way to build something like this, for two reasons.

    1) Since there are or may be pins sticking up from the Arduino (or other shield) underneath, those could get close to the AC side of this board.
    2) Arduinos are not typically mounted to /anything/, in spite of having standoff mounting holes! So, this thing will be skidding around a tabletop or held to something with rubber bands and/or hope.

    This is not a dangerous idea per se, it’s just a matter of implementation.

  • tantris says:

    i agree, this might lead to fewer arduino-posts.

    but first, we will get more arduino posts:
    people, blinking their porch lights
    an arduino, that will turn on the toaster, when you receive email.
    someone dimming his microwave.
    a computer that turns on the gas stove, when someone tries to reconfigure it.

    this will continue for a week or so, than the posts will slowly disapp ..ehhr.. die off.

  • Mickey says:

    To be fair – the developer was doing his best, and while there are plenty of people that can do better – we all made simple errors when we started out. Some of us had mentors to put us right, and others… well they’re not here now.
    Keep this effort within sight at all times, and remember when you do fire it up (no pun intended) – make sure it is well isolated, fused and ideally on an earhtt leakage circuit to protect the vulnerable that are downstream fromthe box. Kids, pets and falling stuff all have the innate ability to find live circuits faster than a sparky.
    Making non-lethal mistakes is as good a way of stimulating positive criticism. Just don’t let your ego run away yet – or you may face liability and insurance problems you never dreamed of!
    Good luck – and keep on developing stuff.

  • Agent420 says:

    “Seriously @DaveDaveDave. This crew is a buncha wussies. 120v on a board like this? Why the hell not? ”

    Couldn’t agree more. I’ve done many similar projects, it’s fine. Take off your training pants and build a project controlling some real power. jeez.

  • Tachikoma says:

    To people who are freaking out over using triacs: They have been used in $5 touch lamps for many years now, and they utilise the shitty-est capacitive sensor circuits.

    Anyway, regarding this project, it’s hard to tell from the photo, but I don’t think I’d be satisfied with the layout. I would probably tear up the PCB design and lay them out for better physical isolation.

    For the circuit design perspective, again it’s hard to tell without seeing the schematic, but it appears this thing is using MOC3022 optos (the white 6-pin DIPs). Those are rated at about 400V, which provides adequate electrical isolation, IMO.

  • Tachikoma says:

    Oh yeah and i forgot to add, put a heat shrink tube around the triacs for insulation.

  • Agent420 says:

    … And to all those suggesting relays, I’d like to see your version of dimming…

  • Mike77 says:

    Sweet mother of crap! Is he nuts? Or has he perhaps never seen an opto-isolator?

  • lejupp says:

    @Agent420: No problem, let the relays do PWM and implement an automatic relay changer with a 1000 relay magazine.

  • Francisco says:

    I can’t see any problem with the circuit, however, I haven’t seen the PCB layout.
    The Insulation and separation of the 5V and mains coud be provided with adecuate routing and smart use of both sides of the PCB.
    The use of non-isolated tab triacs is OK if the circuit is to be put in an adequate enclosure.
    Any real hacker must not have fear of mains voltage, only sufficient knoweldge and respect for it.
    I’ve learned it the hard way with more than ten socks from 230V mains in the first 25 years of my life without consequences (the differential circuit breaker worked in all the cases).
    Some years ago I built a light sequencer using 4xxx series CMOS logic, controlling triacs without isolation (all the 5V circuit floating at mains voltage) and I never get shocked by it. This circuit was built in wired prototipe board and actually the circuit is working today without trouble.

  • Roly says:

    This “wuss” had many years in power control (240/415, to 100kW) including lots of live board work, and this project seriously sucks. There is nothing wrong with the *idea*, it’s done all the time, it’s the *implementation* that gives me the willies.

    @burnsy
    Instructive redesign is a really good suggestion.

    Triac or relay? That depends entirely on the application.

    @Matt
    “I tried to go faster, but I quickly started frying relays.”
    Which is why frequently operated relay contacts are fitted with a CR snubber to minimise contact arcing, and you have to do something similar with triacs and SCR’s if the load is anything but purely resistive or they will stick on. The current and voltage *both* have to go below threshold before the triac will switch off.

    @Manfre
    Edison’s marketing myth from his battle with Tesla resurfaces. Muscles effectively rectify by contracting whichever way the current is flowing. The primary determinant is what happens when you get the shock and your muscles contract – is your hand going to grip the conductor, or move away? So if you *must* touch, always test with the *back* of your hand (after using your trusty neon screwdriver). And yes, I have given myself a richly deserved black eye.

    @kpetoh
    Unless of course you are in a lightning-prone area where a 1930′s relay will outlive a dozen semicons; or you are switching a reactive load (when triacs will often stick on); or DC; or where a shorted triac could produce a dangerous situation; etc. Triacs and SCR’s are also prone to dv/dt firing. The failure modes of relays and triacs are different, but the difference in overall reliability isn’t as great as some seem to think.

    @Tachikoma
    400V is not enough for a 240VAC supply – 1kV minimum.

    @Agent420
    Okay, so this is for dimming. So where are the switching supression components? I have built light dimming racks for theater use and consider an earthed metal box for all the high voltage to be mandatory. Recycled computer power supply cases, available free from your local computer shop, are near ideal for this sort of project.

    A word about ELB/CBR/’safety switches’; if you are not well earthed and manage to touch both the active *and* neutral you are simply part of the load and will FRY. ELB’s also fail quietly and I’ve found more than a few that won’t trip at all. An ELB is not your main protection, that comes from good practice, the ELB is your last gasp reserve ‘chute and if that doesn’t open you’re toast.

    If OP is selling this I hope he understands that his liability insurance will not cover inherently unsafe design.

  • Agent420 says:

    LOl… you do realize that the common ac recepticle and light bulb socket base would likely be deemed deathly dangerous by todays UL world, especially if run by this crowd here ;-)

  • tantris says:

    @agent240:
    not likely, most definitely. the american plug makes contact before the contacts are out of user’s reach. the european plug is recessed so you can’t get your fingers near the hot pin. and at least with the 3-prong one not the pins but the plastic part carries the mechanical stress.
    but then again, 240V needs better insulation than 120V. in europe, you don’t see lamp sockets with paper insulation either.
    well, ok they might have them in italy, because your electrican’s cousin good them from a friend in the us…

  • tantris says:

    ok, a try on constructive criticism:
    1. xmas light switches. wait till after xmas, then get one of these xmas light outdoor switches on sale 50% off, the kind that turns the light on at dusk. with black electrical tape, tape a led over the light sensor and connect the led to your arduino: led on= 120v off, led off= 120v on.
    the good: safe and easy, no danger
    the bad: no dimming, not dangerous enough to get hack cred with 13yo (if that’s what you’re after)
    the ugly: for two ac outlets you also need two switchers -and of course an additional arduino for each led ;p

    2. some low voltage controlled ac-switch from surplus or the thrift store. examples: there are computer modules that switch 120v with a 5v dc hookup. i think hp made them, but i don’t know what for. i got one for a couple bucks. rf remote light switches: a few bucks a the thrift store. not x10 but the even cheaper ones where you glue a fake light-switch to the wall: at some the light switch needs new batteries and the thing ends up at the thrift store.
    good: safe
    bad: some customization required
    ugly: “that’s not a hack”-comments.

    3. your own triac controlled i-am-not-a-wuss controller. what everyone already said: fuse, metal box, opto isolator. in addition: get a metal gang box for electrical work in wet rooms, put a receptacle and a face plate on it, make it three prong, have the box grounded. dc from your arduino should come in through a separate port. also: the triac is not enough to turn this into a proper ac dimmer. don’t ask your uc friends about it, go to an old-school electrical website and find a decent ac dimmer with zero crossing detection and nice noise filters. your arduino won’t switch the dimmer directly, but the analog from the arduino (through an opto-coupler of course!) will replace the potentiometer in the conventional dimmer. the dc-voltage simply sets the on-off percentage for the dimmer, but the dimmer circuit does the switching. you might need a fet.
    good: noone will call you a wuss anymore.
    bad: your home insurance will likely deny coverage
    ugly: the other kids dancing around the fire

  • lekernel says:

    Stupid thing! But at least now the Arduino fans will get the Darwin awards they deserve. Triac circuits connected to mains should be kept away from young children.

    And you’re not saying the creator of this didn’t know what he’s doing? You should. This board design breaks the basic principles of high voltage safety. Check any high voltage design manual, and you will see how you should respect isolation distances between low and high voltage parts of a circuit. This board absolutely does not.

  • lekernel says:

    Oh, and I forgot to say that connecting triacs via optoisolators to a microcontroller is NOT A HACK, especially when done wrong.

  • cgmark says:

    Just a note about shock hazards. I follow the rule of one hand kept in pocket when working with live voltages present, helps to keep you from completing a circuit. The other thing is that most people killed by getting shocked were not killed by the electricity itself, but by their reaction. You are standing on a ladder changing a light bulb and the switch is still on, you get shocked, what is your reaction ? To jerk your hand back, losing balance you fall off the ladder and break a bone or worse. Happens all the time especially in factories near heavy machinery.

  • Tachikoma says:

    @Roly
    The MOC3022 optos I mentioned have an operating voltage if 400V, but the isolation is about 5kV. I should have made that clear earlier…

  • Oren Beck says:

    To the best of my reading so far- the “Hack by itself” here is expanding what a “shield” board can do. I’d call it a “Proof Of *CONCEPT* Prototype” And, as such, the original builder gets an “attaboy” round of applause for advancing Hacking! Safety is what speaking for myself only, I describe as situational. Different rules for each situation. Hacking is a situation divergent from “appliance operation” Are we not Hackers?

    There’s a phrase that appears in my mind EVERY time a comment thread veers to Paranoid or Darwinbaiting extremes. **Be careful, but not too careful**

    And, I owe a beer to someone who knows it was them, that put it on wall signs in a Hackerspace:)

    There’s another sort of wisdom that goes in and out of fashion in Design Science itself. It’s called Design For Usage. IIRC there were/are several variants of that as textbooks,and the ones I read of the type, influence my Hacking for the better. I point our thoughts to the comment by tantris RE: using those Christmas Light” switches, and an Arduino controlled LED.

    As in so listing, tantris has applied the “less risky” path. Hacked something an Industrial Designer who may have applied the “Design For Usage” courses to making UL approved- in a way that does not appear to lower that safety factor we presume is in an approved shrinkwrapped unit.

    Hacking lives-or we DIE in wrongly choosing which approach we use. Shrinkwrapped with non-invasive=least risk hacks- or this EXCELLENT for it’s “Lab POC prototype status” AC Shield= Darwinbait to the untrained/unlucky.

    Kudos to the Hackers of both approaches.

  • tantris says:

    @orenbeck: in principle i agree with your hacker-manifesto. there are safe and well traveled paths and then there are excellent, but slightly dangerous daring proof-of-concept hacks. unfortunatly, these aren’t the only two categories. if something doesn’t fall in category one, that doesn’t automatically make it a member of category two.

    something that is dangerous is not automatically an “excellent” hack. and if something has been done (better) for 30+ years, one can’t call it proof of concept either.
    duino-fans aren’t the only hackers out there. long before arduinos became popular, people built their own dimmers. this isn’t just reinventing the wheel, it’s more like showing up at a ham-fest with a string and two yoghurt containers.
    so, build one of the “traditional” dimmer designs from circuitcellar or tomi engdahl’s tutorial, replace the potentiometer with a transistor and the result will actually work without putting too much noise on your ac-net, or ac through you.

    here’s tomi engdahl’s tutorial: http://www.epanorama.net/documents/lights/lightdimmer.html
    half way down, he also shows a safe way (still a hack) of dimming ac with low voltage dc.

    and something similar here:
    http://www.cs.cmu.edu/~RAS/Docs/space/dimmer.html
    replacing the potentiometer not with a fet or a digital potentiometer, but with an optocoupler.

  • Scott says:

    Ok, you “safety” guys are missing a critical detail, this is a part, not a whole solution. Whoever uses this part needs to add the obvious safety features to the solution they are producing. A fuse and a proper enclosure are certainly required for a 120v solution but they don’t belong on this part anymore than they belong on every individual relay. Assuming someone makes a little black plastic box with this and a fuse inside and a plug and socket on the outside to make their christmas lights flash joy to the world in morse code or whatever they’re doing with it, where’s the danger ?

  • Just came across this… anyone seen it before. Along the same lines, much more refined.

  • deathventure says:

    The same idea is used on heater controllers that are used for plastic injection molding systems. Analog circuits or a microcontroller sends a signal to an opto-isolated triac driver. These are used in 240V AC three-phase standards. the Triacs can handle up to a 40 amp load (in my case). Two protection circuits are used, first a standard set of fuses on both sides of the AC, then a relay on both sides of the AC, also controlled by the micro. The micro is located at least 1/2″ away from any AC. On the board, standard separation from AC line to line is 250 mil, as well as AC to DC, all 250 mil (quarter inch). The board is covered by a heatsink, attached to the back of the Triac (isolated tab). If the triac gets too hot, it will go into what’s called a thermal runaway. If it gets shorted, it will also put out full power, but if that happens, that’s what the relays are for, if the micro senses something out of the ordinary, such as excessive current, or if you have a temperature sensor or even a light sensor, you can have it automatically kill the relays before damage is done. Of course, this would take more board space, and a good knowledge of basic routing practices for pcb’s.

  • Troll says:

    You miserable fucks. 120v, 240v, are NOT high voltages. It’s NORMAL voltage. And the current it SUPPOSED to kill you when you mishandle it. That’s how we keep the gene pool clean.

    Also, Relays make noise, and cannot be dimmed. NOT AN OPTION.

  • Scott says:

    Even though I add the occasional breaker to power panels with the power still on, I concur on doing this the safe way, including creepage / clearance on the PCB layout for optocouplers. There are reasons this is in electrical codes.

    One reason is lightning strikes to the power-line network. Want your project and computer to still work after a storm? Whoops, forgot to unplug it.

    Another reason is that since power lines go down in storms, tree branches fall, pole transformers fail (I’ve heard the occasional boom), power poles get hit by cars and tools or metal ladders can fall on pole transformers, it’s reasonably possible for the (in the US) 1.25kV feeding the power-pole transformer outside your house to get momentarily into your home’s power wiring. For instance, our power-pole transformer also feeds a house across the street. About two years ago a dump-truck with the dump bed left up caught the power lines crossing the road and ripped the transformer right off the pole! Hard to guarantee isolation when that happens.

    Oddly enough, the people writing electrical codes don’t seem to like homes catching on fire or people being electrocuted when these sorts of things occur. Wimps.

    I hope “The Cheap Vegetable Gardener” was kidding about 16 gauge wire taking care of safety.

    A fuse will help prevent fire but won’t save you from shocks. It only takes milliamps to kill, which won’t pop even a 0.5A fuse. And it takes amps to make me turn in my status reports.

  • Nitori says:

    I just use relays if I need to switch small AC loads.
    If I need to put something together fast there are solid state relays that can take a 5v logic inputs.

  • Hacking lives-or we DIE in wrongly choosing which approach we use. Shrinkwrapped with non-invasive=least risk hacks- or this EXCELLENT for it’s “Lab POC prototype status” AC Shield= Darwinbait to the untrained/unlucky.

    Kudos to the Hackers of both approaches.

  • Andy Baker says:

    AC shield… bad idea? You guys are all pussies. This is what opto-isolators are for. Electronics people do more stupid stuff than this every day. If all everybody does is LED and hobby servos, Arduino will remain pathetic. There is no reason that the micro can’t control high power, high voltage stuff. If you want to scare the amateurs off, then write some scary stuff, and that’s that, but it’s a product that people want, so give it to them. Better to have a proven piece of hardware out there than to have some idiot putting triacs in a breadboard!!! I’ve seen it!

  • Leave a Reply

    XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

    Send us your hacks










         




    Hacks

    Resources