Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Using Digi-Key Shaft Encoders (http://www.chiefdelphi.com/forums/showthread.php?t=16691)

Kevin Watson 18-01-2004 13:02

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by WizardOfAz
Hmmm. I'm not going to dive into the details of this I guess, since I'm going to continue down the "pot path" for measuring the angle. But I suspect this calculation is more than a bit optimistic. (1) can you really handle the shaft encoder interrupt in about 10 instructions? (2) are all instructions one cycle with no wait states needed? (3) what about the state save/restore cost of the interrupt? I'll bet it's more like 1% than 0.1%, still not too much load if you don't have a lot of them.

It's 40 or 50 instructions total. There are no wait states involved.

-Kevin

IrisLab 22-01-2004 17:49

Re: Using Digi-Key Shaft Encoders
 
I'm having trouble with the links to digikey at the first of this post. Does anyone know the part numbers that the links refer to?

Or alternatively, any recommends for digi-key optical encoders?

Thanks.

Joel J 15-02-2004 15:10

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by Kevin Watson
If you really, really want to use a potentiometer, why not use the Bourns 6639S-1-103 which is available at Digi-Key (search for 6639S-1-103-ND). I'd rather use an encoder.

-Kevin

I am in heavy deliberation at the moment. I am trying to decide whether or not I wish to use a potentiometer or encoder for something relating to the subject of this thread. I am pretty much at a loss for good reasons (I have never used potentiometers or encoders before), so I am wondering why you have a bias that steers more towards an encoder than to a potentiometer.

D.Viddy 15-02-2004 16:48

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by Joel J.
I am in heavy deliberation at the moment. I am trying to decide whether or not I wish to use a potentiometer or encoder for something relating to the subject of this thread. I am pretty much at a loss for good reasons (I have never used potentiometers or encoders before), so I am wondering why you have a bias that steers more towards an encoder than to a potentiometer.

Because almost all potentiometers that will find will not revolve all the way around. Also pots wear out very easily when attached to a constantly rotating shaft. Last years controller was too slow for using an encoder. This years processor has no trouble keeping up with a 256 tick encoder. We have ours controlling our motors beautifully right now. Dead recoding is incredably precise with them. It's not a bias, it's just one is better than the other.

KevinB 15-02-2004 17:08

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by Kevin Watson
It's 40 or 50 instructions total. There are no wait states involved.

-Kevin

I have written my own Interrupt handler for reading the optical encoders. Is there an easy way to see how many instructions the C Code translates to?

steven114 15-02-2004 18:00

Re: Using Digi-Key Shaft Encoders
 
In MPLAB IDE, go to View->Disassembly

Kevin Watson 15-02-2004 22:56

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by KevinB
I have written my own Interrupt handler for reading the optical encoders. Is there an easy way to see how many instructions the C Code translates to?

Yes, there certainly is. Have a look at the .lst file that the compiler generates. It's a text file that shows you what assembly and machine code the compiler generated and where it placed it in memory.

-Kevin

Joel J 16-02-2004 00:47

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by D.Viddy
Because almost all potentiometers that will find will not revolve all the way around. Also pots wear out very easily when attached to a constantly rotating shaft. Last years controller was too slow for using an encoder. This years processor has no trouble keeping up with a 256 tick encoder. We have ours controlling our motors beautifully right now. Dead recoding is incredably precise with them. It's not a bias, it's just one is better than the other.

Ok, thanks.

Kevin Watson 16-02-2004 03:34

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by Joel J.
I am in heavy deliberation at the moment. I am trying to decide whether or not I wish to use a potentiometer or encoder for something relating to the subject of this thread. I am pretty much at a loss for good reasons (I have never used potentiometers or encoders before), so I am wondering why you have a bias that steers more towards an encoder than to a potentiometer.

As Dylan and others have pointed out, potentiometers have problems when used for positioning/control. Encoders, on the other hand, are designed for this type of application. You can find some example encoder code here.

-Kevin

Greg Powers 02-03-2004 15:21

Re: Using Digi-Key Shaft Encoders
 
mechanical or optical encoders? i know the mechanical encoders are alot cheaper and i was wondering how much that degraded quality

does anyone know the pro's con's between the two?

we plan on using them to compensate for steering problems and atonomous and aren't sure which we want.

steven114 02-03-2004 19:28

Re: Using Digi-Key Shaft Encoders
 
Mechanical encoders don't last nearly as long as optical ones do - check the specs on them for that measurement.

Daniel 07-03-2004 00:41

Re: Using Digi-Key Shaft Encoders
 
Have you read the white paper titled "Quadrature Encoders"?

This should help you a lot. email me if you have any specific questions or comments.

Daniel

sudeepr71 01-01-2005 20:06

Re: Using Digi-Key Shaft Encoders
 
After reading this forum, I still have a few questions.
What exactly is a encoder?
And how can I use it to measure the speed of the robot?

Alan Anderson 02-01-2005 14:49

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by sudeepr71
What exactly is a encoder?
And how can I use it to measure the speed of the robot?

There are a few different kinds of encoders. What most people here are talking about are "rotary shaft encoders", which can tell you the angular position of a rotating shaft. Usually that's done by counting pulses as it turns. Some encoders have thousands of steps per rotation, giving a very precise measurement. At the other end of the precision scale, last year's TechnoKat robot used six black stripes on the wheel hubs with Banner sensors to measure wheel rotation.

To measure the speed, you just use the difference in position between two measurements at different times.

sudeepr71 02-01-2005 19:16

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by Alan Anderson
At the other end of the precision scale, last year's TechnoKat robot used six black stripes on the wheel hubs with Banner sensors to measure wheel rotation.

To measure the speed, you just use the difference in position between two measurements at different times.

On your last year's robot you used it to see how far to go and then turn or something for the autonomous mode? We tried that and found that it wasn't as accurate as the line following.

So to find the speed, one would have two encoders at different times and subtract them?


All times are GMT -5. The time now is 10:12.

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