Introduction: The Door Singer

Helo everyone !

I'm in quarantine and the days are boring. So i decided to create a useless thing ... The door singer !

Ok ... I know ... It's useless ... But it's fun !

The goal is that when someone open the door, it make sound (customizable sound) like a fart, a shouts, a music ... (i warned you ... It's useless)

Because of quarantine, I could not buy what I wanted in store. So i did with what i had :)

Supplies

I've used the following material :

- Raspberry Pi 3

- Limit switch (I was able to find one in an old PC)

- A little speaker (I found what I needed in an old box)

- Wire , and a thing to connect your speaker to your Raspberry Pi

That's all !

Step 1: Color of the Wires in the Jack Cable

My jack plug wad broken. So i need to reconnect a new male jack in the speaker.

I found an old pair of headphones (Samsung maybe) and i identify the wire color and associated then to with their functions.

(like in the picture above)

I didn't have a heat shrink tubing ... So i've made with tape.

Step 2: Codding !

I've connected my button (normaly closed - NC) to the pin 1 (+5V) and the pin 7 (GPIO) of my Rpi.

So now i'll code what i want. For this project i used Python (but u can use other boring codes to do this)

In short :

- Pygame is used for playing a sound

Datasheet Pygame

- Time is used for give the CPU a chance to do additional task

Datasheet time

- GPIO is used for listen to what happening on the GPIO output (obvius)

Datasheet RPi.GPIO

I left you my code as an attachment <3

(You must have the sound played in the same folder as the code)

Attachments

Step 3: Fix Everything ! and Let's Test !

I fixed the button to the door as the best i could (with tape).

I connected all the wires ...

And open the door :)

=> video

Step 4: That's All !

If you want more info, you can send me an e-mail at : cedatyo430@gmail.com

Thanks for reading me (i'm french .. So my english is bad)

And have a boring good day !