Go to Post I am allergic to work... - Mike Schroeder [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 27-08-2006, 03:18
edthegeek's Avatar
edthegeek edthegeek is offline
AMHS/Case Western Reserve Universit
AKA: Eduardo Arellano
no team (TKO)
Team Role: Mentor
 
Join Date: Dec 2005
Rookie Year: 2004
Location: San Jose, California
Posts: 33
edthegeek has a spectacular aura aboutedthegeek has a spectacular aura aboutedthegeek has a spectacular aura about
Send a message via AIM to edthegeek
Need help with shaft encoders

Our team is thinking about using shaft encoders on our 2007 FRC chassis. We need something with ok resolution, does not have to be great (it its within 4 inches of a set distance, its good enough). Does anybody have any idea as to where to get encoders compatible with the RC and how to program them?
__________________
"You do realize that most of the substances that you are inhaling right now are considered toxic in the state of California"
-Paolo to me while I am covered in Teflon and soldering.
"Stupid Chinese 6011 Alloy is stronger than we thought."
"Comrade, your sacrifice brings honor to the motherbot."
  #2   Spotlight this post!  
Unread 27-08-2006, 05:43
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: Need help with shaft encoders

Kevin Watson has an Encoder FAQ on his site, along with example code. Hopefully you should be able to find what you need there.
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
  #3   Spotlight this post!  
Unread 27-08-2006, 11:34
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,587
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Need help with shaft encoders

I've found a rather large selection at US Digital. They have some reasonably priced ones, and they'll make up just about whatever you'd like. You do have to give them a little lead time, however.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #4   Spotlight this post!  
Unread 29-08-2006, 00:41
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,071
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: Need help with shaft encoders

Grayhill and US Digital both have reasonably priced options.

Make sure whatever you get uses 5VDC power, and you'll need quadrature output to get direction as well as speed. Also make sure you don't get anything with a CPR (counts per revolution) too high (>1024 or so), or you can crash the RC.

As for programming with encoders, Kevin's code will let you read things like encoder counts, velocity, etc., but you need to figure out what you want to do with it in order to use that data. For example, if you need to drive 10 feet and stop, you could either wait until you count up to however many ticks equals 10 feet and then kill the power, or you could use a feedback controller to precisely reach the exact position you want down to a fraction of an inch.

It all depends on what you need it for, how much precision you need, and the ability of your programmers.
  #5   Spotlight this post!  
Unread 22-11-2006, 15:31
mluckham's Avatar
mluckham mluckham is offline
Registered User
FRC #0758 (Sky Robotics)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Ontario, Canada
Posts: 116
mluckham will become famous soon enoughmluckham will become famous soon enough
Re: Need help with shaft encoders

Quote:
Originally Posted by MattD
Kevin Watson has an Encoder FAQ ...
His code is great, I was able to very easily adapt it to a different encoder - as long as they have "phases" (two signal wires outputting pulses) - one wire is connected to a Digital Input to trigger an interrupt, the other wire goes to a second DI which the software checks for a HI or LO state, thus determining direction of rotation.

The difficulty with encoders seems to be how to attach them to motors, shafts, whatever. And they aren't cheap. The US Digital E4 Encoder http://www.usdigital.com/products/e4/index.shtml seems like good value for the price, with the encoder wheel and electronics mounted stably inside a housing.

Last edited by mluckham : 22-11-2006 at 15:34.
  #6   Spotlight this post!  
Unread 22-11-2006, 17:48
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,357
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Need help with shaft encoders

Don't forget the vex encoders. They're cheap and your team may all ready have them if they bought into vex. They do not give direction, but may be good enough to navigate a fixed distance in auto mode.
  #7   Spotlight this post!  
Unread 22-11-2006, 18:14
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: Need help with shaft encoders

Quote:
Originally Posted by mluckham
His code is great, I was able to very easily adapt it to a different encoder - as long as they have "phases" (two signal wires outputting pulses) - one wire is connected to a Digital Input to trigger an interrupt, the other wire goes to a second DI which the software checks for a HI or LO state, thus determining direction of rotation.
We easily adapted Kevin's encoder code to work with the gear tooth sensors from last year's kit of parts. They only have a single output. All it took was removing the part of the interrupt code which checks the second phase. We replaced that check with a flag which reflects the currently commanded direction of the motors (it works okay except at very low power where the wheel might actually be forced by friction with the carpet to turn in the opposite direction than desired).

Quote:
The difficulty with encoders seems to be how to attach them to motors, shafts, whatever. And they aren't cheap. The US Digital E4 Encoder http://www.usdigital.com/products/e4/index.shtml seems like good value for the price, with the encoder wheel and electronics mounted stably inside a housing.
Have you actually used the E4 or E4P encoders? I'd be grateful to hear how you mounted them (pictures would be wonderful) and how well they worked.
  #8   Spotlight this post!  
Unread 23-11-2006, 09:37
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,357
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Need help with shaft encoders

Looking at the US digital picture of the mention encoder, there is no bearing for the code wheel. This means that the user must provide the shaft and there are limits on shaft wobble and alignment. The Grayhills I believe include a high quality bearing and with the proper coupling can be more tolerant of misalignment and slop. I believe this means that to use these encoders a team would have to add a shaft, take off gear and bearings to the KOP trans. A bearing and shaft type encoder could be add to the KOP trans at the output shaft with a mounting bracket attached to the frame with a flexible coupling. While the Grayhills are more expensive, the time and effort maybe less for the mounting.
  #9   Spotlight this post!  
Unread 23-11-2006, 11:13
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,587
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Need help with shaft encoders

US Digital does offer the standard sort of encoders with shafts coming off them as well, in fact. Also, we were trying to use the E4 encoders with our custom transmissions last year, but ran out of time for coding and such. So they're mounted, but we haven't gotten around to testing them to see how well they work. For the record, though, they went on pretty easily. Though, of course, we had the shaft customized, etc. to make it easy.

Also, the specifications make them look a little tolerant to play in the system. They specify +-.02 in of axial play and .01 in of off axis tolerance. I don't think .01 inch is a ridiculously tight tolerance really.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter

Last edited by Kevin Sevcik : 23-11-2006 at 11:18.
  #10   Spotlight this post!  
Unread 23-11-2006, 15:08
Phalanx's Avatar
Phalanx Phalanx is offline
Formerly Team 1089 (Mercury)
AKA: Michael Reffler
FRC #5431 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 1999
Location: Lewisville, TX (previously NJ)
Posts: 384
Phalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond repute
Re: Need help with shaft encoders

Here's some real time experiences with shaft encoders.

In 2006 we attempted to use the VEX Encoders on our robots drive wheels and we found that under stress, under load, under heavy vibration they didn't count accurately or reliably so we abandoned using them.

Later on in the year we obtained a pair of H1-50 encoders from USDigital. It took about 5 days for us to get them via UPS ground so your mileage may vary. We found them to be highly reliable on the same robot and the same conditions we used for the Vex ones. I would higly recommend getting the cables they have for them too it makes life much easier when you only have to put hoods and pins on ONE end to connect on the RC. Additionally we may also look at using the E4 or the E4P series from USDitigal as well for 2007, but that has yet to be determined.

Also USDigitals Tech Support staff was very knowledgeable, very helpful and there is good dictionary of terms there, and some nice high level explanations.

We did not use Kevin's Encoder code, what we used instead was based on this whitepaper found here so you may also want to download and read this whitepaper on using quadrature encoders. We found it very helpful, insightful, and should help you understand the workings better.

http://www.chiefdelphi.com/media/papers/1490

PS. There is one minor bug, and one major bug in the sample code, in the initialization functions, but our crack team here found them and corrected them, so it all worked out great in the end.
__________________
Don't just ask the experts, become one!
Leadership is not about ability. It's about responsibility!
Diagonally Parked in a Parallel Universe. It's okay we do Quantum Physics



Last edited by Phalanx : 23-11-2006 at 15:11.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hallow-Shaft encoders magical hands Programming 1 17-01-2005 18:23
Using Shaft Encoders D.Viddy Programming 7 14-12-2004 18:27
Shaft Encoders wun Programming 3 12-10-2004 16:40
Where to get shaft encoders D.Viddy Programming 12 17-01-2003 09:38
Need Help on Shaft Mounting... archiver 2001 3 23-06-2002 23:29


All times are GMT -5. The time now is 03:50.

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