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.

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).

DSC_3983 DSC_3993

Conclusion on ultrasonic: might work, delicate to place, large. The high voltage and high power consumption may be managed to get decent battery life.

Next up:

Trying an optical sensor.


Have you ever needed to look at what is going on on a serial port and not have a PC/smartphone around because the location was a bit inaccessible? I did not need this until now, but now I do, so I was looking for a solution. After building this, I think that it would be a good addition to the modified programmer.

This is a quick and dirty solution, i scavenged of the build of the ESP8266 test rig which uses the XMEGA header board. It’s using a IL9341 driven 2.2″ 320×240 LCD connected over SPI on PORTC (see code for exact details). I used a rather small font(10×16) to be able to show a reasonable amount of text, 20 lines and 24 characters per line. The LCD is used in portrait mode, since it only supports hardware driven scroll on the vertical and I did not want to spend time with more complicated code to copy memory.  Even the hardware scrolling functions were missing from the ASF driver implementation for Xmega. Without hardware scroll feature, there would be a lot of time wasted moving data around the memory, and getting a reasonably fast response would require a lot of SW optimization.

Two hardware UARTs are used to monitor a bidirectional serial port communication between 2 devices, the one on PORTC and the one on PORTE. This allows the micro to know from where to where the data is going and display both in different colors, white or green, color matched to the input wires.

Since it needs to be portable, it is powered by 3xAA batteries. Current consumption is under 50mA, so that should be over 50 hours of operation. Additionally the micro supply is brought out, so it can be powered by the external circuit or provide power to it.

Here are a few pictures of the build and a video of booting up a router:






Quiet 3D printer


I have recently purchased a 3D printer, mostly because  I was interested in learning about 3D printing, and of course, because I wanted one. Between buying a ready to print one and sourcing all parts individually, I went for a complete kit. I though getting a kit that needs assembly would allow me to learn more about it and I would enjoy assembling it. So, I went for a prusa i3 steel, because i wanted something capable of both ABS and PLA from the start and should have reasonable endurance.

The Noizzzz

Clearly, the thing is noisy, without any tuning it was constantly over 70dB, peaking at 75dB for some motions. Since I keep it next to my computer desk where I spent most of the time, I am troubled by it. So i made some changes to try and reduce the audible noise. For noise measurements I have used my smartphone with Audio Tool app and an IMM-6 calibrated microphone placed about 1m from the printer.

1. Support. Place the printer on something as rigid and heavy as possible. I found that tables are not that great, but a drawer set works better.

2. Decouple from the support, in order to minimize vibration transmission. Apart from a layer of foam, I used 4 furniture support feet placed under the Y carriage, which means that now the 3d printer touches the ground in less and smaller points than before. This helped a lot.


3. Play with printing speed. As a mechanical system, the whole printer is prone to have certain resonant frequencies and it turned out that the default 50mm/s speed was the loudest possible.

Speed 1

4. Change the motor drivers. The biggest change I have managed to make in terms of noise was to swap the original A4988 X and Y drivers with DRV8825. While these produce a high pitch wine, the mechanical noise is strongly reduced, i managed to get about 8-10dB.


5. Fix the power supply fan. The most annoying thing about it is that it cycles ON/OFF, not continuously variable according to the temperature. Of course  this is acceptable for an industrial power supply, but not for home use. I could have replaced the control with a variable speed one, but there is not much to gain here either: the fan is small and placed in a closed space. The solution i settled for was to replace it with a 9cm fan, the largest I found in my parts collection. After cutting out the previous guard, I mounted the fan as far away from the case as my screws allowed and sealed the area around with duck tape. This is to allow the air to flow easier and keep the fan blades away from the big aluminum plate which would cause noise. Of course, no fan is complete without a red guard on top, with a bit of scaling. I left the original control in place, but I added a 50 ohm resistor as well, to keep the fan turning at lower speed. My goal is for the original thermostat that puts the fan at full power to never trigger. Some tests have shown that this performs as desired, even the outside of the power supply stays cooler then before. This is clearly beneficial and should increase the life span of what is not such a great quality power supply. Check below for the build pictures below.

What is inside the typical not so high quality, 360W, 12V LED power supply:


For thermal regulation, the power supply uses a simple mechanical thermostat placed inside the filter inductor, which switches the fan on at 45°C and switches it off at 33°C. Since the printer does not draw much power, the fan cycles ON and OFF, which is not that great for all the components, since they keep cycling between the 2 temperatures.


I have removed the original fan and cu the grill to improve airflow as much as possible. The fan is placed at about 1cm further away from the case to reduce noise.




Tape is used to seal the gap


I connected an extra wire to the positive supply of the fan to be brought outside in order to add a resistor to keep the fan at idle speed.


Ending with some experiments for idle speed


Of course, no fan installation is complete without a red grill


Note: The E3D fan is small and it’s quite noisy, if the printer does not print. Otherwise there is no difference in noise with or without it, so there is no need to replace this one with something larger.