Wireless buzzer

Hey Guys,

I need help starting another small project.

So i have raspberry pi in my garage, where i want push-button connected to the exiting raspberry pi. (The push-button will be connected GND & GPIO. (I think it’s called pull up resistor) because all my vcc is used.)

When the button is pressed from the garage, I want to alert the people in the kitchen with the buzzer & led .

I think an esp32 board with a buzzer and 10mm led will be reasonable.(for the alerting part list)

I want the raspberry pi to communicate with esp32 via wifi when the button is pressed.

Is this possible?

Also need help for the shopping cart too:
Is this good for esp board or is it overkill? https://core-electronics.com.au/sparkfun-esp32-thing.html
and this for the speaker? https://core-electronics.com.au/gravity-digital-speaker-module.html

Thanks

3 Likes

Hi Huseyin,

The simplest solution seems to be to run a long cable to the garage so you can eliminate the ESP from the system altogether and just use the Pi’s GPIO.

This is certainly possible but the big decision will be what sort of communications protocol you use to send the data to the Pi.
Also, do you need the information to be sent bi-directionally? Does the ESP32 always send and the Pi always receives, or do you need to send data both ways?

I haven’t used the ESP32 much myself but a few approaches spring to mind.
ESP-Now is supported on the ESP32, but we may need to confirm if it’s compatible with the Pi as well.

An MQTT setup would allow both the ESP32 and the Pi to post messages via a broker and subscribe to select updates.

Or you could use HTTP to do the data transfer.

That speaker should be fine to be driven by the Pi but you will need to wire it into the GPIO without using the plug it comes with.

There are heaps of ESP32 dev boards on our site, the choice is mostly based on which ESP32 chipset version you want. Once you know what extra features you may need (LiPo battery support) then you can choose the ESP32 dev board that includes the chipset you want with only the features you will use to save costs.

4 Likes

Thanks, Trent for the informative reply.

Sounds simple, however don’t in my case

Just want R-Pi to send data to the esp

Speaker needs to be connected to the esp32

2 Likes

Hi Huseyin,

My mistake I misread your outline and had the devices reversed.

That speaker should work with either the ESP32 or the Pi so no worries there, it’s mostly just a matter of connecting it to a digital pin and writing some code to drive it.

Since you only want to drive the speaker as a buzzer it might be a bit cheaper to use the PiicoDev buzzer module via I2C.

2 Likes

Could just hack a doorbell. Replace the button with a FET switched by the GPIO.

4 Likes

Huseyin, some things to consider:

An ESP8266 would be cheaper than an ESP32.
You need Wifi available at your garage.
How are you powering the ESP?
Batteries will not last long without understanding ESP deep sleep and how to wake it up.

I’d look through the Random Nerd Tutorials to understand the choices between HTTP and MQTT.

Dave

3 Likes