Questions about using encoders with the Roboclaw product line
- Posts: 1
- Joined: Sat Jan 25, 2020 3:46 pm
I am looking for help in enabling two bushed DC motors to reach their full speed. One incremental encoder (2400 quadrature pulse per turn) is installed on each of the motors and I am controlling the inputs with a RC with mixed input channels.
Despite all my efforts, I have been unable so far to push the motors beyond a speed of 90 rad/s (corresponding to 34377 QPPS for my setup). My target is 167 rad/s (64000 QPPS).
Here is an example of the motors speed (in rad/s) recorded when I slowly move the right RC joystick up to full throttle:
Here are all the debugging steps that I did:
- Monitored in Motion Studio both RC channels and checked that the min/max commands are -32768/+32768
- Current limits (-15 A to 15 A) are way beyond currents recorded during a test at max speed which is in the order of 5 A per motor. Changing them does not affect the result.
- Default accel/deccel set to 20000. Changing it does not affect the result.
- The proportional (P) gain of the velocity loop is set to 3.0, I and D are set to 0. Changing these value does not affect the result.
- QPPS for the velocity loop is set to 64000 which corresponds to my max. speed target (167 rad/s). Changing the value does not affect the max speed I can reach which is still 34377 QPPS (90 rad/s)
- I recorded the duty cycle to each motor and the power source voltage during a test to determine the voltage to each motor. It tops around 9 V at a maximum speed of 90 rad/s whereas the power source voltage is 20 V.
- Adding load on the motors increases current readings, but max. speed still tops at 90 rad/s.
Is there anything that I am missing ? Any settings inaccessible from the Motion Studio software ?
Voltage [in volts] recording on the two motors during a max speed test:
Current [in amps] recording on the two motors during a max speed test:
- voltage.png (37.64 KiB) Viewed 474 times
- speed_P_4.png (33.34 KiB) Viewed 474 times
- Posts: 1335
- Joined: Thu Feb 26, 2015 9:45 pm
1. Run the motors using the PWM settings screen and graph the results. This is duty controlled so PID settings will have no effect. Maximum speed shown at maximum duty is the actual maximum speed of hte motor(s) under the tested load. Note this speed is also the QPPS of the motor.
2. When using speed control you can NOT reach the same maximum speed as that shown when just running open loop. Not and still have accurate speeds. Assume a maximum of 80% of the open loop maximum speed
3. After setting up the PID run the same test using the Velocity Settings screen. Test up to about 80% of QPPS. If you cant get to 80% QPPS under velocity control then your tuned PI values need some adjustment. This is assuming the same load you tested under 1.
4. The voltage output of a motor driver will never reach the voltage imput. There are losses in a lot of places and the is a minimum off time required for boost circuits to drive the high side mosfets. In general you can reach around 95% the input voltage, under no load, on the output.