View Single Post
  #11   Spotlight this post!  
Unread 25-02-2013, 22:31
lori558 lori558 is offline
Registered User
FRC #3250
 
Join Date: Jan 2013
Location: Sacramento, CA
Posts: 9
lori558 is an unknown quantity at this point
Re: PID vs Bang-Bang for Shooter Consistency

Quote:
Originally Posted by Ether View Post
It would be helpful if you could post a picture of what you are detecting with the photosensor. Is it a piece (or pieces) of tape? Is it reflective paint? Is it an LED shining thru a hole (or holes) in the wheel? You get the idea. (I see later in your post you mentioned a piece of tape. Please post a picture).

I am not currently in the position to take a picture of the wheel right now. For the moment, I can try and explain it as best I can. The wheel we are using is an andymark 6" wheel with 6 spokes. We have attempted to use just one stripe of paint covering one spoke, however, the photoswitch didn't pick up the 1 stripe at high RPMs. So we switch and put a piece of tape that covers the gap between 1 spoke to another. So it is a thick stripe...


Quote:
When you say "the counter", what do you mean by that? How are you decoding the sensor signal? There are two very different ways to decode the signal, and it's important you do it the right way. The two ways are 1) read the counts from the sensor and divide the change in counts by the elapsed time, or 2) use the FPGA's high frequency sampling and 1 microsecond clock to measure the period (the elapsed time between counts).
Currently it is set up according to a tachometer:


Quote:
With a low count-per-rev sensor, you want to use the 2nd method, not the first.
How exactly do I go about programming that?


Quote:
You can make it work, if you have the willingness to stick with it and provide the needed detail so we can help you.
Absolutely! We have been working on this for weeks now and are still set on getting it to work.


Quote:
1) What motor(s) are you using, what is the total gear ration from each motor to each wheel, what motor controllers are you using.

2) What speed are you trying to control at?

3) The graphs Mark requested would be a good idea

a) We are using a CIM motor with a direct drive between the wheel and the motor. The motor is controlled by a talon.
b) We are aiming for any and all speeds
c) Graphs coming soon (when I can get back to the robot again )

The code thus far is attached!
Attached Thumbnails
Click image for larger version

Name:	Begin.png
Views:	35
Size:	4.9 KB
ID:	14188  Click image for larger version

Name:	Periodic tasks.png
Views:	53
Size:	20.9 KB
ID:	14189  
Reply With Quote