Arduino UNO Based Ultrasonic Distance Measurement with GPS Location and Servo Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various components controlled by an Arduino UNO microcontroller. It features an HC-SR04 Ultrasonic Sensor for distance measurement, a Tower Pro SG90 servo motor for actuation, a GPS NEO 6M module for location tracking, and two red LEDs with resistors for indication purposes. The Arduino UNO manages these components and facilitates the communication between them.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
HC-SR04 Ultrasonic Sensor
- Ultrasonic distance sensor
- Provides 2cm to 400cm non-contact measurement functionality with a ranging accuracy that can reach up to 3mm.
Tower Pro SG90 Servo
- A small and lightweight servo motor
- Capable of rotational motion in a range of angles.
GPS NEO 6M
- GPS module
- Provides location and time information in all weather conditions, anywhere on or near the Earth.
LED: Two Pin (red)
- A basic red LED
- Used for indication purposes.
Resistor (200 Ohms)
- A passive two-terminal electrical component that implements electrical resistance as a circuit element.
Wiring Details
Arduino UNO
- 5V: Supplies power to HC-SR04 Ultrasonic Sensor, Tower Pro SG90 servo, and GPS NEO 6M module.
- GND: Common ground for HC-SR04 Ultrasonic Sensor, Tower Pro SG90 servo, GPS NEO 6M module, and both red LEDs.
- D10: Connected to the ECHO pin of the HC-SR04 Ultrasonic Sensor.
- D9: Connected to the TRIG pin of the HC-SR04 Ultrasonic Sensor.
- D6: Connected to the Signal pin of the Tower Pro SG90 servo.
- D3: Connected to one side of a 200 Ohm resistor, which connects to the anode of one red LED.
- D2: Connected to one side of another 200 Ohm resistor, which connects to the anode of the other red LED.
- D1 (TX): Connected to the RX pin of the GPS NEO 6M module.
- D0 (RX): Connected to the TX pin of the GPS NEO 6M module.
HC-SR04 Ultrasonic Sensor
- VCC: Powered by the 5V output from the Arduino UNO.
- TRIG: Sends the trigger signal from the Arduino UNO (D9).
- ECHO: Sends the echo signal to the Arduino UNO (D10).
- GND: Connected to the common ground.
Tower Pro SG90 Servo
- Signal: Receives the control signal from the Arduino UNO (D6).
- +5V: Powered by the 5V output from the Arduino UNO.
- GND: Connected to the common ground.
GPS NEO 6M
- VCC: Powered by the 5V output from the Arduino UNO.
- RX: Receives transmitted data from the Arduino UNO (D1).
- TX: Transmits data to the Arduino UNO (D0).
- GND: Connected to the common ground.
LED: Two Pin (red)
- Anode: Connected to the Arduino UNO through a 200 Ohm resistor (D3 and D2 for each LED respectively).
- Cathode: Connected to the common ground.
Resistor (200 Ohms)
- One side connected to the Arduino UNO (D3 and D2 for each resistor respectively).
- The other side connected to the anode of the red LEDs.
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:
}
Note: The provided code is a template and does not include any functionality. It needs to be populated with the logic to control the components as per the circuit's requirements.