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

Arduino-Controlled Robotic Sensor Platform with Ultrasonic and IR Sensors

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Robotic Sensor Platform with Ultrasonic and IR Sensors

Circuit Documentation

Summary of the Circuit

This circuit is designed to interface an Arduino UNO with multiple sensors and a motor driver. It includes ultrasonic sensors (HC-SR04) for distance measurement, infrared sensors (Sensor FC-51 IR) for object detection, and an L298N DC motor driver for controlling motors. The circuit is powered by a 18650 Li-Ion battery, and a rocker switch is used to control the power supply to the motor driver. The Arduino UNO serves as the central processing unit, reading sensor inputs and controlling the motor driver accordingly.

Component List

Arduino UNO

HC-SR04 Ultrasonic Sensor

Sensor FC-51 IR

L298N DC Motor Driver

Rocker Switch

18650 Li-Ion Battery

Wiring Details

Arduino UNO

HC-SR04 Ultrasonic Sensors

Sensor FC-51 IR Modules

L298N DC Motor Driver

Rocker Switch

18650 Li-Ion Battery

Documented Code

void setup() {
  // Initialize the motor driver pins as outputs
  pinMode(A4, OUTPUT);
  pinMode(A5, OUTPUT);
  pinMode(D13, OUTPUT);
  pinMode(D12, OUTPUT);
  pinMode(D11, OUTPUT);
  pinMode(D10, OUTPUT);

  // Initialize the IR sensor pins as inputs
  pinMode(D9, INPUT);
  pinMode(D8, INPUT);

  // Initialize the ultrasonic sensor pins
  pinMode(D7, INPUT);  // ECHO pin
  pinMode(D6, OUTPUT); // TRIG pin
  pinMode(D5, INPUT);  // ECHO pin
  pinMode(D4, OUTPUT); // TRIG pin
  pinMode(D3, INPUT);  // ECHO pin
  pinMode(D2, OUTPUT); // TRIG pin
}

void loop() {
  // Main code to interact with sensors and control motors
}

Note: The provided code is a template and does not include specific logic for sensor reading or motor control. This should be implemented based on the requirements of the application.