Relay with switch
-
Hi
Is it possible to connect simple relay to regular on/off wall switch?
Oded
-
You have to change some wiring if you have only a single wire availble in the switch box.
Have you checked the Relay project?
-
In the relay project the button is push button.
Can I use on/off switch with the same sketch?
-
I think you just need to change this line:
if (value != oldValue && value==0) {
to
if (value != oldValue) {
And wire the original switch , in order to short GND and pin 3. The original wires now go to the relay (and not more to the switch).
You need to somehow power arduino + radio + relay , I use cheap phone chargers but the risk of fire is too high. We are testing other alternatives here.
And please be careful when working with AC Mains! It is letal!
-
Thanks for this input, please can you share which kind of relay i have to use ?
Suggested Topics
-
Relay actuator sketch - auto off function
Development • 5 Dec 2014, 02:45 • niccodemi 11 Sept 2015, 15:27 -
relay actuator ...
Development • 27 Nov 2014, 18:37 • dzairo 30 Nov 2014, 18:29 -
💬 Wireless Touch Switch: Triac Model - (For Livolo crystals)
OpenHardware.io • 30 Jan 2018, 21:04 • openhardware.io 3 Mar 2018, 17:03 -
💬 MDMSNode "Power"
OpenHardware.io • 22 Mar 2017, 20:15 • openhardware.io 5 Oct 2017, 16:07 -
💬 RS485 4RelayDin Shield
OpenHardware.io • 28 Nov 2018, 12:38 • openhardware.io 5 Mar 2022, 07:04 -
💬 MySensors compact (junction box) relay
OpenHardware.io • 3 Feb 2020, 19:01 • openhardware.io 3 Feb 2020, 19:01 -
Can I have too many relaying (repeater) nodes?
Development • 2 Jun 2014, 19:47 • petewill 3 Jun 2014, 13:35 -
💬 Universal Inputs Modbus Module
OpenHardware.io • 23 Feb 2021, 00:30 • openhardware.io 23 Feb 2021, 13:51