Step 4: Why Connect the Phone Via Bluetooth?

The only way a Android phone can connect to the arduino via the serial (USB) port of the phone is if the phone is rooted. I didn't want to take the risk or live with the consequences of breaking into my own phone. The alternative is to connect by Bluetooth.

When selecting a Bluetooth modem I choose one that had extended range so I could use it for other projects. You don't need a class 1 (350 feet). For this application a class 2 (33 feet) will work just fine. I used the USB modem found here...


I used the following instructable on how to wire it...

Note: Whenever you need to upload you code to the arduino you need to first disconnect the positive lead of the bluetooth modem from power. If you don't the uploader will error. The bluetooth modem uses the same pins that are used by the USB connection on the Arduino.

OK, this takes care of the wiring but it doesn't tell you anything about actually using the modem. We will get to that in a later step. The thing to remember is that the communication speed (baud rate) of the modem by default from the factory comes as 115200. So you will need to change your arduino to match. I'll get into that in a later step as well.

The picture is borrowed from the manufacturer because mine is buried too deep to show.

While the modem has 6 wiring points you only need 4 for the arduino - +5v, Ground, RX (receive), TX (transmit). The Arduino pins 1 and 2 have RX and TX on them as well. The wiring is reversed so that the receiving side listens to the transmitting side RX to TX and TX to RX. I recommend either using 22 gauge solid core copper wire for the leads, so they can be pressed into the arduino, or wiring in some male leads.

For the sake of clarity, the phone and the modem both ride on the bot so the distance between them is very short.
<p>Nice work! We built a similar project. However, we installed the Android device onto a RC car and used an IOIO board instead to control it autonomously. Here is the preliminary result:<br><br><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/vkvkfcqEUkk" width="500"></iframe></p>
Hello, <br> <br>I can see how a phone running android can control the robot through Bluetooth. I am having trouble understanding how a remote phone can call the robots phone, connected to Bluetooth running the original application, and control the robot. <br> <br>Can you explain this as I do not use Bluetooth or own an Android capable phone, yet? <br> <br>Thanks, <br>
I think your adapted code is missing.
The instructable was corrupted so I published unfinished rather than making it worse. They managed to fix it. I have added the adapted code which includes battery voltage detection and voltage regulator control. I'll have to finish the instructable in the coming days.

About This Instructable



More by wdsparrow:4 Servo drive CellBot which can be remotely controlled. 
Add instructable to: