Microcontroller sensor interfacing exercises
TMP36 temperature sensor
- sensitivity: 10mV/C; offset: 750 mV at 25 C
- output voltage range: 0.1 V to 1.75 V
ADC
- Voltage reference: 2.5 V
- Number of bits: 8
- Jusfitication: right
Signal conditioning
To do:
- Write a function that calculates the sensed value as a function of the ADC code!
Test data:
| sensor input | sensor output | ADC input | ADC output | calculated sensor input |
|---|
| -12 C | 0.38 V | 0.38 V | 39 | -11.9141 C |
| 96 C | 1.46 V | 1.46 V | 150 | 96.4844 C |
| 90 C | 1.4 V | 1.4 V | 143 | 89.6484 C |