Products for USB Sensing and Control
It is currently Thu Jul 24, 2014 10:57 am

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Servo Calibration
PostPosted: Tue Jan 17, 2012 4:08 pm 
Offline
Phidgetly

Joined: Sun Jun 05, 2011 5:15 am
Posts: 31
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


Top
 Profile Send private message  
 
 Post subject: Re: Servo Calibration
PostPosted: Tue Jan 17, 2012 4:30 pm 
Offline
King of the Lab

Joined: Fri Mar 06, 2009 12:42 pm
Posts: 472
Location: Calgary, Canada
Velocity will be in degrees per second, so you simply take the reciprocal of 0.17sec/60°, which will be ~353°/s.


Top
 Profile Send private message  
 
 Post subject: Re: Servo Calibration
PostPosted: Tue Jan 17, 2012 5:01 pm 
Offline
Phidgetly

Joined: Sun Jun 05, 2011 5:15 am
Posts: 31
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.

Top
 Profile Send private message  
 
 Post subject: Re: Servo Calibration
PostPosted: Tue Jan 17, 2012 5:07 pm 
Offline
Phidgetly

Joined: Sun Jun 05, 2011 5:15 am
Posts: 31
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


Top
 Profile Send private message  
 
 Post subject: Re: Servo Calibration
PostPosted: Tue Jan 17, 2012 5:19 pm 
Offline
Phidgetly

Joined: Sun Jun 05, 2011 5:15 am
Posts: 31
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 ?


Top
 Profile Send private message  
 
 Post subject: Re: Servo Calibration
PostPosted: Tue Jan 17, 2012 6:14 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jun 20, 2005 8:46 am
Posts: 2604
Location: Canada
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


Top
 Profile Send private message  
 
 Post subject: Re: Servo Calibration
PostPosted: Tue Jan 17, 2012 6:33 pm 
Offline
Phidgetly

Joined: Sun Jun 05, 2011 5:15 am
Posts: 31
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


Top
 Profile Send private message  
 
 Post subject: Re: Servo Calibration
PostPosted: Wed Jan 18, 2012 11:13 am 
Offline
Lead Developer
User avatar

Joined: Mon Jun 20, 2005 8:46 am
Posts: 2604
Location: Canada
No your velocity is good.

-Patrick


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group