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

Arduino-Controlled Dual DC Motor & IR Sensor Obstacle Detection System

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Dual DC Motor & IR Sensor Obstacle Detection System

Circuit Documentation

Summary

This circuit is designed to control two DC motors using an Arduino UNO microcontroller and an L298N DC motor driver. It includes two IR sensors for input and an HC-SR04 Ultrasonic Sensor for distance measurement. The circuit is powered by a 12V battery, which supplies power to the motor driver and indirectly to the other components through the motor driver's 5V output.

Component List

Arduino UNO

DC Motor (x2)

L298N DC Motor Driver

IR Sensor (x2)

Battery 12V

HC-SR04 Ultrasonic Sensor

Wiring Details

Arduino UNO

DC Motor 1

DC Motor 2

L298N DC Motor Driver

IR Sensor 1

IR Sensor 2

HC-SR04 Ultrasonic Sensor

Battery 12V

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 and does not contain any functional code. It needs to be filled in with the logic for controlling the motors based on the input from the IR sensors and the HC-SR04 Ultrasonic Sensor. The setup() function is used for initializing the pins and the loop() function will contain the main logic that will run repeatedly.