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

Arduino-Controlled Robotics Platform with Ultrasonic Sensing and Servo Motor Integration

Image of Arduino-Controlled Robotics Platform with Ultrasonic Sensing and Servo Motor Integration

Circuit Documentation

Summary

This circuit is designed to interface an Arduino UNO with a variety of components including an HC-SR04 Ultrasonic Sensor, an L298N DC motor driver, four hobbyist yellow geared motors, a 16-Channel PWM Servo Driver, four servos, and a 12V battery. The Arduino UNO serves as the central processing unit, controlling the motors and reading sensor data. The L298N driver is used to control the motors, while the 16-Channel PWM Servo Driver manages the servos. The HC-SR04 sensor provides distance measurements. Power distribution is carefully managed to ensure all components receive the appropriate voltages.

Component List

  • Arduino UNO: A microcontroller board based on the ATmega328P, featuring digital and analog I/O pins.
  • HC-SR04 Ultrasonic Sensor: A sensor for measuring distance via ultrasonic sound waves.
  • L298N DC Motor Driver: A module for controlling up to two DC motors with direction and speed control.
  • Motor Amarillo Motorreductor Hobby: Four yellow hobbyist geared motors for mechanical movement.
  • 16-Channel PWM Servo Driver: A board capable of controlling up to 16 servos with Pulse Width Modulation.
  • Servo: Four servos for precise angular movement.
  • Battery 12V: A 12V battery to power the motor driver and potentially other components.

Wiring Details

Arduino UNO

  • 5V connected to HC-SR04 VCC and 16-Channel PWM Servo Driver VCC.
  • GND connected to HC-SR04 GND, L298N GND, and 16-Channel PWM Servo Driver GND.
  • Vin connected to L298N 5V.
  • A4 (SDA) connected to 16-Channel PWM Servo Driver SDA.
  • A5 (SCL) connected to 16-Channel PWM Servo Driver SCL.
  • D2-D9 connected to L298N IN1-IN4, ENA, ENB, HC-SR04 TRIG, and ECHO.

HC-SR04 Ultrasonic Sensor

  • VCC connected to Arduino UNO 5V.
  • GND connected to Arduino UNO GND.
  • TRIG connected to Arduino UNO D7.
  • ECHO connected to Arduino UNO D8.

L298N DC Motor Driver

  • 12V connected to Battery 12V (+).
  • GND connected to Battery 12V (-) and Arduino UNO GND.
  • 5V connected to Arduino UNO Vin.
  • IN1-IN4 connected to Arduino UNO D2-D4, D9.
  • ENA, ENB connected to Arduino UNO D5, D6.
  • OUT1-OUT4 connected to the respective pairs of Motor Amarillo Motorreductor Hobby vcc and GND.

Motor Amarillo Motorreductor Hobby

  • Four motors with vcc and GND connected to L298N OUT1-OUT4.

16-Channel PWM Servo Driver

  • VCC connected to Arduino UNO 5V.
  • GND connected to Arduino UNO GND and all Servo gnd.
  • SDA connected to Arduino UNO A4.
  • SCL connected to Arduino UNO A5.
  • V+ connected to all Servo vcc.
  • PWM1-PWM16 connected to respective Servo pulse pins.

Servo

  • Four servos with vcc connected to 16-Channel PWM Servo Driver V+.
  • gnd connected to 16-Channel PWM Servo Driver GND.
  • pulse connected to 16-Channel PWM Servo Driver PWM2-PWM5.

Battery 12V

  • + connected to L298N 12V.
  • - connected to L298N GND.

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:

}

This code is a template for the Arduino UNO and does not contain any functional code. It provides the basic structure for an Arduino sketch with setup() and loop() functions. The setup() function is intended for initialization code that runs once, while the loop() function contains code that runs repeatedly.

Additional Notes

The provided code is a placeholder and needs to be populated with the logic to control the motors via the L298N driver, read distance measurements from the HC-SR04 sensor, and manage the servos using the 16-Channel PWM Servo Driver. The actual implementation will depend on the specific requirements of the application this circuit is intended for.