My roller blinds work perfectly well, except for the part where I had to get up and pull the chain. Replacing the whole thing with expensive smart shades felt wasteful, especially when I have an ESP32, a small motor, and a 3D printer sitting idle. Surely those could do the pulling for me?
That question turned into a project involving a custom 3D-printed gear, some motor-driving wiring, and an ESPHome config. The result pulls my existing blind in Home Assistant, complete with a position slider and all the automations I could ever want.
I borrowed someone else’s blind motor and downgraded every part
Same idea, worse parts, and no buttons because I didn’t have any
My starting point was nik.po’s open-source roller blind project. Its design uses a JGY-370 12V worm-gear motor, a TB6612FNG driver, and an ESP32-C3 running ESPHome. Two buttons provide physical control, while motor run time stands in for position sensors.
My approach was slightly different because I only went with the parts I had on hand. This involved a V1 ESP32, a yellow TT gear motor (the sort used in hobby robot cars), an ancient L293D motor driver module, and no buttons, because I didn’t have any lying around.
The biggest departure was the motor. Mine is a two-wire, 3 to 6 V DC motor, and its shaft didn’t match the original gear. The L293D motor driver is also rather lossy and can lose up to 2V when sending power to the motor, which I offset by using a 12V power supply and limiting the output with PWM.
Your blind’s chain decides what the gear looks like
A 0.4mm pitch difference is enough to make a chain skip
The original gear was a 35mm-wide, 13mm-thick sprocket with 16 rounded bead pockets, a connecting card groove, and raised retaining rims. Its center had a single-flat hole for a 6mm motor shaft.
My chain had roughly 4mm beads spaced about 5.5mm apart, compared to the approximately 5.9mm pocket spacing on the original. That difference sounds small until several beads engage at once. Each mismatched pocket adds another chance for the chain to pop out and skip. Given my motor was already a downgrade over the original project, I needed as much engagement as possible.
The motor itself had a different kind of shaft compared to the original project. Its plastic shaft had two flats and measured differently from the original gear. Adapting this gear would mean changing both its working surface and its center, so I started fresh.
A quick design job in FreeCAD with Claude’s assistance got me the perfect gear. It snap-fitted tightly on the motor’s shaft and matched my specific chain’s beads perfectly.
GPIO pins won’t spin a motor, so a driver does the work
A 12V supply, a 55 percent duty cycle, and a driver that wastes 2V
Now, the driver I had was the good old L298N-style board, often used to teach motor control with simpler boards like the Arduino UNO. These boards use the enable input for PWM speed control and lose quite a lot of voltage internally. Regardless, they’re extremely simple to wire up and use.
A 12V adaptor powers the driver, and the ESP32 gets its own USB power, which is yet to be merged into the same 12V input. Since the input voltage is double what the motor expects, I set PWM to a 55 percent duty cycle. After the driver’s losses, that gives a rough average near 5.5V. The motor still receives higher-voltage pulses, so this isn’t the same as powering it from a proper low-voltage supply. But for a jury-rigged project built from whatever I had lying around, it works.
Home Assistant guesses where the blind is, and so do I
Time-based position is an assumption, not a measurement
ESPHome’s time-based cover platform supplies the trick that makes this project possible: estimating position from how long the motor runs. It needs no position feedback, but the reported percentage is an assumption, not an exact measurement.
This means I had to time complete opening and closing runs separately and use both durations in the configuration. Home Assistant then provides open, close, stop, and percentage position. I also added two manual controls in Home Assistant to compensate for the lack of physical buttons on the device.
Regardless, without limit switches or a proper stepper or servo motor, careful calibration matters. A jam or slipping chain can easily leave the estimated position wrong and cause the blind controls to be useless.
A smarter blind, a few compromises, one flimsy mount
The blind stayed, the chain got a motor, and the mount is a sketch
The best part about this project is that the blind itself hasn’t become obsolete. I changed how its chain moves, not the whole window covering. The custom gear solved the mechanical mismatch, and ESPHome connects it to the system I already use.
There are some compromises that need further work though. The position is estimated, the motor driver wastes power, and the entire circuit is mounted on a flimsy mount that I sketched up to test everything. The chain loop is still there, so keep it tensioned and out of reach of children and pets. Still, this is exactly the kind of upgrade I enjoy.
