Phidget AdvancedServo calibration problem

Supporting Java SE version 7 and up
6thSense
Fresh meat
Posts: 2
Joined: Fri Jul 26, 2013 3:21 pm
Contact:

Phidget AdvancedServo calibration problem

Postby 6thSense » Fri Jul 26, 2013 4:01 pm

Hello,

I'm kind of new to controllers and electronics in general.

I'm using HiTEC HS-645MG Ultra Torque servo motor in unison with the Phidget AdvancedServo.

Here are the calibration parameters I calculated following the guidelines in the Phidgets user guide:

double min_us = 472.91;
double max_us = 2578.11;
double degrees = 11.5;
double velocity_max = 3115;

I used the following line to set the servo parameters right after I call the openAny function:

servo.setServoParameters(0, 472.91, 2578.11, 11.5, 3115);

Whether or not I include that line in my code, the actual range of rotation on the physical servo motor seems to be approximately the same.

But a glaring inconsistency shows up with respect to the position returned for the getPosition call and the position that I'm able to set for the setPosition call.

Specifically, when that line is not included, the minimum position that I can set or that it returns is 22 degrees. The max position is 218.7 degrees. So the range according to that appears to be 196.7 degrees. Note: The actual physical range of rotation on the servo motor is, in fact, clearly above 180 degrees and seems pretty close 195-ish by estimation.

But when I include the line, the minimum and maximum positions are 0.0475 degrees and 11.5 degrees (just an observation: 11.5 is the same value as my "degrees" parameter that I listed at the top...not sure if that's relevant or just a coincidence). Here the range is about 10 to 11 degrees. I didn't expect that at all. This "calibrated" range is far far off the physical range of rotation in terms of degrees.

I was expecting the calibration line to make it so that the actual physical minimum position on the motor corresponds with 0 degrees and the maximum position to correspond with 180 degrees. Is that not how it was supposed to be work? :oops:

A side question: wasn't the maximum physical range of the motor supposed to be less than or equal to 180?

I would really appreciate it if anyone here could tell me what could be possibly going wrong (or if anything is even going wrong or not) and how I can go about fixing it. :)
And if this isn't the place to ask this question, please point me to the right section of the forum to ask it.

Thank you very much,

-6th

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

Re: Phidget AdvancedServo calibration problem

Postby Patrick » Mon Jul 29, 2013 9:20 am

The third parameter should be the full-range of motion of your servo, so 180 degrees or whatever you calculate, I'm not sure what 11.5 represents for you. Also, the 4th parameter is the max servo velocity in degrees/second. I'm not sure where you got 3115 from. The HS645MG can do about 300 degrees per second.

My values for the HG645MG are: (580, 2330, 180, 300). This corresponds to 180 degrees rotation. You can probably push that to >180 degrees rotation with your wider micro-second range - just be careful about stalling the servo motor.

Also, the HS645MG is already in the list of pre-defined servo motors. Is there a reason that you aren't using setServoType() rather then setServoParameters()?

UPDATED:
Oops.. looks like this is our bad. The documentation is wrong for calibration. Parameter 3 should be degrees, not micro-seconds/degree and parameter 4 is degrees/second not micro-seconds/second. This will be fixed shortly.

-Patrick

User avatar
mparadis
Site Admin
Posts: 625
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Phidget AdvancedServo calibration problem

Postby mparadis » Mon Jul 29, 2013 10:11 am

It looks like the calibration guide in our documentation is actually out-of-date. The formula in the user guide puts the degrees argument in units of µs/degree, when in reality it should be in degrees and will be converted internally. Velocity_max is similarly incorrect. Our documentation must not have been updated when this change to setServoParameters was made. We'll do a review of our servo documentation today. Sorry for the confusion.


Return to “Java”

Who is online

Users browsing this forum: No registered users and 1 guest