High Voltage: Using enclosed relays for HV switching

After seeing many projects that use microcontrollers to switch mains voltages [Rob Miles] decided to share his preferred method. The shots you see above are an enclosed relay, part number RIBTU1C manufactured by Functional Devices Inc.

This in itself is not the full control scheme that he uses, but it takes care of the bulk of the hardware. He uses a triggering circuit based on a 555 timer (PDF). [Rob] mentioned that if you shop around, you can get the relay, 555 timer, and other components for under $15. This is a great solution for the money when you consider that you get an enclosure meant for handling high voltage and a nice terminal block to which you can connect the mains wiring. The relay itself can be triggered by a 9V battery via the transistor in the control circuit.

Notice the protoboard in the image above. There’s plenty of room for your driver circuit to rest inside the box, protected by that barrier from the HV circuitry. Check out the rest of the images he sent us after the break.


  1. Elias says:

    That barrier looks fool proof :D NOT

  2. MurphEngineer says:

    Thanks for linking to that relay driver tutorial! Had I tried to pull this off, I almost certainly would have been tempted to use a micro to control the transistor that controls the relay. “Maximum source current? What’s that?”

    Of course, now I know that this would have resulted in tragedy. You may have just saved a few AVRs from a grisly fate!

  3. adam felson says:

    Switching what? If you want to switch 100vac, use a a triac and an optoisolated trigger diac.

    • +1 for this… I built one in High School with a hand drawn sharpie marker PCB, in one of radio shack’s smallest enclosures. AC cord in and out, and TTL compatible.

    • The linked 555 article makes sense if you read it, but a normal NPN circuit to drive the relay only takes 1mA… easy for most uC’s. Then it starts talking about active low input, and how CMOS circuits might not be able to handle 1mA. I agree active low, but not necessarily active high. Then it goes on to build a 1uA active high 555 driver, fine I guess if you are using some kind of CMOS logic active low output to drive the 555′s input.

      I would just “get dumb” and use a NPN circuit with a relay – or go the opto-isolated Triac route.

  4. Glenn says:

    That’s what I’m talking about!

  5. mike bradley says:

    i dont understand, instead of a micro use a relay? who uses a micro to do the actual swithing? maybe the control, but the title says a relay instead. not tryig to be rude, but i was very confused. and dont half the designs use a relay anyways?

  6. Will says:

    I’m confused, what is the hack here?

    Using a relay to switch voltage higher than the micro’s Vcc? – been done since the dawn of time

    Putting a project in a plastic box? – umm, ok..

    using a 555 timer as a glorified FET? – seems a little overkill and wasteful if the point is to save money or space

    The only link in the article was for a PDF that seems to imply that sometimes the bias current on a transistor is too much for a microcontroller IO pin so use a 555 timer. Umm, so use a MOSFET. A quick search on Digikey revealed 1,311 in stock N-channel MOSFETS that would do the job nicely for between $0.38 and $8.60 apiece. Right tool for the job…

  7. SuperNuRd says:

    Is the hack that his box looks nice?

  8. William Hightower says:

    I have used devices like this before. However I Used in an HVAC setting where everything needs to be done to code. They are quite useful and if you are controlling line voltage of devices that are scattered around, say like lights or fans, these are great. And the LED indicator is a plus. Also if you are uncomfortable switching line voltage these are useful. Also it should be noted that there are a lot of different configurations, so take a look at the web site. http://www.functionaldevices.com/building-automation/pilot.php

    Also if you decide to use devices like this shop around. I general find that prices on Industrial and HVAC Control parts vary wildly for the same part.

    • Ryan Nestor says:

      Thanks for the link. The only thing that I can take away from this is the knowledge that components like these exist. Relays like these, which are “to-code” are a godsend, and might make some of our lives a lot easier. On the other hand, even with my limited electronics knowledge, my response to the 555 bit was: “huh?”.

  9. juice says:

    I do not mean to be rude, but is it appropriate to call mains voltage high? When I read the title I thought that this hack was about much higher voltages, say a few kilovolts.

    What do you consider to be a high voltage? One hundred volts? Fifty volts? I think that the threshold is at about one kilovolt. I guess there is no official standard, so it’s a matter of taste.

    • blackman says:

      Australian standards dictated High Voltage as above 1000VDC and 1500VAC, this is by no mean HV switching

    • Jelle says:

      Yes I agree, HV implies something different. But if you turn it around, it is above 48V, so it is not low voltage. And since we are all binary nerds here: if it is not low, it must be high!

      • dan says:

        It’s not just that it’s greater than 48v.

        There are IEC definitions. (60038)

        Extra low voltage is <25vRMS (for AC) or 1000vRMS (for AC) or >1500v (for DC)

        So all mains equipment (including 3phase stuff) is low voltage, switching 110v (if you’re American) or 240v (if you’re American 3phase user, or British single phaser user) or 480V if you’re a British 3phase user is all low voltage.
        hence why those non-fixed appliances are subject to PAT testing laws -which deal with testing low voltage equipment…

        So yes everyone who says this isn’t an HV hack is technically correct.

        Still mains voltage is not something that the average person should be monkeying around with without properly knowing what they are doing.

        Then again, the PDF linked doesn’t say anything anywhere about high voltage, only high current…

      • dan says:

        my comment was eaten by the comment system, probably because I put triangular brackets for less than and the comment system doesn’t parse HTML properly, so it thought it was a tag?

        IEC 60038

        extra low voltage = less than 25v rms ac or less than 60v dc

        low voltage = 25 to 1000v rms for ac, and 60 – 1500 for DC

        then high voltage is anything over that for either

  10. f says:

    I am slightly confused as to the “high voltage” nature of this hack, as most other hacks filed under “high voltage” concern such things as Jacob’s ladders and Tesla coils. Mains voltage isn’t exactly “high voltage,” is it?

    Although a MOSFET would have been quite as fine for driving a relay, the 555 circuit has its merits just because it’s cheap and everyone has a couple of them around anyway. MOSFETs are more special, so you usually don’t have a suitable one available in your parts bin.

  11. cgimark says:

    I don’t get the 555 being used to switch a relay, seems like building something just for the sake of building it. If your current transistor can’t switch the relay then pick a better one, an hfe of 300 will control a relay off any micro out there.

    What should have been mentioned is how to properly mount a relay on a board for working with mains voltage. You need to pay attention to routing of the wiring and keep the hot areas in their own section of the board with a clear division on the board between the hot/cold areas with no parts or connection in the hot area unless they have to be in those sections.

    I install the relay , triacs or whatever that are to be mains supplied and then use a sharpie marker to mark the top and bottom of the board as HOT, including writing the word HOT in bold in those areas . It keeps me from accidentally placing a lead of a part into those areas.

  12. DoktorJ says:

    I am absolutely appalled that someone would have the nerve to post a tutorial on how to use a 555 timer in place of something else that might be cheaper and more efficient. How dare they! I can’t imagine that HackADay would post something like that, I mean considering how 555 timers should never, EVER, be used in place of something that makes more sense.
    Seriously, have you guys only been reading HaD for a week? They spent an entire month earlier this year posting about people who used 555 timers in the most ridiculous and convoluted ways possible. So, this guy used one in place of a MOSFET and suddenly everybody comes out of the woodwork to talk about how it’s not a hack because most people do it a different way. WTF?

    • I’m with Dok J on this one. The site is called Hack A Day. If it isn’t used in a hacky or amateur way, it won’t get posted. Believe me, after submitting a few of my own projects (none of which used arduinos or misplaced 555 timer IC’s) only to receive zero response, I know. Seriously guys, not even a rejection? I don’t think the HaD staff is THAT busy…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s