Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Designing an android sensor subsystem costillo 20120214

2,541 views

Published on

Published in: Technology
  • Be the first to comment

Designing an android sensor subsystem costillo 20120214

  1. 1. Designing An Android Sensor Subsystem Pitfalls and Considerations Jen Costillo jen@rebelbot.com
  2. 2. Simple Choices User Battery experience performance2/14/2012 Costillo- Android Builders Summit 2012 2
  3. 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. 4. Forsaking Reference Designs2/14/2012 Costillo- Android Builders Summit 2012 4
  5. 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 footprint2/14/2012 Costillo- Android Builders Summit 2012 5
  6. 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 Hardware2/14/2012 Costillo- Android Builders Summit 2012 6
  7. 7. Application Frameworks Libraries Linux Kernel HARDWARE Hardware2/14/2012 Costillo- Android Builders Summit 2012 7
  8. 8. Hardware Architecture2/14/2012 Costillo- Android Builders Summit 2012 8
  9. 9. Sensor Selection • Limited types • New type • Latency • Power consumption2/14/2012 Costillo- Android Builders Summit 2012 9
  10. 10. Sensor Sampling Rate2/14/2012 Costillo- Android Builders Summit 2012 10
  11. 11. Sampling Rates: The 3 Rates Under-sampling Over-sampling • Inaccurate, sluggish • Accurate, smooth response response • Slight power savings • Power-hungry Sampling Rate2/14/2012 Costillo- Android Builders Summit 2012 11
  12. 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 structure2/14/2012 Costillo- Android Builders Summit 2012 12
  13. 13. Interfaces2/14/2012 Costillo- Android Builders Summit 2012 13
  14. 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 impact2/14/2012 Costillo- Android Builders Summit 2012 14
  15. 15. Sensor Subsystem/Hub • Separate processor or part of the Application processor • How to evaluate? – Latency – Power consumption – Low power modes2/14/2012 Costillo- Android Builders Summit 2012 15
  16. 16. Hardware Summary Power Latency = Consumption Max(sensorsn) Sensor = Σ sensorsn + + dedicated Solution any dedicated processing processor time • Use tie-breaker criteria2/14/2012 Costillo- Android Builders Summit 2012 16
  17. 17. Application Frameworks Libraries Linux Kernel KERNEL Hardware2/14/2012 Costillo- Android Builders Summit 2012 17
  18. 18. Kernel Driver Application Processor Peripheral Shared Interface Memory Microcontroller Sensor Coprocessor2/14/2012 Costillo- Android Builders Summit 2012 18
  19. 19. Application Frameworks Libraries Linux Kernel LIBRARIES AND SERVICES Hardware2/14/2012 Costillo- Android Builders Summit 2012 19
  20. 20. Sensor HAL and Services • HAL device/<vendor>/<board name>/libsensors • Service frameworks/base/services/sensorservice • Manager frameworks/base/libs/gui2/14/2012 Costillo- Android Builders Summit 2012 20
  21. 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.html2/14/2012 Costillo- Android Builders Summit 2012 22
  22. 22. Gesture Detection Algorithm Application Android Processor SensorService Co- Sensor Hub Processor Sensors MPU with Barometer Proximity Gyro/Accel Compass2/14/2012 Costillo- Android Builders Summit 2012 23
  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 Handling2/14/2012 Costillo- Android Builders Summit 2012 24
  24. 24. Calibration2/14/2012 Costillo- Android Builders Summit 2012 25
  25. 25. Application Frameworks Libraries Linux Kernel OTHER CONSIDERATIONS Hardware2/14/2012 Costillo- Android Builders Summit 2012 26
  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 tests2/14/2012 Costillo- Android Builders Summit 2012 27
  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.html2/14/2012 Costillo- Android Builders Summit 2012 28

×