+21622886281
ESP32 HC-SR04 Project Servo motor

Realization of an automatic parking barrier with ESP32

Objective of this project:

In this project we will simulate an automated parking barrier with the ESP32 card. This model shows the general operation of the automated systems that allow access to public parks found in stations, airports, cinemas, supermarkets, etc.

Our barrier opens using a servomotor when the HC-SR04 sound sensor detects a vehicle and closes automatically otherwise.

Necessary components

  • ESP32
  • HC-SR04 sensor
  • Connecting wires

  • Test plate

  • Barrier in the form of a pen

  • Servo motor

Mounting of Parking

To perform the assembly, you can connect

For HC-SR04 sensor:

  • the VCC pin to the 3.3V pin of the ESP32 board

  • the Trig pin to pin D5 of the ESP32 board

  • the ECHO pin to pin D18 of the ESP32 board

  • the GND pin to the GND terminal of the ESP32 board

For servo motor:

  • red wire: power supply wire to be connected to the (+) terminal of a 9V battery

  • brown wire: wire to be connected to the GND terminal of the ESP32 board

  • Yellow wire: Positioning signal wire connected to pin D4 of the ESP32 board

Micropython program

Here is the program for the automated parking system controlled by the ESP32 card:




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top