Let's Make Robots!

IOIO-SHR Java programmable robot

RobotFreak's picture
Navigate around bump into walls
Cost to build: 
$150
Time to build: 
30 hours
Weight: 
800 grams

Introduction:

The IOIO-SHR is my first attempt in using Java to program a robot. Using a Sparkfun IOIO board to control the hardware and an Android phone as the robot brain. I must confess that I wasn't a friend of Java until yet, but the simple example programs for the IOIO board gave me a good starting point.

IOIO board:

The Sparkfun IOIO board is based on a PIC24F microcontroller. 48 IOs are available (digital I/O, analog In, special functions like I2C, SPI, PWM and UART). It has a USB host port to communicate with an Android phone via ADB interface (ADK is in an experimental state, Bluetooth can be done with an firmware upgrade).

The best thing is, you don't need to program the IOIO board. It has a builtin firmware to talk to the Android phone. You only have to use the IOIO library in your Android Java program to get things done. The IOIO Library is very well designed and easy to use, similar to program an Arduino. Sourcecode is freely available at Github.

 

Chassis:

The chassis is build from a 3mm piece of styrene. Google SketchUp has been used to make the layout and a drill template.

2 hacked (continous drive) servos has been used for the drive system. The 3rd wheel is made from a deo roll-on.

First tests:

For the first test of obstacle avoiding only 2 bumper sensors have been used. Not really elegant, but it is working. The bumper whiskers were made of cable ties applied to a snap-action switch. Unfortunately the whiskers fall apart very quickly. Need a better solution for this

.

Further tests:

  • Improve obstacle avoiding with a distance sensor.
  • Make a line follower

Todo List:

  • add a line sensor
  • add a distance sensor
  • change servos against DC geared motors and motor controller
  • improve battery runtime
  • find out how to record videos work in background on Android
  • use the Android sensors (accelerometers, compass...)
  • connect IOIO board and Android phone via bluetooth

Update 24.12.2011:

New Video is up. Showing Line follower behaviour.

A Pololu QTR-8A line sensor aray has been used. Cut into pieces you get a 2xline sensor and a 6x line sensor will analog outputs.

The Android app has been extended to show the line sensor values in digital voltage values and an analog progress bar. It is nice feature to see the sensor values in real time on the phone screen.

  
 Update 29.12.2011:

Sourcecode is now available here:
IOIO-SHR is getting more personality. Added a Compound Eye as object detection sensor mounted on a a servo pan/tilt unit. New video shows the first basic steps. Still need some more fine tuning.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kiwiclive's picture

You may even find it cheaper to use an android phone with all the allelerometers/compass etc rather than buying them and using from scratch. The question is, do you want to hot-glue some wheels to the bottom of your android :-)

 

I like your design fro bump sensors -using picroswitches and tie-wraps - ingenious !

RobotFreak's picture

Thank you. But the tie-wrap bumpers are crap. They fall apart too quickly.

The question is, do you want to hot-glue some wheels to the bottom of your android

You mean something like this?

 

Ro-Bot-X's picture

That's Rocket Brand Studio hardware powered by Android! Cool!!!

I like the idea of using commonly processing power such as phones for a processing unit, wjile taking advantage of its built in resources. Good work!

kingkong95's picture

This is brilliant. Considering that many people already own an android phone (myself included), this looks like a fantastically cheap way of giving a robot a massive amount of extra features! I've just read your post on using android debug mode with the fez domino, presumably this means I can also use my fez panda II with my android phone??

Is it possible to communicate with the phones hardware - such as GPS, wifi, camera etc.? It would be fantastic if I could add GPS, voice recognition, compass, camera, wifi, 3g, card reader and an accelerometer to my robot without spending any more money!

:D

RobotFreak's picture

Thank you kingkon95. You can modify your FEZ panda II to get USB host capabilites. Look here:

http://ghielectronics.blogspot.com/2011/03/usb-host-support-is-added-on-fez-panda.html

But than you will need a serial port instead, for deploy and debug programs.  I have used a Fez Domino for the FezBridge. The FezBridge isn't fully functional, at the moment. It will need some more work to get all things done.

Yes you can use all the sensors of your phone. GPS will not work inside of a building, but the rest should work. I want to do this, too.

kingkong95's picture

Thanks RobotFreak, it shouldn't be too hard to modify a usb cable as that blog suggests, but for now I think I'll go with robot-x's idea of sending sensor data over bluetooth :) Good luck with the FezBridge, I look forward to it's completion! 

RobotFreak's picture

Sure, bluetooth will work, too. I have done this with MASHR using the cellbot app. But I run into the problem to build my own Android app. It's more easier with IOIO and the IOIO-lib.

Ro-Bot-X's picture

Unless your phone has a USB host port, you need a IOIO or a ADK board between your fez Panda and your phone. So that will cost you some money. Another approach can be Bluetooth, built in the phone and a cheap bluetooth module for your panda. An app on the phone can send data by request to the panda or you can design an app to do all the thinking and send commands to the panda to read sensors and drive the motors and servos.

Ro-Bot-X's picture

How cool is that! Wonderful project. 

I guess if one uses a tablet instead of the phone, there is no need for a IOIO board, as the tablets have USB host already built in. Install Processing, plug in an Arduino and talk to it directly. A cheap 5" tablet can be used perfectly, with wireless access from your phone or computer. 

Cheers!