Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino-Controlled Robotics Platform with Ultrasonic and IR Sensing

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Robotics Platform with Ultrasonic and IR Sensing

Circuit Documentation

Summary

This circuit is designed to interface an Arduino UNO with various sensors and actuators, including ultrasonic sensors (HC-SR04), infrared sensors, a servo motor, DC motors, and a motor driver (L298N). The circuit is powered by a 9V battery, which is controlled by a rocker switch. The Arduino UNO is used as the central processing unit, reading sensor inputs and controlling the actuators based on the programmed logic.

Component List

HC-SR04 Ultrasonic Sensor

Arduino UNO

IR Sensor

Rocker Switch

9V Battery

DC Motor

L298N DC Motor Driver

Servo

Wiring Details

HC-SR04 Ultrasonic Sensor

Arduino UNO

IR Sensor

Rocker Switch

9V Battery

DC Motor

L298N DC Motor Driver

Servo

Documented Code

// Arduino UNO Code for the Circuit
// Filename: sketch.ino

// Define pin connections & motor speed variables
const int trigPin = 8;
const int echoPin = 9;
const int irSensor1 = 4;
const int irSensor2 = 2;
const int motorPin1 = 12;
const int motorPin2 = 13;
const int motorPin3 = 11;
const int motorPin4 = 10;
const int servoPin = 7;
const int motorSpeed = 255; // Max speed

// Setup function runs once at the start of the program
void setup() {
  // Initialize all the motor control pins as outputs
  pinMode(motorPin1, OUTPUT);
  pinMode(motorPin2, OUTPUT);
  pinMode(motorPin3, OUTPUT);
  pinMode(motorPin4, OUTPUT);
  
  // Initialize the servo control pin as an output
  pinMode(servoPin, OUTPUT);
  
  // Initialize the IR sensor pins as inputs
  pinMode(irSensor1, INPUT);
  pinMode(irSensor2, INPUT);
  
  // Initialize the ultrasonic sensor pins
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  
  // Begin serial communication at a baud rate of 9600
  Serial.begin(9600);
}

// Loop function runs repeatedly after setup function
void loop() {
  // Implement sensor reading and motor control logic here
  // ...
}

Please note that the provided code is a template and does not contain the actual logic for reading sensors or controlling motors. The user should implement the specific logic based on the requirements of their application.