Friday, January 25, 2013

Go, Go, IOIO-On-The-Go!

A year and nine months passed since the first announcement on the IOIO. Eight months flew by since my announcement on the upcoming IOIO-OTG. Almost a year since I started development. Waaaaaay longer than planned. Everything that could have gone wrong went wrong. Hell, even some things that couldn't have gone wrong went wrong! But finally:


Let's start from scratch, as for some of the readers (who've spent the last two years on Mars) this might be your first encounter.

I/O for the I/O-less

The IOIO-OTG is a printed circuit board for electronics hobbyists and prototypers, which addresses a very common problem: how do I use my {computer, tablet, phone} to control my {robot, dish-washer, cat-feeder, etc.}. The original IOIO board was the first to offer a complete solution to this problem for Android devices. The IOIO-OTG adds PC support (Windows, Linux, OSX).

Unlike most other solutions, requiring you to write two pieces of software (board and client), at least one of which is typically complicated, the IOIO takes a different approach, by only requiring you to write the client-side (Android, PC) software, using a high-level programming language (currently Java) with a rich and intuitive API that allows you to manipulate the I/O pins and hardware peripherals on the board, giving you the experience that those I/O capabilities are actually an integral part of your client machine. This feature of the IOIO makes prototyping and development with it very fast and simple. Another great selling point is that it can work with virtually any Android device, even very old ones (Android 1.5 or higher), while most other boards would only work with the latest and greatest.

You can connect the IOIO to its client either over USB or over Bluetooth (using a standard dongle). The pre-installed firmware and the provided software library completely hide away the gory details of the underlying connection. The same code you write will work over either connection type seamlessly.

Smaller, Cheaper, Stronger

The IOIO-OTG is significantly smaller in size and/or cheaper and/or richer in features than alternative solutions. For example, in the Android world, the IOIO-OTG's I/O specs are comparable with an Arduino Mega ADK at a fraction of the size and cost and with all the software advantages mentioned above. In the PC world it would provide an attractive competition as well to boards of similar capabilities, and once again, the savings on software development time are huge.

To make it super-loud-and-clear: I'm not making a case that IOIO-OTG is better than Arduino or vice-versa. Arduino is awesome for what it's good at, which is IMHO for standalone operation. The IOIO boards were never intended to work standalone, but excel when it comes to offering I/O to an existing machine that lacks it. There is an ever increasing number of applications that fall into this category, especially due to the attractiveness of using Android devices in physical computing applications, getting tons of sensors, internet connectivity, lots of computation power, touch screen, etc. in a cheap, easy to use package.

Constantly Improving

The IOIO-OTG is all open-source, software, firmware and hardware. The development has been an ongoing process, with new features and bug fixes introduced on a regular basis. New versions of firmware are distributed in a way that makes it very simple for the user to upgrade: connect the IOIO-OTG to a PC and run a simple program to flash the latest version, or your own custom one if you're into such adventures. Download the software package with libraries and examples from the website and you're good to go.

Hardware Specs

That's what we're here for, aren't we? Here are the main features:
  • USB-OTG dual-role (host, device).
  • Input voltage: 5V-15V, from external source or through USB (when connected to a computer).
  • Output voltage: 5V, up to 3A (!), 3.3V, up to 500mA.
  • 46 I/O pins (digital I/O), built-in pull-ups / pull-downs / open-drain on all pins.
  • 16 Analog inputs.
  • 9 PWM (for driving servos, DC motors, dimming LEDs, etc).
  • 4 UART.
  • 3 TWI (I2C, SMBUS).
  • 3 SPI.
  • 6 Pulse Input (precise pulse-width / frequency measurement).
  • USB current limiting when acting as USB host (useful in Android mode).
  • Switch for forcing host mode (for using non-standard USB cables, which are more common than the standard ones...)
  • On-board LED under user control.
For those who know the IOIO V1, the main changes are the dual-role stuff, the beefier 5V regulator and two less I/O pins. There's also improved circuitry for cleaner analog input and better protection against user error (you can still fry it if you really want to :D)

Cutting Costs

My main goal in this project is to make it available and useful for as many people as possible. Really. No marketing BS here. This is not my day-job. One of the key factors in meeting this goal (assuming the product is great, of course) is making it affordable for as many people as possible. Making it cheaper also means people will be less frustrated if they happen to fry the board, and make people feel more comfortable leaving the board permanently attached to their project and buying a new one for the next project.

In that, I feel that I have yet to improve. We set our goal at $30 end-user price. It is currently about $40, and during the struggle to cut costs I decided to forego my own royalties of the product. I'm not particularly happy about it, to be honest, but I feel like I have done the right thing. I'm currently considering my options for how to reduce the end-user price while leaving a little something for myself too.

Coming Up

  • Raspberry Pi support. Already have a working prototype, but need to polish.
  • More applicative features: capacitive sensing, extended stepper motor control, encoder interface.


Luckily, I didn't do this alone!
Aaron Weiss from SparkFun took part of the board design and walked me through the winding road of getting a product out the door.
David Stadler designed the beautiful new graphics, which preserves (and improves) the yo-yo from the IOIO, but gets rid of the only-for-Android feel.
Kustaa Nyholm contributed his PureJavaComm library to the community, which opened the door for easy PC integration.
All the IOIO users, who are slowly turning into a nice community, gave me all the inspiration and motivation to keep working when things went the hard way.
My dear wife, kids and friends, who gave me the huge amount of support required for such a project and for patiently listening to my boring geeky stories all along.

Read More

Main IOIO homepage:
IOIO project gallery (links I'm collecting):


  1. It's awesome of you to leave out your royalties!
    I don't know many people who would do that for the community, and to be honest I don't even know if I could have done it myself, if I had invested lots of time into a project...

    Kudos to you!

    Btw. Do you have donation button somewhere? I would be happy to shell out some "voluntary royalties" :)

    1. Thanks for offering. Not accepting donations at the moment, maybe in the future. I am, however, looking into a more sustainable arrangement...

  2. Nice Work!

    I'm so glad that there are people like you!

    Thanks Thanks Thanks!

  3. I love to see that PICs are still be used. Barely visible through the Atmel smog, but still visible. Thanks for your hard work and everything you have done for this project. Cheers to you.

    1. With all the holy Atmel vs. PIC wars among hobbyists, people tend to forget that what matters is the application and then making the best microcontroller choice accordingly. Different requirements would call to different choices. If you want to get costs as low as possible, PIC is probably better in most cases. If you're on a tight schedule and already know AVR, or want to utilize existing AVR libraries, then AVR is the right choice.
      I'm trying to keep myself fluent with both (and ARM's too) and choose on a case-by-case basis.
      For the IOIO, the low cost, integrated USB-OTG and richness of peripherals (world's best at this price point) of the PIC24F drove the decision. They are amazing little chips :)

  4. least you could have given $1 royalty to yourself :-P

    Thanks for IOIO OTG...hope Adafruit creates a battery powered version of it :-)
    Next time, if you give Sparkfun an exclusive launch, make sure you put a deadline on their release date...seems like you finished it 3 months ago :-P

    1. Let's stop worrying about SparkFun stuff and royalties and try to focus on a great new IOIO version that came to life :)

  5. Innovative and really cost effective, too. That is really generous to leave out your royalties, it shows true dedication to the project.

  6. Great work Ytai, any place to support WIPI module.

    It will be great!!!

    1. I am planning to support a WiFi dongle, not necessarily this one. It is indeed a good idea.
      However, probably won't happen in the very near future.

    2. Let me know which model, it will be a great product if Wifi is enable directly.

  7. I have few questions:
    - does it work with bluetooth 3.0 dongle? I'm thinking about trying to stream some video and need higher bandwidth
    - does it work with bluetooth 4.0 low energy dongle?
    -is it somehow possible to upgrade firmware of older IOIO version to support OTG?

    1. BT 3 dongles work. Not sure about BT 4. Given your question about video streaming I suspect that you either don't understand exactly how the IOIO works, or rather you understand it so well that you feel comfortable enough to make extensive firmware changes :)
      In short, the IOIO covers common I/O use cases very easily, and requires much more work for specialized protocols. I'm also not sure whether BT is suitable for whatever you're trying to do and even more so BLE.

      It isn't possible to add OTG support via firmware upgrade. It requires hardware support that's only available on the new board (basically, being able to switch the VBUS line).

    2. Hi,
      Any new information out there about BLE (Bluetooth Low Energy - 4.0) support?
      (I could not find it in
      Thanks in advance ;-)

    3. There is currently no plan to support BLE. As far as dongles are concerned, I think most BLE-capable dongles are also capable of non-BLE operation. What is the feature that you'd like to see?

  8. Thanks for this great project, go on ....

  9. Very nice project!!!
    Will the raspberry pi version have a modified hardware or is it just software/firmware?

    1. Hardware and firmware will be untouched. The client-side will probably be very similar to the PC version, possibly with some very slight modifications.

  10. Thanks!!

    My question, is it possible somehow to have more than 5V output? some hobby servo requries up to 7.2V.

    Any ideas?

    1. The IOIO can be supplied by anywhere between 5V-15V and the input voltage is also exposed on the Vin pins on the board, as a convenient bypass for your circuit.

  11. Dear Ytai… are there any plans to build a Version 2 of IOIO OTG with more PWM and digital input/outputs?.. I love the product… and I would like to see a version that can handle a Hexapod with 18 servos.. :-)

  12. hi Ytai this is great product , i must say it is innovation by you. but lack of communities it is not gaining so popularity. I am java developer finding documentation and example of it but this project needs a saprate website or wiki,example like other open source project. i love your IOIO-OTG board but when i am developing with this i got lots of error. Because i am unable to find any book , only video is uploaded. but developers needs step by step documentation. I will provide u example/code with Netbeans8.0, Android Studio but i am unable to find jars ......related to project.

    1. Thanks for the feedback.
      There are many resources available:
      - The IOIO Wiki (on Github - very detailed).
      - Javadocs.
      - Several "Getting started" tutorials authored by different people.
      - A very active mailing list (ioio-users Google group).
      - At least two published books I'm aware of (English, Thai).
      - A Pinterest gallery with links to projects people have done.
      I completely agree that there is no single website that gathers all this information and structures it effectively, as one might expect for a commercial product. Indeed, the IOIO is not really a commercial product (to me), but mostly a hobby. Marketing has traditionally been quite low on my priority list :)
      You're more than welcome to contribute any of your own materials to the community. The wiki is free for everyone to edit!