ESP8266-Based Ultrasonic Distance Sensor with LCD Display and Buzzer Alert
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an ESP8266 NodeMCU microcontroller interfaced with various components including an ultrasonic distance sensor, an LCD display, a piezo buzzer, a red LED, and a resistor. The circuit is designed to measure distance using the ultrasonic sensor, display the distance on the LCD, and provide audio-visual feedback using the buzzer and LED.
Component List
ESP8266 NodeMCU
- Description: A low-cost Wi-Fi microcontroller with GPIO, PWM, ADC, and more.
- Pins: D0, D1, D2, D3, D4, 3V3, GND, D5, D6, D7, D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN
Resistor
- Description: A 10k Ohm resistor.
- Pins: pin1, pin2
- Properties: Resistance: 10k Ohms
LED: Two Pin (red)
- Description: A red LED with two pins.
- Pins: cathode, anode
HC-SR04 Ultrasonic Distance Sensor
- Description: An ultrasonic sensor used for distance measurement.
- Pins: VCC, TRIG, ECHO, GND
LCD Display 16x4 I2C
- Description: A 16x4 character LCD display with I2C interface.
- Pins: SCL, SDA, VCC, GND
Piezo Buzzer
- Description: A piezoelectric buzzer for audio feedback.
- Pins: pin 1, pin 2
Wiring Details
ESP8266 NodeMCU
- VIN: Connected to VCC of HC-SR04 Ultrasonic Distance Sensor and VCC of LCD Display 16x4 I2C.
- D7: Connected to pin 1 of Piezo Buzzer.
- GND: Connected to pin 2 of Piezo Buzzer, cathode of LED, GND of HC-SR04 Ultrasonic Distance Sensor, and GND of LCD Display 16x4 I2C.
- D8: Connected to pin1 of Resistor.
- D1: Connected to SCL of LCD Display 16x4 I2C.
- D2: Connected to SDA of LCD Display 16x4 I2C.
- D5: Connected to TRIG of HC-SR04 Ultrasonic Distance Sensor.
- D6: Connected to ECHO of HC-SR04 Ultrasonic Distance Sensor.
Resistor
- pin1: Connected to D8 of ESP8266 NodeMCU.
- pin2: Connected to anode of LED.
LED: Two Pin (red)
- cathode: Connected to GND of ESP8266 NodeMCU.
- anode: Connected to pin2 of Resistor.
HC-SR04 Ultrasonic Distance Sensor
- VCC: Connected to VIN of ESP8266 NodeMCU.
- TRIG: Connected to D5 of ESP8266 NodeMCU.
- ECHO: Connected to D6 of ESP8266 NodeMCU.
- GND: Connected to GND of ESP8266 NodeMCU.
LCD Display 16x4 I2C
- SCL: Connected to D1 of ESP8266 NodeMCU.
- SDA: Connected to D2 of ESP8266 NodeMCU.
- VCC: Connected to VIN of ESP8266 NodeMCU.
- GND: Connected to GND of ESP8266 NodeMCU.
Piezo Buzzer
- pin 1: Connected to D7 of ESP8266 NodeMCU.
- pin 2: Connected to GND of ESP8266 NodeMCU.
Code
No code provided for this circuit.