This device helps me break my habit of sitting too long while doing homework or scrolling TikTok. It tracks how long I’ve been sitting and starts beeping with a reminder to stand up and move once I hit my time limit. The alarm won’t stop until I get up and move around—it senses my motion to confirm I’m active. Once I move, it stops beeping and records how long I stay active, encouraging me to balance sitting and moving.
Overall View of the Sitting Time Tracker
Wooden Box Created by Laser Cutting
General Circuit Connecting All Components
Sitting Time Status and Tracking
Alert for Sitting: Time to Move!
In this video, I demonstrate the operation of the sitting time tracker. It starts in a sitting mode, automatically recording the sitting time. For testing, I set the time limit to one minute. When the limit is reached, it begins beeping and displays an alert to remind me to stand up and move. Once I start moving, the beeping stops and the tracker begins recording the moving time.
Voltage Regulation Circuit for Arduino Micro
Unit Test for Acceleromter
Soldering Arduino Micro
Soldering Everything
Wooden Box by Laser Cutting
Final Wrap Up
I was really surprised by the amount of time I spent soldering. I have been soldering since my first year, so I expected it to take less time since I have some experience. However, the first time I soldered, I attached all the headers to the protoboard and then plugged in the wires, but it essentially turned into a breadboard, which is meaningless because I don't want to use a breadboard that's too bulky for my little wooden box. Therefore, I had to resolder everything. After soldering and testing it, I found that it didn't work. I asked Professor Zach for help, and it turned out that due to my poor soldering skills, something was connected incorrectly. I should have applied heat to the metal for a longer time, so I had to fix everything over again. Through this process, I learned a lot about soldering, including how to desolder things properly instead of using my old, incorrect method. Honestly, before taking this class, I had never learned soldering systematically—I just tried it. It was a great experience to improve my soldering skills.
One of the written critiques I received said, “replace the box with more soft materials.” I completely agree with this feedback, especially considering my goal is to make the device wearable so that it can track sitting time and moving time pn human body. The rectangular wooden box, with its edgy and pointy design, is simply not suitable for the human body. My project can also be more aesthetic by using the soft materials. Another critique I noticed was to “change the sitting time limit without connecting to the computer.” I also agree with this suggestion. Initially, I did not consider the inconvenience of having to connect the device to a computer to adjust the time limit. I just change the time limit on my computer; however, it is not realistic when every time I want to change the time limit, I have to take out the Arduino and connect it to computer. I can add an alternative mode that allows the user to change the time limit directly on the device. This modification can improve the user experience. Reflecting on the project as a whole, I am quite happy with the final outcome. It was midterm season, a particularly stressful time for me, and there were moments when I thought I couldn’t finish the project2 on time. Also, I learned a lot during the process! Overall, thie experience is an increadible learning experience for me, because I experiences some challenges, from improving my soldering skills to troubleshooting unexpected design flaws. Also, it is really exciting for me to have my very first laser cutting small wooden box! I got so much help from Professor Jayla on creating wooden box on using laser cutting and a recommended website. Through this process, I recognized sometimes I will overlook details in favor of rapid progress. Next time, I would advise my past self to consider every aspect of the design more thoroughly from the start. If given the opportunity to iterate on this project, I would replace the wooden box with softer materials and explore soft fabrication techniques—a field I have always been interested in (I actually knitted before). Additionally, I would look into creating extra features, such as tracking the number of steps taken or monitoring calories burned, to make the device even more powerful and useful.
/*
Sitting Time Tracker
Nora Xi
Read in position value from acceleromter, and use function process and checkSittingDuration to record the sitting time. Compare it with the time limit.
pin mapping:
Arduino pin | role | description
___________________________________________________________________
A0 input xPin for Accelerometer
A1 input yPin for Accelerometer
A2 input zPin for Accelerometer
6 output buzzer
Part of code for acceleromter is from https://github.com/Seeed-Studio/Accelerometer_ADXL335
*/
#include <Arduino.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
const int xPin = A0;
const int yPin = A1;
const int zPin = A2;
const int buzzerPin = 6;
LiquidCrystal_I2C lcd(0x27, 16, 2);
const unsigned long SIT_LIMIT = 1 * 60; // 60 minutes in seconds
const int MOVEMENT_THRESHOLD = 50;
const int CHECK_INTERVAL = 1000;
bool isMoving = false;
unsigned long stateStartTime = 0;
unsigned long lastAlertTime = 0;
void setup() {
Serial.begin(9600);
pinMode(buzzerPin, OUTPUT);
lcd.init();
lcd.backlight();
lcd.print("Initializing...");
delay(1000);
lcd.clear();
}
bool process(int x, int y, int z) {
static int prevX = 0, prevY = 0, prevZ = 0;
static bool firstRun = true;
if(firstRun) {
prevX = x;
prevY = y;
prevZ = z;
firstRun = false;
return false;
}
int deltaX = abs(x - prevX);
int deltaY = abs(y - prevY);
int deltaZ = abs(z - prevZ);
prevX = x;
prevY = y;
prevZ = z;
return (deltaX + deltaY + deltaZ) > MOVEMENT_THRESHOLD;
}
void checkSittingDuration() {
if (!isMoving) {
unsigned long sittingTime = (millis() - stateStartTime) / 1000;
if (sittingTime >= SIT_LIMIT) {
tone(buzzerPin, 1000); // Activate buzzer
if (millis() - lastAlertTime >= 10000) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("ALERT!");
lcd.setCursor(0, 1);
lcd.print("Move your body!");
lastAlertTime = millis();
}
}
} else {
noTone(buzzerPin);
}
}
void updateDisplay() {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Status: ");
lcd.print(isMoving ? "Moving" : "Sitting");
lcd.setCursor(0, 1);
lcd.print("Time: ");
lcd.print((millis() - stateStartTime) / 60000);
lcd.print("m");
}
void loop() {
if (digitalRead(buttonPin) == LOW) {
systemActive = !systemActive;
isMoving = false;
stateStartTime = millis();
lastAlertTime = 0;
updateDisplay();
delay(200);
}
if (systemActive) {
int X = analogRead(xPin);
int Y = analogRead(yPin);
int Z = analogRead(zPin);
bool currentState = process(X, Y, Z);
if (currentState != isMoving) {
isMoving = currentState;
stateStartTime = millis();
lastAlertTime = 0;
}
static unsigned long lastUpdate = 0;
if (millis() - lastUpdate >= 1000) {
updateDisplay();
checkSittingDuration();
lastUpdate = millis();
}
}
delay(CHECK_INTERVAL);
}