Designing an android sensor subsystem costillo 20120214

  • 2,007 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,007
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Designing An Android Sensor Subsystem Pitfalls and Considerations Jen Costillo jen@rebelbot.com
  • 2. Simple Choices User Battery experience performance2/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 Designs2/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 footprint2/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 Hardware2/14/2012 Costillo- Android Builders Summit 2012 6
  • 7. Application Frameworks Libraries Linux Kernel HARDWARE Hardware2/14/2012 Costillo- Android Builders Summit 2012 7
  • 8. Hardware Architecture2/14/2012 Costillo- Android Builders Summit 2012 8
  • 9. Sensor Selection • Limited types • New type • Latency • Power consumption2/14/2012 Costillo- Android Builders Summit 2012 9
  • 10. Sensor Sampling Rate2/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 Rate2/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 structure2/14/2012 Costillo- Android Builders Summit 2012 12
  • 13. Interfaces2/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 impact2/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 modes2/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 criteria2/14/2012 Costillo- Android Builders Summit 2012 16
  • 17. Application Frameworks Libraries Linux Kernel KERNEL Hardware2/14/2012 Costillo- Android Builders Summit 2012 17
  • 18. Kernel Driver Application Processor Peripheral Shared Interface Memory Microcontroller Sensor Coprocessor2/14/2012 Costillo- Android Builders Summit 2012 18
  • 19. Application Frameworks Libraries Linux Kernel LIBRARIES AND SERVICES Hardware2/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/gui2/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.html2/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 Compass2/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 Handling2/14/2012 Costillo- Android Builders Summit 2012 24
  • 24. Calibration2/14/2012 Costillo- Android Builders Summit 2012 25
  • 25. Application Frameworks Libraries Linux Kernel OTHER CONSIDERATIONS Hardware2/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 tests2/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.html2/14/2012 Costillo- Android Builders Summit 2012 28