Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Arm Control Help (http://www.chiefdelphi.com/forums/showthread.php?t=145567)

4AngryNutjobs 03-11-2016 10:49 AM

Arm Control Help
 
My team is currently working on a pickup arm that needs to hold itself in three distinct positions. We originally tried using pid but were unable to get this to work due to the heavy weight of the arm and lack of knowledge. The arm uses a talon encoder to get its positions and needs to hold steady at -4700, -6000, and -3700 ticks with the press of a button. Our team is currently trying to use if statements and while loops to hold the arm but is struggling to move the arm precisely without it swinging down and slamming into our bumpers.

If anyone has sample code or ideas on how to control the arm please help!!!
We are competing at CVR today and are from team 3859.

Alan Anderson 03-11-2016 11:31 AM

Re: Arm Control Help
 
Step one: compensate for the arm's weight mechanically. Add a bungie cord, or a counterweight, or a gas spring, or anything that will take the constant load off the motor.

Then you can proceed to step two, and use the motor just to move the arm from location to location without worrying about gravity.

GeeTwo 03-11-2016 01:17 PM

Re: Arm Control Help
 
Absolutely agree with Alan - make a "passive" system that reduces the load on the "active" system.

Another setup we have used for this (off-competition) is a pneumatic cylinder. You don't even need a solenoid valve, just orient and pressurize it so that it is ALMOST enough to lift the load.

Kevin Sevcik 03-11-2016 01:26 PM

Re: Arm Control Help
 
Quote:

Originally Posted by Alan Anderson (Post 1555481)
Step one: compensate for the arm's weight mechanically. Add a bungie cord, or a counterweight, or a gas spring, or anything that will take the constant load off the motor.

Then you can proceed to step two, and use the motor just to move the arm from location to location without worrying about gravity.

Second option is to just gear the arm down enough that the motor doesn't see the load much. If you're driving the arm with a Versaplanetary gearbox or something, adding an extra reduction stage might be easier than counterbalancing.

Alan Anderson 03-12-2016 02:05 PM

Re: Arm Control Help
 
Quote:

Originally Posted by Kevin Sevcik (Post 1555524)
Second option is to just gear the arm down enough that the motor doesn't see the load much.

This can work too. Just be aware of the torque loads you're going to be putting on the output of the gearing. Make sure whatever you use isn't going to get sheared off if you bump the arm wrong.

In a game like FIRST Stronghold, "bump the arm wrong" might include heavy bouncing from merely driving from one part of the field to another.

Arhowk 03-12-2016 10:23 PM

Re: Arm Control Help
 
If you are having the issue of the arm slamming into the bumpers than what helped for our team was using a slow voltage ramp rate when the PID is arm level

Additionally, to make your code nicer, I'd carefully tune a feed forward constant. Multiply this by the cosine of the CURRENT (not desired) arm position to get the force required to hold the arm at that position. From there, you may find it easier to use traditional PID tuning methods as you are not fighting the force of gravity

snekiam 03-19-2016 08:33 PM

Re: Arm Control Help
 
We did programmatic gravity compensation for our arm this year, and all we ended up with were motors without their blue smoke. Don't do it all by essentially stalling your motors like we did.


All times are GMT -5. The time now is 10:25 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi