TUT
Department of Electronics
Projects - Movement detection with magnetic sensors

Kankaanpää Unit - Projects

Movement detection with magnetic sensors


  • Work done in 2003-2005
  • Extent of work: Diploma thesis, Development of swim distance tracking algorithm
  • Co-operation with Clothing Plus ltd
  • Funding: Clothing Plus ltd
  • Results: Software and algorithm for the device
  • Contact: Manu Myry

Wearable devices have become more and more common; one of the major target groups is sports as people are increasingly interested in their physical performance and wellbeing. Wearable devices measuring data such as covered distance and heart rate during exercise provide interesting information and help the athlete concentrate on the performance itself. The devices should, however, be easy to use to not distract the exercising itself and provide accurate results.

This project set out to develop the distance measuring algorithm for the Clothing+ Swim Distance Tracker. The first prototypes were produced as a shared project with the Tampere University of Technology Department of Electronics and Clothing+. This work especially concentrated on researching motion detection with magnetic sensors as well as other sensors and their suitability for measuring the covered pool distance.

The algorithm development started with no set limitations for the swimmer´s technique. In this case the magnetic sensors measure earth´s magnetic field and swimmer´s rotations in relation to sensor´s axis. At a pool turn the device´s integrated electronic compass registers a 180 degree change of direction; multiplying the number of turns with the pool´s length gives the covered distance. The rotation can only be measured if the sensed magnetic field´s direction differs from rotation axel. So the measured change in direction is biggest in the equator were the magnetic field is perpendicular to earth´s surface and demises the further we go up north.

Magneto resistive sensors were chosen in this case because they were cheaper than for example accelerometers. The idea was to keep the whole device and sensor circuitry as simple as possible and keep the costs down. They are also simple way to measure rotation movement. The device´s first sensors were less than optimal and more accurate results were obtained by tracking changes in the swimming data. The magneto resistive sensor´s sensitivity and its offset point varied making the 3D vector calculation inaccurate. Also local changes in magnetic field and other magnetic disturbances in data caused errors in turn calculation. To overcome the sensor errors new better sensors were chosen and the analog circuitry was updated. The sensor resolution still wasn´t enough for vector calculation and that idea was abandoned. Also it would have needed more calculation power.

Pool turn detection was done with signal processing using existing microcontroller hardware which was a challenge due to fixed point arithmetic and small memory. The turns in data are visible to eye, but how to teach the detection to the device. The detection algorithm looks for changes in data that happen when swimmer turns at end of the pool. The algorithm was tested with swimming data gathered during the project. Turn detection results were promising and swimming style had little effect to detection rate. It was also considered to leave one sensor ( Z ) out, which would have made the sensor circuitry much simpler. This wasn´t achievable though without compromising the turn detection rate.

The deeper analysis of swimming data seems to be a interesting challenge. If accelerometers were also used more information of swimming moves could be obtained. It could be possible to detect different swimming styles and calculate swimmers energy consumption. It is clear that this would need much more calculation power. Maybe a better way would be to store the data to onboard memory and after wards analyze the data with a pc. This way for example a trainer could analyze the swimmers style better.

Links and other info:

  • Myry, Manu (2005) Movement detection with magnetic sensors. Master of science thesis, Tampere University of Technology, Electrical Engineering Department, Tampere.

Updated , Hokkanen Mirja