It’s an sad scene: your alarm clock starts blaring at 7am. You’re groggy and trying to rub the final remnants of a dream from your eyes. You know you need to climb out of bed soon in order to have the time to drink some coffee and still get to work by 9:10. But your darkened room is tricking your semi-conscious brain into believing it’s still nighttime. Opening the curtains to let some light in would certainly help, but you’re not some kind of peasant who has to open curtains yourself. The solution, as redditor nutstobutts has proven, is to use an ESP32 to open the curtains for you — like royalty does.
Dramatic infomercial-style reenactments aside, this setup would be quite handy if you like some sunlight in the mornings. You could either program it to open, and then close, the curtains at specific times of day, or you could integrate it into your smart home or IoT (Internet of Things) system. nutstobutts doesn’t provide a lot of detail about how his curtains are programmed, but this would be fairly easy to replicate yourself if you’re interested.
The curtains themselves are hanging from a rod of extruded aluminum. Two sliding carriages also ride on that aluminum extrusion. There are two stepper motors, one mounted on each side of the curtain rod, which pull the carriage either left or right via a belt and pulley. Those are controlled by an ESP32 board through a stepper motor driver. The use of two motors allows the curtain to be opened symmetrically, but one motor is sufficient if you want your curtains to open to one side. The ESP32 has both WiFi and Bluetooth built-in, so you have options on how to send the “open” and “close” commands. If you’re tired of opening your own curtains, this is definitely a project worth tackling.
Go to Source
Author: Cameron Coward