Electronic – How to relay 120VAC with a raspberry pi

raspberry pirelay

I have five 75W 120V AC LED lamps on a dimmer switch. They draw 13 watts each (375W total). I also have a 600W Lutron dimmer switch hooked up but the thing buzzes when the lights are dimmed. I also tried a Leviton dimmer with the same results. I've heard about debuzzing coils but seems to be that many folks have mixed results with them.

I'm wondering if I can just wire each of the 5 bulbs to a relay of some sort and then use a raspberry PI to control the relay (the PI is already wired into my home LAN so I can put an app on my smartphone to control the relay). This way, I can turn only one lamp on for dim lighting and all 5 for full brightness. No, it's not true dimming but at least it won't be buzzing.. I hope.

What kind of relay should I use? Looking on Ebay for a 120V AC 8 channel relay I found this but not sure if this beast will work. I just want to use the GPIO pins on the PI to trip the relay so it seems pretty straightforward. The listing says the relay is good for 2A per channel and if I did the math right, that should be well within the 13W per bulb (13W / 120V = .1A)

Anyone have some thoughts as to what the best method would be to implement here? Should I go with a Triac relay instead (not sure what that is but will look into it if that's a better way to go).

Thanks!

Best Answer

To pick a relay, check:

  1. Relay operation modes: (monostable, bistable, normally open/closed...)
  2. Relay type (solid state, mechanical)
  3. Output capacity: voltage and current. Make sure your load doesn't exceed these. Keep transients in mind: I recently had a mechanical relay fail because of the instantaneous current draw when charging a big filtering capacitor down the line.
  4. Input requirement: voltage and current. Make sure whatever is controlling the relay can comfortably provide the required power to activate the relay.

Sounds like you've checked #1-3. The ebay page says that the relays will activate in response to an input above 2.5V (OK for a PI's 3.3V GPIO), but not how much current they will draw. So check the relay input current draw, and the maximum current the PI can source on GPIO to see if this relay board will work with a PI.