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

Dual Arduino-Controlled Ultrasonic Sensor Array with Servo Integration

Image of Dual Arduino-Controlled Ultrasonic Sensor Array with Servo Integration

Circuit Documentation

Summary

The circuit in question is designed to interface multiple HC-SR04 Ultrasonic Sensors and Servomotors with two Arduino UNO R4 WiFi microcontrollers. The ultrasonic sensors are used for distance measurement, while the servomotors are used for actuation. The Arduinos serve as the central processing units, controlling the sensors and motors based on the programmed logic.

Component List

HC-SR04 Ultrasonic Sensor

  • Description: An ultrasonic distance sensor that uses sonar to determine the distance to an object.
  • Pins: VCC, TRIG, ECHO, GND

Servomotor MG995

  • Description: A high-torque metal gear servo used for precise angular movement.
  • Pins: SIG, VCC, GND

Servomotor SG90

  • Description: A small and lightweight servo used for less demanding applications.
  • Pins: SIG, VCC, GND

Arduino UNO R4 WiFi

  • Description: A microcontroller board based on the ATmega328, with integrated WiFi capabilities.
  • Pins: OFF, GND, VRTC, IIC0_SCL, IIC0_SDA, 3V3, GPIO 41, GPIO 0, GPIO 42, GPIO 43, GPIO 44, BOOT, IOREF, RESET, 5V, VIN, A0, A1, A2, A3, A4, A5, RSPCKA, CIPO, COPI, D0/RX, D1/TX, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, AREF, SDA, SCL

Wiring Details

HC-SR04 Ultrasonic Sensors

  • VCC: Connected to the 5V output on the Arduino UNO R4 WiFi.
  • TRIG: Connected to digital pins (D9, D11) on the Arduino UNO R4 WiFi for triggering the distance measurement.
  • ECHO: Connected to digital pins (D10, D12) on the Arduino UNO R4 WiFi to receive the distance measurement.
  • GND: Connected to the ground (GND) on the Arduino UNO R4 WiFi.

Servomotors MG995 and SG90

  • SIG: Connected to digital pins (D6, D7) on the Arduino UNO R4 WiFi for signal control.
  • VCC: Connected to the 5V output on the Arduino UNO R4 WiFi.
  • GND: Connected to the ground (GND) on the Arduino UNO R4 WiFi.

Arduino UNO R4 WiFi

  • 5V: Provides power to the VCC pins of the HC-SR04 Ultrasonic Sensors and Servomotors.
  • GND: Common ground for the circuit.
  • Digital Pins (D6, D7, D9, D10, D11, D12): Used for controlling the servomotors and interfacing with the ultrasonic sensors.

Documented Code

Arduino UNO R4 WiFi (First Instance)

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

}

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

}

Filename: sketch.ino

Arduino UNO R4 WiFi (Second Instance)

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

}

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

}

Filename: sketch.ino

Note: The provided code for both Arduino instances is a template with no specific functionality. The actual implementation should include initialization of the pins and the logic for controlling the servomotors and reading from the ultrasonic sensors.