Real-time stress-detection IoT system — reads HRV from a smart ring and automatically adjusts ambient lighting & music, with zero manual input.
Burnout and chronic stress are among today's biggest public-health risks. Students and young professionals usually notice only after it has already hurt their performance and sleep.
Two market gaps: (1) no reliable, real-time stress-measurement tool exists for everyday users; (2) environments don't adapt automatically to physiological state — smart home devices remain entirely manual.
Four steps from heartbeat to relaxation — zero user action required:
The MAX30102 uses PPG (measures heart rate via light on the skin) for the pulse · BLE (low-power Bluetooth) sends it to the MoodBox · PWM (rapid on/off pulsing) sets the LED's brightness/colour · UART (a simple serial link) passes the command to the speaker.
Processes in under 15 seconds · lighting + music activate at a score of 65+ · built-in false-positive check: exercise (high HRV) ≠ stress.
Two components over BLE (Bluetooth): an Arduino MoodBox (C++ firmware) and an Android PWA (Vanilla JS, HTML5 Canvas), both built from scratch. The interesting part isn't the code — it's the design decisions behind it:
Roles: Hardware & firmware — solo. SW prototype — solo. Business plan (BMC — Business Model Canvas, a one-page business-model design tool, financials, UI/UX) — co-authored with a teammate.
Research shows HRV (heart-rate variability, measured as RMSSD) is a stronger autonomic-nervous-system indicator than heart rate alone, so the score weights it higher: ×40 vs ×30 for HR. Just as important, the baseline isn't a population average — it's each user's own resting rhythm, learned during setup. That's what stops 170 BPM while running from registering as stress.
// Personal baseline learned at startup (5-loop incremental avg)
// — not a population norm, not a fixed constant
float baselineHR = 70.0, baselineRMSSD = 35.0;
int calcStress(float hr, float rmssd) {
float refHR = baselineReady ? baselineHR : 70.0;
float refR = baselineReady ? baselineRMSSD : 35.0;
float s = 50.0
+ ((hr - refHR) / max(refHR, 1.0f)) * 30.0 // HR contribution
+ ((refR - rmssd) / max(refR, 1.0f)) * 40.0; // HRV weighted higher
return constrain((int)s, 0, 100);
// constrain() prevents negative scores during exercise (high HR + high HRV)
// key false-positive prevention: running at 170 BPM ≠ stress
}
The dashboard doesn't just show a value — it shows when the system intervened and by how much stress dropped. That's not a technical detail, it's the core retention loop: the user sees that MoodLight worked, which no competing product offers.
// Each intervention stored with timestamp, description, and stress delta
// — user sees the impact, not just a raw number
const periodsData = {
week: {
events: [
{ time: 'Tue 10:12', desc: 'Stress spike · light + music', delta: '-22pts' },
{ time: 'Wed 14:33', desc: 'Auto intervention', delta: '-18pts' },
{ time: 'Fri 16:05', desc: 'Auto intervention', delta: '-17pts' },
{ time: 'Sat 09:20', desc: 'Low stress · no intervention', delta: '—' },
]
}
};
// Tapping a chart dot highlights the list item — and vice versa
// Bidirectional linking: chart → list, list → chart
function highlightEvent(idx) {
document.querySelectorAll('.event-item').forEach((el, i) => {
el.classList.toggle('active', i === idx);
});
}
The only system combining measurement + lighting + music into one automated, privacy-first product.
| Feature | Oura Ring | Philips Hue | Spotify | Calm App | MoodLight |
|---|---|---|---|---|---|
| HR/HRV Measurement | ✓ | ✗ | ✗ | ✗ | ✓ |
| Smart lighting | ✗ | ✓ | ✗ | ✗ | ✓ |
| Relaxation music | ✗ | ✗ | ✓ | ✓ | ✓ |
| Automatic intervention | ✗ | ✗ | ✗ | ✗ | ✓ |
| Privacy-first / EU data | ~ | ~ | ✗ | ✗ | ✓ |
| Price | €299–499 | €150–300 | €10.99/mo | €69.99/yr | €89.99 + €15/mo |
Freemium: one-time hardware bundle + recurring subscription. From Year 2, B2B expansion into corporate wellness programmes.
| Metric | Year 1 (2026) | Year 2 (2027) | Year 3 (2028) |
|---|---|---|---|
| HW Units | 500 | 1.500 | 4.000 |
| HW Revenue | €44.995 | €134.985 | €319.960 |
| Premium Subscribers | 200 | 800 | 2.500 |
| Subscription Revenue | €24.000 | €96.000 | €330.000 |
| Total Revenue | €68.995 | €230.985 | €649.960 |
| Gross Margin | ~72% | ~75% | ~79% |
| EBITDA | −€71.355 | €17.835 | €322.460 |
| LTV / CAC | ~10× · CAC ~€55 (Y1) → ~€30 (Y3) | ||
HW = hardware · EBITDA = earnings before interest, tax, depreciation & amortisation · LTV/CAC = customer lifetime value vs. cost to acquire a customer
Two phases: (1) a quantitative survey of the target demographic, controlled sample (Google Forms, May 2026); (2) qualitative user testing, n=5, with the SW prototype.
| Element | MVP (Current) | Final Product |
|---|---|---|
| Sensor | 2× Potentiometer (TinkerCAD) | MAX30102 PPG Smart Ring · BLE |
| Hub | Arduino Uno R3 | Custom PCB / MoodBox (ESP32) |
| Actuators | RGB LED + Piezo Buzzer | Smart Bulbs + LED Strip + Speaker |
| App | PWA · HTML/JS · Web Bluetooth | Native iOS & Android |
| Cloud | Local processing | EU Cloud · GDPR · LLM API |
Next Steps
Clinical validation (50+ users) → CE marking → €150K angel round → Product Hunt launch → 30-day trial policy → MediaMarkt pilot (B2B)