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

Arduino UNO-Based Battery-Powered Obstacle Avoidance Robot with IR and Ultrasonic Sensors

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based Battery-Powered Obstacle Avoidance Robot with IR and Ultrasonic Sensors

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, various sensors (IR and Ultrasonic), a servo motor, a DC motor driver, motors with wheels, a Li-Ion battery, and a rocker switch. The circuit is designed to interface these components to perform specific tasks, controlled by the Arduino UNO.

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. IR Sensor (2 units)

    • Description: Infrared sensor for obstacle detection.
    • Pins: out, gnd, vcc
  3. Ultrasonic Sensor

    • Description: Sensor for measuring distance using ultrasonic waves.
    • Pins: +VCC, Trigger, Echo, GND
  4. Servo

    • Description: A servo motor for precise control of angular position.
    • Pins: GND, VCC, PWM
  5. L298N DC Motor Driver

    • Description: Dual H-Bridge motor driver for controlling 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
  6. Motor and Wheels (2 units)

    • Description: DC motors with attached wheels.
    • Pins: vcc, GND
  7. 18650 Li-Ion Battery

    • Description: Rechargeable lithium-ion battery.
    • Pins: Positive, Negative
  8. Rocker Switch

    • Description: On/Off switch.
    • Pins: 1, 2

Wiring Details

Arduino UNO

IR Sensor

Ultrasonic Sensor

Servo

L298N DC Motor Driver

Motor and Wheels

18650 Li-Ion Battery

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:

}

This code is a basic template for the Arduino UNO. The setup function is used to initialize any settings or configurations, and the loop function contains the main logic that runs repeatedly. You can add your specific logic to control the sensors, motors, and other components in these functions.