Build DIY Smart Curtains using ESP32 and LDR Sensors
In this article, we have build smart curtains using ESP32 and LDR sensors. This would be used to draw the curtains or window panels and you can control your room lighting according to need.
- Suitable forB.Tech IoT students
- Build time3-4 weeks
- LevelIntermediate
- Available atAjvika Labs, Kakinada
About this project
You’d be surprised at how much curtains matter in the house! Aside from keeping the peeping Toms out (especially in a crowded place like India, where flats are stacked window to window), they play an important role in decor by creating ambiance and pulling the room together kind of like rugs. When comes to decor, curtains play an important role in automation. Very few have thought of this area. When thinking of home automation no one thinks of these, but this will add some extra stars to show off. My attempt is to create a prototype version of Smart Curtains using ESP32. I’ve used basic sensors and actuators, but you can scale it up if you want. With my approach you can control your room lighting to your need, setting customized light intensity as your mood, or even while you’re away. I’ve used servos to represent stepper motor which would be used to draw the curtains or window panels. I’ve used two LDR(light-dependent resistors) to take feedback of outdoor and indoor lighting conditions and set servo in such a level to let that much amount of light enter the room. I’ve used ESP32 as the main microcontroller, it connects to the network and listens for any change of servo position, and reports indoor and outdoor lighting to the network. I’ve used the Blynk IOT platform here, it acts as a middle man between the user phone and actual hardware. It sends data to the phone and takes input from the user. Different people have their own preferences, some prefer more light, while some prefer darkness.
Component Required for Smart Curtains
Project Used Hardware
Common hardware tools
Project Used Software
Project Hardware Software Selection
ESP32 is just the right hardware to go for. Considering its price, it offers some serious advantages over any other IoT board in the market. For demo purposes, I've used Servo in place of Stepper Motor. Two LDR are used as feedback for the system to act accordingly. Users can control the percentage of light entering from any part of the world at a comfort. Different users have different preferences, so gives customization. Programming ESP32 using the Arduino platform is a breeze, it's open-source and already has a wide user base. At any point in time if you're stuck you can just search it online. For DIY projects, open-source is the way to go.
Smart Curtains Circuit Diagram
The circuit is very simple. Any kid will also be able to make it. You just need basic breadboard skills. Connect wires as per circuit shown. I've connected the servo to pin 13. Indoor LDR to pin 34, since it's an analog pin. Outdoor LDR to pin 35 since it's also an analog pin. Just these basic wiring will get up and running. Very easy. Make a voltage divider using LDR and 10kOhm resistor. This voltage divider will give different output voltages for different lighting exposed. Make the voltage divider by referring to the circuit. Connect all ground wires together and connect it to the power supply. Same for power line also.
Complete Project Code
Component Required for Smart Curtains
Project Used Hardware
Common hardware tools
Project Used Software
Project Hardware Software Selection
ESP32 is just the right hardware to go for. Considering its price, it offers some serious advantages over any other IoT board in the market. For demo purposes, I've used Servo in place of Stepper Motor. Two LDR are used as feedback for the system to act accordingly. Users can control the percentage of light entering from any part of the world at a comfort. Different users have different preferences, so gives customization. Programming ESP32 using the Arduino platform is a breeze, it's open-source and already has a wide user base. At any point in time if you're stuck you can just search it online. For DIY projects, open-source is the way to go.
Smart Curtains Circuit Diagram
The circuit is very simple. Any kid will also be able to make it. You just need basic breadboard skills. Connect wires as per circuit shown. I've connected the servo to pin 13. Indoor LDR to pin 34, since it's an analog pin. Outdoor LDR to pin 35 since it's also an analog pin. Just these basic wiring will get up and running. Very easy. Make a voltage divider using LDR and 10kOhm resistor. This voltage divider will give different output voltages for different lighting exposed. Make the voltage divider by referring to the circuit. Connect all ground wires together and connect it to the power supply. Same for power line also.
Complete Project Code
Technologies used
Hardware components
- ESP32
- ESP8266
- Arduino
- DHT22
- Relay
- OLED
- NodeMCU
Software & tools
- Arduino IDE
- Blynk
- Firebase Console
- Node-RED
- MQTT Broker
Project demo video
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.