Moving arms with a motor
Page 1 of 1

Author:  l0jec [ Wed Dec 03, 2008 10:39 pm ]
Post subject:  Moving arms with a motor

My teams have run into design issues where the servos in the kit did not have enough torque to lift an arm with a scoop/bucket at the end they built to dequeue and score pucks. As a refactor of their designs they have attempted to replace the shoulder servos with a Tetrix dc motor. However, they seem to be having trouble finding a good code design to control the motor and keep it from moving way too fast.

They have attempted some of the following general approaches:
1) slowing down the power setting
2) using a shaft encoder + PID control and setting the slowest possible speed for the motor
3) writing code that steps the motor forward (forward for a few millis, brake, forward for a few millis, brake, etc., etc. )

In the end the motor still ends up pausing around for a second and then moving uncontrollably at a high velocity smashing their scoop/bucket into the field/themselves. Also, the braking on the motor doesn't seem to do a very good job holding the arm at a given angle... it seems to have plenty of power to swing it, but not hold it up when you set the motor to zero.
Just relying on the encoder/PID control is... flaky? I suspect the pattern on the encoder is not granular enough to accurately measure the speed of rotation when you only rotate it a fraction (less than 90 degrees).
Doing some of the stepping code helps, but isn't very friendly to drive with. That could just be our implementation, but I suspect there is a better overall strategy.

So.. my question is: What approaches/algorithms has anyone else had luck with using one of the dc motors to move an arm up, down, and hold it in place?


Author:  Jeff McBride [ Wed Dec 03, 2008 11:33 pm ]
Post subject:  Re: Moving arms with a motor

My team is also using motors to control their puck delivery mechanism. They found that it works much better to gear down the motor. Notice the gearing on the side....
Side View - small.JPG
Side View - small.JPG [ 59.95 KiB | Viewed 5409 times ]

Author:  l0jec [ Thu Dec 04, 2008 9:33 am ]
Post subject:  Re: Moving arms with a motor

That is good to hear as it is the same fix we landed on last night!
What approach are you using in code & have you had any issues with the arm since you geared it?

Author:  Jeff McBride [ Thu Dec 04, 2008 4:25 pm ]
Post subject:  Re: Moving arms with a motor

For their initial testing they are just using the same code they use for the drive wheels. It connects the motors to the joysticks in a logarithmic fashion. Look for the TankArcade.c sample in another thread. They can move the arms slowly or quickly as they desire and when they let go the arms stay put. They haven't written the functions to support moving the arm to known positions in a servo-like manner.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group