Introduction: Bluetooth IOS DIY RC Car

Picture of Bluetooth IOS DIY RC Car

Hello everybody, today I will show you how I made a RC Car, that you can control via iOS. I know how hard it is to hook up a Bluetooth module to the iOS, so today I will show you how I did mine, and its actually quite simple.

Step 1: Parts List:

To get started, we will need to get an assortment of parts, mostly ranging to a total of $10-$20
- Wires (For connection from arduino to motor driver)
- Arduino (I used an uno, but I'm sure other types will work)
- 6 AA battery pack or 1 9V battery pack
- 1 L298n motor driver
- 4 tires
- 4 DC Motors
- Chassis of your choice (Recommend acrylic)
- 1 HM-10 Bluetooth Module

Step 2: Connections (Arduino to Motor Driver)

Picture of Connections (Arduino to Motor Driver)

We will start off with the connections, and get difficult part out of the way. On the arduino, there are pins called "DIGITAL PINS", we will use these to connect from the arduino to the motor driver. To start off, I recommend getting 6 different colored wires to connect. Once the wires are obtained, connect as follows.

- Digital Pin 11 on arduino goes to IND on motor driver
- Digital Pin 10 on arduino goes to INC on motor driver
- Digital Pin 9 on arduino goes to ENA on motor driver
- Digital Pin 8 on arduino goes to ENB on motor driver
- Digital Pin 6 on arduino goes to INB on motor driver
- Digital Pin 5 on arduino goes to INA on motor driver

For the power connections from the arduino to the motor driver
- Vin on arduino goes to VCC on motor driver
- GND on arduino goes to GND on motor driver

Step 3: Wheels and Motors

Picture of Wheels and Motors

For the wheels and motors, I essentially made my own design for the chassis and cut it on acrylic to have perfect spots for the motors. But if you do not have access to that, I would personally just make a motor holder type of thing for the wheels. The wheels are classic RC wheels, with a slot to put in where the motors would run. Once the motors are hooked up to the bottom of the chassis in your preferable choice, just simply slide the wheels on the ends. Once everything is set up, insert the wires from the end of the motors into the motor slots on the motor driver. It may take some fiddling around and switching the wires around, but you will know when they are in correctly.

Step 4: Bluetooth

Picture of Bluetooth

The Bluetooth is actually quite simple to connect. There will be 5 pins on the end of the Bluetooth module, the STATE and EN pin will not be essential for what we are doing. Simply again, get 4 wires, suggested different colors, and plug them into the RX, TX, GND, and VCC pins on the module.
Once the wires are on:
- Place the RX wire on the module into the TX slot on the arduino
- Place the TX wire on the module into the RX slot on the arduino
- Place the VCC wire on the module into the 5V slot on the arduino
- Place the GND wire on the module into one of the GND slots on the arduino

Step 5: Code

Picture of Code

The code is quite simple, but again quite complex. There are many things you may change on the code to make it go faster or to change the output letters for the serial, but here is a good place to start out.

Download HERE: http://www.mediafire.com/download/4ymjpcpfjt5x6sz/Bluetooth_RC_Code_with_iOS.ino

Once downloaded, upload your code to the arduino.

Step 6: App

Picture of App

The app I used is a free app on iOS called BLE Joystick. The app works wonderfully with the code provided. Once on the app, just connect via Bluetooth on the top right of the screen.

Step 7: Finish

To start up your car, just plug in the battery pack into your arduino. Keep all of your components on the top of your chassis via your choice.

Thank you for following my instructable, I hope you enjoy!

Comments

mikey116 (author)2017-03-12

Hi,

Even in your picture I see that

Bluetooth_RC_Code_with_iOS.ino

is missing a swtich statement for the variable named "command". I added it so it would compile. Yet, am unsuccessful at seeing the BLE Shield actually communicate with the Arduino in such a way as to fire one of the four inputs for the motor controller.

If you have a corrected .ino which perhaps would have some other problems corrected, could you please send me a link?

Thank you!

Mike

separk20 (author)2017-02-13

does this steer?

CJaco11 (author)2017-02-01

I have done everything, arduino is connected, motor module is up, bluetooth is connected, code is downloaded, but for some reason I cant get the battery to work. the board gets power when plugged into my computer, but I cannot seem to get the battery to work. i have tried many batteries so that is not the issue. Also, onI cannot find the bluetooth device and cannot connect to it. This is for a school project and I have a deadline soon, so any help would be greatly appreciated.

jfox1212 (author)2017-01-31

I get many errors when trying to upload my code, does anyone have any suggestions for this?

knutef (author)2017-01-05

Help me im getting these errors when uploading to arduino!

Bluetooth_RC_Code_with_iOS.ino: In function 'void loop()':

Bluetooth_RC_Code_with_iOS:33: error: case label ''a'' not within a switch statement

Bluetooth_RC_Code_with_iOS:35: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:36: error: case label ''c'' not within a switch statement

Bluetooth_RC_Code_with_iOS:38: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:39: error: case label ''d'' not within a switch statement

Bluetooth_RC_Code_with_iOS:41: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:42: error: case label ''b'' not within a switch statement

Bluetooth_RC_Code_with_iOS:44: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:45: error: case label ''G'' not within a switch statement

Bluetooth_RC_Code_with_iOS:47: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:48: error: case label ''I'' not within a switch statement

Bluetooth_RC_Code_with_iOS:50: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:51: error: case label ''H'' not within a switch statement

Bluetooth_RC_Code_with_iOS:53: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:54: error: case label ''J'' not within a switch statement

Bluetooth_RC_Code_with_iOS:56: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:57: error: case label ''0'' not within a switch statement

Bluetooth_RC_Code_with_iOS:59: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:60: error: case label ''1'' not within a switch statement

Bluetooth_RC_Code_with_iOS:62: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:63: error: case label ''2'' not within a switch statement

Bluetooth_RC_Code_with_iOS:65: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:66: error: case label ''3'' not within a switch statement

Bluetooth_RC_Code_with_iOS:68: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:69: error: case label ''4'' not within a switch statement

Bluetooth_RC_Code_with_iOS:71: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:72: error: case label ''5'' not within a switch statement

Bluetooth_RC_Code_with_iOS:74: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:75: error: case label ''6'' not within a switch statement

Bluetooth_RC_Code_with_iOS:77: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:78: error: case label ''7'' not within a switch statement

Bluetooth_RC_Code_with_iOS:80: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:81: error: case label ''8'' not within a switch statement

Bluetooth_RC_Code_with_iOS:83: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:84: error: case label ''9'' not within a switch statement

Bluetooth_RC_Code_with_iOS:86: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS:87: error: case label ''q'' not within a switch statement

Bluetooth_RC_Code_with_iOS:89: error: break statement not within loop or switch

Bluetooth_RC_Code_with_iOS.ino: At global scope:

Bluetooth_RC_Code_with_iOS:98: error: expected declaration before '}' token

eldho kurian (author)2016-10-05

It is not working when we run code it says that stop is not declared in this scope

KentS32 (author)eldho kurian2016-11-14

it dosnt work!

into15 (author)2016-08-01

What type of motors did you use?

PeanutButter15 (author)2016-05-23

That is AWESOME!!!

KNEXnCoding (author)2016-05-21

Wow! I need to get my hands on that Bluetooth part. This is cool!

wold630 (author)2016-05-19

Wow! Thanks for simplifying this!

About This Instructable

9,547views

89favorites

License:

More by hknott1244:Bluetooth iOS DIY RC Car
Add instructable to: