Android RC Car

 by a1r
  Hello and welcome to my second instructable, where we'll be modifying a cheap RC car to drive it with an Android smartphone over Bluetooth.
  Actually, this was my school project at the Lycée Jules Fil , so I had to produce a complete write-up. Unfortunately, it is in French, but if you want a really in-depth description of the system, and you understand french, you can download it HERE .

   I recommend that you read my first Instructable  for a more detailed explanation on how the thing works.

  The cost of following this instructable is something around 30~40$ if you already have the RC car.

  Disclaimer : In this instructable, you will be using dangerous chemicals (Acetone and Ferric Chloride) and dangerous tools (drill, saw, soldering iron,etc...). I can't be held responsible if you harm yourself following this guide. If you follow this instructable carefully, and protect yourself you won't get hurt.

  So, the RC car will be driven using the accelerometer sensor (like in iPhone/Android racing games) over bluetooth. For that, we'll be using an android app and arduino library named Amarino 2.0 . The system works a little bit like that : 

Accelerometer 
           |
           |     I²C
          \ /
Android Smartphone
           |
           |     Bluetooth
          \ /
Arduino
          |
          |     PWM / simple logic
         \ /
H-Bridge
          |
          |  
         \ /
Rear motor + Dir motor


Dont forget : If you liked my Instructable, please rate it , and let me know in the comments what you think about this Instructable, and what I could do to make it better ! Thanks !

Below is a little video demo :
 
Remove these adsRemove these ads by Signing Up

Step 1: Required Stuff

HPIM6840.JPG
2011-05-07_14-15-26_997.jpg
HPIM6830.JPG
HPIM6846.JPG
HPIM6849.JPG
HPIM6836.JPG
Required tools:

- solder iron with fine tip
- tiny solder wire
- good magnifying glass
- "Third hand" helping tool
- small drill press with small bits (~0.02 inch)
- good soldering skills
- hacksaw (used for cutting and shaping the pcb)
- 400 grit sandpaper (otionnal, used for smoothing rough edges after cutting the pcb)
- latex gloves
- Laser Printer (for the Toner Transfer method )
- iron (used to transfer the toner on the pcb)

Required chemicals:

- copper etchant (I use Ferric Chloride)
- Acetone

Required Parts:

- Arduino
- cheap RC car
- Android smartphone
- Bluetooth serial adapter
- 10k and 20 kOhm resistors
- 9V battery or LiPoly 2S (7.4V) battery or 7~8v RC battery pack (Using a rechargeable battery is MUCH better)
- small wires (IDE cable style, see the photo)
- 28 break away headers
- L293E H-Bridge  (or any 16-pin L293 variant)
- 16-pin DIP socket
- 9v battery clip
- blank PCB (Printed Circuit Board)
- magazine paper (for the Toner Transfer)

Required Software:

- Arduino IDE : get it here .
- Eagle CAD freeware edition : get it here .

Now that you have gathered all this stuff, let's go to step 2.
1-40 of 129Next »
Thom Kouwen says: May 12, 2013. 6:31 AM
For everybody with arduino IDE versions higher then 1.0: download the two files in the link below and replace the MeetAndroid.cpp and MeetAndroid.h in the library folder of the Arduino IDE with the new files. Then your code should work. Go to this link: http://code.google.com/p/android-bt-arduino/downloads/list and download the two files named "MeetAndroid.cpp" and "MeetAndroid.h".
a1r (author) in reply to Thom KouwenMay 12, 2013. 9:21 AM
Thanks buddy :P
kverula says: May 2, 2013. 5:25 AM
i try to change the battery but there is no improvement. When i use the multimeter in the every pin of IC there is no voltage output. so i think there is a problem in the IC.Need help for troubleshooting plz reply ASAP
kverula says: May 1, 2013. 11:55 PM
I already fixed the problem about the program and i already complete the wiring.when i try to pair with my android the output of the rc car is just a beep.why is that?plz help thx
kverula says: Apr 30, 2013. 8:37 PM
Plz help i have a problem in the program.This is the error

In file included from RCdroid.pde:6:
C:\Users\jonathan\Desktop\installer arduino\Arduino\arduino-1.0.4\libraries\MeetAndroid/MeetAndroid.h:104: error: conflicting return type specified for 'virtual void MeetAndroid::write(uint8_t)'
C:\Users\jonathan\Desktop\installer arduino\Arduino\arduino-1.0.4\hardware\gizduino-\cores\gizduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

i already followed the instructions but i still i encounter this.plz reply ASAP
sunand c s says: Apr 26, 2013. 2:39 AM
hi please send me the circuit diagram of this project.i am doing exactly the same project
my e-mail id sunandsuresh92@gmail.com
kverula says: Apr 25, 2013. 4:50 AM
I have a question, what if there is no stock for arduino duemilanove, what is other alternate arduino?
a1r (author) in reply to kverulaApr 25, 2013. 7:45 AM
You can use the Uno too
iabir says: Mar 29, 2013. 10:47 AM
i have a question.....is there any was to use bluetooth USB adapter instead of bluetooth serial adapter?...if yes then how?
mohdhafiz says: Mar 15, 2013. 3:22 AM
Jonathan:can i ask u..i know Proportional Speed ..
how to operation..
u can explain
intdata[0] = int(data[0]);
intdata[0] = intdata[0] * 24;
tq...
a1r (author) in reply to mohdhafizMar 15, 2013. 2:00 PM
Could ya please give me like the 10 lines of codes surrounding this, I can't figure out like that ... thx
mohdhafiz in reply to a1rMar 16, 2013. 12:18 AM
sorry to many question.
a)
}


void setup() {
Serial.begin(9600);
Serial.println("\t\t\t.----------------------.");
Serial.println("\t\t\t| Starting Up.. |");
Serial.println("\t\t\t'----------------------'");
pinMode(EnablePinDir, OUTPUT);
pinMode(EnablePinMotor, OUTPUT);
pinMode(LogicPin1Dir, OUTPUT);
pinMode(LogicPin2Dir, OUTPUT);
pinMode(LogicPin1Motor, OUTPUT);
pinMode(LogicPin2Motor, OUTPUT);
delay(1000);

Serial.println("\t\t\t.----------------------.");
Serial.println("\t\t\t| PG-R Ready ! |");
Serial.println("\t\t\t| Have Fun ! |");
Serial.println("\t\t\t'----------------------');


meetAndroid.registerFunction(floatValues, 'A');
}
-what the function..Serial.println("\t\t\t");
b)
// ..===========================================..
// || ||
// || Control Algorithm Beginning here ||
// || ||
// ''===========================================''


// This is for Forward/Reverse
if (-10<=data[0]<=10) {
// Tilt-Proportional Speed
intdata[0] = int(data[0]);
intdata[0] = intdata[0] * 24;
-why multiple "24";

TQ..:)
a1r (author) in reply to mohdhafizMar 18, 2013. 1:50 PM
The serial functions can be disabled, they're just here for debug
The multiply by 24 is here to adapt the data (ranges from -10 to 10) being sent to the motor controller (which gets -240 to 240).
mohdhafiz in reply to a1rMar 21, 2013. 11:07 AM
how to to identify the axis x or axis y in program?
mohdhafiz in reply to a1rMar 20, 2013. 12:13 PM
What effect I remove or not use Serial.println?.
-240 to 240 range ??..current or voltan.
I weak in the program,new venture into this field..
mohdhafiz says: Feb 25, 2013. 8:59 PM
Jonathan:tq,my project success..from help of you
a1r (author) in reply to mohdhafizFeb 26, 2013. 2:50 AM
Your welcome
asmuransyah says: Feb 23, 2013. 8:37 AM
jonathan thank you for your help? RC CAR dpat now I walk, it turns BT modules are problematic and I replaced it with a new one.
but? there is still a problem if the wheel goes forward, backward, left and right making a sound "BEEP"??
Why is that?? Is there something slah with my chip? but I have replaced it with the new still reads "BEEP"?
mohdhafiz in reply to asmuransyahFeb 23, 2013. 12:30 PM
asmuransyah:powerful enough,try battery change...
https://www.google.com.my/search?hl=en&sugexp=les%3B&gs_rn=4&gs_ri=psy-ab&tok=8b3jCZ6JwvaPeqLAqMbVoA&pq=battery+saver+for+android&cp=13&gs_id=3w&xhr=t&q=battery+sell+oakville&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.42768644,d.bmk&biw=1241&bih=640&um=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi&ei=iCQpUZ2FA9GGrAe4koEY#um=1&hl=en&tbm=isch&sa=1&q=+nicad%2Fnimh+pack+&oq=+nicad%2Fnimh+pack+&gs_l=img.3...18648.22262.4.22668.6.6.0.0.0.0.104.411.5j1.6.0...0.0...1c.1.4.img.w-I75WiewUc&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.42768644,d.bmk&fp=5d827613dcf2ae72&biw=1241&bih=640&imgrc=XaOe-ChZCQnjCM%3A%3B9B-Ph5aLnzBzIM%3Bhttp%253A%252F%252Fi00.i.aliimg.com%252Fphoto%252Fv3%252F235775702%252FNICD_AA_9_6v_battery_pack.jpg_250x250.jpg%3Bhttp%253A%252F%252Fwww.alibaba.com%252Fproduct-gs%252F235775702%252FNICD_AA_9_6v_battery_pack.html%3B250%3B236
maniza2204 says: Feb 22, 2013. 4:28 AM
im having problem with the programmed, could u plez help me ?
it says :
C:\Users\LaPtOp PuNoH\Desktop\mat\arduino-1.0\libraries\MeetAndroid/MeetAndroid.h:104: error: conflicting return type specified for 'virtual void MeetAndroid::write(uint8_t)'
C:\Users\LaPtOp PuNoH\Desktop\mat\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)

mohdhafiz in reply to maniza2204Feb 22, 2013. 11:27 AM
maniza2204 :read intruction correctly..
u must insert one libray android to sofware Arduino...
- Download the Amarino Arduino Library
- Extract it in your libraries folder : arduino_install_dir/libraries/extract_meetandroid.zip_here

asmuransyah:i see connect false..Motor d1 and motor d2,must connect parallel..
if you more disconcerted, check the circuit using circuit draw ..

Jonathan:I hope the tech is correct, if there are errors please show
a1r (author) in reply to mohdhafizFeb 22, 2013. 12:22 PM
Hum, you're right, you do have to install the library. BUT for asmuransyah's wiring, it IS in fact CORRECT: First of all the Init sequence does run, and secondly, I can't find any flaws by looking at his photos.

The issue comes from the BT module: either it's a 5V module and he should remove the resistor divider (ONLY if it's a 5V module), either he's using a different baud rate (I really think this is the problem).
asmuransyah in reply to a1rFeb 22, 2013. 9:42 PM
if init is the source sketch?? I do not know where init is???
please help me ... I really need your help???
a1r (author) in reply to asmuransyahFeb 23, 2013. 5:06 AM
Dude, if your car goes forward backward left then right, that means that the init sequence works just fine, and that you have nothing to worry about concerning your soldering job. BUT can you just give me the link where you bought the bt module ? If you don't, then I can't help you anymore.
a1r (author) in reply to a1rFeb 22, 2013. 12:23 PM
Oh and yeah, his soldering is also pretty messy and unfinished (i.e. he didn't heat the pads long enough) : that equals to poor signal transmission, it could also be an issue.
asmuransyah in reply to a1rFeb 22, 2013. 9:39 PM
so?? do i have to reset again for my car to be good in soldering ...
asmuransyah says: Feb 20, 2013. 6:16 PM
My RC CAR after me upload arduino sketch in arduino wheels front move left and right, for wheels back move forward and backward. But if me remote from smart phone cannot respond RC CAR.........
a1r (author) in reply to asmuransyahFeb 21, 2013. 9:47 AM
If the init sequence completes, then the Arduino/soldering part is done right --> the problem comes from the bt module: try to find a link to the datasheet/product page so I can have a look at it. Does the application successfully connects to the bt module?
asmuransyah says: Feb 20, 2013. 6:05 PM
Jonathan this my RC Car picture, please help me check wahts wrong this my RC car
IMG_20130220_215201.jpgIMG_20130220_215201.jpg
a1r (author) says: Feb 20, 2013. 11:29 AM
modhafiz: It seems either your chip is dead (i doubt that), or, more likely, your battery isn't powerful enough: try to use a nicad/nimh pack (7.4V or more) in place of the 9V battery.

asmuransyah: I'm gonna need more info: does the car make the init sequence or not (first, check that the init isn't commented in the Arduino code). Does it complete the full sequence (all directions) or reset before that? Again, there's a good chance that your 9V batt isn't powerful enough: use NiCad/NiMh.
asmuransyah says: Feb 20, 2013. 7:07 AM
jonathan i have check all the soldering? all seemingly well on the multimeter ... so what should I do to be able to make in the remote RC ...??
mohdhafiz says: Feb 20, 2013. 12:39 AM
Jonathan.I'm getting "beep" sounds,motor forward..
why motor not running..
Tq
asmuransyah in reply to mohdhafizFeb 20, 2013. 4:04 AM
hi mohdhafiz may i look u RC car?? can u upload u picture RC CAR...
mohdhafiz says: Feb 19, 2013. 10:26 PM
i double check solderimg using multimeter,it ok..no negligent...
i use ic l293d. and change l293b..same not respond motor...
Jonathan.?.thank you for guild me..
mohdhafiz says: Feb 19, 2013. 7:16 AM
Jonathan..i have the same problem as asmuransyah ..
data sent from my phone .rc car not respond..u can guild me?
a1r (author) in reply to mohdhafizFeb 19, 2013. 11:38 AM
Triple-check each step to make sure you have soldered everything right, and use a multimeter (in continuity tester "buzzer" mode) to check EVERY solder joint and while you're at it check the pcb too. When you are done, and if it still doesn't work, I'll try to help
mohdhafiz says: Feb 19, 2013. 7:15 AM
Jonathan..i have the same problem as asmuransyah ..
data sent from my phone .rc car not respond..u can guild me?
asmuransyah says: Feb 17, 2013. 8:33 PM
Jonathan?? i make the RC Car android with follow you instruction, but my phone cannot respond mobile RC CAr dan cannot remote. so how me make the phohe work and can remote the mobil...
a1r (author) in reply to asmuransyahFeb 18, 2013. 11:18 AM
Try to use an older version of arduino, like 0027 or something older. BTW, did you read ALL the comments, for a problem resembling yours that could have been already solved? Just sayin'
asmuransyah in reply to a1rFeb 18, 2013. 8:00 PM
y??? i had reade all comment but not 1 give me guid me for my TC car??? can u help me??
1-40 of 129Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!