Bluetooth-Controlled Robotic Vehicle with Ultrasonic Obstacle Detection and Motion Sensing
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control two DC motors using an L298N DC motor driver, interfaced with a SparkFun Pro Micro microcontroller. The circuit also includes an HC-SR04 Ultrasonic Sensor for distance measurement, a Bluetooth module HM-10 for wireless communication, and an MPU-6050 sensor for motion tracking. Power is supplied by a 5V battery and a separate battery case, presumably for the motor driver. The circuit's ground connections are shared among several components, establishing a common ground.
Component List
L298N DC Motor Driver
- Description: A motor driver capable of driving a pair of DC motors or a stepper motor.
- 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
My Battery Case
- Description: A battery case to provide power to the circuit.
- Pins: +, -
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic sensor used for measuring distances via sonar.
- Pins: VCC, TRIG, ECHO, GND
DC Motor
- Description: An electric motor that runs on direct current electricity.
- Pins: pin 1, pin 2
SparkFun Pro Micro
- Description: A microcontroller board based on the ATmega32U4.
- Pins: RAW, GND, RESET, VCC, A3, A2, A1, A0, SCK, MISO, MOSI, D10, D9, D8, D7, D6, D5, D4, D3, D2, RXI, TXO
5V Battery
- Description: A power source providing a 5V output.
- Pins: positive, negative
Bluetooth Module HM-10
- Description: A Bluetooth 4.0 module for wireless communication.
- Pins: BRK, RX, TX, GND, VCC, State
MPU-6050
- Description: A motion tracking device with a 3-axis gyroscope and a 3-axis accelerometer.
- Pins: VCC, GND, SCL, SDA, XDA, XCL, AD0, INT
Wiring Details
L298N DC Motor Driver
- 5V connected to SparkFun Pro Micro VCC
- GND connected to common ground
- IN1 connected to SparkFun Pro Micro D2
- IN2 connected to SparkFun Pro Micro D3
- IN3 connected to SparkFun Pro Micro D4
- IN4 connected to SparkFun Pro Micro D5
- ENA connected to SparkFun Pro Micro D6
- ENB connected to SparkFun Pro Micro D9
- OUT1 connected to DC Motor (Instance 1) pin 1
- OUT2 connected to DC Motor (Instance 1) pin 2
- OUT3 connected to DC Motor (Instance 2) pin 1
- OUT4 connected to DC Motor (Instance 2) pin 2
- 12V connected to My Battery Case +
My Battery Case
-
- connected to L298N DC Motor Driver 12V
-
- connected to common ground
HC-SR04 Ultrasonic Sensor
- VCC connected to common 5V
- GND connected to common ground
DC Motor (Instance 1)
- pin 1 connected to L298N DC Motor Driver OUT1
- pin 2 connected to L298N DC Motor Driver OUT2
DC Motor (Instance 2)
- pin 1 connected to L298N DC Motor Driver OUT3
- pin 2 connected to L298N DC Motor Driver OUT4
SparkFun Pro Micro
- GND connected to common ground
- VCC connected to common 5V
- D2 connected to L298N DC Motor Driver IN1
- D3 connected to L298N DC Motor Driver IN2
- D4 connected to L298N DC Motor Driver IN3
- D5 connected to L298N DC Motor Driver IN4
- D6 connected to L298N DC Motor Driver ENA
- D9 connected to L298N DC Motor Driver ENB
- A1 connected to MPU-6050 SDA
- A0 connected to MPU-6050 SCL
5V Battery
- positive connected to common 5V
- negative connected to common ground
Bluetooth Module HM-10
- VCC connected to common 5V
- GND connected to common ground
MPU-6050
- VCC connected to common 5V
- GND connected to common ground
- SCL connected to SparkFun Pro Micro A0
- SDA connected to SparkFun Pro Micro A1
Documented Code
No code was provided for the microcontroller. The documentation of the code would typically include a description of the functionality, setup, and main loop, along with comments explaining the purpose of each function and variable. Since no code is available, this section cannot be completed.