Skip to content

3. Implementation

Namkangwoo edited this page May 9, 2019 · 9 revisions

Data collection

We collected and analyzed the data through SmartWatch for about a month 
to characterize the smoking behavior.
This graph shows the changes in the x-axis value of the accelerometer sensor 
among sensor values that appear when performing some of the most common actions in everyday life.
The x-axis value of the accelerometer sensor is used 
because the direction of the wrist changes when smoking is performed,
and the value changes most clearly.

Key observation

Through this, we have found two important features. 
The first feature is that the hands are raised and their hands 
are lowered again after about 1 to 1.5 seconds while inhaling the cigarette.
At this time, the sensor data values when the hands were up and down
were measured from -10 to -11 and 7 to 9 on average, respectively.
The second feature is that these patterns repeat on average six or more times.

Algorithm

Based on this, we implemented the algorithm in two steps. 
First, the suction operation is determined. 
Inhalation here refers to the process of raising your hand,
inhaling the cigarette, and bringing it back down. 
If this suction operation is repeated 6 or more times within a certain time,
it is judged that smoking is finally possible. 
In addition, the user can determine whether or not 
he / she wears a smart watch through the heart rate sensor value.
Clone this wiki locally