How to control house lights with limited inputs

I have a problem to solve and I think Arduino can help. I have house wired for C-Bus (Cat 5e) but have decided not to use it. Instead, I was thinking I could use the C-bus 'switch' wire (Cat 5e data cable) as a digital input pulse to Arduino, and then have Arduino 'flip/flop' the correspondingly numbered output. Do any of you know of the top of your head whether Arduino would be able to be used like this and where I would start. Don't worry about the rest of the components as I have got that figured already, its just the Arduino component. :~
Cheers.

Not sure if that makes sense. Here is a little diagram that might help explain it.

Hi,

I'm trying to see this a simple as possible.

What's the difference between the 8-wire (4-pair) "Loop" and the other 8-wire cable??

If you have existing cat5 cable, you have enough wires to be able to send several switch-closure signals to Arduino. Each of the 4 pairs can send 1 or more switch signals. Your code can decide if the switches toggle something, or if one switch means "on" and another means "off".

You can put multiple switches on one pair by using different value resistors.
See: Arduino Playground - AnalogButtons

(A fixed version is on the http://ArduinoInfo.Info WIKI here: http://arduino-info.wikispaces.com/HAL-LibrariesUpdates )

How will you control light circuits? You might use low-cost relay boards like these: http://goo.gl/3mXu0

See "Arduino Power" here: http://arduino-info.wikispaces.com/ArduinoPower

DISCLAIMER: Mentioned stuff from my own shop...

Thanks for the reply Terry. There isn't any difference between the two cables. The C-bus loop does a 'lap' of the floor in the house and then comes back to the same point. I was thinking of using my existing 24VDC rail (which runs the light through relays ATM) for the 'switching' function and putting it through a voltage divider network to drop it down to the 5V that the Arduino device wants as an input.

The number of switches I require exceeds the number of wires i have in each loop for direct switching. I thought maybe I could use all 7 of the wires as a 'digital' input. Eg. switch 9 would pulse power to wire 1 and 5 (digitally 1001000) and toggle output 9. I thought in this way I could potentially address up to 64 switches. The analogue option could work to but I am not to sure how sensitive the inputs are to EMI and near field induction from unidentified 240V cables in proximity.

I am currently switching the lights in groups using relays conforming to local electrical standards. I would expand the number of relays to match the number of items/groups.

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.

The basic thing you have to decide is if the you will have simple switches at the physical locations you want switches, or if you are willing to have a more-complex circuit at each switch.

With 8 conductors and no need for high speed, using simple switches with an input filter network into the arduino analog inputs should be workable. If you use each "pair" for each group of switches, the twisted-pair has the property of cancelling out much electrical noise. If you sample each pair multiple times and average the reading, you can have a lot of noise immunity.

Easy enough for you to prototype this and see how it works in your environment.