Using Google’s ADK on standard Arduino hardware

adk_on_arduino

When we heard that Google’s open accessory development standard was forthcoming, we were pretty excited. However once we heard that the reference hardware kit was going to cost nearly $400, our thoughts changed to, “Surely you can’t be serious.”

Well, Google is dead serious (and we hear they don’t take kindly to being called Shirley either.)

With such a ridiculous asking price, it was only a matter of time before someone tried getting the ADK software running on vanilla Arduino hardware. [Inopia] wrote in letting us know that he did just that.

Using an Arduino Uno and a Sparkfun USB shield, he was able to get the ADK working without a lot of fuss. He tweaked the ADK firmware image in order to bypass a couple of hardcoded pin assignments Google made, and he was good to go. The image boots just fine, though he can’t necessarily guarantee that his setup works with an Android handset, as he doesn’t currently own one that supports accessory mode.

Now that just about anyone can get their hands on the ADK at a reasonable price, we look forward to seeing what you can put together!

Comments

  1. This is the guy who did the Microbridge, for the record. Expect a Propeller port soon.

  2. g says:

    Microchip offer an $80 example board that’s less impressive and won’t be out for a while http://www.microchip.com/android

  3. MattQ says:

    This is awesome. Google can release open source hardware, but just covering their own cost of engineering will keep the price tag well out of the range of most hobbyists.

  4. phisrow says:

    I fairly strongly suspect that(in combination with the availability of the firmware and the basis on a well-known piece of open hardware) the $400 price is basically a polite way of saying “Yes, we will provide Official Dev Hardware if the VP of something or other simply must have it; but we really don’t have the slightest interest in getting into hardware logistics any more intensive than hand-outs at dev conferences…”

  5. The beauty of OSHW ;)

  6. Zilog8 says:

    @ phisrow

    I was having the same thought, especially considering the semi-failure that Google’s direct sale of the Nexus One turned into.

  7. Derrick says:

    And here I thought I had entered the amount incorrectly into the converter….

    I’m surprised their cost is this high for what is essentially commodity hardware. As mentioned, I’m sure most of it is the cost of their engineering, but could it of really been that involved? Or are they just expecting to not sell many?

    But as previously mentioned, situations like these make me glad for OSHW.

  8. Squirrel says:

    “I am serious… and don’t call me Shirley”

  9. Anon says:

    Things are much clearer if you read the source material for the articles.

    Google don’t make the current standard implementation board (which includes a shield btw) and you don’t buy it from Google. They even point you to a PIC based solution.

    From http://developer.android.com/guide/topics/usb/adk.html:

    The Android Open Accessory Development Kit (ADK) provides an implementation of an Android USB accessory that is based on the Arduino open source electronics prototyping platform, the accessory’s hardware design files, code that implements the accessory’s firmware, and the Android application that interacts with the accessory. The hardware design files and code are contained in the ADK package download. You can buy the hardware components of the ADK if you do not already have them. There is also a PIC based USB microcontroller that is not based on the ADK design, but that you can still use to create your own Android open accessories. We expect more hardware distributers to create a variety of kits, so please stay tuned for further developments.

    The main hardware and software components of the ADK include:

    1) A USB micro-controller board that is based on the Arduino Mega2560 and Circuits@Home USB Host Shield designs (now referred to as the ADK board), which you will later implement as an Android USB accessory. The ADK board provides input and output pins that you can implement through the use of attachments called “shields.” Custom firmware, written in C++, is installed on the board to define the board’s functionality and interaction with the attached shield and Android-powered device. The hardware design files for the board are located in hardware/ directory.
    2) An Android Demo Shield (ADK shield) that affixes atop the ADK board implements the input and output points on the board. These implementations include a joystick, LED outputs, and temperature and light sensors. You can create or buy your own shields or wire your own features to the ADK board to implement custom functionality. The hardware design files for the shield are located in hardware/.
    A library based on the Arduino USB Host Shield library provides the logic for the USB micro-controller board to act as a USB Host. This allows the board to initiate transactions with USB devices. Describing how to use this entire library is out of the scope of this document. Where needed, this document points out important interactions with the library. For more information, see the source code for the Arduino USB Host Shield library in the firmware/arduino_libs/USB_Host_Shield directory.
    3) An Arduino sketch, firmware/demokit/demokit.pde, defines the firmware that runs on the ADK board and is written in C++. The sketch calls the Android accessory protocol library to interact with the Android-powered device. It also sends data from the ADK board and shield to the Android application and receives data from the Android application and outputs it to the ADK board and shield.
    4) The Android accessory protocol library, which is located in the firmware/arduino_libs/AndroidAccessory directory. This library defines how to enumerate the bus, find a connected Android-powered device that supports accessory mode, and how to setup communication with the device.
    5) Other third party libraries to support the ADK board’s functionality:
    CapSense library
    I2C / TWI (Two-Wire Interface) library
    Servo library
    Spi library
    Wire library
    6) An Android application, DemoKit, that communicates with the ADK board and shield. The source for this project is in the app/ directory.

  10. lwatcdr says:

    So what handsets support the ADK?

  11. sayit says:

    The same author trash talks the ADK and says to use the IOIO instead:

    http://romfont.com/2011/05/11/a-closer-look-at-googles-open-accessory-development-kit/

  12. All handsets support ADK. I also sell a $40 board that is Propeller based and works the same as the IOIO (I’d like to point out that mine went on market earlier than the IOIO).

    I thoroughly agree with inopia on the new standard being much worse than ADB.

  13. Daid says:

    ADK is supported from Android version 2.3.4 according to the ADK pages. And 3.1 supports it.

    The amount of handsets supporting 2.3.4 or 3.1 is very limited, I think limited to… virtually no consumer devices right now.

  14. Oren Beck says:

    OSHW models tend to have a curve of time~money based on how Vanilla the components+process tech are. And a cost multiplier or divisor by if you’re making a run of one or one thousand or ten million. If you design OSHW in the older models of “ThomCat” or “Grainger’s” sourcing the replication curve factors get a lower supply chain headache aspect but at WAY higher costs.

    Buying a single ADK for the $400 might make sense r for a corp seeking to just use it- but NOT for us Hackers. And thus- we will clone it ASAP:>

  15. Noggin says:

    2.3.4 is available as 3rd party roms, such as the fantastic CyanogenMod. This runs on dozens of different handsets.

  16. steaky says:

    microchip are releasing source for their version in about 2 wks

  17. pol51 says:

    2.3.4 is also officially available for Nexus One and Nexus S

  18. WildZBill says:

    The SDK has a simulator for the 3.1 Android, so a developer can at least make it work.

  19. Taylor Alexander says:

    What Noggin said is true, there are literally dozens of people with phones that support this.

    ;)

  20. Chris says:

    Looking at the article and documentation on google’s android site for the ADK, I don’t see anything that specifically requires you to use either of the two solutions posted. I may be wrong, but it’s looking to me like I could create my own board using whatever microcontroller I want (not just an Arduino or pic), written in any language I want, and communicate with an android device over USB. Anyone else have thoughts on this?

  21. Cloning an bog standart Atmega circuit with an USB host chip from Maxim, copy pasted from the datasheet, really black magic going on there…

  22. romfont says:

    @taylor, noggin: on which phones did you verify this? I tried CM7 (2.3.4) on my Blade, but it didn’t work for me (shared library not found, and the phone also didn’t go into accessory mode).

    @chris: you’re right. So far people got ADK working on pic24, propeller, and others.

  23. lokino says:

    Confirmed working. Look at this video

  24. Oleg Mazurov says:
  25. Eric says:

    Wow, looks like the ADK could be awesome. For hobbyists, the IOIO is a clear winner. I understand Google’s decision not to use ADB for security reasons when it comes to products that will go commercial.
    Now I really need to think of a cool accessory to make for my motorcycle so I can plug in my Droid X and control something or get info from it. How hard is it to interface with an ECU to get speed, RPM, and gear information?

  26. error404 says:

    $400 is really not an out of the ordinary price for a professional development board, I don’t know why people are so up in arms about it.

    It’s well documented and will be copied, as I’m sure Google intends. The ‘product’ is for people building Android-compatible external widgets.

  27. Djhg2000 says:

    So what exactly prevents us from using the ADK interface with a PC?

    This should be pretty straight forward from within Linux using libusb, right?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,672 other followers