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.5 V
- Number of bits: 14
- Jusfitication: left
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 |
|---|
| 85 kPa | 3.35 V | 1.74337 V | 45700 | 84.9978 kPa |
| 78 kPa | 3.035 V | 1.57944 V | 41404 | 77.9999 kPa |
| 82 kPa | 3.215 V | 1.67311 V | 43860 | 82.0006 kPa |