Arduino Due-Based Obstacle Avoidance Robot with Bluetooth Control
View and Edit Project In Cirkit Designer
Automated 2-Wheeled Robot with Obstacle Avoidance and Bluetooth Communication
Summary
This project involves the design and implementation of an automated two-wheeled robot using an Arduino Due microcontroller. The robot is equipped with ultrasonic sensors for obstacle detection, an IR sensor for object recognition, and a Bluetooth module for communication with a smartphone. The L298N motor driver is used to control the motors, and a 2000mAh battery powers the entire system.
Component List
DC Mini Metal Gear Motor
- Description: A small DC motor with metal gears for increased torque.
- Pins: IN1, IN2
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic sensor used for distance measurement.
- Pins: VCC, TRIG, ECHO, GND
L298N DC Motor Driver
- Description: A dual H-bridge motor driver that allows control of 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
IR Sensor
- Description: An infrared sensor used for object detection.
- Pins: out, gnd, vcc
Arduino Due
- Description: A microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU.
- Pins: A8, A9, A10, A11, DAC0, DAC1, CANRX, CANTX, A0, A1, A2, A3, A4, A5, A6, A7, D14/TX3, D15/RX3, D16/TX2, D17/RX2, D18/TX1, D19/RX1, D20/SDA3, D21/SCL3, IOREF, MASTER-RESET, 5V, GND, VIN, D8 PWM, D9 PWM, D10 PWM/SS0, D11 PWM, D12 PWM, D13 PWM, AREF, SDA1, SCL1, D0/RX, D1/TX, D2 PWM, D3 PWM, D4 PWM/SS1, D5 PWM, D6 PWM, D7 PWM, D22, D23, D24, D25, D26, D27, D28, D29, D30, D31, D32, D33, D34, D35, D36, D37, D38, D39, D40, D41, D42, D43, D44, D45, D46, D47, D48, D49, D50, D51, D52, D53, unused
2000mAh Battery
- Description: A rechargeable battery providing power to the circuit.
- Pins: VCC, GND
MKE-M15 Bluetooth
- Description: A Bluetooth module for wireless communication.
- Pins: RX, TX, 5V, GND
Water Level Sensor
- Description: A sensor used to measure the water level.
- Pins: SIG, VCC, GND
4 Channel Relay Module
- Description: A relay module with four channels for controlling high-power devices.
- Pins: N.O. 4, COM 4, N.C. 4, N.O. 3, COM 3, N.C. 3, N.O. 2, COM 2, N.C. 2, N.O. 1, COM 1, N.C. 1, Pin 13, Pin 14, Pin 15, Pin 16, Pin 17, Pin 18, Pin 19, Pin 20, Pin 21, Pin 22, Pin 23, Pin 24, VCC+, VCC- (GND), IN 1, IN 2, IN 3, IN 4
DC Motor
- Description: A standard DC motor.
- Pins: pin 1, pin 2
5V Mini Water Pump
- Description: A small water pump operating at 5V.
- Pins: positive pin, negative pin
Wiring Details
DC Mini Metal Gear Motor
- IN1 connected to L298N DC motor driver IN1
- IN2 connected to L298N DC motor driver OUT1
DC Mini Metal Gear Motor
- IN1 connected to L298N DC motor driver IN2
- IN2 connected to L298N DC motor driver OUT2
HC-SR04 Ultrasonic Sensor
- VCC connected to Arduino Due 5V
- TRIG connected to Arduino Due D5 PWM
- ECHO connected to Arduino Due D8 PWM
- GND connected to Arduino Due GND
HC-SR04 Ultrasonic Sensor
- VCC connected to Arduino Due 5V
- TRIG connected to Arduino Due D6 PWM
- ECHO connected to Arduino Due D9 PWM
- GND connected to Arduino Due GND
HC-SR04 Ultrasonic Sensor
- VCC connected to Arduino Due 5V
- TRIG connected to Arduino Due D7 PWM
- ECHO connected to Arduino Due D10 PWM/SS0
- GND connected to Arduino Due GND
L298N DC Motor Driver
- OUT1 connected to DC Mini Metal Gear Motor IN2
- OUT2 connected to DC Mini Metal Gear Motor IN2
- GND connected to Arduino Due GND
- 5V connected to Arduino Due 5V
- IN1 connected to DC Mini Metal Gear Motor IN1
- IN2 connected to DC Mini Metal Gear Motor IN1
IR Sensor
- out connected to Arduino Due D4 PWM/SS1
- gnd connected to Arduino Due GND
- vcc connected to Arduino Due 5V
Arduino Due
- GND connected to Water Level Sensor GND, L298N DC motor driver GND, 2000mAh Battery GND, HC-SR04 Ultrasonic Sensor GND, IR Sensor gnd, MKE-M15 Bluetooth GND
- 5V connected to IR Sensor vcc, HC-SR04 Ultrasonic Sensor VCC, Water Level Sensor VCC, L298N DC motor driver 5V, MKE-M15 Bluetooth 5V
- D4 PWM/SS1 connected to IR Sensor out
- D6 PWM connected to HC-SR04 Ultrasonic Sensor TRIG
- D9 PWM connected to HC-SR04 Ultrasonic Sensor ECHO
- D5 PWM connected to HC-SR04 Ultrasonic Sensor TRIG
- D8 PWM connected to HC-SR04 Ultrasonic Sensor ECHO
- D7 PWM connected to HC-SR04 Ultrasonic Sensor TRIG
- D10 PWM/SS0 connected to HC-SR04 Ultrasonic Sensor ECHO
- D11 PWM connected to Water Level Sensor SIG
- D0/RX connected to MKE-M15 Bluetooth TX
- D1/TX connected to MKE-M15 Bluetooth RX
2000mAh Battery
- VCC connected to Arduino Due 5V
MKE-M15 Bluetooth
- RX connected to Arduino Due D1/TX
- TX connected to Arduino Due D0/RX
- 5V connected to Arduino Due 5V
- GND connected to Arduino Due GND
Water Level Sensor
- SIG connected to Arduino Due D11 PWM
- VCC connected to Arduino Due 5V
- GND connected to Arduino Due GND
4 Channel Relay Module
- N.O. 1 connected to 5V Mini Water Pump positive pin
- COM 1 connected to 5V Mini Water Pump negative pin
- IN 1 connected to DC Motor pin 2
- IN 2 connected to DC Motor pin 1
- IN 3 connected to DC Motor pin 2
- IN 4 connected to DC Motor pin 1
DC Motor
- pin 1 connected to 4 Channel Relay Module IN 2
- pin 2 connected to 4 Channel Relay Module IN 1
DC Motor
- pin 1 connected to 4 Channel Relay Module IN 4
- pin 2 connected to 4 Channel Relay Module IN 3
5V Mini Water Pump
- positive pin connected to 4 Channel Relay Module N.O. 1
- negative pin connected to **4 Channel Relay