Quote:
Originally Posted by meltbox360
Hi all. I am trying to figure out how to get encoders to read consistent values for speed. We have 250 count encoder (e4p) on there and using getRate() they read correctly at low RPMs but once it starts hitting 6000 rpm then we start seeing variations of around 15 revolutions per second. These are mounted on a mini cim. I don't really know what to do at this point. I have tried varying them from k4X to k1X with no real difference.
|
A 250 count encoder should work if you set it up properly.
- Physically disconnect Channel B. Don't use it. Use Channel A only
- Create an up/down
Counter object (
not encoder) on the Channel A signal, and set it to count
rising edges only
- Set the FPGA sample ring buffer to 125 samples
1.
- Use Counter getPeriod() method. RPM = 60/(250*getPeriod())
Can you provide some more detail about your shooter design?
- what motor controller(s) are you using?
- what motor(s) are you using?
- how are those motor(s) connected to the wheel(s)?
- where and how is your encoder mounted?
Depending on the answers, you may be able to use the very simple bang-bang speed controller algorithm.
1if you don't know what this means, ask