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: 2.25 V
- Number of bits: 8
- Jusfitication: left
Signal conditioning
- voltage divider
- R1 = 10 k, R2 = 10 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 |
|---|
| -34 g | 1.14 V | 0.57 V | 16640 | -33.9355 g |
| -22 g | 1.62 V | 0.81 V | 23552 | -22.0703 g |
| -37 g | 1.02 V | 0.51 V | 14848 | -37.0117 g |