1
\$\begingroup\$

I'm experimenting with capacitive sensors acting as switches and want to actually give my circuits some practicality. I've been researching how to use relays with microcontrollers (in my case, an Arduino) to control lamps, but I still have a few questions.

  • Based on this guide (specifically under the "The Setup" section), I should wire my relay into the live wire. How safe is this? Is the only thing separating wandering hands from live wire just the screw terminal? If so, what would be a good way to house the relay (maybe some sort of project box?)?

  • Could I not forgo the plug altogether and just power the bulb from my Arduino? What would be the characteristics of a lamp that could be powered solely from the Arduino? I have a lamp labeled with MAX 12 V 50 W. Is this even close to possible?

\$\endgroup\$
4
\$\begingroup\$

How safe is this?

Relatively safe, this is how relays are used.

Is the only thing separating wandering hands from live wire just the screw terminal?

Yes. Of course, touching only one side of a wire, with only one hand, is not terribly dangerous, compared to completing a circuit through your body. Of course, the only thing separating a live outlet and wandering hands is a screw driver or fork.

If so, what would be a good way to house the relay (maybe some sort of project box)?

This should be self evident. Yes.

Could I not forgo the plug altogether and just power the bulb from my Arduino? What would be the characteristics of a lamp that could be powered solely from the Arduino? I have a lamp labeled with MAX 12 V 50 W. Is this even close to possible?

The regulated line on any given Arduino is 5V or 3.3V. It's often using a linear regulator that is limited to a few watts of power before it overheats. The microcontroller can only drive up to 40 mA per pin, 200 mA total. Any conventional lamp type bulb is not feasible, directly. Any would require a relay of sorts.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your help. As I've mentioned on Alexander Sabiona's answer, I'll be looking into finding the right relay for my purposes. \$\endgroup\$ – CodeRead Mar 20 '15 at 2:51
1
\$\begingroup\$

You can't power a 50 watt bulb using the arduino. About the relay, they have ratings. Just get the right relay and you won't have to worry about it just make sure you insulate the live wires properly. :)

\$\endgroup\$
  • 1
    \$\begingroup\$ Thanks for your input. I'll look into different types of relays. Also, what would you recommend me to use as insulation? Would regular heat-shrink suffice in this situation? \$\endgroup\$ – CodeRead Mar 20 '15 at 2:48
  • \$\begingroup\$ yes of course, it would be neater as well :) but you can use electrical tape as alternative, making sure no wires are exposed. Goodluck with your project! Stay safe! \$\endgroup\$ – Alexander Sabiona Mar 20 '15 at 4:06
  • \$\begingroup\$ Depending on the "lifetime" of the project, I'd steer away from electrical tape. After a while the adhesive starts to degrade and dry out, then it falls off. IMHO, to do it "properly", you should use heatshrink to insulate the wires directly, and then house the whole thing in a proper case. Remember that if your joints were to fall apart (e.g. due to bad soldering), the loose live wire could touch one of the "low-voltage" sections of the circuit, making it live. Putting heatshrink over the connection minimises that risk. \$\endgroup\$ – David Smith Mar 20 '15 at 17:16
  • 1
    \$\begingroup\$ Also, you're unlikely to be able to drive the relay directly from the Arduino either. You'll need a transistor to amplify the Arduino's output, a resistor to limit the transistor's base current, plus a diode to prevent voltage spikes from the relay coil killing off your transistor. There are a lot of examples online, e.g. makezine.com/2009/02/02/connecting-a-relay-to-arduino \$\endgroup\$ – David Smith Mar 20 '15 at 17:20
  • \$\begingroup\$ @CodeRead, sir David here has added valuable information that you would like to look into. :) thank you sir david \$\endgroup\$ – Alexander Sabiona Mar 21 '15 at 0:12
0
\$\begingroup\$

If you do not want to deal with high voltage you can use your 12W 50W bulb and 12v 8A power supply, such as an old PC PSU.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.