FITNESS AND SLEEP BAND

Download textiles to monitor daily activities like walking, jogging, sleep and hence to provide suggestions to enhance the quality of life. Our basi...

0 downloads 268 Views 315KB Size
Fitness and Sleep Band Badal Chaudhary

Danny Boby

Sourya Basu

Vaibhaw Kumar

Indian Institute of Technology Indian Institute of Technology Indian Institute of Technology Indian Institute of Technology Kanpur, India 208016 Kanpur, India 208016 Kanpur, India 208016 Kanpur, India 208016 Email:[email protected] Email:[email protected] Email: [email protected] Email: [email protected]

Abstract—The field of wearable electronics has the potential to revolutionise our lifestyle. Our aim was to develop a complete package to monitor various physical activities using a wearable band which can interact with mobile devices. This paper presents our solution using an Arduino Lilypad, a 3-axis accelerometer and a Bluetooth module. The band can pair with mobile devices using Bluetooth and measures the distance travelled while walking, calories burnt while jogging, pushups and skipping, and monitors sleep and also has a smart alarm. Index Terms—Lilypad, fitness, sleep, band

I. I NTRODUCTION

of +3g. It can measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion, shock, or vibration. It is has sensitivity of 300mV/g and a voltage output range 0.1 to 2.8 V. B. Step Counting Algorithm Our algorithm for step counting was based on the observation that activities like walking follow patterns of regular acceleration and deceleration. As indicated in the figure, a step starts with an initial acceleration which is maintained till about mid swing followed by deceleration. Hence , a step can

A

great deal of attention has been given to the development of wearable technology during the recent years. There have been successful efforts to build smart watches, virtual visual aids, fitness trackers and so on. But these were limited to commercial ventures. With the release of the Arduino Lilypad, it has become possible to develop e-textiles on smaller scales without manufacturing it. Our team was keen on developing etextiles to monitor daily activities like walking, jogging, sleep and hence to provide suggestions to enhance the quality of life. Our basic design principle was to use the least number of components possible while at the same time ensuring ease of use. We decided on a band with an accelerometer as the only sensor, Lilypad and Bluetooth module to communicate with mobile devices. This ensured that our band was compact while still being feature packed. We also built an Android application that acts as the front end to make the band easy to use. It has the functionality to calculate distance walked when in walking mode, calories burnt during activities like jogging, doing pushups or skipping. Apart from these it can also track various stages of sleep and set smart alarms to wake you up at the best time possible. Actigraphy is a non-invasive method of monitoring human rest cycles. Sensors are used to measure motor activity. To monitor sleep we favoured actigraphy as it is an inexpensive alternative to polysomnygraphy while still being accurate for practical purposes. It does not interfere with sleep and is useful in diagnosing sleep disorders. II. T HEORY A. ADXL 335 3-axis Accelerometer The ADXL335 is a small,thin,low power, complete 3-axis accelerometer with signal conditioned voltage outputs. The product measures acceleration with a minimum full scale range

Fig. 1. A typical walking cycle

be accurately determined by recording the two points at which deceleration changes to acceleration. This approach had the advantage that it simple to implement and can be tweaked for a wide variety of applications as we demonstrate in this paper. The accelerometer data is filtered using a low-pass filter and the change in acceleration is compared to a value which we determined based on raw data to minimise errors. The value we set is 1.5 m/s2 . The following table shows the results of our algorithm. Actual steps 61 101 62 34 49 56

Steps Counted 60 101 59 37 50 56

C. Sleep Tracking Algorithm Sleep can be classified into light sleep and deep sleep. Light sleep is characterised by muscle relaxation, light dreams and a relatively active body. These are phases 1 and 2 of the NREM cycle. Deep sleep consists of phase 3 of the NREM cycle and the REM cycle. Body temperature drops significantly and

the body hardly moves. Deep sleep should ideally constitute around 45% of net sleep time. Our algorithm was to characterise the type of sleep based on the amount of movement registered by the accelerometer. The amount of movement is calculated using Proportional Integrating Method(PIM). The area under the rectified accelerometer data is measured for each epoch and the accumulated count is stored. The PIM measures movement intensity by summing the deviations from 0 V every 10th of a second. The threshold value obtained by analysing the recorded data is 0.85. The subject is characterised as awake if movement is above 50 for a period greater than 10s. This shows a sample data we obtained for a 3hr sleep cycle.

The above components have been sewed on a BP cluff through conducting threads. The function codes for different activities have been developed on the Arduino IDE. Under the

Fig. 2. PIM vs time graph

D. Estimation of distance by using height and number of steps The height of a person is directly correlated to the stride length. It has been experimentally determined that the ratio of the stride length to the height of a person is about 0.415 for males and 0.413 for females. E. Estimation of calories burnt by using weight and number of steps Calories burned depends on the intensity of the activity. The activity intensity is measured using a quantity called equivalent steps. Equivalent steps is the ratio of the number of steps of the activity and walking at 3mph in the same time. Following are the equivalent steps of jogging, doing pushups and skipping. 1) Jogging - 2.12 2) Skipping- 3.03 3) Pushups - 2.42 This can be converted into calories burned using the table given. III. H ARDWARE AND S OFTWARE IMPLEMENTATION The following components have been used: • Lilypad Arduino 328 • Lilypad Accelerometer(ADXL 335) • BT Mate Gold • Lilypad Power • Lilypad Vibrator Motor

Fig. 3. Our Device

fitness banner, we have added functionality to measure calories burnt during walking, jogging, pushups and skipping. These activities utilise the step counting algorithm though tweaked for individual requirements. The smart alarm starts listening for data approximately 30 minutes before the set alarm. It then sounds the alarm if the person is in light sleep at the earliest time in that interval else it sounds the alarm at the set alarm time. Taking into account of the small size of the device and the aim to use the least number of components, we reasoned it was better to make it interact with mobile devices rather than add a display module. Thus we developed an Android application that pairs seamlessly with the band. IV. L IMITATIONS The major source of error in the algorithm is due to the limitations of a 3-axis accelerometer. The double integration of acceleration values introduces a lot of noise and error proportional to time2 which were difficult to filter using existing techniques.This constrained us to use approximate methods to calculate distance. A more accurate and robust algorithm could be implemented for a 9-axis accelerometer. Also compromises were made due to the size of the device.

V. F UTURE S COPE At present the device can only classify sleep as light or deep. It can be extended to classify NREM and REM stages of sleep using a Heart Rate Monitor and a temperature sensor.A major addition could be the implementation of human activity recognition. There are algorithms which automatically detect the type of activity based on the orientation of the accelerometer, linear and angular acceleration. This would eliminate the need to select manually the kind of activity. VI. C ONCLUSION We believe we have quite successfully completed the aims of our project. The algorithm we used is sufficient for all practical purposes and functions well for what it was intended. Although the aforementioned limitations could not be resolved to the best of our abilities, it was difficult to resolve in the limited timeframe we had. ACKNOWLEDGMENT The authors would like to thank the SnT council under which the project was undertaken and successfully completed. We would also like to thank our mentors Elle Atma Vidya Prakash, Harshit Rathore and Raghuveer Thirukovalluru for their support and suggestions throughout the project. R EFERENCES [1] Jin-Ho Cho, Jeong Tai Kim, Tae-Seong Kim Smart-phone based Human activity Classification Symposium on Sustainable Healthy Buildings, Seoul, Korea [2] Kurt. Seifert and Oscar Camacho Implementing Position Algorithms using Accelerometers Freescale Semiconductor [3] Matej. Andrejasic MEMS Accelerometers University of Ljubljana [4] Jan. Hedner, Giora Pillar, Stephen D Pitman, Ding Zou, Ludger Grote, David P White A Novel Adaptive Wrist Actigraphy Algorithm for SleepWake Assessment in Sleep Apnea Patients Sleep Laboratory, Pulmonary Medicine, Sahlgrenska University Hospital, Gothenburg, Sweden. Sleep Lab, Rambam Medical Center and Technion, Israel Institute of Technology, Haifa, Israel. Sleep Division, Brigham and Women’s Hospital and Harvard Medical School, Boston MA, USA [5] Masoud Tahmasian, Habibolah Khazaie, Amir Ali Sephery, Michael B Russo IAmbulatory Monitoring of Sleep Disorders Sleep Research Center, Department of Psychiatry, Kermanshah University of Medical Sciences, Iran. Department of Psychology, University of Victoria, Canada. Burns School of Medicine, University of Hawaii, USA.