Servo Calibration

Any hardware type questions or problems for all other Phidget devices.
mrbencowell
Phidgetly
Posts: 32
Joined: Sun Jun 05, 2011 5:15 am
Contact:

Servo Calibration

Postby mrbencowell » Tue Jan 17, 2012 4:08 pm

Hello,

I'm following this tutorial on servo calibration : http://www.phidgets.com/documentation/P ... ration.pdf

Most of the information makes perfect sense to me, however I'm not quite sure how to convert the rated servo velocity as the manufacturer describes it to the form that the Phidgets command requires.

For example Servo City say that my HS-5485HB has a speed of 0.17sec/60° at no load running at 6v, how does this relate to the single numerical figure I need to put into this forumla : (max_us-min_us)/d * Velocity = Phidgets Velocity.

Many thanks,
ben

erik
King of the Lab
Posts: 477
Joined: Fri Mar 06, 2009 12:42 pm
Location: Calgary, Canada
Contact:

Re: Servo Calibration

Postby erik » Tue Jan 17, 2012 4:30 pm

Velocity will be in degrees per second, so you simply take the reciprocal of 0.17sec/60°, which will be ~353°/s.

mrbencowell
Phidgetly
Posts: 32
Joined: Sun Jun 05, 2011 5:15 am
Contact:

Re: Servo Calibration

Postby mrbencowell » Tue Jan 17, 2012 5:01 pm

thank you Erik, I've got two servo's that I'm attempting to calibrate. However when I set these settings :

PhidgetMotorCtrl.servos[1].setServoParameters(854, 2105, 6, 353);

and then attempt to move the servo I get a Phidgets exception to the move command. However if I comment out this setServoParameters line and then attempt to move the servo it works.

Any idea what I could be doing wrong ?

many thanks
ben
Last edited by mrbencowell on Tue Jan 17, 2012 5:11 pm, edited 1 time in total.

mrbencowell
Phidgetly
Posts: 32
Joined: Sun Jun 05, 2011 5:15 am
Contact:

Re: Servo Calibration

Postby mrbencowell » Tue Jan 17, 2012 5:07 pm

a further piece of information - it's throwing an exception only at this command :

PhidgetMotorCtrl.servos[1].Position = 30;

It's not actually throwing the exception when I engage the servo following this. It's on trying to set the position that the error occurs

mrbencowell
Phidgetly
Posts: 32
Joined: Sun Jun 05, 2011 5:15 am
Contact:

Re: Servo Calibration

Postby mrbencowell » Tue Jan 17, 2012 5:19 pm

having a play about with various servo parameters i notice that the PositionMax seems to be 6 and PositionMin is 5.45260612573698E-16

however if i don't setServoParameters then min is 0 and max is 220 .. could i be doing something incredibly stupid with the setServoParameters command ?

User avatar
Patrick
Lead Developer
Posts: 2943
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Servo Calibration

Postby Patrick » Tue Jan 17, 2012 6:14 pm

The third parameter is degrees - you have it set to 6, which means that the valid range will be 0-6 degrees - you probably want to set it to something higher.

-Patrick

mrbencowell
Phidgetly
Posts: 32
Joined: Sun Jun 05, 2011 5:15 am
Contact:

Re: Servo Calibration

Postby mrbencowell » Tue Jan 17, 2012 6:33 pm

Yep that sorted it. Thank you.

I think that PDF has a mistake as it instructs you to set the degrees using this formula : (max_us-min_us)/deg which is how I arrived at 6.

Should I ignore this formula in the velocity setting as well ?

All the best,
Ben

User avatar
Patrick
Lead Developer
Posts: 2943
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Servo Calibration

Postby Patrick » Wed Jan 18, 2012 11:13 am

No your velocity is good.

-Patrick


Return to “All Other Phidgets”

Who is online

Users browsing this forum: No registered users and 1 guest