Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP8266 NodeMCU Controlled Ultrasonic Distance Measurement

Image of ESP8266 NodeMCU Controlled Ultrasonic Distance Measurement

Circuit Documentation

Summary

The circuit in question is designed to interface an ESP8266 NodeMCU microcontroller with an HC-SR04 Ultrasonic Sensor. The ESP8266 NodeMCU is a Wi-Fi capable microcontroller with a variety of digital pins, while the HC-SR04 is a sensor capable of measuring distance via ultrasonic waves. The circuit is likely intended for applications such as distance measurement or proximity detection.

Component List

ESP8266 NodeMCU

  • Description: A Wi-Fi capable microcontroller with a wide range of digital pins for interfacing with various sensors and devices.
  • 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

HC-SR04 Ultrasonic Sensor

  • Description: An ultrasonic distance sensor that can measure distances by emitting ultrasonic waves and measuring the time it takes for the echo to return.
  • Pins: VCC, TRIG, ECHO, GND

Wiring Details

ESP8266 NodeMCU

  • D5: Connected to the TRIG pin of the HC-SR04 Ultrasonic Sensor.
  • D6: Connected to the ECHO pin of the HC-SR04 Ultrasonic Sensor.
  • GND: Shared ground with the HC-SR04 Ultrasonic Sensor.
  • VIN: Connected to the VCC pin of the HC-SR04 Ultrasonic Sensor to provide power.

HC-SR04 Ultrasonic Sensor

  • TRIG: Connected to the D5 pin of the ESP8266 NodeMCU.
  • ECHO: Connected to the D6 pin of the ESP8266 NodeMCU.
  • GND: Shared ground with the ESP8266 NodeMCU.
  • VCC: Powered by the VIN pin of the ESP8266 NodeMCU.

Documented Code

No code has been provided for the microcontroller. For this circuit to function, code would need to be written and uploaded to the ESP8266 NodeMCU to control the timing of the TRIG pin and to read the ECHO pin to determine the distance measured by the HC-SR04 sensor. The code would also handle any Wi-Fi communication if the application requires remote data transmission.