360° Feedback Servo - Shakes
MacTuxLin
Posts: 821
in Propeller 1
Is it normal for the servo to be shaking like this while waiting for command in terminal? I simply connected the servo to project board & run it with the C code from the website. I only changed the pins assignment.
int pinFeedback = 23; // P14 connected to feedback line
int pinControl = 25; // P12 connected to control line
Comments
If you lower the servo's voltage to 5V does it calm down?
Per the Specs
The OP never said what voltage he was running at.
I didn't spend any time with the C code, but perhaps there is a way to adjust the gain.
I have been working on a PASM driver which twm has ported to C. You can see what we have been doing in this thread.
That's great, but it should mention 5 VDC is also the maximum for unloaded non-CR operation. I think a lot of people will get the servo, and run it from a > 5 V power source, and encounter the same issue.
I posted about this a while back. I will be quiet now.
That is good news. Thanks you.
You guys have a lot more hands on than I do right now so I bow to your findings. I'll be quiet now.
Would like to know what the OP's voltage is. He's in Singapore so it may be a while.
Have you tried the examples in here?
https://www.parallax.com/downloads/propeller-c-learn-folder
Download "Learn-Folder-Updated-2017.10.31.zipside" and open SimpleIDE, click Tools -> Update Workspace -> Browse.
Browse to the .zipside you just downloaded and click Open.
After the libraries have been updated, try:
...Docuemnts\SimpleIDE\Learn\Examples\Devices\Motor\Servo360\Set Angles 1 servo.side
If it still oscillates, the libraries you downloaded have control system adjustment functions we can try.
Andy
Do you have a link to your findings?
I just ran the " Feedback 360 Angle Control [Low Level Example].c at 5volts and it ran fine.
At VIN, , (8.00 volts Lion Battery Pack), it exhibited the same oscillations that the OP posted. Curious, as I tend to run servos off of VIN to get the most out of them.
The general consensus was that overshoot is normal under no load, using the demo code, at voltages over 5V.
What I am trying to get across is that information needs to be more prominent. IMO the highest use case will be someone testing it out, under no load, at 6 V, using the demo code. If you recreate that scenario you will see the same thing as the OP, and myself.
Maybe an app note or code update would resolve the issue.
Here are my findings -
http://forums.parallax.com/discussion/167298/new-parallax-360-feedback-servo/p3
So there was an update? I would assume so.
@maxtuxlin try the update Andy mentioned, if you haven't.
as a fix for using a 2S lipo battery. Many servos will shake when using a 2S lipo,
and not shake when using a 7.2v nicad or nmh battery.
Bill M.
Initially, I powered my PPB USB with a 7.5v since manual wrote > 5v. However, after I changed to 5v, the oscillation stopped.
Next, I've updated the workspace according to Andy's suggestion. It seems to have eliminated the most of the shaking after reaching the designated angle.
This is back to 7.5v
Same after adding the cap.
I'll eventually return to SPIN/PASM so I'll try Tom's link.
Thanks again!