PocketLab user Martin Isaksson used his PocketLab to measure the magnetic field generated by the motor of a washing machine. Check out his results below. Pretty cool!
Washing apparatus ready detection
Using a PocketLab put on the top of a washing machine, we measure the magnetic field generated by the motor. The magnitude of this vector is used to detect if the motor is on, and when the motor has been off for some time, we say that the cycle is finished.
Read data from PocketLab CSV and calculate magnitude from x, y, and z components. Then use an Exponential Moving Average filter to remove the trend (seems like the sensor does not return to zero when the washing machine motor turns off).
time x y z magnitude
0.00 0.0610352 0.0610352 -0.3051758 0.3171480
0.02 0.0610352 -0.0305176 -0.1220703 0.1398491
0.08 0.1525879 0.0915527 -0.3356934 0.3799408
0.16 0.0305176 0.1220703 0.0610352 0.1398491
0.26 0.0000000 0.0305176 -0.0305176 0.0431584
0.36 0.0000000 0.0000000 -0.3967285 0.3967285
Rearrange and plot x, y and z components.
Plot the magnitude
Plot the magnitude trend
Plot the adjusted magnitude (removed magnitude trend).
Plot the normalized absolute magnitude.
Using zero as a threshold, plot on or off status.