NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Android Beaglebone Weather Cape
Content is no longer maintained and is being kept for reference only!
{{#evp:youtube|HwowV67_Eu8|Project Video|right}}
Contents
Introduction[edit]
Penetration of Android into non phone segments like Home Automation, Thermostat, Portable Data Terminals, Point of Sale etc. – raise a need of Android solution with domain specific features like temperature and light sensor, ethernet, mass storage, external modem, custom boot partitions, serial port interface, smartcard interface and many more.
Primary objective of this wiki is to explain detailed beaglebone weather cape porting guide on TI's Android Jellybean release.[ Link [1]].
About Beaglebone Weather Cape[edit]
The BeagleBone Weather Cape provides weather data for the BeagleBone including temperature, barometric pressure, humidity, and ambient light. These weather input data can be accessed via I2C bus. The BeagleBone Weather Cape also features an LED to indicate that power is applied.
[Ref# [2]]
Above block diagram gives the overview of sensor controls
- EEPROM
The Beaglebone Weather Cape has an EEPROM containing information that will allow the SW to identify the board and to configure the expansion headers pins as needed. EEPROMs are required for all Capes sold in order for them to operate correctly when plugged in the Beaglebone.
- Ambient Light Sensor
The TSL2550 features two photodiodes and an ADC on a single CMOS integrated circuit to provide 12-bit light measurements. Ambient light is converted into currents by the photodiodes and eventually to digital outputs by the ADC. One photodiode of TSL2550 is sensitive primarily to infrared light; therefore, the digital output from this photodiode is used to compensate the infrared effect on the digital output of the other photodiode, which is sensitive to both visible and infrared light. The final output data calculated in a commonly used illuminance unit of Lux.
- Temperature and Barometric Pressure Sensor
The BMP085 uses piezo-resistive technology to provide high accuracy measurements. Temperature and pressure data can be sampled up to 128 samples per second and are converted digitally via an ADC before being transmitted over I2C interface. The output data is provided in oC and hPa (millibar) using calibration data stored inside BMP085 EEPROM.
All above listed sensors are interfaced with AM335x over I2C bus. Tricky part over here is on the board initialization one has to read the EEPROM of the cape and identify whether – sensor cape (named weather cape here) is connected to AM335x base module.
Porting Steps[edit]
Step1 : Enabling kernel driver for TSL2550 & BMP085[edit]
Download patches from [HERE]
- Patches are for
- Enabling beaglebone weather cape support
- BMP085 driver modification to report events to input sub system - required for Android
/* go to android kernel directory */ $cd <MY_DIR>/kernel /* extract downloader patch files */ $tar -xzvf Beaglebone-weathercape.tar.gz /* apply patches */ $ git am 0001-bmp085-sensor-modified-to-work-with-android.patch $ git am 0002-added-support-for-beaglebone-weather-cape.patch
- Enable TSL2250 and BMP085 in menuconfig
Symbol: SENSORS_TSL2550 [=y] │ │ Type : tristate │ │ Prompt: Taos TSL2550 ambient light sensor │ │ Defined at drivers/misc/Kconfig:351 │ │ Depends on: MISC_DEVICES [=y] && I2C [=y] && SYSFS [=y] │ │ Location: │ │ -> Device Drivers │ │ -> Misc devices (MISC_DEVICES [=y])
Symbol: BMP085 [=y] │ │ Type : tristate │ │ Prompt: BMP085 digital pressure sensor │ │ Defined at drivers/misc/Kconfig:480 │ │ Depends on: MISC_DEVICES [=y] && I2C [=y] && SYSFS [=y] │ │ Location: │ │ -> Device Drivers │ │ -> Misc devices (MISC_DEVICES [=y])
Step 2 : Android HAL[edit]
- Download patches for Android HAL development for beaglebone sensor cape [Click HERE]
- Patch set includes
- support of beaglebone weather cape sensor board
- Temperature, Pressure and Ambient light sensor values will be measured through sensor service manager
- support of beaglebone weather cape sensor board
- Apply patches
/* go to android directory */ $cd <MY_DIR>/device/ti/beaglebone /* extract downloader patch files */ $tar -xzvf Beaglebone-weathercape-android-hal.tar.gz /* apply patches */ $ git am 0001-added-sensor-support-for-beaglebone.patch $ git am 0002-enabled-sensor-library-for-beaglebone-device.patch $ git am 0003-Added-permission-to-BMP085-sensor-node.patch
Note: The complete development and porting guide for introducing new sensor inside Android is available [HERE]
Step 3: Build the Android source[edit]
- Follow the procedure available at [[3]]
Application Source & Binary[edit]
- Snapshots from application
References[edit]
http://circuitco.com/support/index.php?title=BeagleBone_Weather
http://gitorious.org/blazetablet/device-ti-blazetablet/commit/52268922c84304897a39e65817a0002b5bcf6b7b
http://beagleboardtoys.info/index.php?title=BeagleBone_Weather#Software_Support
Technical Support and Product Updates[edit]
For further information or to report any problems, contact
http://e2e.ti.com/android
http://support.ti.com
For community support join
http://groups.google.com/group/rowboat
For IRC #rowboat on irc.freenode.net