EMBEDDED SYSTEMS

SMART TEA CUP

An intelligent vessel for the perfect brewing ritual.

1. The "Why": Precision in Ritual

Tea is a ritual, but temperature is a variable that often ruins the experience. Too hot, and you burn your tongue; too cold, and the flavor profile is lost. The window for the "perfect sip" is fleeting.

The Smart Tea Cup was built to solve this timing problem. Instead of guessing or constantly testing the liquid, I wanted a device that could intelligently monitor the thermal decay of the tea and provide intuitive, non-intrusive feedback exactly when it reached the optimal drinking zone.

2. The "How": System Architecture

Tech Stack

  • Microcontroller: ESP32 (Heltec WiFi LoRa 32)
  • Sensors: DS18B20 OneWire Temperature Sensor
  • Display: SSD1306 128x64 OLED (I2C)
  • Power Management: Deep Sleep & Wake-on-Timer/Button
  • Language: C++ (Arduino Framework)

Thermal Logic & Prediction

Read Sensor Calculate Decay Estimate Time Update UI

The core of the system is a thermal monitoring loop running on the ESP32. It continuously polls the DS18B20 sensor to get the current liquid temperature (temperatureC).

The system doesn't just display the current value; it calculates the cooling rate every minute. By comparing the current temperature to the previous minute's reading, it determines the degrees lost per minute. It then uses this rate to project the "Time to Go"—an estimation of how many minutes remain until the tea reaches the ideal minimum temperature (45°C).

State Machine & Feedback

The device operates as a state machine, providing different feedback based on the "Time to Go" prediction and the current temperature zone.

Zone 1: Cooling (Wait)

When the tea is too hot (> 60°C), the system calculates the wait time. If the estimated wait is between 5-10 minutes, the LED flashes slowly. If it's less than 5 minutes, it flashes fast, signaling that the perfect sip is imminent.

Zone 2: Ideal Range (Drink!)

Once the temperature hits the sweet spot (45-60°C), the OLED display triggers a visual alert: "Drink your tea !!!!". A progress bar visually represents where the current temp sits within this ideal window.

Zone 3: Finished (Sleep)

When the temperature drops below the minimum ideal threshold (45°C), the system assumes the session is over. It displays the final temperature and enters Deep Sleep Mode to conserve battery, waking up only via a hardware button reset.

3. Visual Interface

The SSD1306 OLED screen is the primary interface, designed to give all necessary information at a glance without being overwhelming.

  • Dashboard: Shows Current Temp, Max Ideal (60°C), and Min Ideal (45°C).
  • Progress Bar: A dynamic bar that maps the current temperature to the ideal range (0-100%).
  • Status Text: Dynamic messages like "Time to go: X min" or the celebration message when ready.

The UI code handles text alignment and screen clearing efficiently to ensure smooth updates every second, creating a responsive and polished user experience.