230V AC - Input for arduino

I need to convert 230 Volts AC input to use with arduino. The solution should be an electrically isolated input using an opto-coupling device. BTW I would be interested to know how a program should be realized to check different states of input length (short pressed, long pressed r.g. > 1 second) for lets say 8 Inputs. I am aware that the second part of my question should probably be moved to the software section of this forum. Anyway, thanks in advance for any help.

I need to convert 230 Volts AC input to use with arduino.

What sort of use?

The solution should be an electrically isolated input using an opto-coupling device.

Well that rules out powering the arduino but what do you want to do. If you want to simply measure the cycles then an opto isolator being fed through a capacitor to the AC, through a series resistor should do.

I would be interested to know how a program should be realized to check different states of input length (short pressed, long pressed

Make a note of the time the button was pressed using millis() and when a time greater than millis() + some value is exceeded then you have a press greater that your time. If the button comes off before then, then you have a short press.

for lets say 8 Inputs

Use a for loop.

What sort of use?


Hi Grumpy_Mike, thanks for yor answer. I´ve an installed LCN System at home. (see http://www.issendorff.com/ ). Just check the technology and you will see why I´m looking for a (open source) alternative. All switches are connected by an TU4H Binary Sensor device. (220V AV).

Ah, data over the mains. I did this with audio signals way back in 1964. There are now standards for the modulation but unfortunately I have not worked on them so on this ocasion I am unable to help you further.
Sorry.
I do know that the US and the rest of the world are on different standards. (again)