Windyble windows can open and close automatically when it is conveniant

Published Aug 28, 2021
 80 hours to build
 Intermediate

Windows are a piece of home automation that requires manual intervention why automate your HVAC or whole house fan, when you still have to manually open windows?

display image

Components Used

Raspberry Pi Zero
Raspberry Pi Zero
2
Raspberry Pi HAT
Interface Development Tools Raspberry Pi HAT for CMX655D Codec
2
Stepper Motor NEMA 17
Stepper Motors .5A Single Shaft 0.9 Deg NEMA 17
3
A4988 Bipolar Stepper Motor Driver
A4988 is a bipolar microstepping motor driver for stepper motor.
2
Breadboard
Breadboard
1
Description

First I experimented with some various hardware and motors to find something that works:

Experimenting with stepper motors, raspberry pi's and drivers

Once I had a solution in mind, I had to assemble the raspberry pi hat with various electronics and the stepper motor driver.  The image below contains a DC to DC converter that converts the 110 volt power source to a 12 volt source to power the raspberry pi zero as well as the attached motor. There are also various sockets to attach the bi polar stepper motor as well as some sensors that can detect when the window is fully open or fully closed. Also attached is the 120 positive and ground. All attached to a special hobby breadboard device designed to mirror a raspberry pi zero.

Assembled custom header

 

I've since designed an PCB that can simplify the assembly:

PCB Schematics
First printed board

Attach the assembled header to a raspberry pi zero and stick it to the stepper motor:

Assembled motor with driver & controller

Assemble a second motor and attach them both to a window with an optional 12v or 120v power supply depending on how your header was configured. I've configured the header so you can run the unit with wither a 12 volt or 120 volt supply. I've only actually tested it on a window with the 120v power supply.

I then built an app for my mobile phone that can connect to and drive the motors.  Of course I then had to write all of the software do drive the devices. That was actually the most fun as I'm a software engineer by trade and have only started dabbling in the hardware realm.  I wrote a piece of controller software that I'm particularly proud of that i call Hive. Hive was designed to synchronize data with any number of attached "pears" or clients. I've worked in the IOT realm for a long time and that was a piece of software that solves a lot of communication and synchronization issues.  Hive works as a secondary driver of source for communicating with various other pieces of hardware. It currently can communicate over TCP sockets, web sockets, or over Bluetooth on a raspberry pi.  I then wrote two more pieces of software that each have a hive client so they can easily communicate with each other. One in Kotlin that runs on an android app that I build, and another in Rust that runs on the raspberry pi.

 

The Hat is designed with a crossover cable so that the two motors can be physically connected and run perfectly in sync with each other. They can also synchronize almost perfectly just using the Hive software. The crossover cable was intended to make that a more physical dependency to prevent any possible latency between the device communication.

 

 

 

Codes

Downloads

Windyble_sch Download
Comments
Ad