Turn Your Phone Into a Robot

by CallMeSwal in Circuits > Mobile

26878 Views, 57 Favorites, 0 Comments

Turn Your Phone Into a Robot

PhoneBOT: Turn Your Phone Into a Robot
55ecf37315be4de7cc00027a.jpeg
IMG_0018.JPG
IMG_0022.JPG

Introducing PhoneBOT!

A cheap, easy, and quick method for converting an Android phone into a reprogrammable robot. No additional hardware(micro-controllers, motor drivers, etc.) required!

You will be able to drive a completed PhoneBOT from your PC. You will also be able to reprogram your robot to perform many other tasks.

Hat tip to DrMaker. His instructable helped with making the app and removed any need for coffee during the project.

Another hat tip to Jim MacArther for designing the drive circuit.

About PhoneBOT

IMG_0019.JPG
IMG_0012.JPG
IMG_0003.JPG
IMG_0023.JPG

What makes PhoneBOT so great?

Most hobby robots are powered by an Arduino or some other microcontroller. The user must buy a frustrating amount of extensions and add ons, like Bluetooth modules and motor shields, to improve the robot's functionality. A PhoneBOT is powered by a phone. The user can program a PhoneBOT to access the phone's hardware. With PhoneBOT, the user can build a robot with tons of features, such as Bluetooth, GPS, WiFi, etc, at a fraction of the cost. Building an equally powerful Arduino or Raspberry Pi robot can cost hundreds of dollars. PhoneBOT's aim is to be the perfect entry level robot. Cost, difficulty, and time consumption are the biggest priorities. Therefore, no special skills or tools are required to construct a PhoneBOT. You may consider building a robot with a Phone and an Arduino. A arduino can compliment a phone very well. However, I feel there is not a strong need for an arduino when you already have a phone.

TL; DR PhoneBOT can make anyone a powerful roboticist. Cue Evil Laugh

How does it work?

PhoneBOT is composed of an Android phone, two continuous servos and wheels(modded), a pair of head phones(preferably broken), a 9V battery, and a 3D Printed Base(optional). When these objects are assembled we have a robot that can be programmed to do a great number of things. The default program allows you to remotely drive the robot from a PC.

PhoneBOT controls the drive servos with music(might not be your taste). The servos are connected to the phone's headphone jack. The phone drives the servos by emitting particular sound waves. PhoneBOT is programmed with an app called Protocoder. This is a coding environment, made by Victor Diaz, that allows the user to program the robot with Javascript and access the phone's hardware.

Tools and Materials

2_2.jpg
2_1.jpg
2_3.jpg
2_6.PNG

Materials

  • Two Continuous Rotation Servos(I'm using Fitech FS90. You can mod any servo to be continuous in about 10 minutes.)
  • Hobby Wire
  • 9V Battery and battery pack
  • Headphones(Preferably broken)
  • Two 1/4-20 Bolts
  • Marble and Plastic Bottle cap(We'll use these to make a castor wheel)
  • One Elastic
  • Old Breadboard(Optional, Warning: Lack of breadboard may cause infrequent cursing.)
  • Four 10K Resistors
  • Four 2N3904 NPN Transistors (or any similar NPN transistors, like BC107, BC108, etc)
  • An Android Phone(Some android devices work and some are't capable of driving the servos. A general benchmark are phones and tablets made after 2011 can be used to make a PhoneBOT. I have personally tested the following devices.)
    • Devices that Work
      • Nexus 4
      • Samsung Galaxy Tab
      • LG G3
    • Devices that don't Work
      • Huawei Ascend D1

Tools

  • Soldering Iron
  • Something to strip wire with
  • Sandpaper
  • Access to 3D Printer for printing base(Optional, you can make a similar structure from another material. Feel free to be original with your structure.)
  • Hot Glue Gun

Make Base

IMG_20150808_130825[1].jpg
2_6.PNG
Image.png

If you have access to a 3D Printer, print the above STL file.

Otherwise, construct the base structure from another material. Feel free to be original and creative with your base. In fact, I highly encourage it. The only requirement is that your phone can attach to the structure.

FYI: I'm sandwiching my phone in the base's U-Shape feature. I'm clamping the phone in place with two 1/4-20 bolts. I'm ensuring no possibility of damage by placing padding between the phone and bolt.

Downloads

Cut and Strip Headphones

3_3.jpg
3_1.jpg
4_3.jpg

Cut the headphones a few inches from the audio jack. Throw away the half that does not have the audio jack. Or keep it and make a groovy necklace; whatever floats your boat.

Strip away two inches of material.

Sand and Solder Headphones

4_2.jpg
4_8.jpg
4_12.jpg

There will be three or four stranded wires inside the casing; two wires of solid colour, in my case red and green, and a ground wire. These are the only wires that matter to us. Feel free to snip away any other wire(s).

All three wires will be insulated with vinyl. Sand the wires until you see a copper like colour.

Solder a piece of solid wire to each stranded wire. Wrap your work in electrical tape and label each wire.

Congratulations! You have completed the most complex part of this Instructable.

Make Battery Holder

IMG_20150828_231241[1].jpg

Now we're going to make our highly advanced battery holder.

Cut the elastic and tie it around the back holes of the base.

I also glued a small breadboard to the front of the base. This is not required.

Make Castor Wheel

IMG_20150828_231224[1].jpg
8_2.jpg

Cut a small hole, slightly smaller than the marble, in the bottle cap. Insert the marble in this hole and glue the cap to the base.

Attach Wheels to Servo

IMG_20150828_224639[1].jpg

We're going to use a highly robust method for attaching the wheels to the servo horns. Glue them on.

Ensure the wheels are as centered as possible.

Attach Servos to Base

IMG_20150828_233119[1].jpg
IMG_20150828_233244[1].jpg
IMG_20150828_234251[1].jpg

Notice the incredibly useful mounting holes on each servo. Now forget about them! We're using glue. Simply, glue the servos to the back of the base.

Complete Phone Holder

11_1.jpg

Screw the 1/4-20 bolts into the base's front holes. The holes are just the right size for tapping.

Unfortunately, you cannot use any lubricant, so you will probably be saying "SCREW YOU" during the process.

Wire the Robot

robotSchematic2_bb.png
IMG_20150905_221719.jpg
IMG_20150905_221745.jpg

Wire up each servo as shown in the diagram. Obviously, connect the left headphone wire to the left servo and the right headphone wire to the right servo.

I've added a small switch for convenience. This is optional.

Install Protocoder

IMG_20150828_234243[1].jpg
IMG_20150828_234149[1].jpg
15_1.jpg
15_2.PNG

Congratulations! You have finished building your PhoneBOT.

Now, install Protocoder on your phone. Protocoder, made by Victor Diaz, is an easy to use coding environment for making Android apps.

Install the App

Finally let us install the driving app.

Open your phone's file manager.

Navigate to > protocoder > projects.

Extract and Paste the above folder in this location.

Downloads

Drive Your Robot

ScreenUI.JPG
IMG_0006.JPG
16_2.png
16_5.png
16_7.png
16_6.png
16_4.png

All right, its time to drive our PhoneBOT!

Ensure your Robot and PC are connected to the same WiFi network.

Raise your phone volume to the max.

Open protocoder and note down the given IP address. Type the IP address in your PC's web browser. Now, run PhoneBOT_Drive.js on your phone.

A new UI will open on your phone and PC. Use the PC UI to drive the robot. Use the phone UI to change the robot's face.

Future

So, we have a drivable robot. What next?

We can use Protocoder to make more apps. Remember, GPS, accelerometers, bluetooth, and a lot more is at your disposal. Think big and then think bigger.