Advertisement

Tired of back pain? This DIY posture sensor detects if you’re slouching

It beeps to reminds you to sit up straight

Too much chatter, too little chatter, fluorescent lights, changing temperature, loud crunching and robotic-sounding phone rings, are traditionally categorized as “annoyances” in the world of office-work, but the worst culprit by far, is “Back Pain”. Yes, if back pain were a noun named Back Pain, he would be synonymous with that nagging you’re-not-good-enough-for-my-son/daughter mother-in-law, the kind who calls to remind you to brush your teeth or refrigerate the food she sent. Fortunately, all it takes is a little bit of DIY ingenuity to craft your very own posture sensor that notifies you whenever you’re slouching, not unlike a mother-in-law, to help eliminate back pain.

If you’re familiar with electronics, then your mind may already be cycling through obvious design solutions: an accelerometer to measure the angle at a certain point in the spine, or pressure sensor that measures the weight distribution of your back. This article deals with neither. Instead, we will outline a device that simply reads the distance from your head, comparing it to a pre-set amount equivalent to when you’re sitting properly.

Hardware
Opting to use a distance sensor as the primary means of slouch-detecting saves both time and money, but does not sacrifice execution. As a result, very few components are needed: a sensor, a controller, a small piezo speaker, power supply, a prototyping PCB, some pin headers, an Arduino, a plastic tube, and piece of leather or cloth to hold the device to ― you don’t want to attach it to the chair itself, right? 

Slouch_Detector_00

The author over at Coretech Robotics recommended an SR-HC04 ultrasonic sensor for its balance of precision and affordability, but almost any infrared or ultrasonic sensor will do. Similarly, there are no special requirements for the controller, so use whatever’s at hand; the author used an Attiny85. Finally, we will need a 5V power supply on account of the ultrasonic sensor. 

Slouch_Detector_1

Solder everything together onto the prototyping PCB; include some pin heads to allow the sensor to connect with the power supply. Resistors do not need to be used for such a simple circuit; however, the author notes that the piezo speaker may require one for longer use. 

Slouch_Detector_2

Next, we must run the wires from the power supply, through the plastic tube, to the circuit itself. (The purpose of the tube is to elevate the circuit to height of your head above the seat.) Once they’ve been joined, you may use electrical tape to firmly secure the circuit atop the tube. Lastly, create a holster in the leather of fabric to help mount the entire device and simultaneously hide the battery.

Slouch_Detector_3

Software 
Programming the Attiny85 controller requires an Arduino, but is simple enough to do with the help of the logic diagram below. 

Slouch_Detector_4

Once the circuit is powered, a configuration mode will detect and record the distance between the sensor and the user’s head, labeling this measurement as the correct posture. Afterwards, a watch-mode is initiated that compares the current distance to the recorded distance on a continuous basis, issuing an alarm whenever the user moves too far. Returning to the correct posture silences the alarm.

In the event that you’ve walked away from chair, the alarm will automatically silence after three beeps, entering a power saving mode. The sensor will proceed to periodically read the distance in case you’ve returned; sitting back in the chair will eventually reactive the sensor into its initial configuration phase.

Story via Coretech Robotics 

Advertisement



Learn more about Electronic Products Magazine

Leave a Reply