View Single Post
  #5   Spotlight this post!  
Unread 27-03-2012, 14:42
jvriezen jvriezen is offline
Registered User
FRC #3184 (Burnsville Blaze)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Burnsville, MN
Posts: 636
jvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond reputejvriezen has a reputation beyond repute
Re: Several programming and electrical questions

Quote:
Originally Posted by bf2416 View Post
Hey guys,

My team, 4058, finished a few weeks ago, so I figured I should start learning some more in depth programming and electrical techniques (yes, I do both, on a small team) so that I can pass on knowledge to the younger members of the team

To start, I read a lot of teams were using PIDs on their shooters, and I am not sure what they are or what they do, so if someone could enlighten me it would be greatly appreciated.

Another thing I would like to learn is how to use vision tracking. At boilermaker regional, we were relegated to putting a piece of tape in the center of the camera image to aim (crudely), and I figured using vision tracking could make scoring exponentially easier in all games, not just rebound rumble.

The last thing I would like to know would be how encoders are used, how they are hooked up, and how they are programmed.

I apologize if some of the things I said make no sense. If they do, let me know and I will try to reword the question.

Thanks in advance for the help.
I'm by no means an expert on any of the topics, but will give you a very high level understanding of each.

Encoders: These are devices that you mount onto a spinning shaft (i.e. shooter wheel shaft, or drive train shaft.) They are connected to motor controllers (i.e. jaguar) and tell the controller and/or cRIO how fast the shaft is turning, and in which direction it is turning.

PID: This is a very commonly used method to get some system measurement (usually RPM) to a desired value quickly and efficiently. Think about accellerating from a red traffic light just turned green, where you want to get to 60mph as quickly as possible. Initially, you will floor it, but if you were to leave the gas pedal there, you'd eventually be going much faster than 60. You don't wan to leave it there until you get to 60, and then suddenly back off. Instead, as you approach 60MPH, you back off so that you smoothly get to 60. Similarly when braking. To stop when you see a yellow light, you first press on the brake pretty hard, but if you left your foot there, you would get quite a jolt at the end of the stop, so you back off on the brake as your speed slows. PID does the same thing, using a mathemetical model. It requires an encoder (or other feedback mechansm) to tell the model how far you are from your goal, how quickly you are approaching it and so forth.

Vision: One quick improvement to 'tape' on the image is that you can program your driver station to draw a cross-hair (or in the case of this year's game a vertical line may be sufficient). One of the things we decided (sort of) this year is doing vision processing on the cRIO was over taxing of it-- so we send the image to the driver station. Once it is there, the best/fastest image processor we have is the human brain standing next to it. We have some 'sweet spot' shooting locations (key, midcourt, etc.) where we know the shooter speed needed (we have an encoder which tells us RPM). So we ended up not using any software for vision processing.
__________________
John Vriezen
FRC, Mentor, Inspector #3184 2016- #4859 2015, #2530 2010-2014 FTC Mentor, Inspector #7152 2013-14