Sunday, May 27, 2012

The Second Generation of IOIO is in the Works


It's been a little over a year since IOIO has been released. During this period it has been used by thousands of users world-wide, who published tens of amazing projects. IOIO has become the first and leading product for interfacing Android with external hardware. Several software / firmware upgrades have been successfully rolled out, which added new features and fixed bugs. Two different manufacturers (SparkFun, Jaycon Systems) currently make IOIOs and an alternative form factor boards from SeeedStudio are just starting to sell. A book has been published on making Android accessories with IOIO. I've given a few workshops on IOIO, one of which at the MIT Media Lab, which has always been a dream place for me. Quite a trip! I was expecting something much more modest when I started, but happily jumped on the train.

Why a New Version?

During the whole time, I've been constantly gathering user feedback and looking at other products in the same field and have kept asking myself "what is the most important thing to do next?". Eventually, two main points started to emerge, that could not be addressed by software alone:

  1. I find that the paradigm of controlling I/O pins remotely (i.e. from an off-board processor) using a high-level Java API works really well. It has proven really great when you can seamlessly move your connection from wired to wireless or when you can easily integrate the capabilities of the host (Android) with the capabilities that IOIO adds. It has proven great when users with Java-only background could now easily be able to communicate with hardware, without needing to write any embedded code and without needing to develop a communication protocol themselves. I believe this paradigm can be just as useful for the PC world. Currently, the standard way to control I/O from a PC is to use an Arduino or a similar board, and having to write two separate programs which communicate with each other. The bandwidth in this case would be typically limited to 115Kb/s, which is far less than what USB is capable of.
  2. IOIO is too expensive. Not for business reasons, because there's hardly any competition, and making it cheaper might actually decrease net revenue. But my goal is increasing the number of units sold and the number of happy users. I'd consider this project a success if IOIO became something everybody knows and loves, and considered the standard and obvious solution for enhancing a host computer with I/O capabilities.
It became apparent that there's enough motivation for a second generation. And so I started! SparkFun were as great as always, and have been very supportive on both goals.

So... What's New?

The next generation of IOIO will be a USB on-the-go (OTG) device. What this means in practice, is that the new IOIO will be capable of acting either as a USB host (like the current IOIO) or as a USB device (allowing it to connect to a PC as well as be powered by it). Moreover, it will be able to auto-detect which is the right role, according to whichever cable is connected to it (a micro-A or micro-B).
Making the IOIO an OTG device required some modifications to the power-supply module. While I'm at it, I've managed to design a module that is both cheaper and beefier (2A) than the current one. It will also have a resettable protection fuse and will handle current limiting more elegantly than the current IOIO (which simply has a resistor on the VBUS line).
I considered upgrading the microcontroller, but was happy to find out after searching a little, that the current one (PIC24F) is one of the most peripheral-rich micros out there if not the richest. Since this is the most important aspect of the microcontroller for this application, I decided to leave it alone. Other than that, I've made a few more nice-to-have changes, such as reducing the noise on the analog inputs and reorganizing the power supply pins in a more accessible way (having GND next to each supply).

The Development Process

In order to save time and money, and according to my beloved tradition, I made the first prototype by home-etching. In this case, I took an old IOIO and gave it a heart transplant to replace all that needed replacing. I wish there was an "ugly but works" contest...

Then it's software time! The firmware took some time to develop, but it is now close to completion. The IOIOLib part was the most fun. It ported from Android Java to PC Java totally smoothly. Finally, just in time for Maker Faire, I finished a fully functional demo, in which I'm running HelloIOIO on a PC, and controlling the IOIO LED over USB or Bluetooth!
SparkFun also moved quickly, and provided me with the "pretty but doesn't work" prototype pictured at the top of this post. The "doesn't work" part is probably the fault of my soldering, though :D. But it was working enough for demonstrating the new USB device functionality at Maker Faire.
So we're probably a couple of months away from production and official launch. It is possible that the initial release will ship new hardware, but with software only capable of USB host and I'll release the device mode in Beta first. Not sure yet. We shall see depending on my estimate of the risk at the time of launch.

Thanks!

I'd like to thank all of the users for their trust, support and feedback; to thank SparkFun for being the most awesome partners on the planet and most of all to thank for my family for putting up with my crazy hobbies and excessive work hours.

80 comments:

  1. Have you considered added a small PROM to store disconnect behavior or allow a standalone mode

    ReplyDelete
    Replies
    1. There's plenty of flash memory on the PIC. It can be used for these purposes.

      Delete
    2. Is if something on the to do list or is not pursuing a standalone mode

      Delete
    3. Currently, it seems that there are plenty of good solutions out there for standalone operation. So I'm trying to develop IOIO in what it does best, which is being an I/O provider for platforms that don't have their own I/O.

      Delete
    4. Just a suggestion -- maybe you could consider a separate IOIO-v2-Lite with a sole focus on reducing cost significantly (s.a. halving it), and paring down functionality to bare-minimum, i.e. allow Android devices to access physical-world via the USB-device port available on all Android devices, i.e. pretty much everything that IOIO today is, but at less than half the price.

      Delete
    5. How would you halve the cost? Most of the things on the IOIO are pretty bare-minimum already. You could possibly shave a little on the VREG, but I find that a 1.5A reg is useful in many cases.

      Delete
  2. Awesome work!

    Any progress on the Python code library? I would love to make something built purely on the python-for-android project?

    Did you consider adding a BT circuit onboard?

    ReplyDelete
    Replies
    1. Re Phyton, I don't know. I wasn't involved in that.
      Re BT, what's the point, given that a $2 dongle does the trick?

      Delete
  3. My question about Python was referring to your reply dated April 12, 2011 11:15 PM.
    http://ytai-mer.blogspot.se/2011/04/meet-ioio-io-for-android.html?showComment=1302639347938#c2483841068620584640
    "
    @scherbi The IOIO wire protocol is very simple and runs on top of a simple TCP socket. So one would definitely be able to implement it in Python with a high-level API within a couple of days' work. I'll publish the protocol spec along with the rest of the code."
    Has anyone else had a go with this?

    I will definitely buy your new version as soon as it is available! It great being able to connect to PC. Thanks.

    ReplyDelete
    Replies
    1. I don't know of such an implementation. There was someone on the ioio-users list whom intended to do this. You can try to contact him.

      Delete
  4. Hope this is not a stupid question but can I use Labview on a PC to control it?
    Thanks, This is Awesome, small and powerful.

    ReplyDelete
    Replies
    1. This is not a stupid question at all - it's an interesting idea that I haven't thought of!
      The answer is probably that initially not. But I may look into it in the future, or perhaps someone else would want to take on this effort (it is all open-source).

      Delete
  5. Sounds great!
    Will it use BT4? I'd love to use it with my iPhone...

    ReplyDelete
    Replies
    1. I don't currently have BT4 plans. It doesn't seem to add much value.
      I also don't have any iPhone support plans, but hey, it's all open-source, so if anyone wants to take on this effort I'll happily collaborate.

      Delete
    2. Actually I agree with all of your replies except this one. New Android phones are already coming with BT4 and if you plan to use the IOIO as either both host or slave, BT4 makes a lot of sense, since is very low power, which is very important for medical applications. Make no mistake BT4 is a game changer and will change the short-range communication world. It's NFC, Zigbee meets Bluetooth, meaning more secure short range communication and now you don't have to turn it off 99% of the time because is too power consuming.

      Anyways keep up the awesome job. As a ECE-bioengineering research BT4 is the only thing I see this new version missing. It will be compatible with BT4 dongle I will be first on the list of pre-orders :D.

      Delete
  6. Hey, this is great. I was looking for something like this to do my first steps in hardware hacking... (too many years of software development).

    Do you know if I can buy the IOIO in Israel?

    ReplyDelete
    Replies
    1. SparkFun ship world-wide. In Israel, DAN Electronics seem to stock them at a slightly higher price point.

      Delete
    2. Maybe there should be where-to-buy links in the sidebar, or the main page. It's kind of hard to find that info within this blog.

      Delete
    3. I'm trying to keep this blog business-free :) Just a place where I can share my creations with the world.
      Googling "ioio android" will surely get you to the right places.

      Delete
  7. Using dongles is a real great idea. I wonder, why the arduino people haven't thought of that. Especially enabling a WiFy dongle would have been a big thing, as there was some trouble with differnt shields and shields running out of production and so on. of course, they need to implement USB host stuff and TCP/IP stuff (which might now be inside the WiFly shield, i don't really know.)

    Plus, afaik USB is faster than arduino SPI.

    ReplyDelete
    Replies
    1. For Arduino it doesn't make a lot of sense, since the USB host is not a built-in part of it. But for IOIO it does. I previously had started looking at WiFi dongles. I found that unlike BT dongles, they are very non-standard (i.e. each one has a different interface and needs different drivers). I eventually found one chipset that is both cheap and common, and has the MAC layer implemented.
      There are also a few second-order challenges, such as how does the user select the SSID and enter the password, but I'm sure these can be solved.
      Then I got side-tracked to the IOIO V2, but I'm still hoping to catch up on the WiFi at some point, since I believe it is a big deal.

      Delete
    2. > but I'm still hoping to catch up on the WiFi at some point

      I will track your site. If WiFi becomes possible, I realy should not miss that news! :-)

      Delete
    3. Something new about wifi dongle support? Should be may ideal (and maybe unique) prototyping platform!!!

      Delete
    4. Agreed. However, I don't have any current plans to implement this in the foreseeable future. Could be great if someone steps up to make it happen.

      Delete
  8. awesome! Looking forward to getting one of the V2 ones :-)
    keep up the great work...hope to see it sooner than the fall though ;-)

    ReplyDelete
  9. What modif. would need the v1 to work as a OTG?

    ReplyDelete
    Replies
    1. Hardware-wise, mostly adjusting the power supply module so it can either supply 5V or consume 5V from the bus.
      Software-wise - a lot of mess :)

      Delete
  10. Looking forward to seeing the updated power supply schematic on github =) Thanks for the great work!

    ReplyDelete
  11. Great Job!!

    Could you please let us know when can we expect the new version available for ordering?

    Thanks

    ReplyDelete
    Replies
    1. My guess is a few weeks for completing development. Then there's manufacturing etc. which is beyond me.
      Stay tuned on this blog and/or the ioio-users group and you'll hear about it!

      Delete
  12. To make IOIO a household name, think Apple , McDonalds and others similar. These have made their populatiry, not on the strength of their product parameters, but rather on the standardized format.

    you use an iphone and it performs predictably
    you bite into a big mac and you know what it will taste like.

    neither of these has a superior product, quite the opposite in fact, yet the standardization of their product has been the key to their success.

    Of course Android thrives on open source and with that, comes the inevitable variations on a theme that leads to innovation. You don't want to strangle that kind of ingenuity, but you need a balance between out and out flexibility and usability of a standard device. Great product by the way. perhaps a series of adapters sold as an auxiliary package to the IOIO device purchase, to emphasize the connectability of the device ?

    ReplyDelete
    Replies
    1. A few separate attempts at a "connector shield" have been made by different people. I have no idea what the status is, but I don't think any of them became commercialized.
      Besides that, I don't want to be neither Apple or MacDonald's. I'll let them be them and keep doing what I enjoy :)
      I have no intentions to invest the marketing efforts required to make IOIO an outstanding commercial success. But you are very welcome to if you want :D

      Delete
  13. Fantastic. Looking forward to it! The auto-detect USB host/slave logic and circuitry is, for me, of particular interest. Any update on availability? Even in beta form as I don't mind finding/fixing a few bugs along the way.

    I'm also anxious to get my kids playing around with this. This would have to be cool for them!

    ReplyDelete
    Replies
    1. There is no magic here - merely implementation of the USB-OTG spec. You can read the spec or the datasheet of any compatible microcontroller to find out how this works.
      The new IOIOs will be ready soon. It is mostly production setup that we're waiting on now.

      Delete
  14. Sounds promising - I'm eager to check it out. Thanks for all the hard work! How goes that production setup? Any updated ETA?

    ReplyDelete
    Replies
    1. There was a delay as a result of a bug that was (fortunately) found in the board. A new revision is on its way, and if it passes the tests, it will probably not take long to start producing them (although I can say exactly how long, since it's out of my hands).
      I'll announce it on the blog and on the ioio-users list when it starts shipping.

      Delete
  15. As of yesterday, the hardware has been declared final and production should begin any day now. We're getting there...
    :)

    ReplyDelete
    Replies
    1. Excellent news! Looking forward to it!

      By the way, the captcha being used on the site is awful; ten attempts before this edit...

      Delete
  16. I'm planning on laying down the ioio board components on a custom robot board that I am making. Are the Eagle files available? Is a binary image available so that I can flash the chip on my new board?

    Thanks for the great work! All our students at Wintriss Technical Schools are using the ioio controlled by an Android phone and running Roombas for iARo'C 2012 (International Autonomous Robot Competition) in San Diego. Check out www.iaroc.org

    ReplyDelete
    Replies
    1. All the hardware and software are open-source. See here: https://github.com/ytai/ioio.
      The IOIO-OTG firmware / hardware will be published shortly after they start shipping (which should be very soon now).
      Feel free to share you project's progress on the ioio-users list. A lot of people there will be inspired I believe.

      Delete
  17. I wonder if it would be possible to add a library of IOIO functions to App Inventor, like e.g. Mindstorms? I know it is more a toy than a programming solution, but it still might be useful for a quick project, especially for those tinkerers who are not much into programming... It might also give IOIO a better exposure, I think.

    ReplyDelete
    Replies
    1. Agreed, and should be technically feasible. Personally, I don't have enough bandwidth to do that, and my previous attempts to encourage others to do that seem to have failed. I do hope someone will pick it up eventually - it is a compelling use-case.

      Delete
    2. IOIOScript provides a very simple way to program for the IOIO board using Javascript directly on your phone/tablet. It's recently been released on Google Play and comes with working samples... ideal for quick projects and tinkering and it also controls Mindstorms :)

      Delete
  18. Hi Ytai, will it be possible to flash the new firmware onto the current (old) ioio boards?

    ReplyDelete
    Replies
    1. No. If it were possible, I wouldn't have spun a new board.

      However, I will keep supporting the current boards: new application layer bundles will include images for both versions and the new host-side software library is compatible with both. In addition, any Android application you write, if built against the latest libraries will support both boards.

      Delete
  19. Last I heard from SparkFun, it should be a matter of a week or two. Hang in there... :)

    ReplyDelete
  20. Hi Ytai,
    I am currently creating a library for an Eagle-Library for the IOIO-Board,
    but now I am a bit confused. On your "Getting To Know The Board" Page are much more peripheral pins, than those "34-40 and 45-48" you mentioned on the UART and SPI pages?!
    Another question: is the new board pin-compatible with the current one?

    ReplyDelete
    Replies
    1. That's great! I bet you can easily derive your EAGLE parts from the freely available EAGLE files for IOIO (you know they're available, right?)

      The pins mentioned on the UART and SPI pages are just those that DO support these functions and HAVE NOT been marked as such on the board (due to a silk error). So the full list mentioned on the table you saw is the right one.

      The new board is not be exactly pin-compatible, but very similar.
      Its dimensions are the same including the mounting holes.
      As far as I/O pins, two pins have been canceled and two pins have additional capabilities. But pins 1-46 are exactly where they were on V1. The layout of the supply pins has changed. In addition, there's a new "boot" pin next to the mclr.
      I'll publish all the EAGLE files shortly after launch (which is fairly close).

      Delete
  21. Hello Ytai,

    The v2 board will be a standard double-sided PCB right ? No intermediate layers ?
    What would be the smallest SMD part used ?
    Did you ever happen to design (for prototyping, say) a completely SMD-free (fully PTH) version (barring the PIC itself, maybe), which works as well and can be taken the self-assembly way ? If so, can that be shared ?

    cheers.

    ReplyDelete
    Replies
    1. The v2 board is not very easy to solder by hand (although possible). It has a small QFN package, a fine-pitched TQFP and small passives.
      Join the ioio-dev group and search for a thread called "IOIO porting to PIC24FJ64GB002".

      Delete
  22. Sorry to be bugging you again, but do you have any news on the availability? It's still not too late to get one for Christmas :)

    ReplyDelete
    Replies
    1. At this point you might as well bug SparkFun customer support :)
      It is totally out of my hands...

      Delete
  23. Bugging unsuccessful - they don't seem to know much about it... They said "early 2013", but "it's an estimate".

    ReplyDelete
  24. I just spoke to them as well. They seem to want to sell out of the 10748 first and there appear to be unresolved design issues with the new revision. A few months' wait is to be expected.

    ReplyDelete
    Replies
    1. This is definitely WRONG. There have been some design issues that have been resolved over a month ago. The boards and parts are already there, and as far as I know assembly is in place, or should start any day.

      Also, I don't think there was ever any plan of getting rid of the V1 stock before starting selling the V2.

      If you got this information from SFE customer support recently, you have apparently been misled.

      Delete
  25. Ytai you are awesome , i would like to buy one, is the second generation of yoyo ready ???

    ReplyDelete
    Replies
    1. In a matter of days. SparkFun are doing the final polishes on the product page.

      Delete
  26. Awesome, is the pricing remaining the same?

    ReplyDelete
  27. Anyone have an update on availability? Couldn't find it on SparkFun.

    ReplyDelete
  28. Any idea if adafruit or seedstudio are going to be doing a Mint version w/ external power?
    Thanks for the work on it...wish SparkFun didn't drag their butts on it as I would have added one to a recent order from them :-(

    ReplyDelete
    Replies
    1. No idea about AdaFruit and SeeedStudio. I guess they themselves probably don't know yet. They'll probably wait to see where the wind is blowing with the IOIO-OTG. You might ask them directly.

      Delete
  29. SparkFun keeps restocking v1... I am afraid we will not see v2 soon.

    ReplyDelete
    Replies
    1. This getting slightly annoying... You came up with this conspiracy theory, and now you're jumping to wrong conclusions and misleading others.
      One last time: there is NO intention to get rid of V1 stocks before starting to sell V2. V1's will keep selling after V2 start selling and slowly fade out until there is no demand. The delays in V2 are unrelated and hopefully should resolve very soon. On the technical level, the V2 board are ready and in stock.

      Delete
  30. I apologize, it was not my intention to spread such rumors, perhaps you should delete that post in moderation.

    I will wait for V2 some more then, but I hope you understand that it is extremely difficult to wait in patience for the Christmas present when it is almost the end of January!

    ReplyDelete
    Replies
    1. Believe me that I'm at least as impatient. I hope this saga will be over soon. The product is ready.

      Delete
  31. Ordered! Can't wait to get my paws on this...

    ReplyDelete
  32. Sparkfun has the IOIO v2 up for sale:

    https://www.sparkfun.com/products/11343

    There's a note under the description that states you've forfeited your royalties on v2 to keep the price down. I hope this doesn't affect your motivation to continue to improve this board. :)

    ReplyDelete
  33. Is this have built-in Bluetooth ? Since the standard USB port is replaced with micro USB port, does it need a converter now ?

    ReplyDelete
    Replies
    1. There's an adapter cable that is supplied with the kit.

      Delete
  34. Very nice job. Just came across the IoIo and I was wondering if were finally able to adapt it so that we can use it mit app inventor?

    ReplyDelete
    Replies
    1. Not that I'm aware of. I'm really hoping someone will take on this task and do it! I would be awesome.

      Delete
  35. Finally got v2! On to the programming then... And thank you Ytai, it is indeed very generous of you!

    ReplyDelete
  36. Ytai, thanks for the great work! I read on another forum you were looking at implementing a one-wire interface. Is that still on your list? The DS18B20 temp sensor looks like it's becoming the new standard on Arduino but we can't use it with the IOIO :( It's pre-programmed serial number addressing is great.

    ReplyDelete
  37. Hi ytai, I'm not sure if this question has been asked and answered but I would like to know what is limiting the IOIO-OTG from being on accessory mode instead of host mode?

    ReplyDelete
    Replies
    1. AFAIK, the only limitation is some Android code that needs to be added to IOIOLib to support this mode.
      It'll surely happen at some point, until now I haven't found the time and nobody else stepped forward.

      Delete
  38. hi Ytai i was hoping if you can tell me how can i link a camera with ioio if i dont want to use another phone for that purpose??

    ReplyDelete
    Replies
    1. Can you please open a topic on ioio-users with this question and describe in more detail what you're trying to achieve?

      Delete