Motorized Roller Shade Opener

This project uses a widely available DC geared motor, ESP8226 board, and rotary encoder along with some 3D printed pieces to pull open/close a roller shade with a ball style chain.
The Wemos ESP8266 board connects to your home’s wifi and is automatically discoverable to Alexas on the same network (“Alexa, discover devices”)
The code emulates a smart bulb, so it will natively turn on/off with Alexa, but doesn’t understand open/close commands. The work around is to create a custom action with your natural open phrase, which maps to turning the device on, which is open.

It is designed to work with the ball style roller chain, like:

BOM:
Wemos D1 Mini (any ESP board would do): https://smile.amazon.com/Organizer-ESP8266-Internet-Development-Compatible/dp/B081PX9YFV/
L293D H-Bridge Motor Driver:
https://smile.amazon.com/Bridgold-16-pin-Stepper-Drivers-Controllers/dp/B07NXTWJV9/
Rotary encoder: https://smile.amazon.com/Cylewet-Encoder-15%C3%9716-5-Arduino-CYT1062/dp/B06XQTHDRR/
5v regulator: https://smile.amazon.com/Regulator-Module-Voltage-Reducer-Adjustable/dp/B08SHQHNNR/
One LED, two momentary buttons, and a DC power jack, plus some glue
Geared DC motor: https://smile.amazon.com/gp/product/B01N1JQFYX/
12v 2a power supply: https://smile.amazon.com/Chanzon-Switching-Adapter-100-240V-Transformer/dp/B07HNL5D56/
3D printed parts: https://www.thingiverse.com/thing:4779589
PCB (either diy with schematic or order pcb files below)

These geared worm motors come in many different RPMs, providing lots of different levels of torque. My parents had 3 roller shades that were happy using the 65 rpm motors, but the largest one required more torque and a 25 rpm motor fit the bill nicely.

Arduino sketch:
https://gist.github.com/philharlow/6397fe8275e9bda25dcbeb37e290911f

Images of the assembly:
https://imgur.com/gallery/eiK3ScN

To program the limits:
Press and hold both buttons for 2 seconds until the led starts flashing.
Use the up/down buttons to drive the shade to either the top or bottom extent.
Press and hold both buttons for 2 seconds until the led flashes.
Use the up/down buttons to drive the shade to the other extent.
Press and hold both buttons for 2 seconds.

Fusion 360 file:
https://a360.co/3wTYG56