Microcontroller sensor interfacing exercises
MPX5500 pressure sensor
- sensitivity: 9 mV/kPa; offset: 0.2 V at 0 kPa
- output voltage range: 0.2 V to 4.8 V
ADC
- Voltage reference: 2.5 V
- Number of bits: 10
- Jusfitication: right
Signal conditioning
- voltage divider
- division ratio: 51/98
To do:
- Write a function that calculates the ADC code as a function of the sensed value!
Test data:
| sensor input | sensor output | ADC input | ADC output | calculated sensor input |
|---|
| 213 kPa | 2.117 V | 1.1017 V | 451 | 212.866 kPa |
| 228 kPa | 2.252 V | 1.17196 V | 480 | 227.982 kPa |
| 164 kPa | 1.676 V | 0.872204 V | 357 | 163.867 kPa |