AutoBlinds
I love my condo - it has tons of natural light and a great view, but that comes with a drawback - I basically live in a greenhouse. Heating bills are non-existent in the winter which is nice, but in the summer... I actually had to buy a second, portable AC unit for my living room because it's unlivable otherwise. Blinds can play a huge role in keeping temperatures managed, and I was (and still am) terrible at adjusting them on the fly. And why should I, when I can automate it!
I looked into motorized blinds, and none of the affordable options had sizes that fit my windows. I guess I'll just have to do this myself. The existing blinds are rollers with a pull-chain, so I just need a motor to turn a gear that turns the chains - so easy, right? I'm still working on the system 3 years later.
Because this was a project I wasn't sure would be successful, I did a TERRIBLE job at documenting it. I'll focus more on the iterative process here, the journey from idea to something a little more polished and automated.
Step 1 - Design a Gear
I can't do anything if I can't reliably turn the blinds. The chain is a standard size, so after studying the gear built into the blind roller, I played around in Tinkercad until I had something strong.
Why the octagon and large centre-hole? Well, my idea was to install this on the bottom window ledge, and to have a sort of clutch system that allows me to connect this gear to the motor, or have it free-spin on the drive shaft so that the blinds can be manually adjusted without taking too much apart if the system fails. It'll make sense once you see some photos below, promise.
Step 2 - Figure out a Motor
My first thought was that this would be a good application for a stepper motor - I could save the total number of steps between the blinds being all the way up, and all the way down (with some sort of limit switch, but that's a Step 3 or 4 problem). However, try as I might with the steppers and drivers I have, I couldn't summon the torque required to turn the chain, at least without the motors audibly whining. In my (humble) experience, if you need more torque on a shoestring budget, look to gearboxes.
I quickly found a perfect motor on Amazon. The new problem was feeding it 12V with selectable polarity - I need this motor to run forwards and backwards. That can be done a ton of ways - I went for a direct power connection with two DPDT relays driven with transistors to allow my controller to run it with 3.3V.
I used this as an excuse to order a batch of PCBs for a number of projects, which forced me to think ahead. I decided on a Pico W as my controller, and since we're using 12VDC for the motor, I made space for a cheap buck converter to provide the Pico W with 5V. I also figured I wanted manual buttons to toggle the motor, and would use limit switches to determine when the roller blinds were up and fully down. Since I knew I didn't know exactly how this would end, I added a second row of headers along each side of the Pico W and boy am I glad I did!
I made 2 versions of the board, one stripped down to the essentials for... future projects? It's the shipping that gets you on low-volume PCB orders, so the more I can order the merrier!
In case you're thinking, like I was thinking, that we're pretty close to done - nope! The controls were the easy part.
Step 3 - The Mechanical Build
Here's an area I really didn't document well. I know I iterated a lot here, ultimately arriving at this first complete working version. I printed discs that would slip into the chain, toggling a physical limit switch (a classic arcade switch) to stop the motor.
First, I designed the "axle" that would connect the motor to the gear from Step 1. My first, foolish, thought was that I could print something that slips directly over the motor shaft. The motor quickly chewed through the half-moon in PLA, so I needed a metal coupling that more evenly spread out the torque. I bought some flange couplers, and tried to design a print that would transfer the max torque.
Printing the entire enclosure took about a day, so my iterations were as thorough as I could make them. My 3D printer also wasn't the most dialed-in at that time, so I woke up to a lot of overnight printing disasters!
Et voilĂ ! A rough, but fully working, first prototype.
Step 4 - Central Control
Each blind has its own Pico W - while one could absolutely run all 4 of my blinds, I wanted to avoid the extra wiring. I leveraged an existing Raspberry Pi I had on my network, and built a Python script with Flask to create an always-on controller with a web-based front-end for manual controls.
This has the added bonus of being able to somewhat easily calculate sunrise and sunset, and set up custom down and up times for each blind to follow the sun.
It's nothing fancy at all, but it gets the job done and still impresses guests that I can control the blinds with my phone!
The peach-coloured buttons at the top command all 4 up or down. I've put the code in a GitHub repo, linked below.
Step 5 - Iterate
Now that I had something that "consistently" worked, I could start identifying issues over time.
Limit Switch
The first issue was the limit switch assembly. Sometimes it just wouldn't trigger, and the motor would drive the switch down into the box, or the chain would drift outside of the "prongs" and fail similarly. My first upgrade was to the limit switch.
This fixed it, but the whole thing was starting to feel pretty overengineered, and it didn't look slick at all. Fast-forward a year and I decided to swap all this out for a current sensor! This solution was WAY better - I could read the average current of the blinds moving up and down, and stop their motion once the current started to spike - either because it's hit a limit, or if someone or something is snagged in the chain, so it's safer too. I used these little beads the blinds came with that snap over a ball in the chain, acting as physical limit switches - much cleaner. Here's where I was really grateful to have broken out all the pins of the Pico W on the board - I could test and add a small pin header strip to accommodate the new sensor.
I do wish I'd integrated these sensors directly into the main board, but the cabley mess is hidden inside the enclosure.
The Drive Axle
I now have 4 of these blinds, and seemingly every year one of the drive axles will break - the connection between the flanged coupler and the 3D printed axle will shear or snap. I've tried Weldbond, many epoxies, and most recently PL construction adhesive. Fingers crossed that's the one.
I also printed little clips that keep the gear... in gear. Over time, the gears would find a way to shimmy off.
The gears themselves have been great - no failures over 3 years.
Light / Weather
One of my biggest annoyances, once everything was in steady state, was cloudy days. I love my view, and if there is no sun, the blinds should stay up! My condo is a corner unit, facing south and west, so I added a light sensor module to each side. Now if it's time to put the blinds down but there isn't enough light, they'll stay up. I built the overall control system to keep a flag though - if the clouds go away and the sun comes out while the blinds are "supposed" to be down, it'll run them down. I decided not to build a system that automatically brings them up if it starts sunny and gets cloudy - I could see an afternoon of intermittent light getting a bit silly. Again, thank you, past Jon, for adding the additional headers for the Pico, these were easy to add on.
Links & Shopping List
- GitHub: Project Code Files & 3D Models
- DC12V Reversible High Turbo Reduction Electric Motor (20RPM) [Amazon]
- Raspberry Pi Pico W [PiShop]
- LM2596 Buck Converter [Amazon]
- V-153-1C25 Micro Limit Switch Long [Amazon]
- 6mm Flange Coupling Connector [Amazon]
- INA219 I2C Bi-Directional DC Current Power Supply Sensor [Amazon]
- TSL2591 Digital Light Sensor [Amazon]