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

Arduino UNO and L298N Motor Driver Based IR Sensor Controlled Dual DC Motor System

View and Edit Project In Cirkit DesignerImage of Arduino UNO and L298N Motor Driver Based IR Sensor Controlled Dual DC Motor System

Circuit Documentation

Summary

This circuit is designed to control two DC motors using an Arduino UNO and an L298N DC motor driver. An IR sensor is used to detect obstacles, and a rocker switch is used to control the power supply from a 12V battery.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. L298N DC Motor Driver

    • Description: A dual H-Bridge motor driver that allows control of two DC motors.
    • Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
  3. IR Sensor

    • Description: An infrared sensor used for obstacle detection.
    • Pins: out, gnd, vcc
  4. DC Motor (Motor 1)

    • Description: A DC motor used for driving mechanical components.
    • Pins: pin 1, pin 2
  5. DC Motor (Motor 2)

    • Description: A second DC motor used for driving mechanical components.
    • Pins: pin 1, pin 2
  6. Battery 12V

    • Description: A 12V battery used as the power supply for the circuit.
    • Pins: +, -
  7. Rocker Switch

    • Description: A switch used to control the power supply from the battery.
    • Pins: 1, 2

Wiring Details

Arduino UNO

L298N DC Motor Driver

IR Sensor

DC Motor (Motor 1)

DC Motor (Motor 2)

Battery 12V

Rocker Switch

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:

}

Additional Documentation (documentation.txt)