Microcontroller sensor interfacing exercises
ADXL1002 acceleration sensor
- sensitivity: 40 mV/g; offset: 2.5 V at 0 g
- output voltage range: 0.5 V to 4.5 V
ADC
- Voltage reference: 1.1 V
- Number of bits: 11
- Jusfitication: left
Signal conditioning
- voltage divider
- division ratio: 22/90
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 |
|---|
| 8 g | 2.82 V | 0.689333 V | 41056 | 7.97729 g |
| -15 g | 1.9 V | 0.464444 V | 27680 | -14.9841 g |
| 12 g | 2.98 V | 0.728444 V | 43392 | 11.9873 g |