Go to Post I remember...my first nationals in 1998, when I was in High School, and thinking "Wow, that's really cool. Engineering looks fun..." - Karthik [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 04-02-2006, 01:46
ForgottenSalad's Avatar
ForgottenSalad ForgottenSalad is offline
In search of a home...
AKA: Michael Wessler
no team
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Bethlehem, NH
Posts: 136
ForgottenSalad will become famous soon enoughForgottenSalad will become famous soon enough
Send a message via AIM to ForgottenSalad
Re: Motor Limits

We're using limit switches to do the same type of thing. Two limit switches came in the kit.

If your motor was hooked to pwm01 you'd use...

Limit_Switch_Max(rc_dig_in01, &pwm01);
Limit_Switch_Min(rc_dig_in02, &pwm01);

That would (should) stop your turret's turning as soon as it hits the limit switches.

DISCLAIMER: I have not yet physically tested this yet, I didn't use any limit switches last year, and didn't get to test if that was stopping our turret today. I compiled and uploaded, but never tested the switches. That *should* work though.

You could also do it with a pot (I originally tried this way) but the limit switch, in my opinion, is much easier.

Last edited by ForgottenSalad : 04-02-2006 at 01:51.
  #2   Spotlight this post!  
Unread 04-02-2006, 01:59
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
Re: Motor Limits

Is the limti switch something in the program or or a piece of equipemtn to put on. Im not at our "workshop" so I cant look now..
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
  #3   Spotlight this post!  
Unread 04-02-2006, 02:01
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,519
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: Motor Limits

It is just small switch (physical) with a little metal arm on it to make it easier to press. See this pic http://www.omron.com.au/product_info...mit_switch.jpg You mount the switch such that when the device reaches maximum travel, the switch is pressed. The RC reads the state of the switch as being closed. And your program shuts off the motor (in that direction) accordingly.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
  #4   Spotlight this post!  
Unread 04-02-2006, 02:02
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,082
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Motor Limits

It is a physical switch you mount so that it gets pressed when your turret is at the maximum extent of its rotation.

You could also put a potentiometer (analog sensor) or encoder (digital sensor) on the turret shaft/motor and limit the rotation manually in software.
  #5   Spotlight this post!  
Unread 04-02-2006, 02:02
ForgottenSalad's Avatar
ForgottenSalad ForgottenSalad is offline
In search of a home...
AKA: Michael Wessler
no team
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Bethlehem, NH
Posts: 136
ForgottenSalad will become famous soon enoughForgottenSalad will become famous soon enough
Send a message via AIM to ForgottenSalad
Re: Motor Limits

EDIT: Ah, abw and sanddrag... beat me to it

The limit switch looks something like this.



You'd have to mount one at the far right and one at the far left to constrain the turret's movement. You'd then have to add those two lines of code and it should stop the motor when it hits either the far left (min) or far right (max) switch.

And as far as using a potentiometer, maybe there's a better way to do it, but I find it much easier for purposes of limiting motor movement to use the switches. Problem I had with the pot was getting instant stopping of the motor and sometimes the pot's base would turn with the motor, instead of just the bar turning, and it'd return feedback that was off and become useless for it's purpose. I find pots better for when you need to work with things along the motor's rotation, not for just stopping the motor at the ends.

Last edited by ForgottenSalad : 04-02-2006 at 02:14.
  #6   Spotlight this post!  
Unread 04-02-2006, 02:09
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
Re: Motor Limits

Okay, does that need to hook up to anything special? Victor (Dont think so), Spike (dont think so either). Does it just need power to run?

And does anyone know by chance how many of these you get with the kit?
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
  #7   Spotlight this post!  
Unread 04-02-2006, 02:12
ForgottenSalad's Avatar
ForgottenSalad ForgottenSalad is offline
In search of a home...
AKA: Michael Wessler
no team
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Bethlehem, NH
Posts: 136
ForgottenSalad will become famous soon enoughForgottenSalad will become famous soon enough
Send a message via AIM to ForgottenSalad
Re: Motor Limits

Two came in the kit this year.

You have to hook them up to the digital inputs on the RC.

Make sure your programmer sets them right in the code and your electrician wire them up correctly and you should be set.

Last edited by ForgottenSalad : 04-02-2006 at 02:14.
  #8   Spotlight this post!  
Unread 04-02-2006, 02:34
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
Re: Motor Limits

Heh, Im not only the driver, but the only programmer we have. I am also the youngest on the team, 15..

We arn't meeting til Monday so I wont be able to check it out till later. We may need like 2 more, for our gate. Or mayeb we can somehow just make sure we dont hit it farther then needed Saves some money. Since we have a team of 10. Ya need all the help and money you can get, hehe.

Thanks for all the quick replys!

So has anyone set up their algorithm for the gun yet?
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
  #9   Spotlight this post!  
Unread 04-02-2006, 02:40
ForgottenSalad's Avatar
ForgottenSalad ForgottenSalad is offline
In search of a home...
AKA: Michael Wessler
no team
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Bethlehem, NH
Posts: 136
ForgottenSalad will become famous soon enoughForgottenSalad will become famous soon enough
Send a message via AIM to ForgottenSalad
Re: Motor Limits

As far as saving money goes, I'm pretty sure you can get them at radioshack for a pretty cheap price. On a different note, good luck with your robot this year! I hear "turret" and "gate" in your posts... I draw that you might be going for both...
  #10   Spotlight this post!  
Unread 04-02-2006, 19:23
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
Re: Motor Limits

gate meaning the side goals? That wasn't what I was reffering to. But our end robot will be able to push a ball or two in there if needed. The gate I was reffering to was the motor that opens and shuts the opening for the balls dropping into the gun. Because you dont want to make a shot from accross the field... thatd be ridiculous ... but cool if we made it.

Were definatly getting closer, our teacher is getting nervous that we wont finish it, heh. Ill check radioshack on Monday or tomorow if I am by there see if they have them. Thanks.
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
  #11   Spotlight this post!  
Unread 04-02-2006, 19:35
ForgottenSalad's Avatar
ForgottenSalad ForgottenSalad is offline
In search of a home...
AKA: Michael Wessler
no team
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Bethlehem, NH
Posts: 136
ForgottenSalad will become famous soon enoughForgottenSalad will become famous soon enough
Send a message via AIM to ForgottenSalad
Re: Motor Limits

Heh, our local radioshack appearantly doesn't stock them though I could swear I've seen them there before. I don't know if yours will, I haven't checked the website if any of the stores stock them.
  #12   Spotlight this post!  
Unread 04-02-2006, 19:50
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,082
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Motor Limits

Quote:
Originally Posted by ForgottenSalad
EDIT: Ah, abw and sanddrag... beat me to it

The limit switch looks something like this.



You'd have to mount one at the far right and one at the far left to constrain the turret's movement. You'd then have to add those two lines of code and it should stop the motor when it hits either the far left (min) or far right (max) switch.

And as far as using a potentiometer, maybe there's a better way to do it, but I find it much easier for purposes of limiting motor movement to use the switches. Problem I had with the pot was getting instant stopping of the motor and sometimes the pot's base would turn with the motor, instead of just the bar turning, and it'd return feedback that was off and become useless for it's purpose. I find pots better for when you need to work with things along the motor's rotation, not for just stopping the motor at the ends.
If you use a pot, you can either set the limit to be some tolerance away from the real max you want (motor overshoot accounting for that tolerance), or use a feedback loop that deadens the motor response the closer it gets to the tolerance. Either way, or with a limit switch for that matter, a mechanical stop is recommended.
  #13   Spotlight this post!  
Unread 05-02-2006, 00:53
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,313
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Motor Limits

Limit switches definetly recommended for physical stops over pots. We had a problem last year with a pot rotating with our arm, causing one side to only shut off when it hit the limit switch, and preventing us from turning in the other direction because we designed the code to stop if it hit a certain pot value or the limit switch. A locked arm was pretty close to useless.

On the note of a gate to stop balls, you might want to use a pneumatic or servo instead. It won't be a massive amount of weight to hold back so either of these should work, if you already have pneumatics you might as well use one more (that's what we're going with).
  #14   Spotlight this post!  
Unread 05-02-2006, 14:28
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
Re: Motor Limits

Well, the gate I think we decided on the window motor. And when the limit switch is hit, it will stop the motor. Will the motor still be able to turn in the opposite direction. BEcause we dont want a locked arm.

And I just went to Radio Shack, they had them. They only had two left. They were only $2.69 so I decided to buy them right then.

http://www.radioshack.com/product/in...entPage=search
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
  #15   Spotlight this post!  
Unread 05-02-2006, 15:35
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Motor Limits

The limit switches will be listed as "micro switches" in a catalog or at Radio Shack. Digikey and Mouser both have tons of different types. On a really important application, back up a pot with a limit switch set (mounted) to the absolute farthest travel you can allow. The pot works but might not stop a fast moving motor in time to prevent damage.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
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 02:12.

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