Opening and closing of a sliding screen door.
Because children often forget to close the screen door (letting flies and mosquitos into the house) and because our cat always nags to be let in or out of the house, I decided to automate our sliding screen door such that:
- The door can be opened both manually and via remote control on smartphone.
- The door opens automatically on approach from the outside.
- The door always closes automatically (after both manual or automated opening).
The main mechanical build of this project is the Openbuilds mini linear actuator build, extended with limit switches. The build is attached to the wall above the sliding door, with the gantry attached to the sliding door. When the gantry travels left or right, the door closes or opens. The linear actuator build is well documented on Openbuilds, but attaching the build to your wall and door will be custom work, depending on your situation.
You also need to add limit switches to the linear actuator to be able to detect when the gantry reaches the extremities:
Limit switch installed on the far end
The Particle Photon development board is the core of the electronics build and it is plugged into a Sparkfun Photon battery shield attached to the Li-on battery. The shield does not only provide battery power for the photon, it also allows to attach a solar panel and charge the battery. We used the a 6W Voltaic Systems solarpanel available from Adafruit.
The Photon board is connected to the Pololu stepper driver that controls the nema-17 stepper motor of the linear actuator. The stepper motor is powered by a separate 12v power supply, which I provided by a battery pack of 10 AA batteries. There is definitely room for improvement in this power supply, so I will be looking at alternatives.
To detect a manual opening of the door and to detect when the door is blocked by a person or object, we also extend the stepper motor with a rotary position sensor: the AS5040. This sensor can detect rotations of an axial magnet that we attached to the motor shaft at the rear of the motor. There is an evaluation board for the AS5040 sensor that we attached to the back of the stepper motor with a custom-made socket (we had it made in wood by a friend).
Stepper motor with AS5040 sensor board attached
We also added a sonar sensor (MB1000 LV-MaxSonar-EZ0) to detect presence of a person in front of the door and a switch to disable the automated movement of the door when necessary.
MB1000 LV-MaxSonar-EZ0 attached using Actobotix hardware