Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Wi-Fi Controlled Smart Servo System with Arduino and ESP8266

View and Edit Project In Cirkit DesignerImage of Wi-Fi Controlled Smart Servo System with Arduino and ESP8266

Circuit Documentation

Summary

This circuit involves multiple components including an Arduino UNO, various sensors, an LED, a servo motor, and a WiFi module. The circuit is designed to perform various tasks such as reading sensor data, controlling a servo motor, and communicating via WiFi. The Arduino UNO serves as the central microcontroller, orchestrating the operations of the connected components.

Component List

  1. Pushbutton

    • Pins: Pin 1, Pin 2, Pin 3, Pin 4
    • Description: A simple pushbutton used for user input.
  2. LED: Two Pin (red)

    • Pins: Cathode, Anode
    • Description: A red LED used for visual indication.
  3. KY-008 Laser Emitter

    • Pins: SIG, 5V, GND
    • Description: A laser emitter module.
  4. Servo

    • Pins: GND, VCC, PWM
    • Description: A servo motor used for precise control of angular position.
  5. Resistor (200 Ohms)

    • Pins: Pin 1, Pin 2
    • Description: A resistor with a resistance of 200 Ohms.
  6. LDR

    • Pins: A0, D0, GND, VCC
    • Description: A light-dependent resistor used to measure light intensity.
  7. Wire Connector

    • Pins: +, -
    • Description: A connector for power supply.
  8. Arduino UNO

    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
    • Description: A microcontroller board based on the ATmega328P.
  9. Wifi Module ESP8266-01

    • Pins: RX, GPIO0, GPIO2, GND, +3V3, Reset, CH-PD Chip power down, TX
    • Description: A WiFi module for wireless communication.
  10. HX711 Weighing Sensor Module

    • Pins: B-, B+, A-, A+, E-, E+, VCC, CK/TX, DO/RX, GND
    • Description: A module used for weighing sensors.
  11. PIR Sensor

    • Pins: VDD, SIG, GND
    • Description: A passive infrared sensor used for motion detection.
  12. LCD Display (16 pin)

    • Pins: VSS, VDD, VO, RS, R_W, E, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7, A, K
    • Description: A 16-pin LCD display.
  13. Loudspeaker

    • Pins: Pin 1, Pin 2
    • Description: A loudspeaker for audio output.

Wiring Details

Pushbutton

LED: Two Pin (red)

KY-008 Laser Emitter

Servo

Resistor (200 Ohms)

LDR

Wire Connector

Arduino UNO

Wifi Module ESP8266-01

HX711 Weighing Sensor Module

PIR Sensor

LCD Display (16 pin)

Loudspeaker

Documented Code

Arduino UNO Code (sketch.ino)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Arduino UNO Code (documentation.txt)

#include <Servo.h>
#include <SoftwareSerial.h>

Servo myServo;
SoftwareSerial esp8266(0, 1); // RX, TX

void setup() {
  myServo.attach(9); // Attach servo to pin D9
  esp8266.begin(115200); // Start communication with ESP8266
  Serial.begin(115200); // Start serial communication with the computer
}

void loop() {
  if (esp8266.available()) {
    String command = esp8266.readStringUntil('\n');
    if (command == "ROTATE_90") {
      myServo.write(90); // Rotate servo to 90 degrees
      Serial.println("Servo rotated to 90 degrees");
    }
  }
}

This documentation provides a comprehensive overview of the circuit, including a detailed list of components, their wiring connections, and the code used in the microcontroller.