It was warm enough in the garage this weekend to get my 212:2 11ppr motors hooked up and tested. I am getting a very strange problem now though.
When I run the motor test I get Left-CCW then CW, Right-CCW then CW and pass shows up for the encoder feedback. (Encoders are set up as 212x11x4=9328). Movement during this test is nice and smooth.
When I try and calibrate the chain length everything blow up. Pressing Left CW 5deg will run the left motor CW but will make an awful grinding/jittering sound. I then press CCW 5deg and it jitters and kinda move the other direction. Both motors pass the test but even when jogging make a jittery racket. I removed the chains and it changes nothing.
Odley enough if you swap the wires at the motors they will jog smoothly but the motor test will fail on encoder feedback. If I swap the two encoder A/B wires the test will pass but we will be back to jittery movement on jog/calibration.
My motor driver is seperate to I have checked all the wiring. Chaning the hardware pins in firmware acheives the same results as swapping the wiring.
I would have thought the motor test code would use the same PID/Settings as general motion. If they are different how can I figure out what the test code is sending?
I tested with chains and load attached and with chains removed. Same behavior regardless of load.
Its almost like its trying to go the wrong way, feedback realizes this and changes direction then tries to go the other way again. Net gain is very slowly going the right way.
Ok, we had someone else get into this mode, whatâs probably happening is that
the motors are overshooting and reversing to try and get to the right position
The suggestion was to reduce one of the PID values from 5, and for that person,
3 was about right.
since you have different motors, itâs very likely that you will need different
PID settings.
the trick with PID tuning is to make it as aggressive as you can, without
pushing it into instability like you are seeing, so itâs a matter of backing off
a bit to make it stable.
During the motor tests, they are commanded to run âfull throttleâ for a second and the firmware checks that there have been a reasonable number of encoder pulses received in the correct direction. They test a rudimentary part of the motor system.
During the chain calibration, the distance to move the chain is calculated and the full PID loop is used to make the move. The âgigglingâ may be due to the mismatch of the PID settings and the PPR value of your encoders. You may need to explore The PID settings to make progress on this. There is a Testing library in the recent release of Firmware, with interesting functions like:
Re-reading the manual says âwithout the weight of the sled the motors will move in a rather jerky fashion during this processâ so that would lead me to believe without the weight the PID is freaking out, yea.
I will re-assemble the sled next time I can get outside and see if that helps things out.
One issue that shouldnât be PID related is that the calibration 0.1deg, 1deg, 5deg all make the motor run for the same ~2 seconds of run time. Hopefully that is just the time the PID takes to settle/give up and not another issue for me.