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

Arduino UNO-Based Smart Distance Measurement and Display System with Servo Control

Image of Arduino UNO-Based Smart Distance Measurement and Display System with Servo Control

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, a Servo motor, an HC-SR04 Ultrasonic Distance Sensor, an IR sensor, and a 16x2 I2C LCD display. The circuit is designed to interface these components with the Arduino UNO, allowing for various sensor readings and actuator control.

Component List

Arduino UNO

  • Description: A microcontroller board based on the ATmega328P.
  • 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

Servo

  • Description: A standard servo motor used for precise control of angular position.
  • Pins: GND, VCC, PWM

HC-SR04 Ultrasonic Distance Sensor

  • Description: A sensor used to measure distance by using ultrasonic waves.
  • Pins: VCC, TRIG, ECHO, GND

IR Sensor

  • Description: An infrared sensor used for detecting objects or measuring distance.
  • Pins: out, gnd, vcc

16x2 I2C LCD

  • Description: A 16x2 character LCD display with I2C interface.
  • Pins: GND, VCC, SDA, SCL

Wiring Details

Arduino UNO

  • 5V: Connected to VCC of Servo, 16x2 I2C LCD, HC-SR04 Ultrasonic Distance Sensor, and IR sensor.
  • GND: Connected to GND of Servo, 16x2 I2C LCD, HC-SR04 Ultrasonic Distance Sensor, and IR sensor.
  • A4: Connected to SDA of 16x2 I2C LCD.
  • A5: Connected to SCL of 16x2 I2C LCD.
  • D7: Connected to PWM of Servo.
  • D4: Connected to out of IR sensor.
  • D3: Connected to ECHO of HC-SR04 Ultrasonic Distance Sensor.
  • D2: Connected to TRIG of HC-SR04 Ultrasonic Distance Sensor.

Servo

  • GND: Connected to GND of Arduino UNO.
  • VCC: Connected to 5V of Arduino UNO.
  • PWM: Connected to D7 of Arduino UNO.

HC-SR04 Ultrasonic Distance Sensor

  • VCC: Connected to 5V of Arduino UNO.
  • TRIG: Connected to D2 of Arduino UNO.
  • ECHO: Connected to D3 of Arduino UNO.
  • GND: Connected to GND of Arduino UNO.

IR Sensor

  • out: Connected to D4 of Arduino UNO.
  • gnd: Connected to GND of Arduino UNO.
  • vcc: Connected to 5V of Arduino UNO.

16x2 I2C LCD

  • GND: Connected to GND of Arduino UNO.
  • VCC: Connected to 5V of Arduino UNO.
  • SDA: Connected to A4 of Arduino UNO.
  • SCL: Connected to A5 of Arduino UNO.

Documented Code

Arduino UNO Code

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

}

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

}

This code is a basic template for the Arduino UNO. The setup() function is where you initialize your components and settings, and the loop() function is where the main logic of your program runs repeatedly.

Additional Documentation


This section is reserved for any additional documentation or notes that may be required for understanding the code or the circuit.