Use a relay to control light switches

raspberry pirelayswitches

I'm working on a project where I use a Raspberry Pi to build smart home devices. One of the devices I want to control is my room's light switch. I've done a bit of research and found out that my light is single pole switch with an identifiable positive and negative lead. My plan is to get rid of the switch and replace it with a relay.

My problems:

  1. The relay isn't able to hold two states unless I tell it to close the circuit continuously (which I heard isn't good for the contact pads inside the relay.)
  2. Can my relay handle the voltage coming through a light switch?

My relay is a JQC3F-5VDC-C

Single Pole Light Switch

Relay

Best Answer

A relay may be used, instead of a switch, to control a light.

The relay coil is to be kept energised for as long as the light is to remain lit. A standard electromagnetic relay would be designed for continuous duty with respect to its coil and contacts and would not get damaged, provided that its voltage and current ratings are not exceeded and snubbers are used to minimise damage to its contacts while switching inductive loads. Likewise, with capacitive loads, it should be ensured that the contact rating is not exceeded, while high charging currents are being switched, that could result in welding of contacts.

Latching relays may also be used to avoid coil consumption after the switching action has taken place. A latching relay would require only a pulse input to its coil / coils, for it to be set or reset.

Considering its voltage and current ratings, the relay referred to would be good enough to control AC/DC domestic lights.

It would be advisable to take the assistance of competent personnel to carry out the modification.