UK
Offline
Sr. Member
Karma: 9
Posts: 353
|
 |
« Reply #4 on: February 08, 2013, 04:04:55 am » |
How would you control the switches 'pulsing' on that Cat5E? How does the switch signal get back from the Arduino to the device being switched, which I assume is back in the same room the switch is in? Hard wired would have your mains loop, plus loop-in terminals and switch wire drops, with maybe a 3c + CPC for 2 way switching.
Are your switches going to be normal lighting switches, i.e 1 way or 2 way normally open, latched, switches? When switched they stay closed like a normal light switch?
If they are normal switches then that could present an issue as I can't see how you could have multiple switches on a single signal wire/pair, unless you did something fancy to make that operate a latch/delatch circuit that then does a similar thing when you open the switch. This would effectively buffer that switch and convert the output to momentary, but then you might as well just change the switches as it would be cheaper.
If these were momentary switches instead then you could conceivably look at wiring them in a 4 x 4 matrix layout, giving 16 switches on 8 wires. You could then use the Arduino Keypad library to detect presses, record the on or off state, and switch the output.
Again, if you have something to control 'pulses' then you could conceivably wire multiple switches on each of the 4 pairs. Each switch could send a different pulse length and the Arduino register the initial state change from low to high, state change from high to low, and the duration of the pulse. i.e. Switch 1 on pair 1 could send a 50ms pulse, switch 2 a 1 100ms pulse etc. You'd not be able to handle multiple switching at the same time though, although short duration pulses may mean this is very unlikely to cover the same time slot in ms.
Or, you could use a voltage divider to have multiple switches. In that case you could use 1 pair as supply and ground, then leaving 6 wires for analog switch signals, which works quite nicely with 6 anaolog pins on the Arduino. Keep it limited with maybe only 5 values per switch wire (to give reasonable spacing between values) and you could switch 30 items.
I'm not sure whether sending a specific binary signal is the best option as that means multiple state changes from off to on to off to signal each bit. That may take time as you could want it reasonably slow for the Arduno to detect reliably, to avoid any interference from nearby 240v. You'd also need to detect, record and buffer each state change until you had all bits, then carry out any action.
|