I built an automatic dog door to solve a practical problem in my home. Some automatic dog doors exist, but they rely on something that a dog must wear, like a RFID tag. However, my dog does NOT like to wear a collar, so I endeavored to build an automatic dog door that would use a different approach.
I used a pair of infrared sensors on both the inside and outside of the dog door, so that when my dog would come close to the door, the beam would break and the door would open.
I soon realized that the IR sensors were the easy part. The hard part proved to be power and practicality.
The problem was, my dog's door opens vertically. It consists of a metal slider that can slide up and down. This metal slider is quite heavy, and so the main challenge I faced in this project was reliably lifting the heavy door.
To make the door open, I needed a lot of torque. I considered a few options such as a rack and pinion or placing a motor above the door to lift it up, but I settled on a pulley. I nailed a nail into the actual door above the dog door, and used a fishing line to connect it to a Nema 23 Stepper Motor. I 3d-printed an attachment to the motor so that it could more easily coil the fishing line. I used the Nema 23 because it has about 2.5 Nm of torque, so theoretically it should comfortably be able to lift the door. But such a strong motor required a lot of power.
So, I spent a lot of time figuring out how to safely and reliably power my stepper motor (3-4A and at least 24V). I wanted to use 36V to be safe, and 10A. To do this, I got a larger power supply, and a 'translator' called a TB6600. I connected the power supply to my wall's outlet and added in an AC fuse for safety.
Ultimately, the dog door uses a state machine to regulate when to open and when to close. It has safety features (it won't be a guillotine - if the door is closing and the signal is tripped, the door will go back up), and it goes upwards until it hits a switch instead of using a digital encoder.
Another interesting thing I added was a way to detect if my dog is inside or outside. Traditional automatic dog doors have a tracker on the dog, but if I'm not using that, then how would my system know if my dog is inside or outside? This is important because at night the door closes and locks, but if my dog is still outside, the door should not lock him outside overnight.
So, what I did was add a switch with a part of a clothes hanger attached to it, so that as my dog walks through the opening, the flap will trigger the switch, and will update the dog's location as inside or outside. I also displayed information about the dog and the door's states on an LCD screen.
Please watch the following demo video!