Society of Robots - Robot Forum

Software => Software => Topic started by: benji on February 24, 2008, 12:12:14 PM

Title: HS-322HD +90 -90 PWMS
Post by: benji on February 24, 2008, 12:12:14 PM
Hey folks, mentioned in the datasheet that to center this you have to send a pwm of 1.5 ms on,, it works
mentioned also pulse varies between 0.9 ms to 2.1 ms
,,tryin this the motor is turning from about -45 to about +45 ,, anyone got the precise pwms to make it turn from -90 to +90 ?
Title: Re: HS-322HD +90 -90 PWMS
Post by: benji on February 26, 2008, 04:29:21 PM
nobody turned this baby to +90 ????????
 :'(
Title: Re: HS-322HD +90 -90 PWMS
Post by: airman00 on February 26, 2008, 07:33:32 PM
just play around with it and see what happens  :P

is it electronically limited to 45 degrees or mechanically?

if you need it to go to 90 , just attach a gear with half the teeth, it will rotate double what the servo is rotating.
Title: Re: HS-322HD +90 -90 PWMS
Post by: benji on February 27, 2008, 04:11:30 PM
the thing is not limited to 45 it can turn to + 90 and - 90 electrically and mechanically
but in the data sheet they didnt provide the pwms for these limit angles
Title: Re: HS-322HD +90 -90 PWMS
Post by: izua on February 27, 2008, 04:25:25 PM
just add more or less to that value, say 0.5 ms and 2.5 ms..
Title: Re: HS-322HD +90 -90 PWMS
Post by: airman00 on February 27, 2008, 04:37:28 PM
perhaps you are not giving it the necessary time to go to 90?

I would probably do what izua said , do it in increments of .1ms
Title: Re: HS-322HD +90 -90 PWMS
Post by: benji on March 05, 2008, 04:38:13 PM
holy lord,,,,, this is the exact values

-90  ==  0.690 ms
0    == 1.515 ms
+90 == 2.385 ms

im lost ... the thing isnt linear, i need it to scan each two degrees, how do i increment???
Title: Re: HS-322HD +90 -90 PWMS
Post by: Admin on March 09, 2008, 09:32:25 AM
Quote
i need it to scan each two degrees, how do i increment???
Look at my sharp IR code on the $50 Robot upgrade:
http://www.societyofrobots.com/robot_50_robot_sharpIR.shtml
Title: Re: HS-322HD +90 -90 PWMS
Post by: benji on March 09, 2008, 12:02:36 PM
yea i did check your code , you are doing this servo_angle += 2 when you want to go on with your scan
THIS doesnt increment the same angle everytime you do it
it does it with an error
actually it depends on the servo your using, and i think most of em arnt so linear
Title: Re: HS-322HD +90 -90 PWMS
Post by: Admin on March 09, 2008, 01:48:46 PM
Quote
THIS doesnt increment the same angle everytime you do it
it does it with an error
ummm, it goes to whatever angle you tell it to go to . . .

the error results from two things:
-internal servo error of +/- 2 degrees thats unavoidable
-time it takes between commanding a servo and when it actually reaches that angle, also not avoidable


ps - I deleted your double post where you asked the same question in another thread - please don't do that! ;)
Title: Re: HS-322HD +90 -90 PWMS
Post by: benji on March 09, 2008, 03:26:44 PM
Quote
-internal servo error of +/- 2 degrees thats unavoidable
is this mentioned in the datasheet? cuz i dont see it, there is nothing about accuracy
try expirementing with it and ull get great accuracy , its a matter of 0.005 ms ,which is less than 2 degrees

anyone has the position/PWM equation?

anyways i did get three values which can help find the equation
these are the values again
-90 == 0.690 ms
0    == 1.515 ms
+90 == 2.385 ms

Title: Re: HS-322HD +90 -90 PWMS
Post by: Admin on March 09, 2008, 04:44:48 PM
Quote
is this mentioned in the datasheet? cuz i dont see it, there is nothing about accuracy
try expirementing with it and ull get great accuracy , its a matter of 0.005 ms ,which is less than 2 degrees
Its in the datasheet, and it depends on the servo. Look for 'deadband'.

You will notice that you can wiggle the servo a bit when you apply torque, thats the deadband error.

There is also gearing slack that will result in the position error.
Title: Re: HS-322HD +90 -90 PWMS
Post by: benji on March 11, 2008, 10:21:14 AM
in the one i have i dont have anything called deadband, can you upload the datasheet for this hitec servo?
Title: Re: HS-322HD +90 -90 PWMS
Post by: Admin on March 15, 2008, 04:16:15 PM
All the datasheets are on the Hitec website.

And all servos have deadband - its impossible, and a very bad idea, not to.