Hi, wondering if I can get some advice. I want to build a project to automatically close a sliding pocket door, to our pantry. My initial thought was to use an Ardrino, connected to a stepper motor and shield, with some reed switches. It’s been suggested thought that I use a DC motor with some limit switches, which may be valid and simpler, the focus will be on quiet and slow closing door, so a geared brushless may be appropriate? The door moves with under 1Kg of Force applied to it so the motor will need to handle this.
This will need to detect if there was any movement, close by and deactivate the motor if this is the case, so the door can be opened again. My initial thoughts for this were to use a PIR (in-place), connected to Home Assistant and some SHELLY 1switch that I have spare to power off the device when this occurs.
In whatever I do I want this to be reversible to the door, so not keen on talking if off or modifying it, heavily.
Given the above then are there any suggestions as to how I should approach this and what components? aka what motor, shield, power-supply etc…
If you’re tossing up between steppers (for cost) and servos (for noise), there are a lot of stepper drivers, especially the ones by Trinamic, that can be put into a slightly-less-powerful silent mode. Here’s a video by my favourite hyper-German Marco Reps on the plusses and minuses of each:
A key take-away from this though, is that the comparison only gets important when you’re talking about the precise positioning of a CNC machine, and positioning doesn’t even need to come into effect in your case.
One of my colleagues actually suggested that you may not even need an arduino, if all you wish to do is close a door after a time limit, whilst ever there is nothing in the way.
Regardless, I’m keen to see what you come up with! Maybe some napkin-sketches of your pantry door might help us choose a motion system better
An Arduino (or maybe a Pico) is likely the way to go for a small microcontroller that you can use to trigger the door to open and control your motor appropriately. I’d highly suggest going with a brushed, DC motor rather than brushless or a stepper motor, as brushless motors are usually used when you need to control the RPM precisely (and usually for most brushless motors this is quite fast as they have the advantage that the only part that wears is the bearing). Similarly for steppers they provide precision rotation and holding torque, but can tend to be quite noisy and large if you need high power output.
To engineer a solution to solve some problem it’s usually best to start by looking at the functional requirements. If the problem statement was, doors need to be manually opened and closed, then your functional requirement would be that the door needs to open and close without manual interaction.
From there you can then start to go into defining the specifics of what manual interaction, open, and close means and start to identify your edge cases and functional specifications (in systems engineering, this is known as the V and is a classic approach to ensuring that the correct problems are solved, and the method by which they were solved was correct).
Breaking what you’ve described down, it sounds like what you need is a way to be able to detect that a door must be opened, fully open the door without slamming it, detect that it is safe to close the door, safely and fully close the door without slamming it, and then wait for the detection to trigger the door to open again.
A potential method (breaking down exactly what each functional and technical requirement and then specification means to design an optimal solution is likely more important than experimenting first-up) to solve this would be to have a microcontroller to detect the PIR sensor was triggered and control the voltage to the motor appropriately, an L298N or similar board to supply power to your motor and board safely, some microswitches or reed switches, and a magnet on the door to identify when the door is fully opened or closed, some 22AWG solid core to wire everything together easily (I assume that you have equipment for soldering available?) and finally a battery or power supply which suits your chosen motor.
I’ve linked a potential list of what may be suitable below for you although I’d go for a motor that is intentionally slightly overpowered for the application so that you can use PWM from your Pico to slow it down if required, but it will have enough kick to move the door (your power supply will need to be suitable for this). Just be sure to check the ratings on your H-Bridge or use another type of motor driver to ensure that you don’t accidentally burn it out:
Make sure to let us know if you have any further questions and how you go with it!
Yes I think a brushed DC motor (which is reversible) with limit switches would be the simplest way to go. There are a couple of things to consider with limit switches.
They should cut power to the motor directly. Don’t rely on other electronics to do this.
To prevent damage due to over run the limit switch should switch a diode (with the correct polarity) across the motor to stop it dead. If the motor is left to run on it could go past the limit switch and re-power and keep on going.
There needs to be a diode connected across the NO contacts of the limit switch of the correct polarity to enable reverse voltage to be applied to the motor to enable it to run in the other direction.
This may sound complicated but is necessary and not too hard to do. All diodes should be capable of carrying the motor stall current.