Hm. Digo doesn't seem to be functioning well either. Most of the time the left motor will stop after the correct number of ticks, but the right keeps going.
~Mike
72 would then be your max possible velocity, but in reality you would want to only command a speed of 60 to 65 so you have some headroom. What I mean is if you command a speed of 72 and the PID algorithm has to use 100% pwm to get there then what happens when you have to go up an incline, or move to deeper carpet or something like that. If you command a speed of 60 and the PID is using 85% pwm then you still have some room for the PID to increase the PWM, does that make sense?
RIngo
Try using pwm to start your motors then use the get encoder command to read them. Are both incrementing correctly? If one is going backwards you can swap your A and B lines on that encoder.
Ringo
Here’s an idea I had about increasing the encoder resolution on larger, slow moving wheels…
Instead of trying to hook encoders to the back side of your motors, how about using a small (0.5” ~ 0.75”) idler wheel, which rolls on the top of your wheels, which turns an axle, connected to the encoder wheels. If you wheel was 5.5” in diameter, and your idler wheel was 0.5”, then the idler would turn 11 times per one wheel rev, and since you have 44 spoke encoder disks, you would end up with 484 ticks per revolution. You could add a pretty simple L mount to your chassis to mount the axle (w/ bearings) which could be adjustable so you can apply the optimum pressure between the idler and the wheel.
|| || ||[]|| +-+ || || <-- Encoder Module +-----+ | | || || |idler|=====| |==|| || +---+-----+---+ | | || | | | | || | | | | || <-- Disk | | | | || | | | |________________________ | | |______CHASSIS____________ | | +--------------------+ | | | | | Wheel |-----| | | |-----| MOTOR | | | | | | | +--------------------+ | | | | | | | | | | +-------------+
Maybe someone will find this idea useful...