View Single Post
  #4   Spotlight this post!  
Unread 21-01-2012, 09:03
mbushroe mbushroe is offline
Registered User
FRC #2840
 
Join Date: Jan 2009
Location: Phoenix
Posts: 16
mbushroe is an unknown quantity at this point
Re: does mag encoder work on jag speed mode?

-> Mike, yes, I have played with PIDs before. For the kicking the soccerball game, I suggested to the team we do a swerve drive, all wheel drive with separate all wheel turning. The PIDs to control the steering motors never worked well using PIDs, so I expect to have some work to do there. Fortunately, this year we do not need instant response to improve over PWM open loop Voltage control.

-> Matt I did not drag the scope over. I may try that soon. I did hook up a DVM to the index and A signals and experiment with a hand held magnet. I got beeps out of the DVM to show a rapid signal change on the Index pulse, and could get a moderate region of voltage change on the A channel. From what I can see, the AS5304 is an analog quadrature detector, with essentially one 'line' per revolution. To work on the robot, the A and B outputs would have to connect to the Analog sidecar, but the Index pulse should be digital, or better yet an interrupt pin. This would be a great place for an Arduino/Atmel or PIC to convert the A and B quadrature voltages into a digital angle.

-> Dan I believe that P=1.0;I=0;D=0 is a valid equation, but just in case the Jaguar was doing as you suggest and not implementing the PID at all until all 3 terms are none zero, I was using P=1.0;I=0.001;D=0.001 as a starting point. I commanded a minimalist 1 RPM, but with the measured speed always failing to work and recording as zero, I saw the ramp up function of the I term work perfectly until the Jaguar went into fault mode, probably numeric wrap around.

I still do not know why the index pulse, which is a digital signal, when fed into the Jaguar encoder channel A input as described in the getting started manual fails to measure any speed. Since I don't have this working yet, the magnetic encoder is not bolted down, and I can move it freely over the magnet on the shaft to try for the best position. I found the correct tiny button magnets int he shop and took them home for testing, but now I can not find them. So I am using a much larger ceramic magnet taped in the shaft on edge because the magnetic quadrature needs the difference between north and south to rotate. I verified a good signal using that magnet and orientation on the test bench, so it should work.

Mike