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.048 V
- Number of bits: 11
- Jusfitication: left
Signal conditioning
- voltage divider
- division ratio: 10/22
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 |
---|
-11 g | 2.06 V | 0.936364 V | 29952 | -11.02 g |
-31 g | 1.26 V | 0.572727 V | 18336 | -30.985 g |
-17 g | 1.82 V | 0.827273 V | 26464 | -17.015 g |