The answer to your question is much more complex than you might think.

So I will direct you to someone who can present the details better than I.

http://www.shortcourses.com/sensors/

..