how to controll mysensors actuator node with multiple wall switches
-
Hi all,
I'm designing ceiling lights in my new flat. I want to use a mysensors node to controll/dimm lights also with wall switches. But there is only one problem, I have not enough cables in walls from light switches to the ceiling. I want to controll 3 sections of led lights (all powered with 24v DC) with three wall switches, but I have only 4 wire cable running from wall switches to the ceiling. 2 wires (live and neutral) goes to the 24V power supply (which supplies led lights and mysensors node) located in the ceiling, so I have only 2 wires for switches. And one of those supposed to be a protective earth/ground wire, but the power supply does not use it so I can use it for switching purposes. Now, what would be the easiest solution ? I can think of two, one is to make a resistor ladder connected to the switches and use the adc to differentiate which switch is pressed. The second is to use a 1-wire gpio expander, as I understand the 1-wire bus can operate without dedicated power line, just gnd and data - would it work on couple meter long wires ? Any other simple solutions ?
-
What I'm doing is something similar to you :
I've made "dimmer boards" for lights, which doesn't have input buttons.
I've made "switch boards" which runs on batteries. Each board sleeps until a button is pressed. When the button is pressed, I send a message to the light that needs to be switched on/off...I can explain more if you're interrested.
-
@napo7 thanks for response. Actually I want to avoid such solution. The main reason is the reliability. Just want to have wired connection between switch and the actuator. I tried the solution with resistor ladder like this:
(5V)
|
(R=2kOhm)
|
(ADC PIN)
|
|--- (SW1) --- (R=1kOhm) -----|
| -- (SW2) --- (R=1.5kOhm) --|
|--- (SW3) --- (R=3kOhm) -----|--- (GND)So pressing different switches (SW1 to SW3) should result in different resistance seen between ADC PIN and GND. And to be able to detect multiple switches pressed at the same moment the resistor values must differ. Unfortunetly this makes very little differences between some combinations, and i'm afraid that on 5 meter long wire the noise will cause misdetections. Does anybody used such solution ?
Suggested Topics
-
Over the air updates
General Discussion • 23 Mar 2014, 21:38 • ToSa 1 Mar 2015, 11:21 -
Sensors and more
Hardware • 19 Jun 2023, 00:41 • Robert Leverett 19 Jun 2023, 00:41 -
"Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design"
Hardware • 24 Jan 2024, 23:06 • wrendral 3 Feb 2024, 07:13 -
Best time of year to buy higher quality small project solar panels?
Hardware • 10 Jun 2021, 19:19 • NeverDie 30 Aug 2024, 14:01 -
Arduino Nano Every problem
Hardware • 1 Feb 2020, 09:18 • hakha4 5 Dec 2023, 02:21 -
Newbie questions
Hardware • 14 Feb 2025, 20:03 • magwas 14 Feb 2025, 20:03