Go to Post It is probable that you will find mroe than a few spotlight worthy phrases or sentences in the following. ;) - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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 08-02-2010, 23:01
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Kit opto encoder resolution?

What is the resolution (in pulses per turn) of the KOP's optical encoders? I need to find out the scaling value to plug into the open VI for the encoders in LabView.

The datasheet says "400-1440" ticks per rotation. This is obviously not helpful. Also, I assume you don't have to specify the quadrature decoding type, right (1x, 2x, or 4x?) I would assume it gets that right without modification.

Thank you for any help.
  #2   Spotlight this post!  
Unread 08-02-2010, 23:46
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Kit opto encoder resolution?

Last year they were 250, 1x. this year they are either 350 or 360, I can't remember which. I would set it to 350 1x. We honestly don't need more than around 12 counts in 4x decoding, or more for 2x or 1x decoding, since the mechanical error is great enough (especially with a little chain slack) that we could be off by as many as 100 counts using the KOP encoder, depending on gearing.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #3   Spotlight this post!  
Unread 09-02-2010, 03:51
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Kit opto encoder resolution?

Quote:
Originally Posted by apalrd View Post
Last year they were 250, 1x. this year they are either 350 or 360
360 counts per revolution for this year's KOP E4P-360-250-D-D-D-B encoders
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
  #4   Spotlight this post!  
Unread 09-02-2010, 10:43
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,584
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Kit opto encoder resolution?

Quote:
Originally Posted by flameout View Post
Also, I assume you don't have to specify the quadrature decoding type, right (1x, 2x, or 4x?) I would assume it gets that right without modification.
The decoding type can be used on any quadrature encoder. If you want to count the rising and falling edges on both the A and B channel, choose 4x. 2x does rising and falling edges on only one channel, while 1x only counts 1 edge on one channel. If you are using the encoder for position only, using 4x gets you extra resolution. If you are trying to use the rate function, you'll probably have better results with 1x. Choose whatever makes sense for your application.

One cool thing you can do with the scaling is get the encoder value in a measurement you want to use. For example, if you want to measure angle in degrees, put in a 1 for the scaling. Each tick will then be 1 degree (since the encoder has 360 ticks per revolution). Alternately, you could calcuate using your gear ratios and wheel size that each tick makes the robot move 1/10 of an inch. Put in 1/10 and then you will get the distance the robot traveled in inches.
  #5   Spotlight this post!  
Unread 10-02-2010, 03:19
ericand's Avatar
ericand ericand is offline
Registered User
AKA: Eric Anderson
FRC #3765 (Terrabots)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: St. Paul, MN
Posts: 148
ericand is a jewel in the roughericand is a jewel in the roughericand is a jewel in the rough
Re: Kit opto encoder resolution?

Quote:
Originally Posted by Joe Ross View Post
The decoding type can be used on any quadrature encoder. If you want to count the rising and falling edges on both the A and B channel, choose 4x. 2x does rising and falling edges on only one channel, while 1x only counts 1 edge on one channel. If you are using the encoder for position only, using 4x gets you extra resolution. If you are trying to use the rate function, you'll probably have better results with 1x. Choose whatever makes sense for your application.

One cool thing you can do with the scaling is get the encoder value in a measurement you want to use. For example, if you want to measure angle in degrees, put in a 1 for the scaling. Each tick will then be 1 degree (since the encoder has 360 ticks per revolution). Alternately, you could calcuate using your gear ratios and wheel size that each tick makes the robot move 1/10 of an inch. Put in 1/10 and then you will get the distance the robot traveled in inches.
Using the 2x and 1x, raises the question of which edge does it detect? I'm running into problems getting a good count of the encoders and I'm thinking the problem is that we have been using an old IFI robot controller theory of operation.

Our setup on our test setup has the encoder output going to a BaneBot encoder divider. This was done previously to allow us to use hardware to divide the counts of the A channel and latch the direction (B Channel) to preclude any latency issues when reading it on the old controller.

Our final robot will not have the dividers, but to save time, they were left on the practice chasis and the A and B signals were taken from the divider to digital I/O on the cRIO.

In this configuration, we are not getting any counts (getraw() returns 0, 1 -1) regardless of how much we move the robot. However, scoping the outputs of the encoders and the dividers shows that the signals are being generated as expected.

I suspect that the cRIO is getting confused since the B channel is not pulsing, but remains constant while the robot keeps moving. I'll be able to run more experiments on Thursday, with the encoder divider out of the picture to see if things work better.

I suspect it would be good to have the cRIO have a library call that would allow it to take advantage of hardware like the BaneBot divider, but given the current set of interfaces, I do not see how it can be done. I could set up a counter on the A channel, but I don't see how I can get an interrupt when the B channel changes so I can properly apply the direction to the A channel count.
  #6   Spotlight this post!  
Unread 10-02-2010, 09:53
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,584
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Kit opto encoder resolution?

Quote:
Originally Posted by ericand View Post
I suspect it would be good to have the cRIO have a library call that would allow it to take advantage of hardware like the BaneBot divider, but given the current set of interfaces, I do not see how it can be done. I could set up a counter on the A channel, but I don't see how I can get an interrupt when the B channel changes so I can properly apply the direction to the A channel count.
I believe you can set an external direction input for a counter, which should do what you need.
  #7   Spotlight this post!  
Unread 06-12-2010, 13:07
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: Kit opto encoder resolution?

Quote:
Originally Posted by Joe Ross View Post
The decoding type can be used on any quadrature encoder. If you want to count the rising and falling edges on both the A and B channel, choose 4x. 2x does rising and falling edges on only one channel, while 1x only counts 1 edge on one channel. If you are using the encoder for position only, using 4x gets you extra resolution. If you are trying to use the rate function, you'll probably have better results with 1x. Choose whatever makes sense for your application.
Forgive me if this has been asked and answered elsewhere; if so I haven't found it yet:

Per the above explanation, if 1x is reading only one channel, it wouldn't know which way the encoder is spinning, right? So the rate information with 1x wouldn't tell you whether the rate is positive or negative, right?

So if you wanted a rate that contained direction information, would you have to use the 4x?


  #8   Spotlight this post!  
Unread 06-12-2010, 13:39
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,584
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Kit opto encoder resolution?

Quote:
Originally Posted by Ether View Post
Forgive me if this has been asked and answered elsewhere; if so I haven't found it yet:

Per the above explanation, if 1x is reading only one channel, it wouldn't know which way the encoder is spinning, right? So the rate information with 1x wouldn't tell you whether the rate is positive or negative, right?

So if you wanted a rate that contained direction information, would you have to use the 4x?
There was a long thread (maybe last off-season) that went into a lot of detail about the encoder algorithm.

The 1x, 2x, and 4x only denotes how often measurements are made, the method of measurement is the same. In 1x, 2x, and 4x, the state of the opposite channel is used to determine direction.
  #9   Spotlight this post!  
Unread 06-12-2010, 13:44
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: Kit opto encoder resolution?

Quote:
Originally Posted by Joe Ross View Post
There was a long thread (maybe last off-season) that went into a lot of detail about the encoder algorithm.

The 1x, 2x, and 4x only denotes how often measurements are made, the method of measurement is the same. In 1x, 2x, and 4x, the state of the opposite channel is used to determine direction.
Thank you. I was slogging my way through that long thread but not finding the answer I was seeking.



  #10   Spotlight this post!  
Unread 06-12-2010, 17:16
buildmaster5000 buildmaster5000 is offline
Trying to program the swerve drive
AKA: Alex
FRC #2421 (Rolling Thunder Robotics)
Team Role: Alumni
 
Join Date: May 2009
Rookie Year: 2009
Location: Northern Virginia
Posts: 207
buildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud of
Re: Kit opto encoder resolution?

Quote:
Originally Posted by Vikesrock View Post
360 counts per revolution for this year's KOP E4P-360-250-D-D-D-B encoders
The number of "ticks" per revolution is found in the part number. The one referenced above has 360 ticks, while the E4P-250-250-D-D-D-B has 250.

Hope that helps
__________________
-Alex



2010 Washington DC Regional: Engineering Excellence Award
  #11   Spotlight this post!  
Unread 06-12-2010, 18:56
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: Kit opto encoder resolution?

Quote:
Quote:
Originally Posted by Joe Ross View Post
There was a long thread (maybe last off-season) that went into a lot of detail about the encoder algorithm.

The 1x, 2x, and 4x only denotes how often measurements are made, the method of measurement is the same. In 1x, 2x, and 4x, the state of the opposite channel is used to determine direction.
Thank you. I was slogging my way through that long thread but not finding the answer I was seeking.
I forgot to ask: is the above (bolded) documented somewhere? Before posting here I pulled up the on-line LabVIEW help for the encoder vi but all it said was:

Quote:
Decoding Type specifies the type of decoding used to decode the quadrature signal. Decoding Type supports three types of decoding for quadrature encoders: 1x, 2x, and 4x.
... which wasn't very informative.

Is there somewhere else that a LabVIEW beginner should be looking for this kind of information?




Attached Files
File Type: pdf encoder help.pdf (63.9 KB, 35 views)
  #12   Spotlight this post!  
Unread 11-12-2010, 10:10
buildmaster5000 buildmaster5000 is offline
Trying to program the swerve drive
AKA: Alex
FRC #2421 (Rolling Thunder Robotics)
Team Role: Alumni
 
Join Date: May 2009
Rookie Year: 2009
Location: Northern Virginia
Posts: 207
buildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud of
Re: Kit opto encoder resolution?

My team tried to use similar encoders to those in the KOP to read the angle of a swerve module, but we had trouble getting quality readings. If you are trying to do this, my advice is to find another sensor that is designed for this purpose. The KOP encoders to designed to read rotary changes (such as RPM on a gearbox) so that the program can respond accordingly.

Good Luck
__________________
-Alex



2010 Washington DC Regional: Engineering Excellence Award
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
Screwing Encoder into Encoder Mount? Adrien Electrical 3 25-01-2009 18:14
VEX Shaft Encoder Kit jeffmorris FIRST Tech Challenge 1 19-05-2006 12:23
DPI resolution Branden Ghena IT / Communications 6 17-04-2006 14:43
Resolution of IR sensors Paul Marshall Technical Discussion 2 16-01-2004 14:03
Resolution... Brandon Martus CD Forum Support 9 15-05-2002 18:49


All times are GMT -5. The time now is 07:36.

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