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

Arduino UNO Controlled Bluetooth and Ultrasonic Sensor-Based DC Motor System

View and Edit Project In Cirkit DesignerImage of Arduino UNO Controlled Bluetooth and Ultrasonic Sensor-Based DC Motor System

Circuit Documentation

Summary

This circuit is designed to control two DC motors using an L298N motor driver, an Arduino UNO, and various sensors and modules. The circuit includes an MPU-6050 accelerometer and gyroscope, an HC-SR04 ultrasonic sensor, an HC-05 Bluetooth module, and a two-pin LED. The power is supplied by two 18650 Li-ion batteries. The Arduino UNO serves as the main microcontroller, interfacing with all the components and executing the control logic.

Component List

  1. L298N DC Motor Driver

    • Description: Motor driver for controlling 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
  2. DC Motor (x2)

    • Description: Standard DC motor.
    • Pins: pin 1, pin 2
  3. 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
  4. MPU-6050

    • Description: Accelerometer and gyroscope sensor.
    • Pins: VCC, GND, SCL, SDA, XDA, XCL, AD0, INT
  5. 18650 Li-ion Battery (x2)

    • Description: Rechargeable lithium-ion battery.
    • Pins: +, -
  6. Motor Switch (Reverse, Stop, Forward)

    • Description: Switch for controlling motor direction.
    • Pins: IN+, IN-, OUT+, OUT-
  7. HC-SR04 Ultrasonic Sensor

    • Description: Ultrasonic distance sensor.
    • Pins: VCC, TRIG, ECHO, GND
  8. Resistor

    • Description: 200 Ohms resistor.
    • Pins: pin1, pin2
  9. LED: Two Pin (Red)

    • Description: Standard red LED.
    • Pins: cathode, anode
  10. HC-05 Bluetooth Module

    • Description: Bluetooth module for wireless communication.
    • Pins: Key, VCC, TXD, RXD, State, GND

Wiring Details

L298N DC Motor Driver

DC Motor 1

DC Motor 2

Arduino UNO

MPU-6050

18650 Li-ion Battery

Motor Switch (Reverse, Stop, Forward)

HC-SR04 Ultrasonic Sensor

Resistor

LED: Two Pin (Red)

HC-05 Bluetooth Module

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)