Servo Motor problem

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
nick_karam
 
Posts: 4
Joined: Fri Oct 10, 2014 10:47 am

Re: Servo Motor problem

Post by nick_karam »

I power it through the laptop by USB now it's really hard to post image but it is exactly as in the tutorial. Thank you.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor problem

Post by adafruit_support_bill »

If there is no twitch or anything at all on powering up, it is probably a dead servo. Please contact [email protected] with a link to this thread for a replacement.

User avatar
nick_karam
 
Posts: 4
Joined: Fri Oct 10, 2014 10:47 am

Re: Servo Motor problem

Post by nick_karam »

Thanks for replying once again, I tend to believe that as you said the servo is probably burned, though I should mention that my beagle was not updated with the latest updates cause of connection problems. I just fixed that and I am going to retry the project from Monday. I'm looking forward to informing this page with what the problem is. . :-)

User avatar
sydeem
 
Posts: 46
Joined: Fri Oct 25, 2013 5:34 pm

Re: Servo Motor problem

Post by sydeem »

I have your small pan-tilt assemble on which I would like to mount the new Parallax laser rangefinder and later include your Pixy cam but I am having major servo jitter problems. The pan-tilt works fine not loaded but if I try to add just a small foam board to use as a mount for the laser the servos jitter at two angles (50 and 140 degrees). I have tried using an SG90 servo as just a sweeping servo all by it self and it works fine also until I try to add a load. In this case the actual (Grand Studio) laser board. With that load the servo jitters violently over most angles except for 50 and 60 degrees. I have 10 uF capacitors on a breadboard power rail next to each servo power connection. I replaced servos in the pan-tilt and all act similar except maybe the jitter is at slightly different angles. I am using a 7.4 volt Lipo battery as a power source, I did experiment with one setup where I changed the servo call angle one degree at a time and found that if I was off the offending angle by a couple of degrees the jitter would stop. I have experienced this jitter from two different Arduino Mega cpu's.

For sweeping I am just using the simple "for" loop moving 10 degrees at a time between 10 and 170 degrees (to ensure I am not banging against any stops). The pan-tilt can sweep smoothly using 1 degree steps and 20 ms delays with a light load but when the delays between angles are extended to something like 1000 ms ( the laser needs 1 second for ranging) you get the jitter. I would blame this on the play in the pan-tilt joints except the single servo mounted only as a sweeping servo jitters also.

I have been fighting this for some time now with different mechanical setups.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Servo Motor problem

Post by adafruit_support_mike »

Servos do have some jitter, especially if you're trying to control them from userland code on a Linux machine.

Linux is a time-sliced operating system, so it gives each process about 10ms on the CPU, suspends it, and gives the next process a turn. That works for batch programs that don't have to finish at any specific time, and for programs that interact with humans. It doesn't work so well for communication with devices that want signal timing on the millisecond level.

My guess is that the jitter occurs when the program controlling the servos gets swapped out at just the wrong time and misses a pulse. That's a known issue with servos being run from Linux.

User avatar
sydeem
 
Posts: 46
Joined: Fri Oct 25, 2013 5:34 pm

Re: Servo Motor problem

Post by sydeem »

Thanks Mike - but that is over my head. Even though I can repair some of the jitter at times by selecting a slightly altered angle (87 vs 90) I believe I have mechanical issues as might other people with similar problems. If I unbalance the load (add weight off center) the problem becomes major. Wish there was a better way to attach a load to the servo than the tiny plastic collar that slips over the servo spline but that is a given.

If the servo could move in a sinusoidal fashion from one position to the next, the sudden jerk to a new position might not set up the oscillations I am seeing but I don't know how to set up a smoothing factor inside the usual "for" loop for sweeping a servo (for(int angle = 10; angle < 170; angle += 10) ).

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor problem

Post by adafruit_support_bill »

I don't know how to set up a smoothing factor inside the usual "for" loop for sweeping a servo (for(int angle = 10; angle < 170; angle += 10) ).
For starters, you can just use a smaller increment than 10 in your loop to slow things down.
I am using a 7.4 volt Lipo battery as a power source,
That s a bit high for the TowerPro servos. Aside from a likely reduction in life-span, running them at a higher voltage will increase the responsiveness of the motor. With common analog RC Servos, you really don't have any control over the control-loop tuning. It is not possible to compensate for changes in load or motor response.
The combination of increased rotating mass and increased motor response will tend to result in an under-damped servo response, leading to oscillations.

User avatar
sydeem
 
Posts: 46
Joined: Fri Oct 25, 2013 5:34 pm

Re: Servo Motor problem

Post by sydeem »

Thanks Bill. I miss spoke on power - I just wanted to indicate I had a good power well - the Lipo is throttled down to 5 volts in circuitry on my bot (Cherokee). BUT you did clear up what is going on (The combination of increased rotating mass and increased motor response will tend to result in an under-damped servo response, leading to oscillations.). I either make my mechanical attachment much more ridged or make the steps small enough to reduce the slam from angle to angle. Knowing that I can more focus on a solution.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor problem

Post by adafruit_support_bill »

Also, keeping the center of gravity closer to the pivot point will help. For the Pixy Pet Robot, I removed the tabs from the camera mount, and mounted the camera board directly to the back of the bracket.

https://learn.adafruit.com/pixy-pet-rob ... era#step-6

Image

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”