Padi1111
Posts: 5
Joined: Sun Oct 23, 2016 6:18 pm

DoorBell

Sun Oct 23, 2016 7:25 pm

Hello everyone, i need your help ^^,

I want to change my boring doorbell to a custom one where I could import my one MP3 to be played.

The problem is that i'm e beginner with Raspberry and i don't know how to set this project up.
I currently have a simple button outside that closes a 230V circuit and makes a bell ring.

I have a Raspberry Pi 3 model B, an Arduino genuino, a Bluetooth receptor and some loudspeakers that i can / would like to use for this project.
I have search for more than one week now for a similar project ( 230V ) on the web but I didn't find anything

Thx for your help

Padi1111
Posts: 5
Joined: Sun Oct 23, 2016 6:18 pm

Re: DoorBell

Mon Oct 24, 2016 11:45 am

I also know that i'll have to use relay.

scotty101
Posts: 3958
Joined: Fri Jun 08, 2012 6:03 pm

Re: DoorBell

Mon Oct 24, 2016 12:20 pm

Remove the existing 230v system completely and replace it with a safe voltage like 12v. If you don't understand a simple switch circuit then you aren't competent enough to work with 230V.

Then use something like a relay or opto-isolator to safely connect it to the Raspberry Pi.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
piglet
Posts: 915
Joined: Sat Aug 27, 2011 1:16 pm

Re: DoorBell

Mon Oct 24, 2016 12:53 pm

Padi1111 wrote:I currently have a simple button outside that closes a 230V circuit and makes a bell ring.
You almost certainly don't. If you do then your house is a death-trap....

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

Re: DoorBell

Mon Oct 24, 2016 1:23 pm

Padi1111 wrote:Hello everyone, i need your help ^^,

I want to change my boring doorbell to a custom one where I could import my one MP3 to be played.
There are a few reason you may want to look at some other board for this.
A doorbell really needs an instant response. To get a Pi to do that it will have to be on all the time (wasting power) or maybe coded in bare-metal (difficult for a beginner). If you have to wait for Raspbian to boot your visitor will leave before you hear the 'bell'.

There are several ways to play mp3 files. There are various microcontroller boards around that could do this on battery power.

If you have some other reason to have a Pi on all the time you could certainly add this functionality to it with a GPIO button and maybe a USB soundcard and amplified speaker to make the noise.

scotty101
Posts: 3958
Joined: Fri Jun 08, 2012 6:03 pm

Re: DoorBell

Mon Oct 24, 2016 1:42 pm

piglet wrote:
Padi1111 wrote:I currently have a simple button outside that closes a 230V circuit and makes a bell ring.
You almost certainly don't. If you do then your house is a death-trap....
Indeed. Most of the mains powered doorbells have a transformer to step down to 12v AC.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Padi1111
Posts: 5
Joined: Sun Oct 23, 2016 6:18 pm

Re: DoorBell

Tue Oct 25, 2016 11:55 am

I had an idea : if the raspberry turns H24 and if i put a relay where the bell is now ( like that i don't have to touch the button where the 230V is currently flowing ), I connect a speaker the to raspberry and [ that is the part that i don't know how to do ] when the relay is activated by the 230V ( transformed in a 12V or 5V ) it tells to the raspberry to simply play the mp3 ( i already go this command ).

Thx for your help till here.

Padi1111
Posts: 5
Joined: Sun Oct 23, 2016 6:18 pm

Re: DoorBell

Fri Oct 28, 2016 7:48 am

Nobody ?? ^^'

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: DoorBell

Fri Oct 28, 2016 8:05 am

Padi1111 wrote:I had an idea : if the raspberry turns H24 and if i put a relay where the bell is now ( like that i don't have to touch the button where the 230V is currently flowing ), I connect a speaker the to raspberry and [ that is the part that i don't know how to do ] when the relay is activated by the 230V ( transformed in a 12V or 5V ) it tells to the raspberry to simply play the mp3 ( i already go this command ).

Thx for your help till here.

Nobody wants to give you advice on a 240v circuit, regardless of where you interrupt the circuit it can still kill you.

Replace the 240v doorbell circuit withsomething safer before it kills someone.
Doug.
Building Management Systems Engineer.

User avatar
Burngate
Posts: 6302
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: DoorBell

Fri Oct 28, 2016 10:11 am

You've got two problem areas - the Pi part and the "doorbell" part. You want to use a relay to join the two together.

As far as the Pi is concerned, a relay is just a push-button or switch - it doesn't know or care what pushes it. It'll do whatever you program it to do when the button/switch/relay is closed.

The "doorbell" part is the difficult bit.
We don't know the details of your doorbell circuit - though we can guess - and any advice we give you could be lethal. So we ain't going to give you any, apart from "be very careful"

Padi1111
Posts: 5
Joined: Sun Oct 23, 2016 6:18 pm

Re: DoorBell

Fri Oct 28, 2016 1:29 pm

BMS Doug wrote:
Padi1111 wrote:I had an idea : if the raspberry turns H24 and if i put a relay where the bell is now ( like that i don't have to touch the button where the 230V is currently flowing ), I connect a speaker the to raspberry and [ that is the part that i don't know how to do ] when the relay is activated by the 230V ( transformed in a 12V or 5V ) it tells to the raspberry to simply play the mp3 ( i already go this command ).

Thx for your help till here.

Nobody wants to give you advice on a 240v circuit, regardless of where you interrupt the circuit it can still kill you.

Replace the 240v doorbell circuit withsomething safer before it kills someone.
I live in Switzerland and this is how all door bells are since more than 20 years.

User avatar
Burngate
Posts: 6302
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: DoorBell

Fri Oct 28, 2016 4:18 pm

Padi1111 wrote:
BMS Doug wrote:Nobody wants to give you advice on a 240v circuit, regardless of where you interrupt the circuit it can still kill you.

Replace the 240v doorbell circuit with something safer before it kills someone.
I live in Switzerland and this is how all door bells are since more than 20 years.
I haven't visited Switzerland, so I have no direct knowledge, but that seems ... unlikely.

At your front door, there's a small push-button. It's exposed to the elements including rain, and can be touched by anybody including small children. And it's been made as cheaply as possible - just a couple of bits of springy metal, behind a bit of plastic. Look up IP64 enclosures for comparison.

Tl:dr no-one is going to allow 240v to be connected to something as flimsy as that. Health and safety may go mad, but in this case they're right.

User avatar
bensimmo
Posts: 4625
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: DoorBell

Fri Oct 28, 2016 6:06 pm

As for the Pi side
If using Python, connect the 'relay setup' up in such a way hat you are switching a gpio on and off (high/low)
Then use gpiozero to see that as a button.
Hen program it to do whatever you want when that condition happens.
Play a tune, make a noise, turn a camera on etc.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: DoorBell

Fri Oct 28, 2016 9:50 pm

As prevously stated, a pi isn't ideal for this anyway.

An adafruit soundboard is the ideal solution, connect your relay contact to that and away you go. (Without electrocuting yourself or others please).
Doug.
Building Management Systems Engineer.

boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: DoorBell

Fri Oct 28, 2016 10:36 pm

Try using a opto Isolator
Pi 5v+-----------( B/P)----------( 300r )----------(a opto k )--------0v-Pi
Pi3.3v+Rail----( 10k )------(GPIO I/P)---(1k)---(c opto e)-------0v-Pi

B/P = Door Bell Push
300r Limiting current 10ma opto led
10k= Pull / Up resistor
1K= Current Limiting Resistor
a Opto k = LED
C Opto e = Transistor

Push OPEN in/put 1( high)
Push Closed in/put 0 ( low ) Giving a active 0 (low) to in/put
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Return to “Automation, sensing and robotics”