September 25, 2025

Automated Curtain Alarm System

Automated Curtain Alarm System

Short Summary

The Automated Curtain Alarm System (ACAS) is a fully integrated smart curtain solution that combines embedded hardware, stepper motor control, IR remote and mobile app communication, database management, and alarm scheduling to enhance daily routines. The system can open and close curtains, control lights, and trigger alarms via Wi-Fi, MQTT, or an IR remote—without relying on constant human supervision.

Problem

Many people struggle with consistent wake-up routines and managing ambient light throughout the day. Existing solutions are either overly manual, lack automation features, or require multiple devices and apps to function. A unified, smart curtain and alarm system can simplify this process, improving comfort and productivity.

Solution

The ACAS leverages:

  • ESP32-WROOM microcontroller programmed in MicroPython
  • Stepper motors with TMC2209 drivers and timing belts
  • Limit switches for precise curtain positioning
  • LED strips and audio playback via SD card and I2S
  • MQTT and Wi-Fi connectivity for mobile app integration
  • IR remote with ATmega328 for offline control

It allows users to schedule curtain movements and alarms, control lights, and receive notifications via a mobile app built in Xamarin Forms, backed by a MySQL database.

How It Works

Data Collection

Stepper motors, limit switches, LED strips, and IR signals are continuously monitored and controlled via the ESP32.

On-Device Processing

The ESP32 processes inputs from sensors, motor drivers, and the IR receiver to determine curtain position and alarm triggers.

Edge Communication

MQTT and Wi-Fi transmit curtain status and alarms to the mobile application in real time. The IR remote communicates via UART for offline operation.

Notification & Automation

The mobile app displays curtain status, light control, and alarm triggers. Automated sequences gradually open curtains and play audio alarms.

Project planning and breakdown

Project breakdown
system vision
mechanism vision

Key Features

  • Low-power, embedded hardware design
  • Automated curtain and alarm scheduling
  • IR and mobile app remote control
  • Real-time MQTT/Wi-Fi communication
  • Integrated LED lighting and audio playback
  • Modular hardware-software architecture

Hardware & Software Stack

Hardware

  • Microcontroller: ESP32-WROOM, MicroPython
  • Motors: Stepper motors with TMC2209 drivers
  • Sensors: Limit switches, IR receiver
  • Lighting & Audio: LED strips, audio amplifier, SD card reader
  • Power: 5V and 12V regulated buck converters
  • Indicators: LEDs for status, IR remote buttons

Software

  • Firmware: MicroPython for ESP32
  • Mobile App: Xamarin Forms with MySQL backend
  • Communication: MQTT for edge connectivity, UART for IR remote

PCB & Hardware Design

The ACAS prototype uses a custom PCB integrating:

  • Stepper motor drivers and power circuits
  • ESP32 and IR receiver connections
  • LED strip and audio amplifier routing
  • IR remote PCB for offline control
  • Careful trace layout to minimize noise and ensure stable operation
PCB design
IR remote control
Motherboard

Evaluation & Testing

  • Stepper motor calibration tests ensured precise curtain movement
  • IR remote communication verified over UART
  • MQTT and Wi-Fi tested for reliability and latency
  • LED and audio playback verified across different routines

Mobile App UI

  • Displays curtain status: open, closed, or moving
  • Controls alarms and lighting schedules
  • Connects to the ESP32 via MQTT
Phone App control

Conclusion

The Automated Curtain Alarm System demonstrates a practical, low-power embedded solution for smart home automation. By integrating stepper motors, LEDs, audio, mobile app control, and MQTT/Wi-Fi communication, the system offers convenience, routine automation, and an improved wake-up experience. Future iterations could include more sensors, light adaptation, and expanded alarm functionality.

© 2025 — Taimoor Arshad