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: 10
- Jusfitication: left
Signal conditioning
- voltage divider
- R1 = 47 k, R2 = 51 k

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 |
---|
78 kPa | 3.035 V | 1.57944 V | 41408 | 78.0065 kPa |
60 kPa | 2.225 V | 1.15791 V | 30336 | 59.9709 kPa |
83 kPa | 3.26 V | 1.69653 V | 44480 | 83.0105 kPa |