Go to Post This game is all about dealing with the unexpected and making changes on the fly. - Greg Hainsworth [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2013, 20:39
randalcr's Avatar
randalcr randalcr is offline
Programming Mentor
AKA: Chance Randall
FRC #0476 (Wildcats)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Ponca City
Posts: 82
randalcr is an unknown quantity at this point
Motor using Encoder as Limit Switch?

So our team wants to use an encoder as a limit switch. Meaning we want to stop a motor from going so far forward, and prevent from going too far backward while still being able to move anywhere in between. The issue is that none of our programmers have enough experience with using encoders nor the know how to make them function as limit switches. Any suggestions on how to do this?

Thanks.
__________________
-Time is the best teacher...unfortunately it kills all of its students. --Robin Williams
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2013, 21:51
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Motor using Encoder as Limit Switch?

I probably wouldn't do that if it's a critical mechanical stop involving multiple revolutions.

An incremental encoder will tell you how far you've moved, but it won't know where the device was when it started.
An absolute encoder will tell you where in a single rotation you are, but for multiple rotation devices it also won't know where it started.

Both of them forget where they are when the robot is turned off.

A true limit switch is really absolute. It knows exactly where the mechanical thingy is when a mechanical limit switch is engaged.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-02-2013 at 23:22.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2013, 21:52
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Motor using Encoder as Limit Switch?

When you read an encoder, you get a value that represents how far it has turned. You can use that value to enforce minimum and maximum travel on your motor. When the encoder is above a certain value, don't let the motor travel any farther forward. When it's below a certain value, don't let the motor travel any farther backward.

But if you don't guarantee that you're always starting up the robot with the motor in the same position, the encoder value won't always represent a consistent position.
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2013, 22:53
randalcr's Avatar
randalcr randalcr is offline
Programming Mentor
AKA: Chance Randall
FRC #0476 (Wildcats)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Ponca City
Posts: 82
randalcr is an unknown quantity at this point
Re: Motor using Encoder as Limit Switch?

Thanks for the input Mark and Alan. The mechanism it is on is a table that can be elevated by a motor for the shooter. We have limit-switches in place, but a couple of our mentors would feel more comfortable with having an encoder control the max and min movement.
__________________
-Time is the best teacher...unfortunately it kills all of its students. --Robin Williams
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2013, 22:57
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Motor using Encoder as Limit Switch?

A better sensor for that would be a potentiometer, 10-turn maybe, but geared to match the full range of travel desired.
A pot gives you an absolute position.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2013, 23:13
randalcr's Avatar
randalcr randalcr is offline
Programming Mentor
AKA: Chance Randall
FRC #0476 (Wildcats)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Ponca City
Posts: 82
randalcr is an unknown quantity at this point
Re: Motor using Encoder as Limit Switch?

Quote:
Originally Posted by Mark McLeod View Post
A better sensor for that would be a potentiometer, 10-turn maybe, but geared to match the full range of travel desired.
A pot gives you an absolute position.
I'll bring that up tomorrow and see if I can sell them on the idea of that.

Thank you.
__________________
-Time is the best teacher...unfortunately it kills all of its students. --Robin Williams
Reply With Quote
  #7   Spotlight this post!  
Unread 09-02-2013, 13:40
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,995
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Motor using Encoder as Limit Switch?

Mechanical switched that detect the min and max position will be far better of a solution. Just position the switch such that...

1. It does not get damaged if the motor exceeds its position (e.g., to the side, not 'blocking' thr path)

2. Put hard stops so that if it does exceed the limits, it won't break, but stop.

In fact, no matter the method, #2 is always a good idea.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
Reply


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 12:16.

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