NOTICE: The Processors Wiki will End-of-Life in December of 2020. 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

From Texas Instruments Wiki
Jump to: navigation, search

Content is no longer maintained and is being kept for reference only!

{{#evp:youtube|HwowV67_Eu8|Project Video|right}}

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]

BeagleBone WeatherCape.jpg


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]]

Block Diagram WeatherCape.png

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
  • 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]

  • Download application source at [[4]]
  • Download application binary/apk at[[5]]
  • Snapshots from application

Sensorapp mainscreen.jpg

Sensorapp temperature.jpg

Sensorapp light.jpg

Sensorapp pressure.jpg

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

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Android Beaglebone Weather Cape here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Android Beaglebone Weather Cape here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Android Beaglebone Weather Cape here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Android Beaglebone Weather Cape here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Android Beaglebone Weather Cape here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Android Beaglebone Weather Cape here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Android Beaglebone Weather Cape here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Android Beaglebone Weather Cape here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Android Beaglebone Weather Cape here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity