Arduino Nano Controlled Bluetooth Robot with IR Sensing and Dual Motor Driver
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an Arduino Nano microcontroller with a variety of components to achieve a system capable of motor control, Bluetooth communication, and infrared sensing. The Arduino Nano serves as the central processing unit, interfacing with an HC-05 Bluetooth module for wireless communication, a 5-channel IR array for line or obstacle detection, and an L293 motor driver to control two DC Mini Metal Gear Motors. The circuit is powered by a 7.4V power source, which supplies power to the motor driver, IR array, Bluetooth module, and the Arduino Nano.
Component List
Arduino Nano
- Microcontroller board based on the ATmega328P
- Offers a variety of digital and analog I/O pins
- Used for controlling the logic of the entire circuit
L293 Motor Driver
- A motor driver IC capable of driving two DC motors
- Provides bidirectional drive currents
- Used for controlling the speed and direction of the motors
7.4V Power Source
- Provides the power supply for the circuit
- Used to power the motor driver, IR array, Bluetooth module, and Arduino Nano
5 Channel IR Array
- An array of infrared sensors
- Used for line tracking or obstacle detection
- Interfaces with the Arduino Nano for sensor data processing
HC-05 Bluetooth Module
- A wireless communication module
- Enables Bluetooth connectivity for the circuit
- Allows for remote control or data exchange with the Arduino Nano
DC Mini Metal Gear Motor (x2)
- Small, high-torque DC motors
- Used for driving the mechanical parts of the system
Wiring Details
Arduino Nano
D1/TXconnected toRXDon HC-05 Bluetooth ModuleD0/RXconnected toTXDon HC-05 Bluetooth ModuleD2connected toEN_Bon L293 Motor DriverD3connected toEN_Aon L293 Motor DriverD4connected toA1on L293 Motor DriverD5connected toA2on L293 Motor DriverD6connected toB2on L293 Motor DriverD7connected toB1on L293 Motor DriverVINconnected to 7.4V Power Source+GNDconnected to 7.4V Power Source-A0toA5connected to correspondingA1toA5on 5 Channel IR Array
L293 Motor Driver
EN_AandEN_Bconnected to Arduino Nano for motor enable signalsA1,A2,B1,B2connected to Arduino Nano for motor control signalsMA1,MA2connected to the first DC Mini Metal Gear MotorMB1,MB2connected to the second DC Mini Metal Gear MotorVCCconnected to 7.4V Power Source+GNDconnected to 7.4V Power Source-
7.4V Power Source
+connected toVCCon L293 Motor Driver,VCCon 5 Channel IR Array,VINon Arduino Nano, andVCCon HC-05 Bluetooth Module-connected toGNDon L293 Motor Driver,GNDon 5 Channel IR Array,GNDon Arduino Nano, andGNDon HC-05 Bluetooth Module
5 Channel IR Array
A1toA5connected to correspondingA0toA5on Arduino NanoVCCconnected to 7.4V Power Source+GNDconnected to 7.4V Power Source-
HC-05 Bluetooth Module
RXDconnected toD1/TXon Arduino NanoTXDconnected toD0/RXon Arduino NanoVCCconnected to 7.4V Power Source+GNDconnected to 7.4V Power Source-
DC Mini Metal Gear Motors
- Each motor has two inputs,
IN1andIN2, which are connected toMA1,MA2andMB1,MB2on the L293 Motor Driver respectively
Documented Code
Arduino Nano 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 template provides the basic structure for the Arduino Nano's firmware. The setup() function is called once when the microcontroller is powered on or reset. It is used to initialize the pins and set up the communication protocols. The loop() function is called repeatedly and contains the main logic for controlling the motors, reading sensor data, and handling Bluetooth communication.
Additional Notes
- The provided code is a template and does not contain any specific logic.
- The actual implementation should include motor control algorithms, sensor data processing, and Bluetooth communication handling.
- The
setup()function should configure the pin modes and initialize the serial communication if needed. - The
loop()function should include the code to read the IR sensors, control the motors via the L293 driver, and manage Bluetooth communication with the HC-05 module.