Angular positioning of a door or window - using a MEMS accelerometer and a magnetometer

University essay from Lunds universitet/Avdelningen för Biomedicinsk teknik

Author: Josefin Voigt; [2015]

Keywords: Technology and Engineering;

Abstract: The accurate and reliable detection of opening of doors and windows is vital for home security applications. This master thesis aims to present a way to achieve this using a low-cost and low-power ecompass, containing a MEMS accelerometer and a magnetometer. This has been achieved by attaching such a device to a door and collecting sensor data when opening and closing the door. Said data were then analysed in the Matlab environment to study the impact of different methods found in literature to correct for errors in measurements. These include Zero Velocity Compensation for the accelerometer values and hard- and soft-iron compensation for the magnetometer. Thereafter the angle of opening has been calculated, using corrected measurement values. The finished algorithm has also been adapted for implementation on a Cortex-M4 CPU as this, or a similar processor, is likely what is available to use with the e-compass in a real world application. This also motivates the adjustment of the algorithm to use less memory. Finally said implementation has been performed. The results show that it is possible to correct for most of the errors of the accelerometer, but the errors that are left will still propagate to the angular calculations, causing the angle to drift. This can be compensated for by using the angle calculated from magnetometer measurements. The correction of effects affecting the magnetometer is also mostly successful. Likewise the implementation of the algorithm on the processor shows promising results. However, to generalise the algorithm to work on all kinds of doors, as opposed to only the doors it has been developed on, further studies are required.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)