Accelerometers are used in many portable devices like smart phones, to detect if the device is held vertically or horizontally, in fitness watches as step counters or in some smart portable hard disks where free fall is detected and the device is secured before hitting the ground.
Two diifferent devices are easily available for bread board use:
![]() |
![]() |
lis3dh | mma8452 |
Here are the references:
In addition to its use as accelerometer the lis3dh also implements a 12 bit ADC for general use and a temperature sensor, which however only measures relative temperature changes and must thus be cross calibrated with another device if absolute temperature values are desired.In order to make it easier for the students to interact with the devices I wrote share libraries with a number of access functions which hides most of the complexity. All accesses to the chip registers pass through the library functions. The library is not really complete as many chip functions like free fall detection, access to the FiFo or to the filter configuration registers are not implemented. In addition to the library itself test programs using the library are provided demonstrating its use.
https://afnog.iotworkshop.africa/pub/Embedded_Systems/3-axisAccelerometers/mma8452.tar.gz
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
lis3-dh.png | r1 | manage | 88.8 K | 2018-11-27 - 10:24 | UliRaich | |
![]() |
mma8452.png | r1 | manage | 159.0 K | 2018-11-27 - 10:24 | UliRaich | |
![]() |
mma8452.tar.gz | r1 | manage | 227.0 K | 2018-12-21 - 16:53 | UliRaich |