SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Designing An Android
 Sensor Subsystem


 Pitfalls and Considerations

        Jen Costillo
     jen@rebelbot.com
Simple Choices
               User                             Battery
            experience                        performance




2/14/2012       Costillo- Android Builders Summit 2012      2
Established
                  or Innovative Product?
            Established                            Innovation-Driven
            • Will I be making another             • Do I have new sensors
               new product in 6                       types?
               months?                             • Are features more
            • Is the reference design                 important than release
               considered good enough                 date?
               for the application?                • Are money and
                                                      resources no
                                                      problem?



2/14/2012                   Costillo- Android Builders Summit 2012             3
Forsaking Reference Designs




2/14/2012          Costillo- Android Builders Summit 2012   4
Going On Your Own
      • If you make your own,                        • But…
            – You’re on your own                            – power ↓
            – Integration pains                             – Control code size
            – Test time ↑                                   – Control mechanical
            – Gesture testing                                 footprint
              becomes a challenge                           – In-house expertise
            – Calibration blues
            – Larger mechanical
              footprint



2/14/2012                Costillo- Android Builders Summit 2012                    5
Android Universe
                   Android Application                                  Application
                      SensorManager
                                                                        Frameworks
                          Sensor JNI
             Sensor Service       Sensor Manager
                                                                         Libraries
                          Sensor HAL

            Interface Kernel
                 Driver
                                   Sensor Driver                        Linux Kernel

            Sensor Hub/
            Coprocessor           Sensors                                Hardware
2/14/2012                      Costillo- Android Builders Summit 2012                  6
Application

                                                  Frameworks


                                                      Libraries


                                                  Linux Kernel
            HARDWARE
                                                     Hardware

2/14/2012        Costillo- Android Builders Summit 2012           7
Hardware Architecture




2/14/2012       Costillo- Android Builders Summit 2012   8
Sensor Selection
        •   Limited types
        •   New type
        •   Latency
        •   Power consumption




2/14/2012            Costillo- Android Builders Summit 2012   9
Sensor Sampling Rate




2/14/2012       Costillo- Android Builders Summit 2012   10
Sampling Rates:
                                The 3 Rates
            Under-sampling                                                Over-sampling
            • Inaccurate, sluggish                                        • Accurate, smooth
              response                                                      response
            • Slight power savings                                        • Power-hungry




                                             Sampling
                                               Rate




2/14/2012                            Costillo- Android Builders Summit 2012                    11
Polling versus Interrupt
              Pros:                        Pros:
              • Simplicity                 • Low power
              • Throttle                     Sleep Mode
                data                       • Use fewer
                throughput                   timers

              Cons:                        Cons:
              • Less sleep                 • Complex
              • Latency ↑                    program
              • Data loss                    structure


2/14/2012          Costillo- Android Builders Summit 2012   12
Interfaces




2/14/2012   Costillo- Android Builders Summit 2012   13
Wake up events and power
                    considerations
            Application                 Internal                           External
            Processor only              Coprocessor                        Processor


                     D                             C                              CC
            Reference supported         Reference supported                More processor selection
            Most power hungry           Most work done for                 More outcome control
                                        you                                Most customized
                                                                           Footprint impact




2/14/2012                         Costillo- Android Builders Summit 2012                              14
Sensor Subsystem/Hub
      • Separate processor or part of the
        Application processor
      • How to evaluate?
            – Latency
            – Power consumption
            – Low power modes




2/14/2012              Costillo- Android Builders Summit 2012   15
Hardware Summary

           Power                     Latency =
       Consumption                 Max(sensorsn)
                                                                  Sensor
       = ÎŁ sensorsn +               + dedicated
                                                                 Solution
       any dedicated                processing
         processor                     time




      • Use tie-breaker criteria




2/14/2012               Costillo- Android Builders Summit 2012              16
Application

                                                       Frameworks


                                                              Libraries


                                                       Linux Kernel
            KERNEL
                                                          Hardware

2/14/2012            Costillo- Android Builders Summit 2012               17
Kernel Driver
                      Application Processor


                       Peripheral                                   Shared
                        Interface                                   Memory




            Microcontroller          Sensor                      Coprocessor


2/14/2012               Costillo- Android Builders Summit 2012                 18
Application

                                                  Frameworks


                                                         Libraries


                                                  Linux Kernel
        LIBRARIES AND
        SERVICES                                     Hardware

2/14/2012       Costillo- Android Builders Summit 2012               19
Sensor HAL and Services
  • HAL
       device/<vendor>/<board name>/libsensors


  • Service
       frameworks/base/services/sensorservice


  • Manager
       frameworks/base/libs/gui

2/14/2012         Costillo- Android Builders Summit 2012
                                                           20
Sensor Fusion

                                                                             Libraries

                                                                            Linux Kernel

                                                                            Sensor Hub


                                                                              Sensors
      http://en.wikipedia.org/wiki/Sensor_fusion
      https://www.llnl.gov/news/newsreleases/2010/NR-10-01-06.html
2/14/2012                          Costillo- Android Builders Summit 2012                  22
Gesture Detection Algorithm
            Application                                Android
            Processor                                SensorService



                                                            Co-
            Sensor Hub                                   Processor



            Sensors         MPU with
                                                         Barometer   Proximity
                            Gyro/Accel



                             Compass


2/14/2012                 Costillo- Android Builders Summit 2012                 23
Gesture Detection Comparison

              Make                   Buy
                                                                            Application
                                                                            • Powerful processor
                                    Minimal
            Off-load AppPro
                                Schedule Impact

               In-house          Already Tested
               expertise             &tuned

                                    Complete
            Compact code
                                     solution              Sensor hub
                                                           • Off-load to cheaper
                                                             power
                                                           • Wake up Event
                                                             Handling


2/14/2012                     Costillo- Android Builders Summit 2012                          24
Calibration




2/14/2012   Costillo- Android Builders Summit 2012   25
Application

                                                         Frameworks


                                                          Libraries

                                                         Linux Kernel
        OTHER
        CONSIDERATIONS                                    Hardware

2/14/2012       Costillo- Android Builders Summit 2012                  26
Testing Methodologies
        • Creating tools
        • Checkpoints at all levels
        • Ensure the application processor can see each of
          your sensors
        • Compatibility Test Suite (CTS) at application level -
          /cts/tests/tests/hardware… SensorTest.java

        • Test services -
          /frameworks/base/services/sensorservice/tests

        • Manufacturing tests

2/14/2012               Costillo- Android Builders Summit 2012   27
QUESTIONS?
                    JEN@REBELBOT.COM




        Additional resources
        http://processors.wiki.ti.com/index.php/Android_Sensor_PortingGuide
        http://www.kandroid.org/online-pdk/guide/sensors.html
2/14/2012                   Costillo- Android Builders Summit 2012            28

Weitere ähnliche Inhalte

Was ist angesagt? (9)

Chip ex 2011 faraday
Chip ex 2011 faradayChip ex 2011 faraday
Chip ex 2011 faraday
 
Tdd and a new paradigm for hardware verification
Tdd and a new paradigm for hardware verificationTdd and a new paradigm for hardware verification
Tdd and a new paradigm for hardware verification
 
Autodesk Case Study
Autodesk Case StudyAutodesk Case Study
Autodesk Case Study
 
Intsoc2
Intsoc2Intsoc2
Intsoc2
 
Zehr dv club_12052006
Zehr dv club_12052006Zehr dv club_12052006
Zehr dv club_12052006
 
Parking Lot App
Parking Lot AppParking Lot App
Parking Lot App
 
Extending Android with New Devices
Extending Android with New DevicesExtending Android with New Devices
Extending Android with New Devices
 
Droid con 2012 bangalore v2.0
Droid con 2012   bangalore v2.0Droid con 2012   bangalore v2.0
Droid con 2012 bangalore v2.0
 
Q1 2009 Earning Report of National Instruments Corp
Q1 2009 Earning Report of National Instruments CorpQ1 2009 Earning Report of National Instruments Corp
Q1 2009 Earning Report of National Instruments Corp
 

Andere mochten auch

高等管理理論研討作業 陳世輝
高等管理理論研討作業 陳世輝高等管理理論研討作業 陳世輝
高等管理理論研討作業 陳世輝
Bobby Chen
 
Tiffany and Co project (3)
Tiffany and Co project (3)Tiffany and Co project (3)
Tiffany and Co project (3)
Devin Barrett
 
День бухгалтера
День бухгалтераДень бухгалтера
День бухгалтера
libusue
 
IBMiX: Ready-To-Wear The Future
IBMiX: Ready-To-Wear The FutureIBMiX: Ready-To-Wear The Future
IBMiX: Ready-To-Wear The Future
Joanna PeĂąa-Bickley
 
Fashion tech powerpoint
Fashion tech powerpointFashion tech powerpoint
Fashion tech powerpoint
oacore2
 

Andere mochten auch (20)

NYFT Lab Fashion Tech overview
NYFT Lab Fashion Tech overviewNYFT Lab Fashion Tech overview
NYFT Lab Fashion Tech overview
 
Fashionably Practical: Fusing Fashion & Technology
Fashionably Practical: Fusing Fashion & TechnologyFashionably Practical: Fusing Fashion & Technology
Fashionably Practical: Fusing Fashion & Technology
 
Fashion technology
Fashion technologyFashion technology
Fashion technology
 
高等管理理論研討作業 陳世輝
高等管理理論研討作業 陳世輝高等管理理論研討作業 陳世輝
高等管理理論研討作業 陳世輝
 
Tiffany and Co project (3)
Tiffany and Co project (3)Tiffany and Co project (3)
Tiffany and Co project (3)
 
US Fashion Tech Trend Report
US Fashion Tech Trend ReportUS Fashion Tech Trend Report
US Fashion Tech Trend Report
 
День бухгалтера
День бухгалтераДень бухгалтера
День бухгалтера
 
Fash&Tech Bootcamp - 5-day acceleration program for early stage fashion-tech ...
Fash&Tech Bootcamp - 5-day acceleration program for early stage fashion-tech ...Fash&Tech Bootcamp - 5-day acceleration program for early stage fashion-tech ...
Fash&Tech Bootcamp - 5-day acceleration program for early stage fashion-tech ...
 
LA Fashion Industry analytics project with Grid110
LA Fashion Industry analytics project with Grid110LA Fashion Industry analytics project with Grid110
LA Fashion Industry analytics project with Grid110
 
ThingsCon Salon 6 - Fashion Tech - Eef Lubbers
ThingsCon Salon 6 - Fashion Tech - Eef LubbersThingsCon Salon 6 - Fashion Tech - Eef Lubbers
ThingsCon Salon 6 - Fashion Tech - Eef Lubbers
 
3 d printing pres
3 d printing pres3 d printing pres
3 d printing pres
 
ThingsCon Salon 6 - Fashion Tech - WEtec
ThingsCon Salon 6 - Fashion Tech - WEtecThingsCon Salon 6 - Fashion Tech - WEtec
ThingsCon Salon 6 - Fashion Tech - WEtec
 
The Principles of Creativity and Innovation
The Principles of Creativity and InnovationThe Principles of Creativity and Innovation
The Principles of Creativity and Innovation
 
IBMiX: Ready-To-Wear The Future
IBMiX: Ready-To-Wear The FutureIBMiX: Ready-To-Wear The Future
IBMiX: Ready-To-Wear The Future
 
Fashion tech powerpoint
Fashion tech powerpointFashion tech powerpoint
Fashion tech powerpoint
 
Future of Fashion
Future of FashionFuture of Fashion
Future of Fashion
 
When Tech meets Fashion, what could possibly go wrong? @nickdemey
When Tech meets Fashion, what could possibly go wrong? @nickdemeyWhen Tech meets Fashion, what could possibly go wrong? @nickdemey
When Tech meets Fashion, what could possibly go wrong? @nickdemey
 
Fashion Technologies
Fashion TechnologiesFashion Technologies
Fashion Technologies
 
Who we are
Who we areWho we are
Who we are
 
Full Program & Tools to Accelerate an Internal Innovation Project - by Board ...
Full Program & Tools to Accelerate an Internal Innovation Project - by Board ...Full Program & Tools to Accelerate an Internal Innovation Project - by Board ...
Full Program & Tools to Accelerate an Internal Innovation Project - by Board ...
 

Ähnlich wie Designing an android sensor subsystem costillo 20120214

Software engineering principles in system software design
Software engineering principles in system software designSoftware engineering principles in system software design
Software engineering principles in system software design
Tech_MX
 
Developing and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-androidDeveloping and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-android
Elvis Jon Freddy Sitinjak
 
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
Nesma
 
Android village @nullcon 2012
Android village @nullcon 2012 Android village @nullcon 2012
Android village @nullcon 2012
hakersinfo
 
Distributed Software Development with Scrum and Social Coding
Distributed Software Development with Scrum and Social Coding Distributed Software Development with Scrum and Social Coding
Distributed Software Development with Scrum and Social Coding
Intland Software GmbH
 

Ähnlich wie Designing an android sensor subsystem costillo 20120214 (20)

Bringing RFID to Electronics with Monza X RFID Chips
Bringing RFID to Electronics with Monza X RFID ChipsBringing RFID to Electronics with Monza X RFID Chips
Bringing RFID to Electronics with Monza X RFID Chips
 
Software engineering principles in system software design
Software engineering principles in system software designSoftware engineering principles in system software design
Software engineering principles in system software design
 
Automated BI Modernizations
Automated BI ModernizationsAutomated BI Modernizations
Automated BI Modernizations
 
CyberLink Meets Python
CyberLink Meets PythonCyberLink Meets Python
CyberLink Meets Python
 
Monitoring of Web Applications and GlassFish for Performance and Availability...
Monitoring of Web Applications and GlassFish for Performance and Availability...Monitoring of Web Applications and GlassFish for Performance and Availability...
Monitoring of Web Applications and GlassFish for Performance and Availability...
 
Developing and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-androidDeveloping and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-android
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
 
Mobile trends and impressions
Mobile trends and impressionsMobile trends and impressions
Mobile trends and impressions
 
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
 
Hyperion Financial Management Application Design for Performance
Hyperion Financial Management Application Design for PerformanceHyperion Financial Management Application Design for Performance
Hyperion Financial Management Application Design for Performance
 
Android village @nullcon 2012
Android village @nullcon 2012 Android village @nullcon 2012
Android village @nullcon 2012
 
Introduction of android
Introduction of androidIntroduction of android
Introduction of android
 
Workshop APM in a Cloud & Virtualized environment
Workshop APM in a Cloud & Virtualized environmentWorkshop APM in a Cloud & Virtualized environment
Workshop APM in a Cloud & Virtualized environment
 
Sunrise Presentation, Company Overview 2012
Sunrise Presentation, Company Overview 2012Sunrise Presentation, Company Overview 2012
Sunrise Presentation, Company Overview 2012
 
Sunrise presentation
Sunrise presentationSunrise presentation
Sunrise presentation
 
Nagios Conference 2012 - Nathan Vonnahme - Monitoring the User Experience
Nagios Conference 2012 - Nathan Vonnahme - Monitoring the User ExperienceNagios Conference 2012 - Nathan Vonnahme - Monitoring the User Experience
Nagios Conference 2012 - Nathan Vonnahme - Monitoring the User Experience
 
Distributed Software Development with Scrum and Social Coding
Distributed Software Development with Scrum and Social Coding Distributed Software Development with Scrum and Social Coding
Distributed Software Development with Scrum and Social Coding
 
Estimating Packaged Software - The first part of a framework
Estimating Packaged Software - The first part of a frameworkEstimating Packaged Software - The first part of a framework
Estimating Packaged Software - The first part of a framework
 
Case Study: Practical tools and strategies for tackling legacy practices and ...
Case Study: Practical tools and strategies for tackling legacy practices and ...Case Study: Practical tools and strategies for tackling legacy practices and ...
Case Study: Practical tools and strategies for tackling legacy practices and ...
 
Build Smarter User Interfaces for Legacy Applications with IBM Rational Host ...
Build Smarter User Interfaces for Legacy Applications with IBM Rational Host ...Build Smarter User Interfaces for Legacy Applications with IBM Rational Host ...
Build Smarter User Interfaces for Legacy Applications with IBM Rational Host ...
 

KĂźrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

KĂźrzlich hochgeladen (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Designing an android sensor subsystem costillo 20120214

  • 1. Designing An Android Sensor Subsystem Pitfalls and Considerations Jen Costillo jen@rebelbot.com
  • 2. Simple Choices User Battery experience performance 2/14/2012 Costillo- Android Builders Summit 2012 2
  • 3. Established or Innovative Product? Established Innovation-Driven • Will I be making another • Do I have new sensors new product in 6 types? months? • Are features more • Is the reference design important than release considered good enough date? for the application? • Are money and resources no problem? 2/14/2012 Costillo- Android Builders Summit 2012 3
  • 4. Forsaking Reference Designs 2/14/2012 Costillo- Android Builders Summit 2012 4
  • 5. Going On Your Own • If you make your own, • But… – You’re on your own – power ↓ – Integration pains – Control code size – Test time ↑ – Control mechanical – Gesture testing footprint becomes a challenge – In-house expertise – Calibration blues – Larger mechanical footprint 2/14/2012 Costillo- Android Builders Summit 2012 5
  • 6. Android Universe Android Application Application SensorManager Frameworks Sensor JNI Sensor Service Sensor Manager Libraries Sensor HAL Interface Kernel Driver Sensor Driver Linux Kernel Sensor Hub/ Coprocessor Sensors Hardware 2/14/2012 Costillo- Android Builders Summit 2012 6
  • 7. Application Frameworks Libraries Linux Kernel HARDWARE Hardware 2/14/2012 Costillo- Android Builders Summit 2012 7
  • 8. Hardware Architecture 2/14/2012 Costillo- Android Builders Summit 2012 8
  • 9. Sensor Selection • Limited types • New type • Latency • Power consumption 2/14/2012 Costillo- Android Builders Summit 2012 9
  • 10. Sensor Sampling Rate 2/14/2012 Costillo- Android Builders Summit 2012 10
  • 11. Sampling Rates: The 3 Rates Under-sampling Over-sampling • Inaccurate, sluggish • Accurate, smooth response response • Slight power savings • Power-hungry Sampling Rate 2/14/2012 Costillo- Android Builders Summit 2012 11
  • 12. Polling versus Interrupt Pros: Pros: • Simplicity • Low power • Throttle Sleep Mode data • Use fewer throughput timers Cons: Cons: • Less sleep • Complex • Latency ↑ program • Data loss structure 2/14/2012 Costillo- Android Builders Summit 2012 12
  • 13. Interfaces 2/14/2012 Costillo- Android Builders Summit 2012 13
  • 14. Wake up events and power considerations Application Internal External Processor only Coprocessor Processor D C CC Reference supported Reference supported More processor selection Most power hungry Most work done for More outcome control you Most customized Footprint impact 2/14/2012 Costillo- Android Builders Summit 2012 14
  • 15. Sensor Subsystem/Hub • Separate processor or part of the Application processor • How to evaluate? – Latency – Power consumption – Low power modes 2/14/2012 Costillo- Android Builders Summit 2012 15
  • 16. Hardware Summary Power Latency = Consumption Max(sensorsn) Sensor = ÎŁ sensorsn + + dedicated Solution any dedicated processing processor time • Use tie-breaker criteria 2/14/2012 Costillo- Android Builders Summit 2012 16
  • 17. Application Frameworks Libraries Linux Kernel KERNEL Hardware 2/14/2012 Costillo- Android Builders Summit 2012 17
  • 18. Kernel Driver Application Processor Peripheral Shared Interface Memory Microcontroller Sensor Coprocessor 2/14/2012 Costillo- Android Builders Summit 2012 18
  • 19. Application Frameworks Libraries Linux Kernel LIBRARIES AND SERVICES Hardware 2/14/2012 Costillo- Android Builders Summit 2012 19
  • 20. Sensor HAL and Services • HAL device/<vendor>/<board name>/libsensors • Service frameworks/base/services/sensorservice • Manager frameworks/base/libs/gui 2/14/2012 Costillo- Android Builders Summit 2012 20
  • 21. Sensor Fusion Libraries Linux Kernel Sensor Hub Sensors http://en.wikipedia.org/wiki/Sensor_fusion https://www.llnl.gov/news/newsreleases/2010/NR-10-01-06.html 2/14/2012 Costillo- Android Builders Summit 2012 22
  • 22. Gesture Detection Algorithm Application Android Processor SensorService Co- Sensor Hub Processor Sensors MPU with Barometer Proximity Gyro/Accel Compass 2/14/2012 Costillo- Android Builders Summit 2012 23
  • 23. Gesture Detection Comparison Make Buy Application • Powerful processor Minimal Off-load AppPro Schedule Impact In-house Already Tested expertise &tuned Complete Compact code solution Sensor hub • Off-load to cheaper power • Wake up Event Handling 2/14/2012 Costillo- Android Builders Summit 2012 24
  • 24. Calibration 2/14/2012 Costillo- Android Builders Summit 2012 25
  • 25. Application Frameworks Libraries Linux Kernel OTHER CONSIDERATIONS Hardware 2/14/2012 Costillo- Android Builders Summit 2012 26
  • 26. Testing Methodologies • Creating tools • Checkpoints at all levels • Ensure the application processor can see each of your sensors • Compatibility Test Suite (CTS) at application level - /cts/tests/tests/hardware… SensorTest.java • Test services - /frameworks/base/services/sensorservice/tests • Manufacturing tests 2/14/2012 Costillo- Android Builders Summit 2012 27
  • 27. QUESTIONS? JEN@REBELBOT.COM Additional resources http://processors.wiki.ti.com/index.php/Android_Sensor_PortingGuide http://www.kandroid.org/online-pdk/guide/sensors.html 2/14/2012 Costillo- Android Builders Summit 2012 28