Introduction: DIY Android Remote Control Car With Arduino

Picture of DIY Android Remote Control Car With Arduino

This is a step by step guide on how to build an Android phone or tablet controlled paper Car. You can modify it to build any other type of vehicle that you like.
Steps include guide on:

1. Building up the hardware of the car

2. Programming the Arduino UNO as the main engine ( controller) of the car from the sample code provided.

3. Writing an app with MIT app inventor and install it to Android phone or Tablet as the remote control unit, with sample provided.






Step 1: Get the Materials and Tools Ready

Picture of Get the Materials and Tools Ready

Before we start anything, we need to prepare materials and tools for the project.
Materials and Tools needed are listed as below together with link to where to get the item:

1. Cube Servos x2

2. rero Cube Joint x2
(soon in Cytron production)

3. rero Slim Wheels x4

4. rero Inter Connect

5. rero Rotatable Connect

6. rero Opener

7. Arduino UNO or Cytron UNO or Cytron UNO Special Edition

8. Cytron XBee Shield with Cytron BlueBee Module.

9. Cytron G15 Shield

10. Battery Pack (any battery pack with voltage more than 7V) , Battery Holder.

11. Cytron BlueBee.

12. Paper Box

13. Scissor

14. Cutter

15. Double Sided Tape

16. Paper glue

17. Plastic Card Board

Step 2: Get Ready the Car Base

Picture of Get Ready the Car Base

This Step shows the making of the car base to mount the Cube servo and Arduino board and shields. The car base is made from a plastic card board which you can easily get from stationary shop. 

Follow simple steps below:

1. In order to match the frame of the car which is made from a paper box later,trace the size of the box onto the plastic card board. My paper box dimension is 23.5cm x12cm x12cm (L x W x H).

2. Cut out the plastic card board following the traces that we made using a cutter with the help of a ruler. Make sure to cut a little smaller than what we had traced from the paper box just now so that the cut out can fit into the paper box. (see last picture, which the card board fit well into the paper box. 


Step 3: Prepare the Vehicle Wheels

Picture of Prepare the Vehicle Wheels

The car wheels will be made from the Cube Servo and Cube Joint attached with Rero's Wheel. We will create two set of wheels, ie. the driving back wheel with Cube Servo, and free running front wheel with Cube Joint and Rotatable Connect. 

Back Wheel with Cube Servo

1. Slide the Rero Wheel onto the Cube Servo Output Connect (Output Shaft). Do the same for both Cube Servo. 

2. Slide an Inter Connect into opposite surface of Cube Servo's output connect. Slide to connect both Cube Servo together back to back. (See picture below). 

3.

Front Wheel  with Cube Joint: 

1. Slide a rotatable connect to a Rero Wheel and do the same for the other wheel. 

2. Slide the Rero Wheel attached with rotatable connect onto a Cube Joint. Do the same for the other wheel. This will create two free running wheel on the Cube Joint. 

3. Slide an Inter Connect onto a cube joint on the surface which is opposite of the wheel, and connect both Cube Joint together with the Inter Connect. 




Step 4: Attach the Wheels to the Base

Picture of Attach the Wheels to the Base

In this step, we will make several cut out on the Plastic Card Board to give space for the wheels. 

1. Position the wheel to a suitable spacing on the card board. 

2. make markings on the side of the card board for both of the wheels (see picture below) . 

3. Draw straight line across the card board on the markings that was made just now. For my case, it is around 5.5cm from each end of base. This lines are the middle lines where the two set of the wheels will be place. 

4. Make cutting on the card board to fit the wheel (refer the fourth picture ). In my case, depth 1.8cm into card board for each of wheels and  width 7.5cm


5. Cube servo width is 4.5cm. Draw guideline to place the Cube Servo properly. Put on double side tape to the area that will be covered by Cube Servo with wheel. (refer picture). Press double sided tape firmly to the base.
 
6. Peel of double sided tape cover to reveal the sticky surface and stick the Cube Servo wheel assembly to the base (refer last two pictures. 


Step 5: Setting Up for Arduino and Shields

Picture of Setting Up for Arduino and Shields

We will setup the Arduino UNO, Cytron G15 Shield and Cytron XBee Shield as the controller of the car in this step. 

1. Connect the two Cube servo together, the male connector to the female connector (Cube servo are connected serially i.e. daisy chained). 

2. Setup the Cytron G15 Shield: set the jumper on board to select D3 and D2. 

3. Setup the Cytron XBee Shield: set the jumper on board to select D11 and D10.

4.Stack the Cytron G15 Shield onto Arduino UNO then Cytron XBee Shield onto Cytron G15 Shield. 

5. Fix the position of Arduino Stack and battery pack to the base using double sided tape on the other side of the base (opposite the surface where Cube Servo were sticked).  Please put more weight to the Cube Servo side (refer the fourth picture where both Arduino stack and battery pack are placed near to the Cube Servo side). 

6. Program the Arduino UNO ( download the source code below, compile and download the Arduino UNO).

7. Plug the the left over male connector of Cube Servo to the Cytron G15 Shield.


Step 6: Create the Android App With MIT App Inventor

Picture of Create the Android App With MIT App Inventor

This step is to create the Android App and download the App to the phone to use the phone as the remote controller. 

1. Go to the MIT App Inventor 2 page.

2. Click Create to start creating the app.  Login using Google Account. 

3. Click Project -> Import to import the project from the attachment below ( extract the RemoteWithAcc.zip file to get RemoteWithAcc.aia before import)

4. After Import was successful, click to open the project. 

5. If you wish to try the app, you can click Connect on the MIT App Inventor Page and select one of the options available according to your preference, I tested it with AI Companion which requires the installation of MIT APP Inventor 2 app from Play Store on the phone. 

6. If you wish to install the app directly to your phone, you can click on Build App (save to my computer) then download the app to your phone and install it. 


Step 7: Test Drive the Car

Picture of Test Drive the Car

We will test drive the car in this step: 

1. Upon successful installation of the app. Turn on the bluetooth on the phone manually. Pair the bluetooth of the phone with the BlueBee on the car. You will need to power on the the Arduino stack by now. (make sure the BlueBee is in transparent mode -Trans before power on). The pass key required for the pairing is 1234.

2. Open the App and press the bluetooth icon on the app, and select BlueBee to connect it. The label above the bluetooth icon will show Connected in green color if the connection was successful.

3. Now, test drive the car by tilting the phone to front, back and side to move the car forward, backward and turn left and right. The app use the accelerometer on phone to as the control. 



Step 8: Car Body With the Paper Box

Picture of Car Body With the Paper Box

If you are satisfied with the car without body, then your can skip the following steps. Following step will shows the making of the car body. 

1.Mark the Wheel center position on the box's sides. We will cut out semi-circle to fit for the wheel. The wheel center is around 5.5 cm from the ends of box for my case and adding some offset for the paper thickness (in my case 2mm) for each end. 

2. Use a compass to draw circles, set the center of semi-circle to the markings made just now. 

3. Cut out the semi-circle together with the bottom part of the box. 

4. Try to fit the base with wheel into the box (refer last picture). Make necessary modifications to the cutting to fit the wheels well. 

5. Lastly you can make some decorations and cuttings to the box to make it more like a car instead of cuboid box. 

6. I put some double sided tapes inside the car body to prevent the car base going to far into the body and wheels touch the body. 

Step 9: Ready to Go

Picture of Ready to Go

Lastly put on the car body and the car is ready to go!

Comments

PriyankaM21 (author)2017-07-10

Hey people, Check out on how i made an RC arduino car

https://youtu.be/Rv1_rLoA8uQ

Mimiproject (author)2016-01-31

Hi,
Great project. I'm planning on making a similar to robot. Can you please explain the bluetooth application I have no experience with MIT app inventor.

IngHui (author)Mimiproject2016-01-31

I think you can go through the basic tutorial on MIT app inventor on their website. Now there is newer version, MIT app Inventor 2 which is even better

Mimiproject (author)IngHui2016-01-31

Thanks for the swift reply.

i just wanted to know why is the timer required?

and why are the accelerometer if conditions > or <2?

IngHui (author)Mimiproject2016-02-01

I don't really remember the actual code already, but i think the timer is to check the accelerometer in a timely manner. you can modify the blocks to fit your application.

I check the accelerometer to be less than -2 or more than 2 to provide a dead zone of 4 i.e. -2 to 2 the car wont move. this is because its hard for our hand to hold the phone exactly at value of 0. If you set the condition to be >0 or <0. It will be very sensitive that when u slightly move the phone a bit, the car will move.

SyafiqS (author)2015-06-10

hi can i know where should i connect the wires..tq for help..

ImiV (author)SyafiqS2015-06-22

Vaguest question award goes to: SyafiqS

Also - can you tell me how do to the things and the stuff?

IngHui (author)SyafiqS2015-06-10

Which Wire?

for servos, the wire is connected to G15 Shield. for Battery wire, its connected to the arduino DC plug.

airfoil233 made it! (author)2014-06-26

Thanks a lot for the tutorial ! I made my own RC car, with sonar.

nick2420 (author)airfoil2332015-05-18

Hi friend can you help me to make the same for my daughter...

farihanadhirah (author)2015-05-15

Hi, I am using this instead of G15 shield, can you help me with the source code of arduino???

IngHui (author)farihanadhirah2015-05-15

Hi, from what I can guess from the picture, you are using L298 motor driver. I think you can easily Google it to get code on how to control the driver to move motor cw and ccw. In arduino code, just call the function to move the motor when the Bluetooth receive command from phone.you will need to read through the arduino code that I posted first, then modify and replace it for the code that I call the g15 driver with call to function of motor driver. Hope you can do it well.

YadavManish (author)2015-03-15

I have another doubt about servo motors apart from this
How can I control 2 3005servos without gettijerury jerk using Ardiuno

mal-shami (author)2014-09-26

HAI

can i know how can get the code? i have searched for a link to the codes, but cant find it!!

IngHui (author)mal-shami2014-09-28

https://www.instructables.com/files/orig/F07/RSF0/HQ7TLXDE/F07RSF0HQ7TLXDE.zip

IngHui (author)mal-shami2014-09-28

https://www.instructables.com/files/orig/F7A/LVEK/HQ730OXL/F7ALVEKHQ730OXL.zip

aoca1 (author)2014-09-05

I could send remotewithacc.zip to arielaudenino@hotmail.com

I would like to do the project

thank you very much

IngHui (author)aoca12014-09-12

You can download from the link above, just click it and the download will start

boyznowhere (author)2014-08-20

hi, so where do we connect the 4 wires from the cube servos? I am sorry for not understand everything

IngHui (author)boyznowhere2014-08-26

hi sorry for the late reply.

the servo has 3 wires: signal, Vin, and Gnd.

in this project the servo is connected to G15 shield which convert the half duplex signal on single signal wire of G15 into a normal UART TX and RX signal.

communication with Arduino will be UART commands and this commands protocol is made easy with the G15 shield Library.

visit this page for the library reference: https://code.google.com/p/cytron-g15-shield/

with this library the code will be as simple as

rotateCW();

SetSpeed();

etc..


NadaDiaElsaid (author)2014-07-07

I want the same project but I want to add a temperature sensor for the H bridge how can I do it ?

IngHui (author)NadaDiaElsaid2014-07-07

Hi thanks for viewing. The cube servo has internal temperature sensor and you can directly read the temperature from its table of control register. Refer to the arduino library reference of the g15 shield. It will be quite hard to access to the h bridge since it is build in to the cube servo.

IngHui (author)NadaDiaElsaid2014-07-07

Hi thanks for viewing. The cube servo has internal temperature sensor and you can directly read the temperature from its table of control register. Refer to the arduino library reference of the g15 shield. It will be quite hard to access to the h bridge since it is build in to the cube servo.

mmulyana (author)2014-06-13

nice

lgarcia44 (author)2014-01-11

Is it possible to make it faster?

IngHui (author)lgarcia442014-01-12

Hi lgarcia44,

thanks for viewing.

Its possible by changing to a larger diameter wheel to make it move faster.

Right now, this version of G15 Cube servo specification stated rotation speed is 63RPM at 12V, with high torque of 15kgcm.