-
21.09.2015 – Wrapping up V2
09/21/2015 at 11:02 • 0 commentsHardware revision 2 is now complete, this includes a dedicated PCB for the circuit and a dedicated 3D printed box. I have made the new box black to merge better with office chairs, even though the box is not visible under the chair. Check you the newer V2, assembled
The documentation has been updated on GIT to include the newest hardware and firmware revisions.
Make sure to check out how simple it is to install the device, once it has been assembled:
and of course, a short testing. I had to alter the timings and disable the power saving to make the device more presentable.
-
13.09.2015 – New PCBs
09/13/2015 at 12:12 • 0 comments -
06.09.2015 – 3D printed box with logo
09/06/2015 at 14:32 • 0 commentsI thought the project needs a custom box, nothing special. Since my 3D printer cannot print more than one colour, I had 2 alternatives to colour the embossed text on the box: markers and pause printing and swap filament. The double filament method makes it only possible to print the logo in a single colour, while colouring allows for multiple.
Here are the two box lids, side by side which one do you like better?
For the first option, I started with a white print, some markers and a bit of colouring, something i haven’t done in a while.
-
29.08.2015 – An Xmega mistake
08/29/2015 at 18:27 • 0 commentsBecause of so many available pins and a higher current requirement of 80mA, I have connected the vibrator motor to 3 pins in parallel of the Xmega microcontroller. This is a good practice and saves adding an extra external switch, like a transistor in these cases. However, once I swapped the fresh alkaline batteries for some not so fresh rechargables, the vibrator was barely felt. Checking the datasheet shows that the Xmega pins are less capable than the old MEGAs, where my mind went for when I was considering that 3 pins are sufficient. So, time for the first design change: add transistor to switch off/on the vibrator. A NMOS is better than a NPN, since it includes a diode to protect against back EMF and does not need a base resistor, saving 2 components extra.
-
10.08.2015 Wrapping things up
08/11/2015 at 22:22 • 0 commentsWith the original capacitive sensor proven to be the best option, it was time to wrap up the project and build the final prototype device and code.
Software wise, a lot of features had to be added, most importantly the ability to alert the user when sitting for too long. The device alerts by vibration every 15 minutes, but once an hour has passed, it becomes more annoying. A web interface is in the works which allow configuration of parameters. Other updated include better calibration, low power modes, vibrator patterns, LED blinks, buzzer sounds, LCD disable and a lot of clean-up.
Hardware wise, the module lost it’s LCD for debugging purposes and gained a vibrator motor, to discretely alert the user if sitting too much. Along with the batteries attached under the PCB, the whole thing is a lot more compact, practically invisible when mounted under a chair. The device is build around a general purpose board I have designed for the microcontroller, the complete schematic is available in the project documentation on GitHub.
Current measurement shows up at around 25μA while sleeping, mostly eaten by the EPS8266 module, the micro itself needs only 0.2μA. Make sure to cut the trace of the red power LED on the module, otherwise it will waste most of the power. In active measurement the current drawn is 4mA, going for an average of about 100μA, should provide 2 years of stand by time. Of course, frequent sitting for long times drains the battery because of the vibrator motor and WiFi. Nevertheless, with typical usage I expect about 6 months from a pair of AAs.
Schematics for the device are simple, with plenty of pins to spare on the micro, there are no major issues. The buzzer and LED get a pin each, while the vibrator gets 3, to increase the current capability an elude a transistor. Optionally, there is an ESP8266 for data uploading and logging. The capacitive sensor itself only requires to connections to the outside: GND and Touch, no other components.
The device, now installed looks much cleaner than before
Looking at some data from June, I can say I probably spent too many hours on my home chair, even after a day of office work
-
12.07.2015 E-filed sensor
08/11/2015 at 21:54 • 0 commentsAs my initial capacitive sensor using aluminium tape as electrodes proved successful, I looked into shrinking the size. Compared to measuring the capacitance, another method of detecting a conductive object like the human body around a sensor is by using the electric field method: 2 electrodes form a transmitter and receiver. When a conductive body comes between them, the amount of signal received changes. I have attempted to use a 75x100mm double sided PCB for this method, at first. In open air the detection distance can be even 20cm, but things change once this plate is placed under a chair: the sensor is very directional and there are ways to sit on the chair without being detected. Swapping the PCB for the original aluminium tape electrodes works better, but there is no point of implementing this method, as it requires extra parts. The system in this case consists of the microcontroller outputting a 1MHz signal on a pin serving connected to the transmitter electrode while the other electrode, the receiver, gets read out by the microcontroller’s ADC after passing through a simple detector.
-
10.07.2015 - Dedicated proximity sensor - A failure!
08/11/2015 at 21:29 • 0 commentsI have done some brief experimenting with dedicated proximity sensors, specially the MTCH101: better sensitivity, but comes with 2 nice “features”. First, it is designed for momentarily proximity, so after a while it will compensate the person and think there is actually nothing there. Second, it seems to get stuck in “detected” mode quite often, even the datasheet mentions a “Stuck Release Mechanism” as a feature! So, no good.
-
14.06.2015 Wifi Enabled Data logging and display chair
06/13/2015 at 23:17 • 0 commentsAfter 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
06/11/2015 at 21:44 • 0 commentsFor the last 2 days I have experimented with capacitive sensing using the method described in Atmel’s Qtouch ADC guide: charge division between external capacitor and internal sample and hold. 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
06/08/2015 at 22:39 • 0 commentsToday 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.