Arduino Nano-Based Ultrasonic Distance Measurement with LCD Display and Servo Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino Nano as the central microcontroller, interfaced with an HC-SR04 Ultrasonic Sensor, an LCD Display with I2C communication, a 2Pin Push Switch, a Tower Pro SG90 servo motor, a 7805 voltage regulator, an 18650 Li-Ion battery, and a Rocker Switch. The circuit is designed to perform tasks that likely involve distance measurement, user input, data display, and motion control.
Component List
Arduino Nano
- Microcontroller board based on the ATmega328P
- Offers a variety of digital and analog I/O pins
- Can be powered via USB or an external power supply
HC-SR04 Ultrasonic Sensor
- Used for measuring distances using ultrasonic waves
- Features a trigger and echo pin to interface with the microcontroller
LCD Display 16x4 I2C
- A 16x4 character LCD display
- Utilizes I2C communication for displaying data
- Requires VCC and GND for power
2Pin Push Switch
- A simple push-button switch
- Used to provide a digital input to the microcontroller
Tower Pro SG90 Servo
- A small and lightweight servo motor
- Controlled by a PWM signal
7805 Voltage Regulator
- A voltage regulator that outputs a steady 5V from a higher voltage input
- Commonly used to provide a stable power supply to electronic components
18650 Li-Ion Battery
- A rechargeable battery commonly used in portable electronics
- Provides the power source for the circuit
Rocker Switch
- An on-off power switch
- Used to control the power supply to the circuit
Wiring Details
Arduino Nano
- GND connected to the common ground net
- D3 connected to the 2Pin Push Switch (Output +)
- D7 connected to the HC-SR04 Ultrasonic Sensor (TRIG)
- D8 connected to the HC-SR04 Ultrasonic Sensor (ECHO)
- D12/MISO connected to the Tower Pro SG90 servo (Signal)
- VIN connected to the 7805 Voltage Regulator (Vout) through the Rocker Switch
- 5V connected to the common VCC net
- A5 connected to the LCD Display (SCL)
- A4 connected to the LCD Display (SDA)
HC-SR04 Ultrasonic Sensor
- VCC connected to the common VCC net
- TRIG connected to Arduino Nano (D7)
- ECHO connected to Arduino Nano (D8)
- GND connected to the common ground net
LCD Display 16x4 I2C
- SCL connected to Arduino Nano (A5)
- SDA connected to Arduino Nano (A4)
- VCC connected to the common VCC net
- GND connected to the common ground net
2Pin Push Switch
- Input + connected to the common ground net
- Output + connected to Arduino Nano (D3)
Tower Pro SG90 Servo
- Signal connected to Arduino Nano (D12/MISO)
- +5V connected to the 7805 Voltage Regulator (Vout)
- GND connected to the common ground net
7805 Voltage Regulator
- Vin connected to the Rocker Switch (2)
- Gnd connected to the common ground net
- Vout connected to the Tower Pro SG90 servo (+5V) and Arduino Nano (VIN)
18650 Li-Ion Battery
- Positive connected to the Rocker Switch (1)
- Negative connected to the common ground net
Rocker Switch
- 1 connected to the 18650 Li-Ion Battery (Positive)
- 2 connected to the 7805 Voltage Regulator (Vin)
Documented Code
Arduino Nano Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code is a template and does not include any functional code. It needs to be populated with the logic required to control the components in the circuit.