Go to Post To give credit where credits due, thanks to the GDC for this update. - Brandon Holley [more]
Home
Go Back   Chief Delphi > Technical > Motors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-02-2016, 15:47
Knufire Knufire is offline
Rose-Hulman Institute of Technology
no team
Team Role: College Student
 
Join Date: Sep 2009
Rookie Year: 2010
Location: Terre Haute, IN
Posts: 740
Knufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond repute
Re: CIM Motor Reversing

Quote:
Originally Posted by parbas View Post
We're having an issue with a CIM motor operating in reverse. In our code, we have a CIM motor set to go forward for half a second and then in reverse for half a second (both at full speed) at the press of a button. The issue is that the motor does not go back to it's starting position like we thought it would. It goes further back than it was when it started, which is causing an arm to move further and further back with each button press.

Any ideas?

Thanks!
There are many variables you are not controlling. Things like battery voltage, arm. angle (the load on the motor required to move the arm when it is horizontal is much more than when the arm is vertical), the motor may be biased in one direction, etc. Simply applying a percentage of battery voltage for a specified amount of time isn't going to let you preciely control the position of the arm.

You will need to put a sensor on the arm joint to measure the angle of the arm, and use that measured angle in code with a control loop to control the position of the arm.
__________________
Team 469: 2010 - 2013
Team 5188: 2014 - 2016
NAR (VEX U): 2014 - Present
  #2   Spotlight this post!  
Unread 12-02-2016, 00:48
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,606
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: CIM Motor Reversing

In particular with an arm, the load on the arm is almost always preferentially in one direction (probably what you are referring to as "back"). All other things being equal or even close, it will take more volt-seconds to raise a load than to lower it. If you need to get it to a certain spot, use an encoder, potentiometer, limit switch, or other sensor to tell when the process is complete.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #3   Spotlight this post!  
Unread 12-02-2016, 05:00
cbale2000's Avatar
cbale2000 cbale2000 is offline
Registered User
AKA: Chris Bale
FRC #5712 (Gray Matter)
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 2004
Location: Saginaw, MI
Posts: 945
cbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond repute
Re: CIM Motor Reversing

Quote:
Originally Posted by GeeTwo View Post
In particular with an arm, the load on the arm is almost always preferentially in one direction (probably what you are referring to as "back"). All other things being equal or even close, it will take more volt-seconds to raise a load than to lower it. If you need to get it to a certain spot, use an encoder, potentiometer, limit switch, or other sensor to tell when the process is complete.
To add to this, in a pinch, you can add a dead stop to the mechanism and then program it to slightly overshoot where you want it to go and always hit the dead stop, thus returning it to a consistent starting point. You do briefly stall the motor by doing this (though CIMs do have a bit of tolerance to this) and you have to have a mechanism beefy enough to take the repeated impacts, but if for whatever reason you are unable to add/program a sensor for the mechanism it will do the job. Just make sure you bring a spare motor or two. Of course this method pretty much only works with a 2-position mechanism.

That said, the other suggestions mentioned above are all far preferable to the option I just described. A physical dead stop for a mechanism should almost always be a last resort.
  #4   Spotlight this post!  
Unread 12-02-2016, 08:18
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,606
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: CIM Motor Reversing

Quote:
Originally Posted by cbale2000 View Post
To add to this, in a pinch, you can add a dead stop to the mechanism and then program it to slightly overshoot where you want it to go and always hit the dead stop, thus returning it to a consistent starting point. You do briefly stall the motor by doing this ..
If you go this route, also monitor the current on that motor. A spike in current (other than during startup) will alert you to hitting the stop. Not elegant, but better than nothing.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #5   Spotlight this post!  
Unread 12-02-2016, 08:42
aeastet aeastet is offline
Programming Mentor
AKA: Tim Easterling
FRC #6043 (Allegan Tigers Robotics)
Team Role: Coach
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Holland, MI
Posts: 119
aeastet is an unknown quantity at this point
Re: CIM Motor Reversing

Encoders are easy to use and take no time to install. Look into that before doing something like dead stopping your arm. That could cause many other issues with voltage spikes and brownouts.
  #6   Spotlight this post!  
Unread 12-02-2016, 08:57
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: CIM Motor Reversing

Quote:
Originally Posted by aeastet View Post
Encoders are easy to use and take no time to install. Look into that before doing something like dead stopping your arm. That could cause many other issues with voltage spikes and brownouts.
Encoders are not hard, but limit switches are even easier - especially with the new SPARK speed controllers which have limit switch inputs. No software!!! You dont even need to stop driving up or down based on time, just leave the motor drive in the direction you want the arm. The limit switch cuts the power at precisely the right time. I strongly recommend limit switches tied directly to a speed controller (Spark, Jaguar or SRX) for this particular problem.

Also, a previous post talked about loads. Not knowing your system, I am going to make a wild guess that the first direction arm moves is "up" (against gravity) and the second, faster direction is "down" (with gravity). Gravity always wins - common design challenge with rotating arms.
  #7   Spotlight this post!  
Unread 12-02-2016, 09:03
maxnz's Avatar
maxnz maxnz is offline
Registered User
AKA: Max Narvaez
FRC #2855 (BEASTBot)
Team Role: Student
 
Join Date: Jan 2016
Rookie Year: 2016
Location: St. Paul, MN
Posts: 249
maxnz is a glorious beacon of lightmaxnz is a glorious beacon of lightmaxnz is a glorious beacon of lightmaxnz is a glorious beacon of lightmaxnz is a glorious beacon of lightmaxnz is a glorious beacon of light
Re: CIM Motor Reversing

Potentiometers work too, but they can be harder to program.
  #8   Spotlight this post!  
Unread 12-02-2016, 09:05
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,074
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: CIM Motor Reversing


If you decide to go with limit switches, make sure to mount them in such a way that they don't also serve as a hard stop.

Common mistake.



  #9   Spotlight this post!  
Unread 12-02-2016, 09:33
Zebra_Fact_Man's Avatar
Zebra_Fact_Man Zebra_Fact_Man is offline
]\/[ Go Blue!
AKA: Solomon
FRC #1076 (Pi Hi Samurai)
Team Role: Coach
 
Join Date: Mar 2012
Rookie Year: 2006
Location: Ann Arbor, MI
Posts: 472
Zebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant futureZebra_Fact_Man has a brilliant future
Re: CIM Motor Reversing

Quote:
Originally Posted by Ether View Post

If you decide to go with limit switches, make sure to mount them in such a way that they don't also serve as a hard stop.

Common mistake.



Seconded. You'll destroy your limit switch if you do.
-Knowledge from experience.

It boggles my mind that there are still people that think motors/gearboxes/axles are going to perfectly turn in opposite directions at the same speed/distance/force.
__________________
My Journey in FIRST:

Mentor/Coach/Engineer
2014-2017: Team 1076 - Pi Hi Samurai
____ 2014: Team 5220 - The Rockets
2009-2014: Team 313 - The Bionic Union/Bionic Zebras
Student
2006-2009: Team 313 - The Bionic Union
  #10   Spotlight this post!  
Unread 12-02-2016, 09:52
maxnz's Avatar
maxnz maxnz is offline
Registered User
AKA: Max Narvaez
FRC #2855 (BEASTBot)
Team Role: Student
 
Join Date: Jan 2016
Rookie Year: 2016
Location: St. Paul, MN
Posts: 249
maxnz is a glorious beacon of lightmaxnz is a glorious beacon of lightmaxnz is a glorious beacon of lightmaxnz is a glorious beacon of lightmaxnz is a glorious beacon of lightmaxnz is a glorious beacon of light
Re: CIM Motor Reversing

Quote:
Originally Posted by Zebra_Fact_Man View Post
Seconded. You'll destroy your limit switch if you do.
-Knowledge from experience.
That happened enough times that we had to fashion a new 'detector' (the part that is hit and turns on the switch, not sure what it's called) out of a zip tie. It actually worked better than the metal did by not bending out of shape and staying there for the rest of the offseason event.
  #11   Spotlight this post!  
Unread 12-02-2016, 11:07
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,606
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: CIM Motor Reversing

Quote:
Originally Posted by maxnz View Post
That happened enough times that we had to fashion a new 'detector' (the part that is hit and turns on the switch, not sure what it's called) out of a zip tie. It actually worked better than the metal did by not bending out of shape and staying there for the rest of the offseason event.
I've seen this referred to as a whisker or cat's whisker.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #12   Spotlight this post!  
Unread 12-02-2016, 10:09
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: CIM Motor Reversing

Quote:
Originally Posted by Ether View Post

If you decide to go with limit switches, make sure to mount them in such a way that they don't also serve as a hard stop.

Common mistake.



Agreed. I have seen many smashed/mangled limit switches. This can be a huge issue, especially if the arm is moving fast. Locate the switch trip point about a half inch before the hard stop, such that when at the hard stop the switch is still tripped.

One way to make the "switch" more robust from damage with fast moving arms is to use a hall effect sensor like http://www.andymark.com/Electrical-p/am-3313.htm an put a small magnet on the arm.
  #13   Spotlight this post!  
Unread 12-02-2016, 10:37
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 5,989
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
Re: CIM Motor Reversing

...or mount the switch so that it is activated as the arm moves past it and hits the hard stop. There are many solutions.
  #14   Spotlight this post!  
Unread 12-02-2016, 10:47
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: CIM Motor Reversing

Quote:
Originally Posted by MrForbes View Post
...or mount the switch so that it is activated as the arm moves past it and hits the hard stop. There are many solutions.
Thats what i meant, but also tried to suggest that it to stays activated while resting on the hard stop. I have seen fast moving arms fly past the limit switch, the motor pauses, and then restarts when it clears the switch. It then powers into the hard stop as if the switch wasn't there.

I think Ether, MrForbes and myself are saying the same thing. Limit switches should be mounted next to the moving arm such that the arm sweeps past the switch; NOT directly in the arm's path such that the arm smacks the switch and uses it as the hard stop.
  #15   Spotlight this post!  
Unread 12-02-2016, 14:14
philso philso is offline
Mentor
FRC #2587
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 938
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: CIM Motor Reversing

Quote:
Originally Posted by gpetilli View Post
Thats what i meant, but also tried to suggest that it to stays activated while resting on the hard stop. I have seen fast moving arms fly past the limit switch, the motor pauses, and then restarts when it clears the switch. It then powers into the hard stop as if the switch wasn't there.

I think Ether, MrForbes and myself are saying the same thing. Limit switches should be mounted next to the moving arm such that the arm sweeps past the switch; NOT directly in the arm's path such that the arm smacks the switch and uses it as the hard stop.
Or the limit switch contact closes. Milliseconds later, the arm crushes the limit switch. Another few milliseconds later, the switch contacts open again, never to close again, and the mechanism with over 400 ft.-lb. of torque procedes to destroy itself...
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:56.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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