32 3 732KB
instructables
Bluetooth Controlled Robot Car Using Arduino by Nayantha KGD
In this instructable, i'm going to guide you on making a robot car that control over Bluetooth from your android mobile phone. Not only that, the robot car has special ability of avoiding obstacles which it meet when moving the car forward. The robot car is fully based on arduino and I hope to do step by step guide on making this robot in very easy way. Hope you will enjoy it.
Bluetooth Controlled Robot Car Using Arduino: Page 1
Step 1: What You Need for This Robot 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15.
Arduino UNO - https://www.ebay.com/p/Arduino-UNO-R3-Board-With-... HC-06 Bluetooth Module - https://www.ebay.com/itm/2PCS-Wireless-Serial-4-Pi... L298n motor driver - https://www.ebay.com/itm/New-L298N-DC-Stepper-Mot... HC-SR04 Ultrasonic Sonar Sensor - https://www.ebay.com/itm/Ultrasonic-HC-SR04-HC-SR... Smart robot car chassis with 2 x toy car wheels and 1 x Universal wheel (or ball casters) https://www.ebay.com/itm/Motor-New-Smart-Robot-Ca... Two DC motors - https://www.ebay.com/itm/Arduino-Smart-Car-Robot-... 2x 9V Batteries 1K and 2K Resistors Jumper wires (male-to-male, male-to-female) Mini breadboard Screws and nuts Screwdriver Soldering iron Double sided tape(optional) Hot glue gun(optional)
1
1. Arduino UNO
1
1. HC-06 Bluetooth Module
Bluetooth Controlled Robot Car Using Arduino: Page 2
1
1
1. L298n Motor driver
1. HC-SR04 Ultrasonic Sensor
1
1. Chassis
Bluetooth Controlled Robot Car Using Arduino: Page 3
Step 2: Assembling the Chassis Solder two wires to each DC motor. Then fix two motors to the chassis using the screws. If you need any clarification, please watch this youtube video https://www.google.lk/url? sa=t&rct=j&q=&esrc=s&so... and it will show you how
to assemble the Smart 2WD Robot car chassis. Finally attach the Universal wheel (or ball caster wheel) to the back of the chassis.
Step 3: Mount the Components Mount the Arduino UNO, L298n motor driver and the Breadboard on the chassis. Attach the HC-06 Bluetooth module on the breadboard. Mount the HC-SR04 Ultrasonic sensor at the front of the chassis. Note: when mounting the arduino board, leave enough space to plug the USB cable, since later you have to program the arduino board by connecting the it to the PC via a USB cable.
Bluetooth Controlled Robot Car Using Arduino: Page 4
Step 4: HC-06 Bluetooth Module Connections Tip: This circuit diagram only shows you, how the pins of HC-06 Bluetooth module should be connected to the arduino board. This is not the circuit diagram of our robot. Make resistor connections correctly!!! You can use 'two series 1K' resistors instead of 2K resistor.
Power the Bluetooth module using arduino 5V output. Important: You have to remove any connections you made to the arduino digital pin 0(RX) and digital pin 1(TX) before upload any code. Otherwise your code will not upload to the board. After uploading the code, you can plug wires to both pins.
Bluetooth Controlled Robot Car Using Arduino: Page 5
Step 5: Wire Connections L298n motor driver:
HC-SR04 Ultrasonic Sonar sensor: VCC ® +5V
+12V ® 9V battery (+) Trig ® arduino analog pin 1 GND ® 9V battery (- ) and to arduino board any GND pin
Echo ® arduino analog pin 2
In1 ® arduino digital pin 7
GND ® breadboard GND
In2 ® arduino digital pin 6
HC-06 Bluetooth module:
In3 ® arduino digital pin 5
VCC ® +5V
In4 ® arduino digital pin 4
GND ® breadboard GND
OUT1 ® Motor 1
TXD ® arduino digital pin 0 (RX)
OUT2 ® Motor 1
RXD ® arduino digital pin 1 (TX) [after going throught resistor connections]
OUT3 ® Motor 2 OUT4 ® Motor 2
Bluetooth Controlled Robot Car Using Arduino: Page 6
Step 6: Programming Arduino UNO 1. Install NewPing Library. (Ultrasonic sensor function library) Download the NewPing.rar file Unrar the file and copy NewPing file Paste the file to Arduino libraries folder where you have installed the Arduino software in your PC (e.g:-C:\Arduino\libraries) 2. 3. 4. 5.
Download and open bluetooth_obstacle_avoiding.ino Remove any connections made to arduino digital pin 0 (RX) and digital pin 1 (TX) Upload the bluetooth_obstacle_avoiding.ino code Make necessary connections to arduino digital pin 0 (RX) and digital pin 1 (TX) again Bluetooth Controlled Robot Car Using Arduino: Page 7
http://www.instructables.com/ORIG/FSL/9TT3/JBQUNB5Z/FSL9TT3JBQUNB5Z.rar … Download (https://cdn.instructables.com/ORIG/FSL/9TT3/JBQUNB5Z/FSL9TT3JBQUNB5Z.rar)
(https://cdn.instructables.com/ORIG/FSL/9TT3/JBQUNB5Z/FSL9TT3JBQUNB5Z.rar) Download (https://cdn.instructables.com/ORIG/F1X/UI7O/JBQUNBB6/F1XUI7OJBQUNBB6.ino)
http://www.instructables.com/ORIG/F1X/UI7O/JBQUNBB6/F1XUI7OJBQUNBB6.ino …
(https://cdn.instructables.com/ORIG/F1X/UI7O/JBQUNBB6/F1XUI7OJBQUNBB6.ino)
Step 7: The Android App 1. Download mkrbot.apk on your android mobile 2. Install the app. If your mobile prevent installing the app, Go to settings ® security ® enable unknown sources 3. Open the app 4. At the beginning, the app will show "Disconnected" and the HC-06 Bluetooth module red LED will blink 5. Tap the Bluetooth symbol on the app 6. Select something named with HC-06 7. Now the app will show connected and the LED in the HC-06 Bluetooth module will light up continuously without blinking
Bluetooth Controlled Robot Car Using Arduino: Page 8
Download (https://cdn.instructables.com/ORIG/FEI/2HZN/JBQUNHZT/FEI2HZNJBQUNHZT.apk)
http://www.instructables.com/ORIG/FEI/2HZN/JBQUNHZT/FEI2HZNJBQUNHZT.apk …
(https://cdn.instructables.com/ORIG/FEI/2HZN/JBQUNHZT/FEI2HZNJBQUNHZT.apk)
Bluetooth Controlled Robot Car Using Arduino: Page 9
Step 8: Great!!! Now you can control the robot from your android mobile over Bluetooth and it will automatically avoid any obstacle before crash!!! I would be happy to answer any questions you have email me: [email protected] search me on facebook and linkedin for more projects - Danusha nayantha Thank You
Bluetooth Controlled Robot Car Using Arduino: Page 10