Maker Pro
Maker Pro

Optoisolator

Galgenstrick

Oct 19, 2015
3
Joined
Oct 19, 2015
Messages
3
I would like to know how to take the AC voltage supplied from a doorbell (usually 8-24VAC) and turn that into a 5V DC signal I can use as an digital input to an Arduino Uno. Is this something that can be done with an optoisolator or relay? I would like 5V DC supplied every time the doorbell is pressed and it to work regardless of the AC voltage the doorbell supplies, as long as it's in the 8-24V range.

I am making this project as a gift, so I cannot measure the exact AC voltage the doorbell supplies, I just know it will be between 8 and 24V.
 

Alec_t

Jul 7, 2015
3,587
Joined
Jul 7, 2015
Messages
3,587
If the AC bell supply can share a common ground with the Arduino supply the all you need is a resistor and zener diode to act as a voltage divider-cum-regulator.
 

cjdelphi

Oct 26, 2011
1,166
Joined
Oct 26, 2011
Messages
1,166
But the ac will give you pulses ... maybe rectify it pass it through a cap and a bleed resistor depending on current, maybe a transistor and a 7805.. depends on the AC current to determine resistor values...
 

GPG

Sep 18, 2015
452
Joined
Sep 18, 2015
Messages
452
Use a bridge rect (4 1N4148 will do) and a 1.8K resistor to feed the diode of an optocoupler Use 10μF across the output of the bridge if pulsing output is not manageable. On the transistor side use 100K load either in the collector to 5V or the emitter depending on the polarity of the signal required. A 4N25 or similar will do.
 
Last edited:

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
Jeff,
What is the current your Arduino Uno + every thing it drives requires?
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
An AC-coil relay with an 8-24 V guaranteed pull-in range will be hard to find; better to go with an opto. I recommend *not* trying to combine the doorbell-side and Arduino-side grounds. A 4N35 has a minimum CTR (current-transfer ratio) of 100%, which more than enough to saturate the output transistor over the full input range. But if the output is not pulling low enough, increase R2 to 10 K. Also, you can move R2 to the emitter side of the output if you want positive-going pulses.

This circuit makes 60 Hz pulses, not a DC level, when the doorbell rings. While it is fairly simple to add a missing-pulse detector to turn the opto output into a level, it is easier and cheaper to do that in Arduino firmware.

ak
DoorbellInterface-1-c.gif
 
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I would second AnalogKid's solution.

Bob
 
Top