The problem
Curtains are opened and closed by habit, not by need — rooms bake in afternoon sun with the curtains drawn, or sit dark at noon because nobody pulled them. The engineering fix is a small closed loop: sense the light and temperature, decide the curtain position, and drive it. This project builds that loop as a student prototype: an LDR watches ambient light, a DHT11 reports room temperature, and an Arduino drives a stepper motor coupled to a miniature curtain rail. The control logic is genuinely two-input — bright light opens the curtain for daylight, but high room temperature keeps it closed to block heat, with the temperature rule winning the conflict. Push buttons give manual open/close/stop at any time, and the last position is remembered across power cycles. A relay output is included so the same controller can switch a room light or fan based on the same sensor readings.
Measures ambient light; readings are smoothed to ignore passing clouds and shadows.
Follow the working sequence
How it works
- The LDR and DHT11 are sampled every few seconds; readings are smoothed with a moving average to ignore passing clouds and shadows.
- The firmware compares light against the daylight threshold and temperature against the heat threshold using the documented decision table.
- If the decision differs from the current curtain state, the Arduino steps the motor the calibrated number of steps to the new position.
- When temperature is above the heat threshold, the close command wins regardless of light level — the anti-heat rule takes priority.
- Pressing any manual button immediately stops automatic control and drives the curtain directly; the new position is saved to EEPROM.
- The relay channel follows its own rule (e.g. room light on when light is below the dark threshold), independent of curtain position.
- On power-up, the controller reads the last saved position from EEPROM and resumes automatic mode without recalibration.
Tech stack:
- Arduino Uno (ATmega328P)
- Arduino IDE (C/C++ firmware)
- LDR light sensor module + DHT11 temperature/humidity sensor
- Stepper motor with driver (ULN2003 class) and belt-coupled curtain rail model
- 16x2 LCD for status and thresholds
- Push buttons for manual control
- Relay module for auxiliary output
- 5 V/12 V DC supply for logic and motor
| Parameter | Value |
|---|---|
| Controller | Arduino Uno (ATmega328P), 5 V logic |
| Light sensor | LDR module, analog, adjustable sensitivity |
| Temperature sensor | DHT11: 0–50 °C, ±2 °C (datasheet); humidity 20–90% RH, ±5% RH |
| Motor | Stepper with ULN2003-class driver; position in calibrated steps |
| Positions | Open / half / closed, stored as step counts |
| Position memory | EEPROM, survives power loss |
| Manual input | 3 push buttons (open / close / stop) |
| Auxiliary output | 1 relay channel, 230 V AC / 10 A rated contacts (design) |
| Decision cycle | Approximately every 3 seconds with moving-average smoothing |
Project features
- [Dual-sensor control] An LDR measures ambient light and a DHT11 measures room temperature; the firmware combines both into the open/close decision instead of reacting to light alone.
- [Conflict resolution logic] Bright light opens the curtain for daylight, but if room temperature crosses the set threshold the curtain stays closed to block solar heat — temperature wins, documented in the control table.
- [Stepper-driven rail] A stepper motor with a belt/lead drive moves the miniature curtain rail smoothly to calibrated open, closed and half positions with position memory.
- [Manual override] Push buttons for open, close and stop work at any moment; automatic mode resumes only when the user re-enables it.
- [Position memory] The last curtain position is stored in EEPROM, so a power cut does not lose the state or require recalibration.
- [Relay output] A spare relay channel switches a room light or fan from the same sensor readings — e.g. light on when the room is dark and occupied-mode is enabled.
- [Adjustable thresholds] Light and temperature setpoints are adjustable with a potentiometer/button combination, with current values shown on the LCD.
What is included
- Working prototype: Arduino, sensors, stepper-driven miniature curtain rail with fabric curtain, LCD, buttons, relay
- Complete Arduino firmware (sensor reading, decision logic, stepper control, EEPROM memory, relay output)
- Control decision table documenting the light/temperature conflict rules
- Wiring diagram and connection table
- Threshold adjustment and calibration guide
- Project report PDF (background, control logic design, methodology, working, results)
- PPT presentation for final review
- Viva Q&A preparation document (stepper control, LDR/DHT11 interfacing, closed-loop logic, EEPROM)
Limitations & prerequisites
- The DHT11's ±2 °C accuracy is a datasheet value — it is adequate for comfort thresholds but not for precision climate work.
- The curtain rail is a miniature model; driving a full-size domestic curtain would need a higher-torque motor and is listed as future scope.
- Rapid light flicker (e.g. TV light) is smoothed by averaging, but very fast changes can still cause extra motor moves.
- The relay's auxiliary output is a simple on/off switch — it does not dim lights or vary fan speed.
- Position memory assumes the curtain is not moved by hand while powered off; a manual tug desynchronizes the step count until the next full travel.
Frequently Asked Questions
Why use both light and temperature sensors?
Light alone would open the curtain into harsh afternoon sun and overheat the room. The temperature rule overrides the light rule above the heat threshold, so the curtain blocks solar gain when it matters — the report documents this decision table.
Can I control it manually?
Yes — open, close and stop buttons work at any time and immediately pause automatic mode. Automatic control resumes when you re-enable it.
Does it remember the position after a power cut?
Yes. The last position is stored in the Arduino's EEPROM and restored on power-up, so no recalibration is needed.
What does the relay output do?
It is a spare switched channel driven by the same sensors — typically wired to a room light (on when dark) or a fan. It is on/off only, not dimming.
Can it drive my real home curtains?
Not as shipped — the prototype uses a miniature rail and a small stepper. A full-size version needs a higher-torque motor and track, listed as future scope in the report.
Is this project suitable for a final-year project?
Yes — for IoT & Embedded programs. It is a complete closed-loop control build: sensing, decision logic with conflict resolution, stepper actuation and manual override. Suitable for B.E./B.Tech final-year projects in IoT & Embedded.
Components & software requirements
- Arduino Uno (ATmega328P)
- Arduino IDE (C/C++ firmware)
- LDR light sensor module + DHT11 temperature/humidity sensor
- Stepper motor with driver (ULN2003 class) and belt-coupled curtain rail model
- 16x2 LCD for status and thresholds
- Push buttons for manual control
- Relay module for auxiliary output
- 5 V/12 V DC supply for logic and motor
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.