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

Arduino UNO Controlled Servo with Ultrasonic Sensor

Image of Arduino UNO Controlled Servo with Ultrasonic Sensor

Circuit Documentation

Summary of the Circuit

This circuit integrates an Arduino UNO microcontroller with a Micro servo 9G and an HC-SR04 Ultrasonic Sensor. The Arduino UNO serves as the central processing unit, controlling the servo motor and interfacing with the ultrasonic sensor to measure distances. The servo motor is controlled via PWM signals from the Arduino, and the ultrasonic sensor is used to detect objects within its range by emitting ultrasonic waves. The circuit is powered by the 5V output from the Arduino, which is distributed to both the servo and the ultrasonic sensor.

Component List

Arduino UNO

  • Description: A microcontroller board based on the ATmega328P.
  • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13.
  • Purpose: Acts as the central controller for the circuit, providing logic and power distribution.

Micro servo 9G

  • Description: A small and lightweight servo motor suitable for projects that require simple motion.
  • Pins: GND, +5V, PWM.
  • Purpose: Provides physical motion as directed by the PWM signal from the Arduino.

HC-SR04 Ultrasonic Sensor

  • Description: An ultrasonic distance sensor capable of measuring distances by emitting ultrasonic waves and measuring their reflection.
  • Pins: VCC, TRIG, ECHO, GND.
  • Purpose: Measures the distance to objects in front of the sensor and sends this information to the Arduino.

Wiring Details

Arduino UNO

  • 5V: Powers the HC-SR04 Ultrasonic Sensor and the Micro servo 9G.
  • GND: Common ground for the circuit.
  • D12: Outputs PWM signal to control the Micro servo 9G.
  • D11: Receives the ECHO signal from the HC-SR04 Ultrasonic Sensor.
  • D10: Sends the TRIG signal to the HC-SR04 Ultrasonic Sensor.

Micro servo 9G

  • GND: Connected to the common ground.
  • +5V: Powered by the 5V from the Arduino UNO.
  • PWM: Receives PWM control signal from Arduino UNO pin D12.

HC-SR04 Ultrasonic Sensor

  • VCC: Powered by the 5V from the Arduino UNO.
  • TRIG: Receives trigger signal from Arduino UNO pin D10.
  • ECHO: Sends echo signal to Arduino UNO pin D11.
  • GND: Connected to the common ground.

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 contain any functional code to control the servo or read the ultrasonic sensor. Additional code is required to implement the desired functionality.