By Hazim Bitar (techbitar.com)
For Arduino prototypers who needed additional computing power, be it for image processing or other CPU-intensive applications, Windows/Intel computers made a logical first choice simply because of their availability and ease of interface to Arduino using solutions such as FTDI's USB to RS232. But the cost, bulkiness of Windows/Intel platform and the closed source OS left an open niche to be filled with compact and inexpensive alternatives. Enter the Raspberry Pi.
The affordable and diminutive SoC-based Raspberry Pi ($40) has become a popular choice for prototypers since its introduction a couple of years ago. With more SoC (System on a Chip) solutions in the pipeline such as the Arduino TRE and Galileo, it's reasonable to ask this question: if you already own an Android device with a powerful ARM processor, GPU, sensors, and multimedia features why not leverage it for prototyping and hacking?
If you are an obsessive compulsive electronics prototyper like me you will soon discover that adding additional electronic components and functionality to Arduino or Raspberry Pi will obviate the initial low-cost of ownership. In my case, it adds up to over $400 in component purchases. (See attached table). Most of those components already exist in the majority of mid-range Android smartphones and tablets that are already in wide global circulation.
Built-in components such as WiFi, Bluetooth, GPS, SD, touch screen, accelerometer sensor, speaker, mic, camera, and much more can transform the Android device into a powerful compact computing platform to pair with the Arduino Uno on par with the Raspberry Pi, BeagleBone, and the next generation of Arduino/ARM compact computing SoC platforms.
Inversely, Arduino can extend the sensory capabilities of Android devices by adding sensors that are not typically built-into with Android such as gas, radiation, PIR, pulse, etc.
The Android OS is open source like Linux and also benefits from a vast support and education ecosystem.
A GLOBAL MARKET SHARE
Android devices are growing in power and sophistication as they slide down the price/function curve. But very few geeks think of their Android smartphone as a powerhouse of hacking and electronic experimentation.
In many countries, shipping costs and custom tariffs will add significant costs to your prototype. In countries with paranoid and corrupt regimes, you may end up paying 100% or more of the value of imported items often in contradiction with the published low custom tariffs which are advertised to lure investors. I speak from personal experience.
Not to mention the absurd security procedures you will be subjected to in those countries when dealing with imported components such as barebone GPS and GSM modules. Having those electronic items already built into your Android smartphone, which are imported and traded with ease as mainstream consumer products, saves money and headaches.
OPEN AND INTEGRATED
Having a proven open source OS such as Linux as a software platform has also been a strong selling point for the Raspberry Pi. The Android OS offers a similar advantage being open source with tight hardware integration and a rich set of APIs to tap into built-in electronic components.
The skills required to program an Android device are no more challenging than programming Linux. Yet the tight integration between the Android APIs and the built-in hardware components such as sensors and communications sub-modules translate to more time making and less time on low level hacking.
ARDUINO TO ANDROID...COME IN ANDROID
In the realm of barebone electronics, components communicate mostly via pins and intra-circuit communications protocols such as I2C, SPI, and UART. But in the realm of Android, you will be hard pressed to find GPIO pins protruding from your Android phone ready to be connected with jumper wires to another circuit. Android phones will typically have a USB port and an audio jack.
Google offers the Accessory Development Kit (ADK) that can facilitate the interface between Android devices and Arduino. This has proven a costly solution with limited acceptance and support. The ADK requires the Android device to support certain hardware features such as USB Host that are found in expensive top of the line Android devices.
BLUETOOTH IS SPOKEN HERE
Using a $10 HC-05 Serial Bluetooth module (which can be purchased from ebay.com) attached to an Arduino Uno you can start sending and receiving data generated by the Android's built-in components and apps to Arduino or any microcontroller or computer equipped with serial Bluetooth. It's possible to send/receive data from Android devices using WiFi and USB too but currently Bluetooth is far cheaper.
Already, developers published guides and uploaded various ready-to-run Android apps to interface Android with Arduino to aid prototypers with no Android programming skills.
I have published two Android apps on Google Play to bridge between Android and Arduino. The first app is ArduDroid which allows you to wirelessly control Arduino Uno pins from your Android device.
The other app is SensoDuino which harvests data in real-time from over a dozen Android sensors (the ones which exist on your phone model) and sends this data to your Arduino wirelessly. Android built-in sensors include GPS, Gyro, Accelerometer, Compass, Light, Audio, Temperature, etc.
Amarino is another nice Android app that also harvests Android sensors. Then there is ArduinoCommander to control your Arduino board from your Android device over Bluetooth, Ethernet or USB. If you search for Arduino on Google Play you will be presented with a number of apps that help Arduino interface with Android.
An unintended but welcome benefit to using Bluetooth for Arduino-Android interfacing is the vanishing of spaghetti cabling which is the hallmark of electronics prototyping. Imagine wiring 5 components to your Arduino or Raspberry Pi such as Bluetooth, gyro, GPS, touch screen, and speaker.
The cabling and shield stacking will add considerable bulk let alone the time it takes for debugging software integration between these components.
The neatness factor of wireless Bluetooth communication adds to the attractiveness of the Arduino-Android combo. Wireless is all the rage. Even phone battery charging is going wireless.
THE COMING OF ANDROID
For prototypers, there are times when wiring a project from basic components is desirable especially for the educational value. Other times, a feature-rich compact hardware platform with computing power and a well-supported open source OS is needed for the task at hand.
If you already have an Android device and an Arduino Uno, together they can serve as a powerful DIY platform. So why not save money and recruit your Android for geeky pursuits.
With over a billion Androids world-wide, even 1% of Android users could make a significant contribution to the global electronics DIY movement.