LukeAmis
Posts: 4
Joined: Wed Jun 26, 2013 1:26 pm

Doorbell GPIO

Wed Jun 26, 2013 1:30 pm

Hey guys, sorry I am a complete noob but I was wondering what would be the easiest way to go about connecting a doorbell to the GPIO so that when its pressed it rings as normal but also sends an input to the pi
Thanks in advance :)

PiGraham
Posts: 3939
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Doorbell GPIO

Wed Jun 26, 2013 1:44 pm

It depends on the doorbell. Is it battery powered or mains powered? Is it a solenoid and chime type, or electronic?
Do you have a multimeter? You should find there is a low DC voltage across the open contacts of the bell push.
If there's a solenoid you have to take care of voltage spikes that could damage the Pi. You will need to match the bell push voltage to the Pi input range.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Doorbell GPIO

Wed Jun 26, 2013 1:50 pm

Use an opto-coupler with appropriate series resistor (4K7) connected to the opto-couplers LED, and place a small diode (1N4148) anti-parallel over the LED (so that the led is protected against voltages of the wrong polarity for the LED).
connect it across the door bell, the 8V AC will light up the LED 50 times a second.
On the photo-transistor side connect the emitter to GND, and the collector to the GPIO, together with a 4K7 pullup to 3V3.
This will pull down the GPIO 50 times a second. If you would rather have it pulled down as long as the bell rings, simply connect a 100uF elco across the photo-transistor, the photo-transistor will discharge the elco and it will stay discharged in between the 50Hz pulses. If you want to make things foolproof, don't connect the GPIO directly, but put a 2K2 resistance in series, that way outputting a "1" (accidentally) while the bell rings (photo transistor is open) won't damage the GPIO.

LukeAmis
Posts: 4
Joined: Wed Jun 26, 2013 1:26 pm

Re: Doorbell GPIO

Wed Jun 26, 2013 1:55 pm

I haven't purchased a doorbell yet but it will most likely be battery powered and electronic. If you know of any cheap doorbells that work well with the pi please let me know. Would it be possible for it to be wireless?

PiGraham
Posts: 3939
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Doorbell GPIO

Wed Jun 26, 2013 2:05 pm

Wireless may be possible. There are various 433MHz (I think doorbells will use 433) radio receiver modules available that could be connected to the Pi and may be able to detect the radio signal from the doorbell. You would have to experiment.

Direct connection, via an opto-isolator, will be easier to get working is you put the Pi reasonably close.

Another option could be to connect a radio transmitter module to the bell push and a matching receiver to the Pi.

LukeAmis
Posts: 4
Joined: Wed Jun 26, 2013 1:26 pm

Re: Doorbell GPIO

Wed Jun 26, 2013 2:11 pm

The wireless option seems a lot more straight forward if we can use a radio transmitter, I'll look into it :) thank you so much for your help

LukeAmis
Posts: 4
Joined: Wed Jun 26, 2013 1:26 pm

Re: Doorbell GPIO

Wed Jun 26, 2013 2:22 pm

Would it be possible to use a wireless RF transceiver (slice of radio) with a wireless doorbell?

PiGraham
Posts: 3939
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Doorbell GPIO

Wed Jun 26, 2013 2:57 pm


Return to “HATs and other add-ons”