Motion-Controlled Pomodoro Timer
by nilutpolkashyap in Circuits > Clocks
48 Views, 0 Favorites, 0 Comments
Motion-Controlled Pomodoro Timer
NOTE: I am yet to receive the 3D-printed case for the Pomodoro timer. I will update the pictures once I shift the project to the new 3D-printed case. I didn't have enough time before the contest submission deadline.
Build a completely portable, motion-controlled Pomodoro timer that runs on battery power! This innovative productivity tool responds to device orientation to select timer durations (5, 10, 15, 30, 45, or 60 minutes) with automatic screen rotation for optimal viewing. The integrated battery system with charging capability makes it perfect for use anywhere without being tethered to a power outlet.
What makes this special:-
- 🎯 Motion-controlled timer selection (no buttons needed!)
- 🔄 Automatic screen rotation based on orientation
- 🎵 Audio feedback and completion alerts
- 👆 Touch sensor for easy control
- 📱 Professional LCD display with smooth animations
Key Features:
- 🔋 Portable battery-powered operation with USB charging
- 🎯 Motion-controlled timer selection (no buttons needed!)
- 🔄 Automatic screen rotation based on orientation
- 🎵 Audio feedback and completion alerts
- 👆 Touch sensor for easy control
- 📱 Professional 1.69" LCD display with smooth animations
- âš¡ Built-in charging system with status indication
Perfect for:
- Study sessions away from power outlets
- Outdoor work or reading
- Meeting rooms and classrooms
- Travel and mobile productivity
- Anywhere you need distraction-free timing
Supplies
Required Components
- ESP32 Development Board (30-pin)
- Waveshare 1.69" LCD Module (240×280) (ST7789V2)
- MPU6050 IMU Sensor
- TTP223 Touch Sensor
- Passive Buzzer
- 3.7V 500mAh LiPo Battery
- TP4056 Charging Module
- MT3608 Step-Up Converter
- Wires
- PCB Prototype Board
Tools Required
- Soldering iron and solder
- Wire strippers
- Multimeter
- Computer with Arduino IDE
- Micro USB cable
- Small screwdriver set
Set Up Development Environment
Arduino IDE Configuration
1. Download and install Arduino IDE from [arduino.cc](https://arduino.cc)
2. Add ESP32 board support:
- File → Preferences
- Add URL: `https://dl.espressif.com/dl/package_esp32_index.json`
- Tools → Board → Boards Manager → Install "ESP32"
Install Required Libraries
- TFT_eSPI (by Bodmer) - v2.4.0+
- Adafruit MPU6050 - v2.2.0+
- Adafruit Sensor - v1.1.0+
- Wire (built-in for I2C)
- SPI (built-in for display)
Configure TFT_eSPI for Waveshare Display
Navigate to Arduino libraries folder, find `TFT_eSPI/User_Setup.h` and configure:
Connections
Power System Wiring
Connect the LiPo Battery to TP4056
LiPo Battery → TP4056 Charger
Red (+) → B+
Black (-) → B-
Connect TP4056 to MT3608 Boost Converter
TP4056 Output → MT3608 Input
OUT+ → IN+
OUT- → IN-
Configure MT3608 Output Voltage
1. Connect multimeter to MT3608 output (OUT+ and OUT-)
2. Turn potentiometer clockwise to increase voltage
3. Adjust until output reads exactly **5.0V**
4. Double-check voltage before connecting to ESP32
Connect MT3608 to ESP32
MT3608 Output → ESP32
OUT+ → VIN (5V input pin)
OUT- → GND
LCD Display (SPI Interface):
Waveshare 1.69" LCD → ESP32
VCC → 3.3V
GND → GND (shared)
DIN → GPIO 23 (MOSI)
CLK → GPIO 18 (SCLK)
CS → GPIO 5
DC → GPIO 2
RST → GPIO 4
BLK → GPIO 15
MPU6050 IMU Sensor (I2C Interface):
MPU6050 → ESP32
VCC → GPIO 13 (power output)
GND → GND (shared)
SDA → GPIO 21
SCL → GPIO 22
TTP223 Touch Sensor:
TTP223 → ESP32
VCC → 3.3V (shared with LCD)
GND → GND (shared)
I/O → GPIO 16
Passive Buzzer:
Buzzer → ESP32
+ → GPIO 14
- → GND (shared)
Code
How It Works
Motion Control:
- Tilt left/right (X > 0.5 or X < -0.5) → PAUSE
- Hold vertical (X between -0.3 and 0.3) → Active timer selection
Timer Selection (Y-axis tilt):
- Y > 0.85 → 5 minutes
- Y 0.6 to 0.85 → 45 minutes
- Y 0.0 to 0.6 → 10 minutes
- Y -0.6 to 0.0 → 60 minutes
- Y -0.85 to -0.6 → 15 minutes
- Y < -0.85 → 30 minutes
Features:
- Auto-rotating display based on orientation
- Touch to stop timer alarm
- 2-second buzzer when timer completes
- 3-4 hour battery life