Sie sind auf Seite 1von 4

Abnormal Posture Detection Device with Audible Feedback

Octavian M.S. Dogrescu, Sever S.G. Paca, Member IEEE Department of Applied Electronics and Information Engineering, University Politehnica of Bucharest, Romania octaviand@rdslink.ro, sever.pasca@elmed.pub.ro

Abstract-The goal of this paper is to describe the development of an abnormal posture detection device intended for home use. The device uses two accelerometers placed in the cervical and lumbar regions of the spine and calculates the relative inclination of the cervical and lumbar planes. This inclination is used by the device to decide if the user has an anatomically correct or incorrect posture; in the latter case the user is warned by a buzzer that he needs to correct his posture.

Fig. 1. Block diagram of the abnormal posture detection device.

I.

INTRODUCTION

The idea for this device came from observing a general tendency for people to develop spine conditions like kyphosis and lordosis from an early age [8, 9]. The reasons for the early onset of these conditions are not very hard to find: long hours spent sitting on a chair in front of the computer, the lack of regular physical exercise and, even though it may seem unlikely, poor nutrition is also responsible for the development of spinal problems. Many of these conditions can be prevented if the persons presenting them would be more aware of their anatomically incorrect posture. The abnormal posture detection device described in this paper was designed to have the role of acoustically warning the person using it that their posture needs to be corrected. II. FUNCTIONING PRINCIPLE AND BLOCK DIAGRAM As it can be seen in Fig. 1, the device uses one accelerometer placed in the region of the C7 cervical vertebrae and another near the L4 lumbar vertebrae [2]. The placement for these sensors was experimentally determined and maximizes the performance of the device in making the distinction between a correct and an incorrect posture. Both accelerometers are connected through an IC bus to a PICDEM 2 Plus development board which has a buzzer that is used for the audio feedback of the incorrect posture. The microcontroller on the development board computes the inclination of the accelerometers based on their acceleration output and then computes the difference of the two values obtained. The difference represents the relative inclination of the cervical and lumbar planes and this value can be used to decide if the person wearing the device is slouching or not. There are two steps which must be taken for the device to function correctly.

The first step is the calibration of the device, during which the user must maintain a good posture (left side of Fig. 2). The difference in tilt between the cervical and the lumbar areas is stored in the memory of the microcontroller for future reference (C1-L1).The second step is the continuous monitoring of the posture. If the user slouches (right side of Fig. 2), the difference in tilt becomes C2-L2 which exceeds a certain threshold which was experimentally determined to be 15 degrees more than the reference value computed in the first step. This observation is used in this project as a means of determining if the user has adopted an abnormal posture, by comparing the newly obtained difference in tilt to the value obtained in the calibration step. A device similar to the one presented in this project is the iPosture [13]. The iPosture uses only one accelerometer to determine the changes in posture, making it very easy to use. The downside of utilizing only one sensor is that it limits the use of the device to standing still on the chair. Even though the user keeps a good posture while leaning forward, for example, to watch something from up-close on the computer screen, the device still detects the new posture as an abnormal one.

Fig. 2. Graphical representation of the principle behind the posture detection [8].

2068 - 7966 / ATEE 2011

This limitation is removed by the system presented in this article. The accelerometer placed in the lumbar region acts as a reference for the accelerometer placed in the cervical region, adding a whole range of permitted movements for the user to make. III. CHOICE OF HARDWARE The first accelerometer chosen for this device was the ultra low cost MEMSIC MXC62020JV with two axis reading, digital IC communication, and a measuring range of 2.0 g which is perfect for low cost tilt sensing applications [4]. The second accelerometer used was the STMicroelectronics LIS3LV02DQ with three axis reading, digital IC communication, and a selectable measuring range between 2.0 g and 6.0 g [5]. The main reason for choosing these components was their IC communication capability. The benefits of using the IC interface are [10]: simple implementation of the communication protocol between the accelerometers and the microcontroller, only two bus lines required for data transmission [3] and low component cost. The second accelerometer used had to be a different type than the first because the manufacturing companies did not add the possibility of manually changing the address of the sensor. Using two devices with the same address on the same IC bus is not possible because the master cannot make a distinction between the two slaves. The PICDEM 2 Plus is a development board used to demonstrate the capabilities of the 16 bit PIC microcontroller family, like PIC18F4520 [7]. It was very useful for this project because it already had a LCD and a buzzer integrated, used for video and audio communication with the user [6]. IV. PROGRAMMING A. General Description The code for the programming of the PIC18F4520 was written in C and compiled with the MPLAB C18 compiler; the i2c.h header file was particularly useful because it contains the implementation of the communication commands for IC bus. There are two main subroutines of the program: a calibration routine and a monitoring routine. An important part of each routine is that it works with averaged values of the outputs given by the accelerometers. After experimental research it has been concluded that an average of 5 values is the best choice, given the fact there is also a time factor which must be taken into account. An average of 10 values, even though it would bring a bit more precision, would unnecessarily slow down the device. Another aspect that needs attention is the fact that the accelerometers give an acceleration output, not a tilt output. The tilt must be computed based on the acceleration ranges determined experimentally [11,12], using the arcsine function found in the math.h header file. B. The Calibration Subroutine The first subroutine of the program, having the flowchart in Fig. 3, is a calibration routine during which it is imperative that the user keeps the best posture possible.

Fig.3. Flowchart of the calibration subroutine.

The values computed while keeping the calibration posture will be used as a reference for all the values the device computes in the monitoring process. The calibration routine computes the average difference out of two averages of the inclinations computed for each accelerometer. The choice of two averages was made experimentally, the limiting factor being the duration of the calibration routine. At the end of this routine the reference value is returned to the main routine. C. The Monitoring Subroutine The second subroutine is the monitoring routine, having the flowchart in Fig. 4, in which the program checks if the current difference between the tilts of the two accelerometers is greater than a certain threshold; if so, the buzzer is activated. In more detail, the routine initially adds a 15 degree threshold to the reference value obtained in the calibration subroutine. The 15 degree limit was determined experimentally as the border value above which a posture is classified as being incorrect, in relation to the calibration posture. The routine compares the border value to the current value of the difference in tilt between the accelerometers. If the threshold is exceeded the routine enters a delay of 2 seconds, the purpose of this delay being to prevent accidental warning if the user has only temporarily changed his posture. After this delay, the routine rechecks the posture and if the current value of the difference in inclination is still above the threshold, the user is warned. D. The Main Routine of the Program The main routine of the program, having the flowchart in Fig. 5, starts with the configuration of the PIC18F4520 microcontroller, the oscillator is set to maximum speed of 32 MHz in the High Speed PLL mode. The user is asked to press the S2 button to calibrate the device. After the calibration is done, the user can recalibrate or he can start monitoring his posture.

Fig. 6. The average tilt computed for the MEMSIC accelerometer, the physical tilt being 50 degrees.

Fig. 4. Flowchart of the monitoring subroutine.

V.

EXPERIMENTAL RESULTS

A. Testing the Individual Precision of the Accelerometers To be accurate in evaluating the global performance of the device in detecting postures, it was found necessary to test the accelerometers individual performance in determining tilt. The MPLAB ICD2 (In-Circuit Debugger 2) was used to determine the computed value for each tilt, as it can be observed in the Fig. 6, a screen capture of the watch window in MPLAB. The first two values represent the most significant and the least significant byte of the acceleration value returned by the MEMSIC accelerometer.

The fourth and fifth values represent the computed inclination for one reading of the acceleration, measured in radians and then transformed to degrees. The last value, medie_primul_acc represents the averaged computed value of five reads of the tilt when the sensors real inclination was 50 degrees clockwise. For computational reasons, clockwise tilts are considered negative and anti-clockwise tilts are considered positive. Table 1 contains the values computed by the program for different inclinations of the MXC62020J sensor, measured between 50 and 50 degrees with increments of 10 degrees. As it can be observed, the precision of the sensor is very good (under one degree) in the [-20, 20] degrees interval and sufficiently good for greater tilts (under 4 degrees). It should be noted that the real inclination of the accelerometers was difficult to measure exactly, that reason alone being able to induce some errors in the approximation of the sensors precision. The same testing procedure was applied for the LIS3LV02DQ accelerometer, with similar results (Table 2). The precision is very good when the Y axis of the accelerometer is parallel to the ground (1 degree) and it drops to about 5 degrees when tilt is computed near the margins of the measuring range. B. Testing the Performance of the Entire Posture Detection System After testing the individual performance of the sensors with satisfactory results, the following step was to test the performance of the whole posture detection system. Three tests were conducted in order to evaluate de precision of the device in determining incorrect postures.
TABLE 1 THE REAL AND COMPUTED VALUES FOR THE INCLINATION OF THE MXC62020J ACCELEROMETER

Fig. 5. Flowchart of the main routine.

TABLE 2 THE REAL AND COMPUTED VALUES FOR THE INCLINATION OF THE LIS3LV02DQ ACCELEROMETER

Keeping in mind that the threshold of detection is 15 degrees greater than the calibration value, the main focus of the testing was to evaluate the performance of the device near a 15 degree difference in tilt between the calibration posture and the posture in the monitoring subroutine. The first test conducted was calibrating the device in a certain position and then increasing the tilt of the accelerometer placed in the cervical area with 10 degrees. The device was kept in this position for 10 cycles of measurement and the alarm wasnt set off even once, this meaning that the precision of the device in this case was less than 5 degrees. In a similar manner, the accelerometer in the cervical region was tilted with 20 degrees. Out of 10 cycles of measurement, only once did the device classify the posture as being correct. The second test conducted was aimed at determining the performance of the device detecting changes of posture which lead to lordosis (abnormal curvature of the spine in the lumbar region). After the calibration was made, the system was tested for 10 and 20 degree tilts. The results were similar: a single false alarm for the 10 degree tilt and a single false correct posture classification for the 20 degree tilt. An important aspect to be mentioned is that the calibration routine with 10 readings for each accelerometer lasts 15 seconds and that it takes 8 to 14 seconds for the device to sound the buzzer when an abnormal posture is detected, depending on the position of the section of code the microcontroller is running when the change in posture is made by the user. The third test conducted had the purpose of proving the two accelerometer system is significantly more versatile than the single accelerometer posture detection system which was mentioned earlier. The test is meant to simulate the situation in which the user bends forward while maintaining a good posture. After the device is calibrated, the cervical and the lumbar accelerometers are tilted simultaneous with the same angle. The false alarm rate when conducting this test was 0%, the sensors being tilted with a maximum of 35 degrees.

Fig. 7. Experimental model for testing the device.

VI.

FUTURE DEVELOPMENT

A useful feature that can be added to the device is the detection of abnormal postures caused by moving the spine in the frontal plane (this project was focused on movements in the sagittal plane). This feature can be quite difficult to obtain because it would require at least another accelerometer placed in the thoracic region of the spine and a more complicated detection algorithm [1]. Another idea for a future development of this project would be to investigate the possibility of adding an electrostimulation circuit to the device so that if the person doesnt have a good posture the device sends an impulse to one of the back muscles to motivate the user into the anatomically correct posture [1]. REFERENCES
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] O. Dogarescu, S. Paca, Posture correction device with electrostimulation, in The Scientific Session of the Department of Applied Electronics, 2010. R. McRae, Clinical Orthopaedic Examination, London: ChurchillLivingstone, 2004, cap. 8. IC bus specification, version 2.1, http://www.nxp.com/documents/other/39340011.pdf. MXC62020 datasheet, http://www.farnell.com/datasheets/75127.pdf. LIS3LV02DQ datasheet, http://www.sparkfun.com/datasheets/IC/LIS3LV02DQ.pdf. PICDEM 2 Plus Users Guide, http://ww1.microchip.com/downloads/en/DeviceDoc/51275d.pdf. PICD18F4520 datasheet, http://ww1.microchip.com/downloads/en/DeviceDoc/39631E.pdf. Introduction to kyphosis, http://familymedicinehelp.com/introduction-to-kyphosis. Lordosis, http://www.nlm.nih.gov/medlineplus/ency/imagepages/9583.htm. I2C tutorial, http://www.robot-electronics.co.uk/acatalog/I2C_Tutorial.html. Inclination sensing with thermal accelerometers, http://dataweek.co.za/news.aspx?pklnewsid=18578. Thermal accelerometers thermal compensation, http://arlotto.univ-tln.fr/docs/acc%E9l%E9rom%E8tre/an-00mx007.pdf. I-Posture, http://www.iposture.com/.

Das könnte Ihnen auch gefallen