- Arduino Mega 2560
- 2 Wheel Chassis
- Two DC Motors
- Two Dual Channel Relay Modules
- HC-SR04 Ultrasonic Sensor
- HC-05 Bluetooth Module
- 400 points Breadboard
- 5V adapter for external power supply for Arduino
- 12V adapter for external power supply for DC Motors
To verify that all components are in working condition, upload the following codes one by one to check and test the working of each part.
- Upload
Blink.ino
code to test the Arduino. - Upload
DC_Motor.ino
code to test the working of Two Channel Relay Module and DC Motors - Upload the
Sensor.ino
Code to test the working of the HC-SR04 Ultrasonic Sensor. - Upload the
Bluetoooth_inbuilt_LED.ino
code to test the working of HC-05 Bluetooth module
Connect the components with the Arduino as shown in the images below. You can use breadboard for common connections.
Interfacing HC-SR04 Ultrasonic sensor with Arduino:
Interfacing HC-05 Bluetooth Module with Arduino:
Interfacing DC Motor using Two Channel relay Module with Arduino:
The bot can be controlled by using an android app developed using MIT App Inventor. Download and install BOT.apk
to install the MIT App.
Upload Object_Avoidance.ino
code to the Arduino.
This code will receive user inputs from the MIT App via the HC-05 Bluetooth Module to move around in the direction specified by the user. When the bot detects any object or obstacle via the HC-SR04 Ultrasonic sensor, it stops within 10 cm of the object. The bot will again move only if the obstacle is removed and an input is given via the app.
For the bot to move in its previous path as soon as the obstacle is removed, upload the Object_Avoidance_Refined.ino
code to the Arduino.