Hi all
I'm hacking my doorphone to allow me to tap a "rhythmical code" on the apartment block entrance ringer, to unlock the door.
I'm using an arduino to read when the doorbell rings. The signal I'm reading is the signal going to the ringer, which is 8.5 volts AC. So I'm using a small rectifier diode to not pump AC into the board (I'm guessing this would not be too healthy for it :P). Problem is, that of course the signal I'm getting in is now "chopped" up so to speak, because I'm only getting half of the AC wave, and this is troublesome to read precisely. So I was thinking that simply introducing a small capacitor in the circuit would solve this, but I have no idea how to calculate how many microfarads this capacitor should be. Anyone willing to offer their expertise on this one? I think the AC is about 50Hz.
Use a full-wave (bridge) rectifier and you can use a smaller capacitor. The value depends on the current; as that will be minimal, something like 470 uF should be OK. You will also need to clamp the voltage to <5V, to avoid damaging the Arduino input. You could use a diode to the 5V supply with a resistor.
which is 8.5 volts AC
So assuming that is an RMS measurement then you have 12V peak signal. (8.5 times root two). If you smooth that it gives you 12V.
something like 470 uF should be OK.
Sounds far too big, the problem is what is going to discharge it. Inputs have a high impedance. I would use a 1uF with a 10K across it.
Use clamping diodes to stop over voltage and a 200R series resistor.
http://www.thebox.myzen.co.uk/Tutorial/Protection.html
Thanks a lot for the help guys! I got it all working today