Go to Post We can still do better, even if we've come a long way. - cadandcookies [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 02-02-2013, 21:00
Wildcats1378 Wildcats1378 is offline
Registered User
no team
 
Join Date: Jan 2012
Rookie Year: 2011
Location: hawaii
Posts: 93
Wildcats1378 is an unknown quantity at this point
Encoder for a fly wheel

Hey guys,
We are trying to use an encoder for speed control this year on our fly wheel. We've only got any encoders that came with the KoP for the past 2 years, and we are sort of confused about how to go about mounting an encoder for our flywheel.
Our flywheel is controlled by a mini cim. The minicim shaft is connected to a 3/8 shaft using a coupler, and that 3/8 shaft houses the wheel. We just want to mount an encoder to read the speed.

Any help would be really appreciated!
  #2   Spotlight this post!  
Unread 02-02-2013, 21:08
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Encoder for a fly wheel

Quote:
Originally Posted by Wildcats1378 View Post
Hey guys,
We are trying to use an encoder for speed control this year on our fly wheel. We've only got any encoders that came with the KoP for the past 2 years, and we are sort of confused about how to go about mounting an encoder for our flywheel.
Our flywheel is controlled by a mini cim. The minicim shaft is connected to a 3/8 shaft using a coupler, and that 3/8 shaft houses the wheel. We just want to mount an encoder to read the speed.

Any help would be really appreciated!
Are you dead-set on using an encoder?

A one-per-rev sensor may actually be a superior solution for this application. For example, put a piece of reflective tape or paint on the wheel and detect it with an photosensor.

What speeds do you want to control?


  #3   Spotlight this post!  
Unread 02-02-2013, 21:15
Wildcats1378 Wildcats1378 is offline
Registered User
no team
 
Join Date: Jan 2012
Rookie Year: 2011
Location: hawaii
Posts: 93
Wildcats1378 is an unknown quantity at this point
Re: Encoder for a fly wheel

No, we aren't dead set on using an encoder. I simply thought that was the best way to determine speed.

Since it is a flywheel for our frisbee shooter and it is connected to a minicim, I'd just guess in the area of 2000-4000 rpm? Those kinds of speeds.
  #4   Spotlight this post!  
Unread 02-02-2013, 21:23
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Encoder for a fly wheel

Quote:
Originally Posted by Wildcats1378 View Post
No, we aren't dead set on using an encoder. I simply thought that was the best way to determine speed.

Since it is a flywheel for our frisbee shooter and it is connected to a minicim, I'd just guess in the area of 2000-4000 rpm? Those kinds of speeds.
You could get a very clean speed signal at those speeds (maybe +/- 2 rpm) with very little phase lag using the GetPeriod() method in the Counter class. Instantiate the counter at 1X. Grab GetPeriod() and divide it into 60 to get RPM (for a one-per-rev counter like we're discussing here). Do not filter the signal.

With a good signal like that you should be able to use the simple bang-bang speed control algorithm. Fastest spinup and recovery time and no tuning required.

Search Chief Delphi. Quite a few teams are doing it this way with good success.


  #5   Spotlight this post!  
Unread 02-02-2013, 21:41
Richard Wallace's Avatar
Richard Wallace Richard Wallace is online now
I live for the details.
FRC #3620 (Average Joes)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1996
Location: Southwestern Michigan
Posts: 3,663
Richard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond repute
Re: Encoder for a fly wheel

Quote:
Originally Posted by Ether View Post
A one-per-rev sensor may actually be a superior solution for this application.
Here is another method for getting once per rev pulses: use a strong (rare-earth) two-pole diametrically oriented magnet as the target for a Hall effect latch sensor. One good magnet for this application is KJ Magnetics part R424DIA. One good sensor IC is Melexis part US1881. The typical 3-wire application circuit shown in diagram 13.1 on page 8 of the Melexis UA1881 data sheet can be implemented using a small piece of perf board, and mounted so that the sensor is about a centimeter from the target. The signal can be processed as Ether describes.
__________________
Richard Wallace

Mentor since 2011 for FRC 3620 Average Joes (St. Joseph, Michigan)
Mentor 2002-10 for FRC 931 Perpetual Chaos (St. Louis, Missouri)
since 2003

I believe in intuition and inspiration. Imagination is more important than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution. It is, strictly speaking, a real factor in scientific research.
(Cosmic Religion : With Other Opinions and Aphorisms (1931) by Albert Einstein, p. 97)
  #6   Spotlight this post!  
Unread 02-02-2013, 23:00
z_beeblebrox's Avatar
z_beeblebrox z_beeblebrox is offline
Custom User Title
AKA: Cal
FRC #4183 (Bit Buckets)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Cambridge MA
Posts: 811
z_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond repute
Re: Encoder for a fly wheel

My team is direct driving the shooter wheels with the AndyMark hub and CIM/ miniCIM motors. To measure speed, we are using a slotted optical switch whose light beam is broken by the teeth of a sprocket mounted to the wheel. Although we haven't tested it yet (hopefully tomorrow), I expect that it will be easy to mount and program (the program is mostly done) and give good (48 counts per revolution) resolution data.
__________________
2012 Utah Regional Rookie All-Star
2013 Phoenix Regional Judge's Award for "design process and prototyping"
2014 Hub City Regional Quality Award, Arizona Regional Excellence in Engineering Award
2015 Arizona East Regional Creativity Award, Winner
2016 Arizona North Regional Finalist, Arizona West Excellence in Engineering Award, Finalist
  #7   Spotlight this post!  
Unread 02-02-2013, 23:15
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Encoder for a fly wheel

Quote:
Originally Posted by z_beeblebrox View Post
My team is direct driving the shooter wheels with the AndyMark hub and CIM/ miniCIM motors. To measure speed, we are using a slotted optical switch whose light beam is broken by the teeth of a sprocket mounted to the wheel. Although we haven't tested it yet (hopefully tomorrow), I expect that it will be easy to mount and program (the program is mostly done) and give good (48 counts per revolution) resolution data.
You didn't mention the RPM you are trying to control. At 48 counts per rev at 5000 RPM, you're going to get roughly 150 RPM jitter with GetPeriod() if you leave the FPGA sample averaging at the default value of 1. If you set the samples to 48, you'll get the same clean signal as a one-per-rev sensor at that speed, namely 3 RPM.

If you use Get() to get counts instead of period, and your control loop is running at 10ms, you're going to see about 125 RPM jitter at 5000 RPM. If you try to filter that in software, there may be too much phase lag to get clean control with bang-bang.




Last edited by Ether : 02-02-2013 at 23:21.
  #8   Spotlight this post!  
Unread 02-02-2013, 23:29
z_beeblebrox's Avatar
z_beeblebrox z_beeblebrox is offline
Custom User Title
AKA: Cal
FRC #4183 (Bit Buckets)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Cambridge MA
Posts: 811
z_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond repute
Re: Encoder for a fly wheel

Quote:
Originally Posted by Ether View Post
You didn't mention the RPM you are trying to control. At 48 counts per rev at 5000 RPM, you're going to get roughly 150 RPM jitter with GetPeriod() if you leave the FPGA sample averaging at the default value of 1. If you set the samples to 48, you'll get the same clean signal as a one-per-rev sensor at that speed, namely 3 RPM.

If you use Get() to get counts instead of period, and your control loop is running at 10ms, you're going to see about 125 RPM jitter at 5000 RPM. If you try to filter that in software, there may be too much phase lag to get clean control with bang-bang.

Probably dumb questions, but how does one adjust the FPGA sample averaging count? Will this give fast enough updates to use with a bang-bang controller?
__________________
2012 Utah Regional Rookie All-Star
2013 Phoenix Regional Judge's Award for "design process and prototyping"
2014 Hub City Regional Quality Award, Arizona Regional Excellence in Engineering Award
2015 Arizona East Regional Creativity Award, Winner
2016 Arizona North Regional Finalist, Arizona West Excellence in Engineering Award, Finalist
  #9   Spotlight this post!  
Unread 03-02-2013, 00:15
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Encoder for a fly wheel

Quote:
Originally Posted by z_beeblebrox View Post
Probably dumb questions, but how does one adjust the FPGA sample averaging count?
It's not a dumb question. What language are you using?

For Java or C++, see posts 29 & 36 in this thread:
http://www.chiefdelphi.com/forums/sh...30&postcount=3

For LabVIEW, it's a parameter you set, I'm not sure where. Post over on the LabVIEW forum if you can't find it.

Quote:
Will this give fast enough updates to use with a bang-bang controller?
Yes, at shooter wheel speeds.



Last edited by Ether : 03-02-2013 at 00:21.
  #10   Spotlight this post!  
Unread 03-02-2013, 04:09
S2K JDM's Avatar
S2K JDM S2K JDM is offline
Registered User
FRC #1378 (Hilo Viking Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2008
Location: Hilo, Hawaii
Posts: 18
S2K JDM is an unknown quantity at this point
Re: Encoder for a fly wheel

you could just use an US digital encoder. we just drilled the middle of these shafts http://www.andymark.com/product-p/am-0153.htm slid it on the output shaft of the CIM and put set screws in it, then we just used the mounting kit that comes with that encoder at the end of the shaft.
__________________
Team 1378 Hilo Viking Robotics| student | 2007-2009
Team 1056 Warrior Pride| Alumni | 2009-2010
Team 1378 Hilo Viking Robotics| Mentor |2011-present
  #11   Spotlight this post!  
Unread 04-02-2013, 23:44
compboy07's Avatar
compboy07 compboy07 is offline
Registered User
AKA: Jake M.
FRC #2449 (Out of Orbit)
Team Role: Electrical
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Tempe, AZ
Posts: 19
compboy07 is on a distinguished road
Re: Encoder for a fly wheel

Don't forget that if you use a CANJaguar, you can use the encoder directly attached to said Jaguar. My team has successfully done that in the past.

This year, I'm using a AMT-102 capacitive encoder, which I like a lot better than the kit ones. Adjustable lines/rev (48-2048), mounts on just about anything up to the size of the CIM shaft without machining, and it seems to be more reliable than optical encoders IMHO (don't have much experience with magnetic ). Also, it has an index count (aka one pulse per rotation on a separate pin). Worth a look at least.
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


All times are GMT -5. The time now is 00:20.

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