Introduction: CxemCAR 1 - Android Control RC Car Over Bluetooth

Picture of CxemCAR 1 - Android Control RC Car Over Bluetooth
This is a open source project of RC Car with control from Android Phone via Bluetooth. The controller is used with .NET Micro Framework: FEZ Panda II, but you may use any controller works with .NET Micro Framework core (Netduino, GHI Electronics board's and other). All source code is available at GitHub.

To control the machine using  4 different way:
  1. Accelerometer. Tilt forward - car goes forward, tilt to the left - car turns to the left, tilt back - car goes back. Speed of movement or rotation depends on how much you tilt the device. Sensitivity and value of the tilt set in the configuration Android-apps.
  2. On-Screen Buttons.
  3. Touch Control via virtual circle.
  4. Wheel Control - like virtual steering wheel.
More detailed see video:


Step 1: Assembly

Picture of Assembly

FEZ Panda II board to the chassis 4WD stuck with 2-sided scotch tape:

Step 2: Parts

Picture of Parts

For this project you need Android device with accelerometer and Bluetooth: tablet, smartphone and other... As an Android device, I used a cheap Chinese Phone "Jiayu g2s" with Android 4.1 OS.

Also you need any .NET Micro Framework board, Chassis, Bluetooth module (i'm use HC-06) and L298N Dual Bridge DC stepper Motor Driver module

Step 3: Calculations and Block Diagram

Picture of Calculations and Block Diagram

All calculations are performed in the Android-application, and immediately calculate the values of the PWM for the left and right motor. Application has flexible settings, such as the range of the PWM, the sensitivity of tilt, the minimum threshold for the PWM and other. Example commands transmitted by Bluetooth:
L-255\rR-120\r
L - the command to the left engine, R - for the right
A dash means the motor rotation to move back
255 - PWM value (for Arduino is the maximum speed of rotation)
\r - end of command.
On this command RC car will move forward and slightly rotated to the right, as right engine rotates slowly left.

L255\rR-255\r
On this command the left engine will rotate back and forward right, forcing a car to rotate around its axis counterclockwise.

H1\r
Command is an additional channel to which you can connect for example lights, sound, etc.

Symbols command L, R and H can be defined in the settings of Android-applications.

In the MCU control program provides a timer that shuts off the engine if the last command was received more than n-seconds ago. The data are stored in the EEPROM memory of the controller and can be changed from Android device. The range of this setting is from 0.1 seconds to 99.9 seconds. This setting can be disabled. To work with EEPROM provides commands: Fr - reading values and Fw - record values.

Step 4: Android Application

Picture of Android Application

The application for Android was written in Eclipse IDE. All sources of the project and the project for Eclipse, you can download from GitHub. Android version on your device must be > 3.0.

The application contains several activity. Main activity is a home screen with buttons running different operating modes and settings

MAC address

To establish a connection with the RC Car's Bluetooth module, you must set MAC-address in the application settings. But first, you must configure the pair the devices on Android-device: open Settings -> Bluetooth and click "Search for devices". When the phone finds our Bluetooth-module, click them and enter password for pairing (usually "1234")

To know Bluetooth module MAC-address possible from any application, such as Bluetooth Terminal. To do this, click "Connect a device - Secure" and in the resulting window, click the button "Scan for devices". Software will be scans the Bluetooth devices and displays them MAC-address.

Step 5: Assembly

Picture of Assembly

I soldered a Bluetooth-module to the FEZ Panda 2 and led status light. For communication between Arduino and Bluetooth, read this article: Arduino and Bluetooth. Module HC-06 placed in heat-shrink tube 10mm. Bluetooth-state LED with current limiting resistor (calculator) were also placed in heat-shrink tube.

Power DC motors are from the 3xLi-Po battery 3.7V 1100 mAh. The controller is powered by a single 3.7V Li-Po battery (although the required 5V, but works fine on 3.7V). Power supply of Bluetooth module is taken from the FEZ board.

Step 6: Source Code

Comments

dulpratt (author)2017-03-02

Thanks for the information about Android Control RC Car. Your instructions are very helpful. However, I was wondering if I do need to download all 3 of the source code on step #6 and uploaded them onto the Arduino IDE before making any configuration. please respond.

tankmonxk (author)2016-09-27

does this work on latest android version

NishanN2 (author)2016-07-05

How to download Cxem CAR 1.3??

TheH5 (author)2016-03-19

Hey the app says socket failed... any idea why and what's the fix?

jasonjason931 (author)2016-02-04

I cant find or figure out how to download the cxem car 1.0 program. the closest thing i can find is from the googleplay store called "wn-bluetooth car"

anyone have the program and willing to post it somewhere so i could get it??!!

mattia.colli1 (author)2015-08-05

how do i downlode the app on my phone?

madscience.rk (author)2015-03-25

how can i use atmega 328 board to this project..?

lWilmer (author)2015-03-04

kpalan (author)2014-12-23

I am not getting the Cxem CAR 1.3 App.

mukesh0121 (author)2014-11-22

hey i have made this project and it is successfull...

I only want to ask that how can i add an hc sr04 distance sensor in this project, please give me the arduino coding for this purpose, any help should be highly appreciated..

please email me the step for doing this on my id- mirnal.mannu123@gmail.com

or call me 8109948815

bbogdanmircea (author)2014-09-15

Very nice.

Can I use the application to control Arduino Uno robot with Bluetooth ?

pdantas (author)2013-07-23

Hi,

Nice work.
Have a look in http://pedrodantas.com/wp/2013/07/928/
I develop a robot with Fez Panda II, too.

About This Instructable

41,135views

60favorites

License:

Bio: I like Electronics, Robots and Arduino!
More by tolik777:Android controlled RC Vehicle with real-time Video via Bluetooth & Wi-FiCxemCAR 1 - Android Control RC Car over BluetoothArduino Ampermeter (ZXCT IC's)
Add instructable to: