A motorized smart window system that provides precise position control, automated operation, and built-in safety features through custom electronics and a purpose-built enclosure.
A linear potentiometer provides continuous position feedback from the actuator, allowing the microcontroller to determine the window's position throughout its travel and move it to a commanded position.
An ACS712 current sensor monitors motor current for abnormal increases associated with an obstruction. When the configured threshold is exceeded, the controller stops and reverses the actuator.
End-stop protection: A hardware limit switch prevents the mechanism from driving beyond its mechanical travel by directly interrupting motor current, independent of software control. A 40 V Schottky diode provides a reverse-current path, allowing the motor to move away from the triggered end stop while preventing further travel in the unsafe direction.
Quick release: In the event of a power outage or actuator failure, the clevis pin can be removed to disconnect the actuator and allow the window to be operated manually.
Enclosure: The electronics housing mounts vertically along the wall and provides dedicated connections for the 24 V power input and actuator output, with an easy-access snap-on lid.
The window is exposed to Home Assistant as a controllable device, allowing its entities to be incorporated into larger home automations.
Fail-safe automation: Automations are permitted to disable the H-bridge enable signal, but never to re-enable it. After a critical condition disables the system, actuator operation can only be restored manually by the user, preventing an automation from unintentionally restarting the window.
Adaptive speed control: Motor speed is controlled through PWM, allowing the window’s movement speed to be adjusted dynamically. During nighttime operation, the system automatically reduces the motor speed for quieter, less disruptive movement.
This system is used reliably every day. Future improvements for a second-generation design include developing a custom PCB for cleaner wiring and easier troubleshooting, as well as upgrading from Hall-effect current sensing to a shunt-based current-sensing IC, such as the INA228.