New Orleans, Louisiana
June 26, 2016
June 26, 2016
August 28, 2016
Electrical and Computer
Android Device as a “Programmable” Sensor Module
An Android device has a touch screen and an array of sensors. There are many used and inexpensive entry-level Android phones and tablets available. With proper configuration, a device can be transformed into a ``programmable sensor module” that can be used with microcontroller, FPGA (field programmable gate array), or embedded system experiments and projects. A single phone or tablet can replace many commonly used input devices. The basic configuration includes a serial Bluetooth module, which functions as a wireless serial port, and an Android app that retrieves the desired sensor information, formats the data into a common “byte stream,” and transmits them via the Bluetooth wireless link. From the embedded system’s point of view, the Android device appears as a sensor module that sends data through a serial port.
Three types of sensor modules can be obtained. The first type is to use the Android GUI’s “button,” “slider,” and “canvas” components to emulate switches, variable force sensitive resistor, and touchpad. The second type is the Android’s built-in physical sensors, which include accelerometer, GPS (global position system) module, orientation sensor, proximity sensor, NFC (near field communication) sensor, and real-time clock. The third type is specialized input methods that are unique to Android devices. These include simple commands from voice (via Android speech recognition), text message (via SMS, short message service), and internet (via Tiny Web DB service).
The Android app can be developed using the MIT App Inventor platform, in which “programming” is done with visual, drag-and-drop jigsaw puzzle like building blocks. It supports Bluetooth SPP (serial port profile) and can access all sensor modules discussed earlier. Students can learn the platform in few hours and create basic, functional apps that extract the needed I/O information and make an Android device behave like a collection of custom sensors.
Chu, P. P. (2016, June), Android Device as a "Programmable" Sensor Module Paper presented at 2016 ASEE Annual Conference & Exposition, New Orleans, Louisiana. 10.18260/p.26249
ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2016 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015