Quote:
Originally Posted by mkaa00x
Yeah, I understand how a PID works... WAIT THE SERVO HAS UNLIMITED AMOUNT OF ROTATIONS??? So technically, if we were to have a servo that would feed data to an input by making sure that we don't power up the servo in anyway... we can use (in Java) the .getAngle (or whatever it was) method for measuring an angle, correct? Like I know it may not have enough power but it can work side by side with a cim. Right?
*EDIT*
Oh and I haven't found any servo that does that, can you like send me a link too, if possible of one that has continuous rotations? If not I can try asking one of the builders on our team 
|
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.