Bluetooth-controlled robot, doing some task based on commands: Manual control (RC Mode), Autonomous (Obstacle avoider Mode), shows a text on LCD, also control the Robot's speed.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts Needed
You will need:
- Arduino Uno/Genuino
- Motor Driver (I'm using 2A Motor Shield from DFRobot)
- Three of Ultrasonic sensors HC-SR04
- HC-05 Bluetooth module
- 16x2 LCD with I2C
- Jumper wires
- 9V battery for Arduino, 7.5-12 V battery pack for motors (custom)
- Robot chassis (I'm using DFRobot Devastator Tank Mobile Platform)
- Soldering tools
- Any tools that may help you work easily
Step 2: Modifying Some Parts
Here, you need to modify some parts, the HC-05 bluetooth module and the LCD. You have to make a voltage divider for the bluetooth module and add an I2C module to the LCD.
Step 3: Build It..
Attach your arduino and parts in their proper place, based on your creativity. For good looking, neat the jumper wires.
Step 4: Wiring Diagram & Programming
Follow this wiring diagram to hook up the parts. Instructions also included in the program. Install the libraries then upload the program. Make sure to release the HC-05 RX TX pins from the Arduino pins before uploading.
Step 5: Play With Your Robot
To control Robot from PC, use TeraTerm software. Software download available here: Tera Term
To control over Android, you can use this app: Arduino Bluetooth Controller
Pair your HC-05 with your device first. When it is asking for password, enter 1234 (default HC-05's password).
If you use TeraTerm: open the software, click 'Serial', choose your bluetooth port, play.
If you use Android, open the app > Proceed > choose HC-05 > open the Controller Mode > set your controller keys (Set Commands), play. You can also use the Vehicle Mode, set the controller keys too.
These commands based on the codes:
w : Move Forward
a: go Left
s: Move Backward
d: go Right
e: decrease speed
r: increase speed
x: LED ON
z: LED OFF
1: Obstacle Avoider Mode
2: Showing the text on LCD
0: Clear n turn off the LCD backlight
You can modify the codes for another commands. If you fail once, don't give up! That's what make this fun. Do troubleshoots. Hope you make it!