You’ve probably seen commercials where a car has a built-in touch screen in the dash or watched movies where a house is almost completely controlled by a single tablet. Once upon a time, we would have thought scenes like that were from the future. That future, however, is now. With an Android tablet, the machine-to-machine (M2M) prospects are seemingly infinite.
How is this possible? Back in 2011, Google released what’s called The Open Accessory Protocol. This allows external USB hardware to interact with an Android device in a special accessory mode. The accessory mode allows the USB-connected accessory to act as a USB host, and the Android device acts in the USB accessory role. All accessories must provide 500mA at 5V for charging power.
Prior to the release of the Android Open Accessory (AOA), most Android-powered devices were only capable of acting as a USB device, and they were unable to initiate connections with external USB devices. With the AOA, accessories can initiate this connection and more easily interact with an Android tablet.
AOA is included in Android 3.1 (API Level 12) and higher and is supported through an add-on library for versions earlier than 3.1 (down to 2.3.4 – API Level 10). Android 4.1 and higher enjoys built-in support for audio output over USB or Bluetooth.
Roll your own
But what if you want to build your own accessory to communicate with an Android tablet? Here is the general information:
- Build your hardware device that can support USB host mode (make sure you follow the AOA protocol specifications (AOA 2.0 protocol is recommended for all new Android USB accessories)
- Review the ADK 2012 firmware source code (located in <adk-src>/adk2012/board/library/ADK2/) for information on general data communications and audio streaming
- Review the ADK 2012 Android application source code (located in <adk-src>/adk2012/app/) for information on connecting your device via USB
Electric Sheep
For those of you who want to integrate a device with Android, but you need the hardware to make it so, take a look at SparkFun’s Electric Sheep. The Electric Sheep is a development board that enables you to create accessories that can communicate with your Android device via the Open Accessory protocol. These boards run $79.95 each and feature the following:
- ATMEGA2560-16AU Microcontroller Pre-loaded with Mega 2560 Bootloader
- USB-Host Connector On-board for Connection to Android Devices
- Create Android Accessories using the Arduino IDE and HandBag
- Arduino-style Pin Configuration (Shield Compatible)
- FTDI Header for Programming
- Input Voltage: 6-15VDC
DragonBoard
Another company, BSQUARE, has created the DragonBoard that allows for the development of Android M2M devices. You can purchase the following DragonBoards:
- Snapdragon S1 MSM7x27A processor-based DragonBoard
- Qualcomm’s SnapdragonTM APQ8060 processor
- SnapdragonTM S4 Plus APQ8060A based DragonBoard
The DragonBoard APQ8060 features:
- Fully loaded, Android development platform
- Power of a PC plus innovation and development around Qualcomm’s APQ8060 chipset
- Early access to an inexpensive development platform that’s easily modified
- 2D and 3D graphics accelerators and Qualcomm’s Adreno 220 GPU for high-end game development
- Full suite of sensors and cameras, plus the capability to integrate and innovate with new sensors
- High quality audio codec for audio recording and playback
- HDMI 1080p video playback and stereoscopic 3D video playback for multimedia application development
Where this is all leading
As novels and movies have indicated, we are all heading into an era where technologies will collide and every appliance, auto, house, and gym will be controlled by smartphone or tablet. We’re already seeing this in the auto and appliance industries. Vaistech now offers the in Vehicle Infotainment Center (iVIC), which allows you to plug in your Android device and manage that device from a built-in dashboard monitor. The iVIC system also enjoys seamless integration of both audio and video into the auto’s built-in systems.
As for household appliances, Panasonic is the one manufacturer on the forefront of Android device integration. If you search “panasonic” on the Google Play Store, you’ll find apps to control various devices, including:
- Some VIERA televisions
- Some Blu-ray players
- LUMIX digital cameras
- Panasonic IP cameras
Panasonic also plans on introducing a line of appliances that use Near Field Communication (NFC) to allow Android devices to control and gather information from (or program) appliances like washers/dryers, refrigerators, and air conditioners. In addition, their plans include the release of home health tools (like blood pressure monitors and calorie meters) with Android integration.
Another company, INSTEON, has created an entire line of household products (lights, dimmers, HVAC controllers, security and motion detectors, sprinklers, energy monitors, and low voltage I/O controllers) that can be controlled via an Android device.
There have been other initiatives, such as Google’s Nexus Q and android@home, both of which have proven to be little more than vaporware at this point.
M2M communication has an incredibly bright and open future. With the help of an open protocol and developer tools (like the SDK) and various boards (like Electric Sheep and DragonBoards), the sky is quite literally the limit with Android tablets.
More resources
For a comprehensive look at the issues and technologies surrounding the Internet of Things and the emerging M2M ecosystem, check out ZDNet’s latest feature page, Tapping M2M: The Internet of Things.