Property Bell With ESP-NOW

by Markus Opitz in Circuits > Microcontrollers

3812 Views, 57 Favorites, 0 Comments

Property Bell With ESP-NOW

Title-2.jpg

Approach bell for larger properties.

My property is not small and I don't have a gate or a doorbell at the entrance. Everyone is welcome, but sometimes I get scared when someone suddenly stands on the terrace or in the kitchen ("Didn't you hear me knocking?").

Our carport is 30 metres away from the house, I will install a sensor there that will notify me of visitors by dingdong into the house.

This project requires a certain level of experience. Depending on which microcontroller you use, please find out about the setup. An excellent site is

https://randomnerdtutorials.com/

This is my first project with ESP-NOW. With this protocol you can quickly connect ESP8266 and/or ESP32, without routers and without losing time through log-in procedures. (Time is money energy.) In addition, the range is greater than with conventional wifi. It can only transmit up to 250 bytes, but it is enough for simple data or signals.

I have also tried nRF24 transmitters for this project. But with the thick walls of my house, it was not so successful. (Tarantula3 made a great tutorial about nRF24.)


Supplies

Supplies2.jpg

Transmitter:

ESP8266 or ESP32

Power supply (or solar panel)

PIR sensor (Keyestudio KS-052 or HC-SR501 or AM312 or SR602)

18650 Battery Expansion Shield V3 with LiPo battery


Resistor 5kOhm

Resistor 10kOhm

Diode

NPN Transistor

Capacitor 1uF

PCB plate small, pins, wires


Receiver:

ESP8266 or ESP32

Power supply

Buzzer / Piezo plate

ESP-now: Receiver

IMG_4350.JPG

I use an ESP8266 nodeMCU Amica with internal antenna as receiver.

We need the MAC address of the receiver to add it later to the program of the sender. If you don't know it, you can use the script getMAC.ino. Just upload this sketch to the receiver and the address will be displayed on the serial monitor of the Arduino IDE.


The program "Bell-Receiver.ino" is transferred to the ESP via USB and the Arduino IDE.

The piezo puzzer must be attached to D6 and GND.

The microcontroller is now on standby. When it receives a signal from the transmitter, it sends a short receipt message so that the transmitter can go back into deep sleep. The receiver itself makes a "beep" and is ready again.


Alternatives:

To have other audio signals than a "beep", you can also connect an mp3-player with SD-cards, like I used in https://www.instructables.com/Sound-Badge-With-Touch-Sensor/ . Then you can use any mp3 sounds you like.

Receiver Housing

3D.jpg
IMG_4351.JPG

Of course, you can just leave the circuit lying around - it works anyway. But such a housing is more elegant. Plastic, wood, cardboard, heat shrink tubing - here are hardly limits. Even if you use a different microcontroller and a different buzzer, I provide the 3D file PropertyBellCase.stl as a suggestion.

Before you invest a lot of time in wall mounting - try the radio contact of the two microcontrollers first!

ESP-now: Transmitter

antenna-0.JPG
Transmitter1.jpg
Transmitter2.jpg

I use a Wemos D1 mini with external antenna connection as transmitter.

If you have a Wemos D1 mini (pro) with an antenna connection and want to use an external antenna, you must first desolder the zero resistor facing the internal antenna. Then solder the resistor or a piece of wire towards the external connection.


To be independent from the power grid, the device is driven by a solar cell with a 18650 Battery Expansion Shield V3. The shield consumes a little more energy than a homemade charging device, but our Wemos D1 does not need much power.


Principle: The Wemos D1 is in deep sleep to save power. It is woken up by a movement/signal from our PIR sensor and sends a message to the receiver in the house. When it gets an acknowledgement from the receiver, it goes back into deep sleep. If it gets no confirmation, it tries four more times, then it still goes into deep sleep.

Then the solar cell can recharge the battery.


The program "Bell-Transmitter.ino" is transferred to the Wemos via USB and the Arduino IDE. Then only the following line needs to be changed:

// REPLACE WITH RECEIVER MAC Address

uint8_t broadcastAddress[] = {0xAC, 0xFA, 0xBC, 0x7F, 0x0A, 0x81};
// AC:FA:BC:7F:0A:81

Please note the format of the MAC address, e.g. AC: --> 0xAC,

Transmitter/PIR Hardware

Circuit_Transmitter.jpg
Transmitter7.jpg
Transmitter4.jpg
transmitter3.jpg

In order for the PIR sensor to wake up our ESP, we need a small circuit. I found a circuit diagram on the internet and modified it for my use. I could just fit the components between the pins of the Wemos. So I now have a compact device on a circuit board.


I hid the sensor on the side of the carport under a wooden strip that was already a little grey. You can hardly see it, can you? I don't want to give guests the feeling that they are being monitored.

Now just put the small solar cell on the roof, connect it to the battery unit, connect it to the Wemos - done. Dingdong.