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)

Joe Johnson 15-01-2004 17:18

Re: using potentiometer as shaft encoder
 
Quote:

Originally Posted by WizardOfAz
Actually, there's another disadvantage of these Piher potentiometers - you can't get them from any of the permitted suppliers (newarkinone, future-active, digikey), so I guess you can't use them. Does anybody know of any "out" for this? Does every little $2 or $3 part I might buy at some local electronics store for the robot also have to be obtainable from the listed suppliers? What would seem reasonable to me is that there be a lower limit, maybe $5 or $10 dollars, under which you could buy electronics parts from anybody.

It's too bad if we can't use these Piher pots (for example). They are less than $3 each and make great continuous rotation sensors. I have not yet found anything similar from the listed suppliers.

Bill

As I understand it, we've got only those 3 suppliers. But, I like your idea. I think we should propose it to FIRST (for at least 2005 if not this season).

Anyone up for making the suggestion? Nice and pretty now, nothing like, "you guys really blew it on this 3 supplier's only rule, you can make it up to us by getting half a brain and ..." Remember, we want them to agree with us!

Joe J.

WizardOfAz 16-01-2004 11:46

Re: using potentiometer as shaft encoder
 
Joe, seems like you're a big name, why don't you do it? If not, somebody remind me the approved mechanism for making such suggestions and I'll do it.

Bill

WizardOfAz 16-01-2004 13:31

$100/$200 electronics spending rule and other electronic suppliers
 
Some related questions have already been asked, but not yet answered:

on 1/13:
Q: In the past, items such as wire, switches, and pots were not considered part of the custom circuit and its $200 limit. The rules do not make distinctions between the custom circuit and other robot electronics. Please clarify

and on 1/15 a related question:
Q: We need 5 Victor speed controllers (kit has 4). The extra controller costs >$100. R75 sets individual itemlimit to $400. R71 sets limit of electronic component to $100. Does the Victor speed controller fall under rule R71 or R75?

Neither of these specifically ask about using other suppliers for "trivial" parts, so I guess that question should still be asked.

Joe Johnson 16-01-2004 16:46

Re: using potentiometer as shaft encoder
 
Quote:

Originally Posted by WizardOfAz
Joe, seems like you're a big name, why don't you do it? If not, somebody remind me the approved mechanism for making such suggestions and I'll do it.

Bill

There isn't really a process. I think you more or less just send them an e-mail (assuming you know them already).

I think I am pretty much tapped out on the "making suggestions" front. My thought was that FIRST was tired of hearing from me, someone new would perhaps get a better hearing.

Joe J.

Craig Putnam 16-01-2004 21:31

Re: $100/$200 electronics spending rule and other electronic suppliers
 
Quote:

Originally Posted by WizardOfAz
Q: We need 5 Victor speed controllers (kit has 4). The extra controller costs >$100. R75 sets individual itemlimit to $400. R71 sets limit of electronic component to $100. Does the Victor speed controller fall under rule R71 or R75?

See rule <R77> which addresses purchase of additional components from IFI. As I read it you can have whatever you want, but the components are included in the $3500 maximum cost.

IrisLab 16-01-2004 23:10

Re: using potentiometer as shaft encoder
 
Quote:

Originally Posted by WizardOfAz
[clipped text] ... What would seem reasonable to me is that there be a lower limit, maybe $5 or $10 dollars, under which you could buy electronics parts from anybody.

It's too bad if we can't use these Piher pots (for example). They are less than $3 each and make great continuous rotation sensors. I have not yet found anything similar from the listed suppliers.


I'd like to see the rule amended to say we can purchase compenets that meet the $$$ requirements ($100/$200) that we can obtain from Newark, Digikey, and Future Active OR from a supplier/distributor SUCH THAT the component or comparable component is available from Newark, Digikey, or Future Active.

Does that make sense? This rule would be in the spirit of the GP. If we buy a part from our local distributor and Digikey or the others sell a comparable item (at comparable pricing), I see no advantage that one team could gain.

I'll post on the Q&A and let's see what they think.

WizardOfAz 16-01-2004 23:35

Re: using potentiometer as shaft encoder
 
Quote:

Originally Posted by IrisLab
I'd like to see the rule amended to say we can purchase compenets that meet the $$$ requirements ($100/$200) that we can obtain from Newark, Digikey, and Future Active OR from a supplier/distributor SUCH THAT the component or comparable component is available from Newark, Digikey, or Future Active....

Actually, that IS the rule. See <R71>. It says the parts must be available from the suppliers, not that they have to be bought from them.

IrisLab 16-01-2004 23:48

Re: using potentiometer as shaft encoder
 
Quote:

Originally Posted by WizardOfAz
Actually, that IS the rule. See <R71>. It says the parts must be available from the suppliers, not that they have to be bought from them.


My mistake, I didn't make my self clear. I posted on the Q&A at usfirt that is a little more clear.

My intent was that a component A manufactured by company X where Digikey, Future, and Newark are not distributors of X. However, they are distributors for company Y (competitor to X) that manufacture component B (comparable to A).

For example, where A and B might be potentiometers with similar ratings and resistor ranges and comparable costs.

Does that make sense?

Kevin Watson 17-01-2004 19:19

Re: Using Digi-Key Shaft Encoders
 
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

WizardOfAz 18-01-2004 01:07

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

Kevin, thanks for finding that pot. DigiKey shows it as "1 turn", so I had not found it. But in the Bourne link, it's clear that it is continuous rotation and would serve as well as the Piher part. Too bad it costs 4x the Piher one.

My concern about encoders was the CPU utilization, though I didn't much more than guess about this issue. Any estimates what it will take to track an encoder that reads 128 or better pulses per rev?

Bill

Kevin Watson 18-01-2004 01:34

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by WizardOfAz
My concern about encoders was the CPU utilization, though I didn't much more than guess about this issue. Any estimates what it will take to track an encoder that reads 128 or better pulses per rev?

How many counts per second? Several hundred per second shouldn't be a problem. While testing my encoder code, I noticed that the controller could keep up with a peak count rate of just over 5,000/counts/second.

-Kevin

Jay Lundy 18-01-2004 02:44

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by WizardOfAz
My concern about encoders was the CPU utilization, though I didn't much more than guess about this issue. Any estimates what it will take to track an encoder that reads 128 or better pulses per rev?

Let's assume 15 ft/s with 6 in diameter wheels (very fast).

That's 9.55 rev/s or 1222 cycles/s.

Should be fine.

Also, (818.1 us/cycle) / (.1 us/instruction) = 8180 instructions/cycle

Assuming your int handler takes 10 instructions, 0.122% of your instructions are devoted to 1 of your encoders.

Heh, I think I got carried away with that calculation, but I was curious myself.

Dave... 18-01-2004 08:05

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

The 6639S-1-103 Bourns pot is 10K and not available in a 100K. Will adding 90K resistors in series be acceptable to the RC? It seems like we would lose quite a bit of the RC's resolution.

FIRST has promoted the use of sensors the last few years. It seems like many teams are looking for either one of two things here:
1. Some type of encoder/pot to measure steering angle (slow rpm, continuous turn with good resolution ~3°). I like the idea of a continuous pot because it doesn't take up CPU power and takes almost nothing to program, and does not rely on starting postition (absolute). An optical encoder measuring ticks (like a mouse) needs to count not only ticks, but the direction of ticks. PS/2 mice have two optical sensors, and with some programming outside of beginners, these two sensors can measure both position and direction (relative to some starting point).

2. Angular velocity in order to measure speed of shaft rotation, which can then give you the linear distance traveled by the output wheel/belt (C=pi*D).

The http://www.rec.ri.cmu.edu/education/...tent/index.htm site has some information listed for encoders, but I didn't find where to obtain their encoders and they were not in the Edubot or KOP. Where do we obtain these parts? The sample programs count the number of ticks in a constant direction, but what about when the wheel changes direction or is attached to steering? The sample code does not address this issue.

Sample code from FIRST or Innovation FIRST would help teams to concentrate on building robots. Not all teams have the resource or knowledge to construct additional electronics that use encoders to measure steering angles, angular velocity, etc. which is in turn converted back to an analog signal readable by the RC analog inputs.

Any help from other teams who have knowledge on how to do any of the above would be appreciated!

WizardOfAz 18-01-2004 11:12

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by Jay Lundy
Let's assume 15 ft/s with 6 in diameter wheels (very fast).

That's 9.55 rev/s or 1222 cycles/s.

Should be fine.

Also, (818.1 us/cycle) / (.1 us/instruction) = 8180 instructions/cycle

Assuming your int handler takes 10 instructions, 0.122% of your instructions are devoted to 1 of your encoders.

Heh, I think I got carried away with that calculation, but I was curious myself.

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.

Kevin Watson 18-01-2004 12:38

Re: Using Digi-Key Shaft Encoders
 
Quote:

Originally Posted by Dave...
The 6639S-1-103 Bourns pot is 10K and not available in a 100K. Will adding 90K resistors in series be acceptable to the RC? It seems like we would lose quite a bit of the RC's resolution.

No, you don't need to use the additional 90K. 10Kohms across 5v means that only 0.5mA of static current will flow through the potentiometer for a power dissipation of 2.5mW. The potentiometer is rated far above this value and therefore safe to use.



Quote:

Originally Posted by Dave...
1. Some type of encoder/pot to measure steering angle (slow rpm, continuous turn with good resolution ~3°)

To get good resolution you'll probably need an encoder because the linearity of non-wirewound potentiometers is questionable.



Quote:

Originally Posted by Dave...
I like the idea of a continuous pot because it doesn't take up CPU power and takes almost nothing to program, and does not rely on starting postition (absolute).

Yes, these are good attributes. If you really need the accuracy or just want to learn how robotics engineers do it in the real world, I'd suggest at least looking at an optical encoder. Here are a few ways to get around the starting position problem: 1) Make sure the wheels are straight when you start the robot 2) Use a potentiometer to find the zero position at startup, then use the encoder for steering angle. 3) Have the computer run through a calibration sequence at startup, stepping the steering angle in one direction until a switch is tripped at a pre-determined angle. 4) If your steering mechanism is robust, you can run through a calibration sequence that steps the steering in one direction until you run into a hard stop which causes a sudden increase in motor current that can be detected with the current sensor.



Quote:

Originally Posted by Dave...
http://www.rec.ri.cmu.edu/education/...tent/index.htm site has some information listed for encoders, but I didn't find where to obtain their encoders and they were not in the Edubot or KOP. Where do we obtain these parts?

Digi-Key has many. An example is the grayhill 61K128-050.



Quote:

Originally Posted by Dave...
Sample code from FIRST or Innovation FIRST would help teams to concentrate on building robots.

See http://kevin.org/frc for an encoder interface example.

-Kevin


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