Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Motors (http://www.chiefdelphi.com/forums/forumdisplay.php?f=52)
-   -   Stopping motors (http://www.chiefdelphi.com/forums/showthread.php?t=54669)

simeon1770 20-02-2007 16:14

Stopping motors
 
lets say im using a motor for an arm, but once i move the motor and the arms move, it doesent lock, it goes back to its original state, so if i try to stand the arm up when the motor moves and the arm gets to a standing point once i stop controlling the motor the arm will fall, is there anyway to program it to stop when i stop controlling it?

Kevin Sevcik 20-02-2007 16:31

Re: Stopping motors
 
What you're describing is called open loop control. Programmatically, your control system has no idea what the arm is doing, so it can't stop the arm from moving or falling. All it can do is take the command you're giving it and send power to the motor to match what you're telling it to do. There's no loop of information, commands come from you, go to the controller and then to the arm. No information travels the other direction, thus the term "open loop."

To get your arm to stay in one place via programming, you must close this loop by providing your controller with information about the position of the arm. The controller then decides on its own how much power to send to the motor based on the information of where the arm is now, and the input of where you want the arm to be. If you want the arm to stand still, and the controller sees the arm moving, it will send power to the motor to stop the arm. This is closed loop control because the controller gets information back from the arm and uses this information to control how much power to send to the motor. There's an actual loop of information coming from the arm, affecting the power to the motors, which affect the position of the arm, which means new information from the arm, which changes the power to the motors further, which.... and so on. Closed loop control is the PID control you'll see people talking about here.

So, if you truly want your program to stop the arm from falling you need to add a sensor to the arm and connect this to your controller to implement PID control on the arm. Another option is to use one of the window motors to mechanically stop the arm from falling since these motors are not backdriveable. Your final option is to move the Brake/Coast jumper on your Victor 884 from BC to AB to enable dynamic braking. This will slow the motor down while the victor is in neutral. Unfortunately it slows the motor down more the faster the motor spins. This means it's not actually capable of stopping the arm from falling. It can potentially slow it down by a large amount, however.

mgreenley 20-02-2007 16:38

Re: Stopping motors
 
simeon1770, you have a few options to go about fixing this. If the arm is light enough, you can simply set the braking pin on the Victor to brake. As I understand it (read: I'm just an alumnus, not an engineer), this produces an effect similar to crossing the leads on a motor. IT makes it very difficult to turn, hence, holding it in place.

If you arm is a little heavier, then a working software-oriented fix may be mounting sensors on the robot (a shaft encoder may be a good solution here). From there, you would need to read the count and, in the simplest case, set a value you want the arm to go to and then a lower limit at which point the motor lifts the arm back up to the desired value (if you set only one value the motor will be rapidly switching on and off trying to maintain that position). If you need more control over your arm, or your arm is fragile, etc..., then a more complex control method may be in order. A PID, or Proportional, Integral, Derivative control may be a good solution then. This option gives you a little more control over the arm, but may take a little time to tune (Also, advice I've found useful is to use only a P control and then add the I and D terms to eliminate error in the P solution after tuning it.).
For more information, the programming side of controlling your arm has also been discussed here.

If you're looking for a more hardware oriented fix, and have the weight to spend, adding a worm gear to the drive-motor gearing has worked well for my former team in previous competitions. Other hardware oriented solutions include adding a mechanical brake or changing up the gear ratio on the arm.

Depending on your situation, a different solution or mix of solutions may be the best for you. Hope this helps.

simeon1770 20-02-2007 16:48

Re: Stopping motors
 
darn, i dont think we'll be able to do it 2day, the robot is being shipped as we speak, well we have 10 hourse to edit at competition, so how long do you think it would take?

anyone in the midwest region at UIC pavilion?

Kevin Sevcik 20-02-2007 16:59

Re: Stopping motors
 
simeon,

I would at least set your victor to the Brake setting and see how that works for you. Setting up a PID loop for your arm can be a finicky process. If you have the potentiometer, a mounting plan, and the will, you can probably pull it off on practice day. I would search around on CD and learn as much as you can about PID control and write up some sample code in your team's Fix-It Window. With that and hopefully a veteran team to help you at Midwest Regional (There's a few) and you should be able to get it working.

SuperBK 20-02-2007 17:15

Re: Stopping motors
 
For a quick and dirty fix, you could try to find a value to drive the motor at that holds the arm up. It would be a low value, maybe 135 (in the forward direction) or something like that.

You probably need to watch out for motors getting hot. They draw a lot of current when still.

Brian

Gary Bonner 21-02-2007 21:47

Re: Stopping motors
 
1 Attachment(s)
Here is our solution this year. It activates whenever the motor PWM value is 127.

MrForbes 21-02-2007 21:53

Re: Stopping motors
 
Quote:

Originally Posted by Gary Bonner (Post 583766)
Here is our solution this year.

that's the cleverest thing I've seen all week! :)

Mark McLeod 22-02-2007 11:12

Re: Stopping motors
 
Quote:

Originally Posted by SuperBK (Post 582650)
For a quick and dirty fix, you could try to find a value to drive the motor at that holds the arm up. It would be a low value, maybe 135 (in the forward direction) or something like that.

You probably need to watch out for motors getting hot. They draw a lot of current when still.

A simple variation on Brian's idea is to just retrim your joystick to apply the small amount of power you need to keep the arm from backdriving.

You do have to be careful of which motors you use this with. The CIM's and globes can handle it well, but the Fisher-Price and Banebot 540 motors do not take well to being stalled.

Tom Line 09-03-2007 09:49

Re: Stopping motors
 
Gary - That is one AWESOME little brake! Whomever designed that deserves an award.

Mind if we steal it? I'm pretty sure I could fab that up in the pits before Friday's match :p

simeon1770 09-03-2007 16:58

Re: Stopping motors
 
ok, so i read the instructions on the victors, and when the light is orange that means its braking, how do i apply the break in programming to something like the trigger on the controller

Tom Line 09-03-2007 18:12

Re: Stopping motors
 
You can't. To brake a DC motor, the motor is shorted across the positive and negative terminals. This happens automatically whenever you have the brake jumper on the victor turned on and when there is no/a neutral signal going to the victor.

Gary Bonner 09-03-2007 21:03

Re: Stopping motors
 
Quote:

Originally Posted by Tom Line (Post 593756)
Mind if we steal it? I'm pretty sure I could fab that up in the pits before Friday's match :p

Feel free. I hope it works for you.

simeon1770 12-03-2007 17:02

Re: Stopping motors
 
im sorry, im a little dumb, i have like NO idea about some of the stuff your talking about, can you put it in simpleton terms in how to make it stop using things that came with the robot in the red and blue box, and take it step by step, sorry if im causing any inconvience

meatmanek 12-03-2007 18:52

Re: Stopping motors
 
I think you may want to go with the brake that Gary Bonner posted. If you have anybody on your team who's more mechanically inclined, I would seek their help.

You're probably going to have to use stuff that isn't in the Kit of Parts to solve your problem.


All times are GMT -5. The time now is 05:43.

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