Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO-Based Battery-Powered Robotic Car with Bluetooth and Ultrasonic Sensors

Image of Arduino UNO-Based Battery-Powered Robotic Car with Bluetooth and Ultrasonic Sensors

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, an L298N DC motor driver, two DC motors, an HC-SR04 ultrasonic sensor, two IR sensors, an HC-05 Bluetooth module, a rocker switch, and a 18650 Li-Ion battery. The circuit is designed to control the DC motors and read sensor data, with power supplied by the Li-Ion battery.

Component List

  1. Arduino UNO

    • Description: 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: Dual H-Bridge motor driver.
    • 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. DC Motor (x2)

    • Description: Standard DC motor.
    • Pins: pin 1, pin 2
  4. HC-SR04 Ultrasonic Sensor

    • Description: Ultrasonic distance sensor.
    • Pins: VCC, TRIG, ECHO, GND
  5. IR Sensor (x2)

    • Description: Infrared sensor for obstacle detection.
    • Pins: out, gnd, vcc
  6. HC-05 Bluetooth Module

    • Description: Bluetooth module for wireless communication.
    • Pins: EN, VCC, GND, TXD, RXD, STATE
  7. Rocker Switch

    • Description: On/Off switch.
    • Pins: output, input
  8. 18650 Li-Ion Battery

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

Wiring Details

Arduino UNO

  • 5V connected to:

    • HC-05 Bluetooth Module (VCC)
    • IR Sensor 1 (vcc)
    • IR Sensor 2 (vcc)
    • HC-SR04 Ultrasonic Sensor (VCC)
  • GND connected to:

    • HC-05 Bluetooth Module (GND)
    • IR Sensor 1 (gnd)
    • IR Sensor 2 (gnd)
    • HC-SR04 Ultrasonic Sensor (GND)
    • 18650 Li-Ion Battery (Negative)
    • L298N DC Motor Driver (GND)
  • Vin connected to:

    • 18650 Li-Ion Battery (Positive)
    • Rocker Switch (input)
  • A0 connected to:

    • IR Sensor 1 (out)
  • A1 connected to:

    • IR Sensor 2 (out)
  • D11 connected to:

    • L298N DC Motor Driver (IN1)
  • D10 connected to:

    • L298N DC Motor Driver (IN2)
  • D9 connected to:

    • L298N DC Motor Driver (IN3)
    • HC-SR04 Ultrasonic Sensor (ECHO)
  • D8 connected to:

    • L298N DC Motor Driver (IN4)
    • HC-SR04 Ultrasonic Sensor (TRIG)
  • D6 connected to:

    • L298N DC Motor Driver (ENA)
  • D5 connected to:

    • L298N DC Motor Driver (ENB)
  • D1 connected to:

    • HC-05 Bluetooth Module (RXD)
  • D0 connected to:

    • HC-05 Bluetooth Module (TXD)

L298N DC Motor Driver

  • OUT1 connected to:

    • DC Motor 1 (pin 2)
  • OUT2 connected to:

    • DC Motor 1 (pin 1)
  • OUT3 connected to:

    • DC Motor 2 (pin 2)
  • OUT4 connected to:

    • DC Motor 2 (pin 1)
  • 12V connected to:

    • Rocker Switch (output)

HC-05 Bluetooth Module

  • VCC connected to:

    • Arduino UNO (5V)
  • GND connected to:

    • Arduino UNO (GND)
  • RXD connected to:

    • Arduino UNO (D1)
  • TXD connected to:

    • Arduino UNO (D0)

HC-SR04 Ultrasonic Sensor

  • VCC connected to:

    • Arduino UNO (5V)
  • GND connected to:

    • Arduino UNO (GND)
  • TRIG connected to:

    • Arduino UNO (D8)
  • ECHO connected to:

    • Arduino UNO (D9)

IR Sensor 1

  • vcc connected to:

    • Arduino UNO (5V)
  • gnd connected to:

    • Arduino UNO (GND)
  • out connected to:

    • Arduino UNO (A0)

IR Sensor 2

  • vcc connected to:

    • Arduino UNO (5V)
  • gnd connected to:

    • Arduino UNO (GND)
  • out connected to:

    • Arduino UNO (A1)

Rocker Switch

  • input connected to:

    • 18650 Li-Ion Battery (Positive)
    • Arduino UNO (Vin)
  • output connected to:

    • L298N DC Motor Driver (12V)

18650 Li-Ion Battery

  • Positive connected to:

    • Rocker Switch (input)
    • Arduino UNO (Vin)
  • Negative connected to:

    • Arduino UNO (GND)
    • L298N DC Motor Driver (GND)

Code Documentation

Arduino UNO Code

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 where you initialize your components and settings, and the loop() function is where you place the main code that runs repeatedly.

Additional Documentation


This section is reserved for any additional documentation or notes related to the code or circuit.