For my GCSE Design and Engineering coursework, I designed and built an automatic dog door for our two dogs, so they could get outside when nobody was home to let them out. I prototyped a hydraulic syringe mechanism and then a pulley in Lego before settling on a motor-driven rack and pinion.
An Arduino runs the door. On every loop, it fires an ultrasonic sensor mounted behind holes in the housing and turns the echo time into a distance. When a dog comes within 10 cm, the Arduino tells a stepper motor, through its driver board, to turn and raise the flap, waits a second, then turns back to lower it. I tuned how far the motor turns by trial and error so the pinion travels the full length of the rack.
I sized the opening from measurements of the dogs and modeled every part in CAD. I 3D-printed the ABS rack and pinion, faced, drilled, and tapped an aluminum axle on the lathe and pillar drill, and laser-cut a plywood housing for the Arduino, driver board, and breadboard. The parts came to about £44, against an £80 budget.
In testing, the sensor triggered the motor as designed and the dogs could fit through the opening, but the only motor available in the school workshop wasn’t strong enough to lift the door against gravity. My next version would use a higher-torque motor, a lower-friction aluminum door, and a sensor paired with a tag on the dog’s collar so the dogs could come back in on their own.