View Single Post
  #5   Spotlight this post!  
Unread 09-10-2013, 02:10
mkaa00x's Avatar
mkaa00x mkaa00x is offline
Momo
AKA: Mohammad Al-Ahdal
FRC #4627 (Iron Manning)
Team Role: RoboCoach
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Calgary, Canada
Posts: 38
mkaa00x is an unknown quantity at this point
Talking Re: Suggestions on a good way to get angle?

Quote:
Originally Posted by EricH View Post
One step at a time:

1) Servos have unlimited rotations IFF they are Continuous Rotation (CR) servos. Example: http://hitecrcd.com/products/servos/...-servo/product. Other servos on the same site may or may not be CR, and may or may not be modifiable to be CR.

2) Servo feeding data to an input, ugh! Servos are designed to be used as motion sources, not data sources. You could use it... but for one thing.

3) Guess what the servo's sensor actually is? IIRC, it's a small encoder.

4) A CIM would exert an awful lot of force on that servo. The linked servo is only rated at 52 RPM, 46.8 oz-in rated torque. To put this in perspective, that's 1% of the CIM free speed and 13% of the CIM stall torque. Servo might not survive more than a little time unless the motor was removed. At which point, you have a small encoder.

So, let's go through how to read an encoder for angle:
1) Determine how many counts it takes to go through one 360-degree turn. Divide by 360 to get counts per degree (or divide by 2*pi for counts per radian, which the computer might like better).
2) Get the count from the encoder as to how far it's traveled (and in which direction) from the last stop point.
3) You now have a number of counts, and a number of counts per angle. With a little math, you can eliminate the number of counts and come up with an angle.

Speaking as an ME, I wouldn't want to use a servo when a sturdier encoder was available, and most likely cheaper.
OH! I get it! so basically servos are encoders + motors, they're easier to program because half the code is already there, I can use a CIM + encoder although I'd need to become a nerder nerd and nerd out nerdy maths to get the answer for the value of the angle made by the CIM and basically set a value, until angle reaches approximately point A, keep making the CIM spin in 1 direction.

Thanks so much
Reply With Quote