Microcontroller sensor interfacing exercises
MPX6116A pressure sensor
- sensitivity: 45 mV/kPa; offset: 0.2 V at 15 kPa
- output voltage range: 0.2 V to 4.8 V
ADC
- Voltage reference: 2.25 V
- Number of bits: 16
- Jusfitication: right
Signal conditioning
- voltage divider
- division ratio: 13/28
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 |
|---|
| 41 kPa | 1.37 V | 0.636071 V | 18527 | 41.0001 kPa |
| 51 kPa | 1.82 V | 0.845 V | 24612 | 50.9993 kPa |
| 26 kPa | 0.695 V | 0.322679 V | 9399 | 26.0005 kPa |