Electronic – Can you put a 120vac positive line into a breadboard

acbreadboard

Is there anything I need to know about putting a 120vac positive line in my breadboard? (Like, for example, if it's a bad idea to do that to begin with.) It will just be a christmas lights strand at less than a quarter amp. I will only be putting the positive line into a DIP relay. I've only heard a few instances where people have done this and my only electrical experience deals with 5vdc so i've never been shocked. I know that I will not be touching this while it is actually plugged in as well.

I also will have 5vdc control wires on the other side of the breadboard. Should I throw in some diodes to protect my Arduino, or should the relay keep the power isolated pretty well?

Best Answer

Do not put 120VAC on a breadboard. While there's nothing preventing you from putting 120VAC on a beardboard, that's really dangerous so don't do that.

Get a perfboard to solder your relay in. Mount said perfboard with the relay into a plastic project enclosure box. That way, you won't accidentally short any of the relay contacts. Drill a hole in the box to allow for 120VAC connectors.

You can get all those items at your local Radio Shack or Fry's electronics. Or just about any electronics supply store.

According to your comments, you have a HSR412. You should still get a perfboard and plastic box and solder this device into it to protect it and to protect yourself and others from a potential shock. The datasheet says that it provides "4,000 VRMS Isolation", so w.r.t. isolation you should be fine.

The datasheet specifies that the control LED has a voltage drop of 1.6VDC @ 10mA. Assuming that your Arduino outputs 5VDC, you need a resistor in series with the LED to drop 3.4VDC while passing 10mA. This is to get the 5VDC down to 1.6VDC. You can use Ohm's Law (\$V = IR\$) to figure out the required resistance:

\$R = V/I = 3.4\text{ V} / 10\text{ mA} = 340\text{ }\Omega\$.

There isn't actually a resistor that's exactly 340 ohms, so select a 390-ohm resistor. Now, calculate the power across the 390-ohm resistor:

\$P = IV = I^2R = (10\text{ mA})^2(390\text{ }\Omega) = 0.039\text{ W}\$.

So a 390-ohm, 1/8 watt resistor connected in series with the LED should be appropriate. So you can connect your Arduino to your relay like this:

     Arduino                             HSR412
----------------+                     +----------
                |       390 Ohm     1 |
    control pin +-------/\/\/\/-------+----+
                |       1/8 Watt      |   _|_
                |                     |  _\_/_
                |                   2 |    |
                |             +-------+----+
                |           __|__     |
                |            ___      |
                |             _       |
                |                     |

The maximum pin source current from an Arduino is 40mA per pin IIRC, so you should be able to just drive the LED and resistor directly. Again, it's best to put your relay in a plastic enclosure to protect yourself from the 120VAC that will be present.