building robots using android
TRANSCRIPT
![Page 1: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/1.jpg)
Building Robots using Android and
Arduino
Sudar MuthuResearch Engineer, Yahoo! Labshttp://sudarmuthu.comhttp://github.com/sudarhttp://twitter.com/sudarmuthu
![Page 2: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/2.jpg)
Agenda• Let’s start with a demo• Anatomy of a robot• Android• Arduino• Making them talk
– Over Bluetooth– Over WIFI– Over USB wire– Over Audio Jacket– Over GSM
• Summary• Questions
![Page 4: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/4.jpg)
MotorsSensors
Processor
Anatomy of a Robot
![Page 5: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/5.jpg)
Android can act as a ..
Sensor
– Accelerometer– Camera– Magnetic Compass– GPS– etc.
Processor
– Native Java App– Android Scripting Environment (ASE)
![Page 6: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/6.jpg)
Missing part is..
![Page 7: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/7.jpg)
Missing part is..
Motor(and that’s where Arduino can help)
![Page 8: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/8.jpg)
Arduino• Visual Basic for hardware• Includes both Hardware and software
Photo credit Arduino team
![Page 9: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/9.jpg)
We have Android (Sensors & processor) and Arduino (Motor)
![Page 10: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/10.jpg)
We have Android (Sensors & processor) and Arduino (Motor)
Let’s make them talk
![Page 11: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/11.jpg)
Making them talk• Over Bluetooth
– Serial Socket• Over WIFI• Over USB
– ADK– Normal Way
• Over Audio Jacket• Over GSM• Over C2DM• Over NFC• Others (Intermediate computer etc)
![Page 12: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/12.jpg)
Over BluetoothYou need• Bluetooth Shield (or just a Bluetooth Dongle)• Library – Amarino - http://amarino-toolkit.net• Or create a Bluetooth Socket
Advantages• Wired connection is not needed• Can work from Android 1.5• Two way communication
Disadvantages• Power consumption is high• Slightly slower when compared with others• Range is limited
![Page 13: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/13.jpg)
Over WIFI
You need• Wifi Shield• Wifi Connection
Advantages• Wired connection is not needed• Two way communication• Can work from Android 1.5
Disadvantages• Both should be present in the same network• Power consumption is slightly high
![Page 14: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/14.jpg)
Over USB Cable - ADK
You need• ADK Board or USB Host Shield• ADK SDK
Advantages• Native support from Android• Two way communication
Disadvantages• Will work only in 2.3.4 +• Wired Connection is needed
![Page 15: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/15.jpg)
Over USB Cable – Socket & Logcat
You need• USB Host Shield• Library – Microbridge - http://code.google.com/p/microbridge/
Advantages• Works in older versions as well• Two way communication (Socket & Logcat)
Disadvantages• Wired connection is needed• The bandwidth is slower
![Page 16: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/16.jpg)
Over Audio Jacket
You need• Male Audio Pin• Pre-encoded Wave/MP3 files • http
://sudarmuthu.com/blog/transferring-data-from-android-using-audio
Advantages• Very compact• Less power consumption
Disadvantages• Slightly difficult to get it to work• Baud rate is slow
![Page 17: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/17.jpg)
Over GSM
You need• GSM Arduino Shiled• Two sim cards
Advantages• Range is unlimited• Very simple to setup• Two way communication is possible
Disadvantages• Operating cost (SMS)• Potential to abuse
![Page 18: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/18.jpg)
Over C2DM
You need• Ethernet or Wifi Arduino Shield• C2DM account
Advantages• Good for notifications• Very easy to setup in Android side
Disadvantages• Only one way communication is possible• Works only from v2.2+• Need Wifi connectivity
![Page 19: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/19.jpg)
Over NFC
You need• NFC Shield• Phone which has NFC
Advantages• Very easy to setup• No connection needs to be setup
Disadvantages• Works only from v2.2+• Very short range
![Page 20: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/20.jpg)
Other Options
Some notable alternate options
• Using Computer as a intermediate transmitter• USB Host support (in case of tablet or rooted phones)• Serial VGA (You can project from an Android phone)
![Page 21: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/21.jpg)
Don’t throw away your old phones ;)
![Page 22: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/22.jpg)
Links• Arduino – http://arduino.cc• Microbridge – http://code.google.com/p/microbridge/• Amarino – http://amarino-toolkit.net• USB Host Shield –
http://circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino/
• Using Arduino as ADK – http://sudarmuthu.com/blog/using-standard-arduino-board-as-googles-adk-kit
• My articles about Arudino – http://sudarmuthu.com/blog/category/ardino• Demo source code – http://github.com/sudar/Asimi• Demo Project page – http://sudarmuthu.com/arduino/asimi• Cellbots – http://cellbots.com
![Page 23: Building Robots Using Android](https://reader034.vdocuments.site/reader034/viewer/2022042615/55cf9b31550346d033a51225/html5/thumbnails/23.jpg)
Questions
Thank You
Sudar Muthuhttp://sudarmuthu.comhttp://gitbub.com/sudar
http://twitter.com/sudarmuthu