Demo Projects

Loading...

Saturday, November 12, 2011

Android + Raspberry Pi + Microcontroller = Intelligent gadgets with everything possible

1. What is Rapsberry Pi?

I have always wanted to talk about my favorite thing of the year: the cheap tiny linux PC - Yes, the Raspberry Pi!

It will be avaiblable soon by the end of the year 2011, let's hope.

Size: same as a credit card (for model A, even smaller, like a pen)

Price: 25 dollars

It is a full linux PC on which we can install Ubuntu, or even play Quake smoothly.



2. Why is Raspebrry Pi so interesting for DIY Phone Gadgets?


Android = Gorgeous user Interface, portable telecommunications services and the Internet of things everywhere with you

Raspberry Pi = Cheap, smart, tiny linux PC that can be powerful brains of any intelligent gadget and easily uses the USB port to add Microcontrollers like Arduino to control any motor or light or whatever sensors

Conclusion: Every project that combines Android and Raspberry Pi can make a powerful gadget.

3. How to make DIY Phone Gadgets combining Rasperry Pi and Android?


Mode 1. Android as a standalone remote control and Raspebrry Pi as a part of the gadget.


There are two possible types of communications:

a. Short range low delay communication


We can plug USB WiFi or Bluetooth dongles on Raspberry Pi, connecting it to the Arduino or whatever microcontroller, and use Android to interact with it.

Typical examples can be home automation gadgets such as an NFC lock or an intelligent airconditionner, showing user interface on the Android phone. WiFi toys with augmented reality feature can be interesting too. In UAV, you can connect Raspberry Pi to ArduPilot, and do some near real-time telemetry and video feedback via WiFi to be displayed on the Android phone, seamlessly working with Google Maps.

b. Cloud communication

We can connect the Raspberry Pi powered gadget to the Internet, and use Android to "chat" with it from everywhere in the world.

An example that I can imagine would be a surveillance robot with USB camera at home (of course its brain is the tiny Raspberry Pi). While the robot is wandering at home, we can chat with it on Google Talk using our Android phone from another end of the world. The QoS on some 3G or 4G networks can be good enough to support video chat and voip. Android will use XMPP, Web RTC or whatever promising or classical Internet protocols to interract with the gadget.

Mode 2. Android and Raspberry Pi together as a part of the gadget.

This mode takes advantage of the Android's built-in software and hardware (GPS, sensors, WiFi, bluetooth, etc) and the advantage of Raspberry Pi's good hardware extensitivity (because it is a linux PC with USB 2.0 OTG ports).

In this mode, the Android is directly connected to Raspberry Pi using a USB cable, just as it is connected to any PC. So ADB and USB tethering can be great protocols to help realizing fast bidirectional communication.

An example can be a sophisticated RC controller with many physical buttons and joysticks, and of course Android's large touch screen. You can download many different Android applications for this gadget, or add different 2.4Ghz radio modules. So there is a both a greater software and hardware flexibility compared to the classical radio controls from different manufacturers.

Mode 3. Installing Android on Raspberry Pi...And make cheap gadgets.


This seems a bit difficult for now because higher versions of Android are demanding in terms of hardware capabilties.

3. What can be done to help developers of DIY Phone Gadgets?


The idea is to buid up some good libraries in Raspberry Pi that can work with a special microcontroller such as Arduino, while supporting different types of connections with Android. The ultimate purpose is to provide a simple and single way to develop, instead of always developing on different platforms and trying to figure out how to bridge.

I really like the way how projects like IOIO and Amarino integrate the electronics programming in Android development. If Raspberry Pi can provide such a platform to handle PWM, UART etc while easily supporting WiFi dongles, and it is so cheap, why not?

4. Limitations of using Raspebrry Pi in DIY Phone Gadgets


Unfortunately, as Raspeberry Pi is so tiny and squeezes all cool things into a small board, there are not enough I/O pins for hardware developers. This is what is better considered on the more expensive BeagleBone. However, we can always connect a cheap Arduino board to it and it's all done easy and clean. Remember it is a PC and it is USB-friendly. For those of you who are curious about the I/O on Raspberry Pi, please read the official WiKi:

http://elinux.org/RaspberryPiBoard#General_Purpose_Input.2FOutput_.28GPIO.29.2C_I2C.2C_I2S.2C_SPI

There are approximately 16 spare GPIOs, which on the Alpha board are brought out to 1.27mm pin-strip. Voltage levels are 3v3. The connector choice is deliberately annoying to connect to directly; there is no over-voltage protection on the board so the intention is that people interested in serious interfacing will use an external board with buffers, level conversion and analog I/O rather than soldering directly onto the main board. It brings 2x I2C (3v3), I2S and an SPI (3v3) interface out to the same connector. It supports one slave interface for I2C and one for SPI. The UART has four PINs: 3.3V, GND, TX and RX. Kernel boot messages go to this UART at 115200bps.

Good ideas are happily discussed on Raspberry Pi Forum here:
http://www.raspberrypi.org/forum?mingleforumaction=viewtopic&t=1158
or in IOIO User Group here:
http://groups.google.com/group/ioio-users/browse_thread/thread/d23be2c908a9d5ae/be8101778a202a52

6 comments:

  1. It is my understanding that the raspberry pi can not run Ubuntu, as there isn't a version compiled for use on the arm processor that will work well with the limited ram.

    ReplyDelete
  2. It can run anything it has the power and compatibility to run. I suggest you run your own Ubuntu if one isn't available.

    ReplyDelete
  3. can it be programmed to walk the dog.count me in

    ReplyDelete
  4. Raspebrry Pi is one of the greatest phone gadget I have ever seen.It is most useful gadget for smartphone. Today most of the people uses smartphone that's why this geeky gadgets is really an important gadgets for them.

    ReplyDelete

Disqus for DIY Phone Gadgets