I've up and built my first robotic arm. I'm experiencing a jitter-type shaking that I don't think is jitter. Ok, the arm is not nearly as stiff as I'd like it to be, but at certain times it starts to vibrate at some resonant frequency. There are no commands going to the servos, but the vibration (really, serious shaking) will continue until I still it with my hand.
So, why does a servo, seemingly on its own, maintain this periodic effect, and, more to the robotic point, how can I stop it?
My arm is shaking
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- douglaso
- Posts: 36
- Joined: Tue Mar 12, 2013 12:36 am
Re: My arm is shaking
Sorry, I meant to note that I'm using an ESP32-S2 Feather with a PWM Feather wing, and running 6 MG995 servo knockoffs.
- adafruit_support_bill
- Posts: 88151
- Joined: Sat Feb 07, 2009 10:11 am
Re: My arm is shaking
Servos typically use a PID type controller to seek and maintain position. For best performance, a PID needs to be 'tuned' to match the characteristics of the system it is controlling. But most hobby-grade servos are just tuned for some 'typical' use case. So when you push them to the extremes, they may not perform optimally.
To maintain position, the servo needs to apply power to the motor. When it reaches the target position, it will cut power to the motor. If the servo is heavily loaded, the load may start to back-drive the servo and push it away from the target position. So the servo powers up again to push it back towards the target again. If the load is persistent, this can turn into a cyclic thing. And if it is close to some resonant frequency of the mechanical system, it can turn into some serious oscillations.
To maintain position, the servo needs to apply power to the motor. When it reaches the target position, it will cut power to the motor. If the servo is heavily loaded, the load may start to back-drive the servo and push it away from the target position. So the servo powers up again to push it back towards the target again. If the load is persistent, this can turn into a cyclic thing. And if it is close to some resonant frequency of the mechanical system, it can turn into some serious oscillations.
- douglaso
- Posts: 36
- Joined: Tue Mar 12, 2013 12:36 am
Re: My arm is shaking
Thank you Bill. That explains how an 'inactive' servo is actively trying to maintain its inactivity. It also sounds like I need to be more sophisticated in how I control each servo within its limits.
- adafruit_support_bill
- Posts: 88151
- Joined: Sat Feb 07, 2009 10:11 am
Re: My arm is shaking
One technique I have found helpful for servo-powered arms is to add a counter-spring to reduce the load on the first and/or second joint. The joints close to the base of the arm tend to get heavily loaded when the arm approaches horizontal. A spring to counteract the force of gravity can significantly reduce the load on the motors.
Surgical tubing comes in various diameters and wall thicknesses and makes a pretty good tension spring.
Surgical tubing comes in various diameters and wall thicknesses and makes a pretty good tension spring.
- douglaso
- Posts: 36
- Joined: Tue Mar 12, 2013 12:36 am
Re: My arm is shaking
Brilliant, I'll think on that. Do servos exist that can feedback how hard they are working, current use or something?
- adafruit_support_bill
- Posts: 88151
- Joined: Sat Feb 07, 2009 10:11 am
Re: My arm is shaking
Yes. Some of the digital servos allow you to tune some of the control parameters and monitor things like motor current. The Dynamixel line of servos takes it up several notches from there. These servos were developed specifically for robotics application and have much more sophisticated control and feedback options:
https://www.adafruit.com/product/4768
This section of the manual describes the load-monitoring feature: https://emanual.robotis.com/docs/en/dxl ... nt-load-40
https://www.adafruit.com/product/4768
This section of the manual describes the load-monitoring feature: https://emanual.robotis.com/docs/en/dxl ... nt-load-40
- diaphone
- Posts: 34
- Joined: Thu Apr 21, 2022 8:38 pm
Re: My arm is shaking
This can certainly be helpful, but the spring or counter-weight should be for countering the weight of the arm itself. You still might find yourself in a position where this fixes the empty arm, but as soon as the arm picks something up, the shaking is back. You'll need to get the mass of the arm down-stream from the driven joint, its full length, and how heavy a payload you want to lift, and do the basic napkin calculations to figure out an approximate max torque required at each joint for the worst-case scenario of holding something with the arm outstretched and horizontal. You don't want to add too much counter spring to fix having too weak a motor, because then your motor will be working against the spring when you have no load.adafruit_support_bill wrote:One technique I have found helpful for servo-powered arms is to add a counter-spring to reduce the load on the first and/or second joint. The joints close to the base of the arm tend to get heavily loaded when the arm approaches horizontal. A spring to counteract the force of gravity can significantly reduce the load on the motors.
Please be positive and constructive with your questions and comments.