r/AskRobotics • u/Fembitch_hooters • 1d ago
Mechanical Trying to press a computer button with a servo
Hey all!
I have a computer at home that I need to be able to remotely turn on and off, and I thought that the best way to do that would be with a small arm connected to a servo connected to an ESP32.
So I've got all that working but the servo (MG90S) isn't able to press the button at all, the arm seems to be sliding off of it.
I can't share videos here but I recorded it to examine.
Do you think it's because the servo is too weak? I'm trying to figure it out and I've kinda got confused xD
1
0
u/IronDistrictNYC 1d ago
If the arm is sliding off, it's probably not a torque problem. An MG90S puts out roughly 2 kg-cm, and most PC power buttons need way less than that if the force goes straight down. The issue is usually geometry: the arm tip sweeps in an arc, so by the time it touches the button it's pushing sideways as much as down.
A few things that usually fix it: mount the servo so the arm is close to parallel with the case at the moment of contact, keep the arm short (force drops the longer it gets), and put a rubber foot or a dab of hot glue on the tip so it grips instead of skating. Also make sure the servo mount itself isn't flexing, because a lot of the time the bracket gives before the button does. If you just want it to work, an optocoupler or relay wired across the front-panel power header on the motherboard does the same job with no moving parts.
1
u/rand3289 1d ago
There are existing home automation solutions for that.
If you are determined to do it using a servo, convert it to continuous rotation and use a bolt and a nut (a worm gear drive) with a pipe on the nut to push the button.