IOIO-SHR Java programmable robot

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.

Navigate around bump into walls

  • Actuators / output devices: 2x hacked servos
  • CPU: PIC24F, Qualcomm QSD 8250
  • Operating system: Android
  • Power source: 5xAA NiMH
  • Programming language: Java
  • Sensors / input devices: 2 Bumper switches
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/ioio-shr-java-programmable-robot

Sweet, I wonder if there is

Sweet, I wonder if there is an option to use Python under SL4A (scripting layer for Android).  It could definitely simplify Bluetooth comms, and it is extremely simple to access sensors like accelerometers.  I really like what you’ve done, and I think it would be great to use the phone as a WiFi camera for remote operation, whether in another room or over the net.

this looks SWEEEET

For your bumpers, what if you drilled more holes toward the front of the board and tied the zipties onto the board loosely? then they can still bump the switch.

Does the board draw power from the phone on the USB? Other way around? Neither?

Obviously the android’s sensors are a huge bonus, but what advantages does Java have over Wiring /C in terms of programming / bot behavior?

The IOIO board is USB host

The IOIO board is USB host and has to power the USB bus and the phone. But you can limit the charging current of the phone with  a trimmer on the IOIO board.

The advantage of this solution is, you need only one program that manages  the user interface and controls the hardware with simple commands like input.read() or pwm.setPuseWidth(). No need to think about serial protocols and to write parsers for both sides (hardware controller and phone) .

Don’t know much about Python

Don’t know much about Python and SL4A. I read about it in the IOIO forum to implement a SL4A interface to IOIO is on the users wishlist. Teleoperation is on my wishlist too.

very cool

This setup gives you lots of room for complex programs in the Android device.

How cool is that! Wonderful

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!

Thank you Ro-Bot-X.Did you

Thank you Ro-Bot-X.

Did you test the USB host with a tablet? I am sceptical about that USB host, if it will run on every tablet with honeycomb. Same like open accessory, it will depend on the manufacture if it will be supported or not.

wonderful!

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!

The USB2 host port(s) on a

The USB2 host port(s) on a tablet are designed to connect devices like keyboard, mouse, 3G dongle, etc. I had a cheap chinese tabled that I sold to get a phone that I later lost, so now I don’t have anything running Android. But I had one of my µBotino boards connected to the tablet through a cheap USB-serial cable. These cables have a Prolific chip insode instead of the FTDI chip. The Prolific chip is many times found in regular computer devices so the drivers are built in the Android OS. So the only thing you actually need to do is write your own app that talks with the Arduino. I was reading on how to do it, then I decided to get a phone instead and sold the tablet. Latter I discovered that the phone does not have a USB host port and I can’t do anything with that, but instead I could use the Bluetooth to connect to my µBotino. Unfortunately I lost the phone…

Great idea

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 :slight_smile:

 

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

Thank you. But the tie-wrap

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?

|x

 

That’s Rocket Brand Studio

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