ESP8266 NodeMCU Controlled Servo with Ultrasonic and IR Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
The circuit in question appears to be designed for sensing and actuation purposes, utilizing an ESP8266 NodeMCU as the central microcontroller. The ESP8266 NodeMCU interfaces with an HC-SR04 Ultrasonic Sensor for distance measurement, a generic servo motor for actuation, and an IR sensor for additional sensing capabilities. The circuit is powered through the ESP8266 NodeMCU, which distributes power to the other components. Ground connections are shared among all components, ensuring a common reference point for all signals.
Component List
ESP8266 NodeMCU
- Description: A Wi-Fi enabled microcontroller module with an ESP8266 chip that includes digital I/O pins, analog input pins, power pins, and serial communication pins.
- Pins: D0-D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN, 3V3, GND
Servo
- Description: An electromechanical device that can be controlled to move to a specified position using a PWM signal.
- Pins: GND, VCC, PWM
HC-SR04 Ultrasonic Sensor
- Description: A sensor that measures distance by emitting ultrasonic waves and timing how long it takes for the echo to return.
- Pins: VCC, TRIG, ECHO, GND
IR Sensor
- Description: A sensor that detects infrared light, commonly used in proximity and object detection applications.
- Pins: out, gnd, vcc
Wiring Details
ESP8266 NodeMCU
- D0 connected to HC-SR04 Ultrasonic Sensor TRIG
- D1 connected to HC-SR04 Ultrasonic Sensor ECHO
- D2 connected to Servo PWM
- A0 connected to IR Sensor out
- GND connected to IR Sensor gnd, Servo GND, HC-SR04 Ultrasonic Sensor GND
- VIN connected to IR Sensor vcc, Servo VCC, HC-SR04 Ultrasonic Sensor VCC
Servo
- PWM connected to ESP8266 NodeMCU D2
- GND connected to ESP8266 NodeMCU GND
- VCC connected to ESP8266 NodeMCU VIN
HC-SR04 Ultrasonic Sensor
- TRIG connected to ESP8266 NodeMCU D0
- ECHO connected to ESP8266 NodeMCU D1
- GND connected to ESP8266 NodeMCU GND
- VCC connected to ESP8266 NodeMCU VIN
IR Sensor
- out connected to ESP8266 NodeMCU A0
- gnd connected to ESP8266 NodeMCU GND
- vcc connected to ESP8266 NodeMCU VIN
Documented Code
No code has been provided for the microcontroller. To fully utilize the circuit, embedded code for the ESP8266 NodeMCU is required to handle input from the IR sensor and the HC-SR04 Ultrasonic Sensor, as well as to control the Servo motor based on the sensor inputs. The code would typically include initialization of the sensors, reading sensor values, implementing control logic, and generating PWM signals for the servo motor.