This project has been developed in association with Lancaster University, England.
The objectives of this project are as follows:
- Detection The magnet sensors are used to detect whether a magnet is present or not. This can be achieved by letting a led light or even a small mono sound when the magnetic presence is detected.
- Left/Right Movement The magnet sensors should be used to detect whether a magnet was moved from left to right or vise versa. A phone application can then be used to show an arrow to represent this movement.
- Compass An improved motion detection based on objective 2.
To this, sensors of type Hall Effect Sensors are used. There are 9 of these sensors on the Magnet Sensor board, which are aligned on a 3x3 grid numbering from 1 to 9.
The output from the magnet sensors are directed to the Opensensor Board via a connector cable, so sensor 1 (s1) is connected to RB0 (pin on the sensor board) and s2 to RB1 and so on.
The application on the Opensensor Board samples those 9 input pin every 200ms each and outputs the following values:
East (right) movement
North east movement
North west movement
West (left) movement
South west movement
South east movement
Each output value is terminated with newline “\n”. The two interfaces of the Opensensor board, Bluetooth and the RS232, can be used to view the output.