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 ?


  • Hardware Contributor

    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 ?


Log in to reply
 

Suggested Topics

  • 87
  • 2
  • 10
  • 5
  • 7
  • 7

8
Online

11.4k
Users

11.1k
Topics

112.7k
Posts