I am currently interfacing to an intercom system and have hit a bit of a wall at each turn but thankfully found solutions to most of my problems thanks to the wonderful people here :).
I am trying to sense a a 12v 'doorbell' line, It goes high when the doorbell is pressed and it activates a network of buzzers around the building.
I have tried to have the line switch a relay which the Arduino picks up fine but then the buzzer does not sound, its the same story with a transistor method.
Anybody have any suggestions? Your help is greatly appreciated.
you can connect the Grounds of Arduino and the doorbell, and use a voltage divider to scale down the 12Volt to 4 Volt (this allows the voltage to exceed 12 Volt and will still be recognized as a HIGH.
VOltage divider = +12V ---[10K]---[10K] ---A---[10K]---- GND
Connect the A to an Arduino pin and you can use digitalRead(pin) to see if it is high or low (or use an interrupt pin.
The total R=30K so with 12 Volt there is only 0.4 mA current.
To prevent peak voltages you might add a 5V Zener over the right resistor.
(Think the relay will draw to much current so there is too little left for the buzzers)
Note that some buzzer systems use low voltage AC whilst others are DC but only low current so will not be able to drive a relay.
What I have also seen (in some older buildings) is a bell system that runs on 12V AC but the transformer was an auto-transformer meaning no isolation from the mains.
Your best bet is to use an opto-coupler which will provide a solution to all of the above.
Enable the pull-up resistor on the input pin of the Arduino that the opto connects to.