|
Re: Wiring Talon SRX PID w/ Beam Break Sensor
Not to speak for Jared, but this is my understanding of the issue.
The Talon is counting pulses and uses the pulse count as a proxy for velocity/rpm. In your scenario you are going to initially have ~30 pulses per 100ms (3000rpm / 600 = 50(revs/100ms) * 6 spokes = 30 pulses per 100ms.
Another way to think about this every pulse in a given 100ms window represents 100rpm. If you count pulses to determine, speed you are going to have +/-100 rpm accuracy if everything else is perfect (which it won't be).
Rather than using the Talon to run the PID, you determine velocity by measuring the time between spokes 100ms/30 = 3.3ms vs 100ms/2.9 = 2.9ms if you can reliably measure changes with more accuracy than 0.4ms (3.3-2.9=0.4ms) you should be able to determine velocity greater accuracy than the Talon.
I have not done this, but I would run some tests and probably use InterruptableSensorBase override and use the readRisingTimestamp call to collect the data.
If Java/Linux collude to reduce accuracy, I might also consider using an arduino/teensy to collect this information and report via spi/i2c back to the rio.
|