Sitting for long periods has become more common in today’s jobs causing serious health issues. Unfortunately the plethora of activity trackers fail to address the issue: being rather active while sitting does not provide a good picture of the amount of time spent sitting.
Sit.Up is a simple device that alerts the user if sitting for too long and tracks the sitting time. It comes in two flavours: a device for the chair which works with any user and a device for the user which works with any chair. Currently I am doing some experiments to see which one is more feasible.
This project is an entry for the Hack a day prize 2015 and is a work in progress. Stand by for updates and drop by to give a Skull for appreciation.
14.06.2015 Wifi Enabled Data logging and display chair
After the first successful tests using capacitive sensors I implemented the thing in the chair. Here are the modules as size comparison. The new module can sit on top of 2 AA batteries and will not require more than 2 wires leaving from it.
Due to the nature of the capacitive sensor, having an ISP/serial cable connected to the PC influences the measurement. In order to develop the software I connected an LCD and in the end I thought it should stay on the chair for a while.
There are 2 electrodes made of aluminium tape: the one towards the back is the ground and the one towards the front is the sense. The capacitance is measured between the two and when a person sits, it increases. I could not find any normal sitting position on the chair which does no detect the person. Here is the whole thing assembled.
And of course, some data logging on the LCD:
11.06.2015 Welcome capacitive
For the last 2 days I have experimented with capacitive sensing. Things are a little bit trickier that with buttons: normally a capacitive sensor drifts, therefore it needs to be constantly adjusted. For a button it is not an issue, as you expect it to be not pressed most of the time. So, you just compare the current readout with some average over the past and you are done. For the Sit.Up sensor it needs to be able to detect a “button press” for longer periods of time, so the button methods don’t work. I believe I solved this problem differently, but more on that later.
The new sensor can be a lot smaller than before, this new board sits on top of 2 AA batteries, and will be hidden under the chair anyway.
09.06.2015 Optical does not work
Today I was checking the proximity sensors based on optical reflection, specially the VCNL4020 which can do 20cm and which I have in my parts box. Or the SI1146. It turns out that even though these would allow for a smaller sensor, they have more limited range than the ultrasonic distance sensor. Then, it hit me: capacitive! A simple wire placed under the chair can measure capacitance which should change depending on whether somebody is sitting or not.
Note: i am not looking at making a chair with built in sensor, rather a sensor as a simple to use add-on.
03.06.2015 New ultrasonic sensor and some data
It’s becoming obvious that ultrasonic sensors are not the best way to tell if somebody is using a chair. I have failed to make another one work with a different model of a chair, which means they will not work everywhere. Apart from that, they are very bulky, coupled with 3AA(A) batteries will have to create a reasonably large sensor. Time to think of alternatives.
I have just received the new US-100 ultrasonic sensors from ebay. As they operate from 3V, a 3.3V supply can be common to the microcontroller and WiFi. Current consumption is also lower, I am measuring 1.8mA vs 7.5mA with the older sensor, 4 times less, this should improve overall power consumption.
I have set up an emoncms panel to watch over the data. Unfortunately it takes a precise level of zoom for the first graph to look this great: the visualizer decimates the data and then interpolates the remaining points linearly, which usually causes it to draw diagonal lines between some sitting and non sitting event. However, here is a section that looks great:
25.05.2015 First experiments with chair version
The chair version will work with any user and should be as low cost as possible so that it will be installed on a high scale on any possible chair. Alternatively, if the chairs are dedicated per person they may provide insight on time spend on each chair, like at work, at home or in the car.
I started doing some experiments with an ultrasonic distance sensor. As it turns out, it is not the ideal thing to use: this particular version requires 5V and quie a lot of power, but it will do for the time being, as proof of concept.
The circuit is build around an XMEGA32E5 one some header board, with an attached ESP8266 and your tipical HC-SR04 ultrasonic ranging module, nothing special. It is not optimised for power consumption in any way so it will burn a charge of batteries in 3-4 days. For now, it simply uploads the data to emoncms on my website, similar to Led logger V3.
As it turns out, putting the sensor on the top of the chair is not a good idea: some fabrics seem to be pretty bad at reflecting ultrasounds and crouching does not detect the person.
Next up, i mount this sensor between the seat and back of the chair. It is a delicate position, as a bit higher or lower will cause the sensor to pick up the cushions as obstacles. However this seems to work a lot better, usable with all the types of pants that i have. (well a long wool sweater will still break the thing).
Conclusion on ultrasonic: might work, delicate to place, large. The high voltage and high power consumption may be managed to get decent battery life.
Trying an optical sensor.