Carduino: Control Arduino Car From Android Phone

Hey guys I have updated the robotic car and was able to make it work with Android device. Now, you can make it dance with your phone. Although, this is a very basic working model, and a lot can be done to make good use of this basic tutorial into a serious use case robotic rover.

For this project I created an Android app that communicates with the car via Bluetooth. I named the app Carduino. I made a few modifications to the car we made in previous article Arduino obstacle avoiding car, are as follows:

  1. Remove the Ultrasonic sensor
  2. Remove the Servo motor
  3. Add Bluetooth module

Components:

  1. Arduino Mega/Uno
  2. HC-05 Bluetooth module
  3. Adruino motor driver shield
  4. Robotic car kit
  5. Connector wires

For instructions on assembling the robotic car, connecting car motors with motor driver shield, and rest of the instructions are given in previous article.

Circuit Diagram:

Car_Blueetooth

  1. Connect HC-05 Bluetooth modules VCC with +5V of Arduino
  2. Connect HC-05 Bluetooth modules GND with GND of Arduino
  3. Connect HC-05 Bluetooth modules RX with TX1 of Arduino
  4. Connect HC-05 Bluetooth modules TX with RX1 of Arduino
  5. Connect Battery +ve terminal with +5 terminal of motor driver shield
  6. Connect Battery -ve terminal with GND terminal of motor driver shield
  7. Motor terminal connection are explained below:

M1 on outside = MOTOR1_A (+) north
M1 on inside = MOTOR1_B (-)
middle = GND
M2 on inside = MOTOR2_A (+)
M2 on outside = MOTOR2_B (-) south

Final assembled car will look like this:

IMAG1167.jpg

Android app:

The Carduino android app is available on github Carduino . This app performs following operations:

Screenshot_2017-06-11-20-19-561. Shows you a list of paired Bluetooth devices as shown in figure below:

Screenshot_2017-06-11-20-20-022. Allows you connect with Bluetooth device and send commands

Screenshot_2017-06-11-20-22-06

App is not very mature and you might face issue while using it. I will be working on it to make it more efficient. Please feel free to help me improve the app.

Arduino Code:

The Arduino code is available on github Carduino_Arduino. Arduino receives the commands via Bluetooth on RX1 port.  Whenever user presses any button from Carduino app, app sends a command to the car. Following commands are send from the device:

User Action Command Car
Up Button F Move Forward
Down Button B Move Backward
Left Button L Turn Left
Right Button R Turn Right
C Button C Connect socket
D Button D Disconnect Socket
S Button S Stop Car

Please feel free to get in touch if you have any questions/suggestions.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s