Mindstorms Inventor Motor jerky at slow speeds #584
-
Hi there! Playing with Mindstorms Inventor motors, I found them jerky at slow speeds. Attaching videos that are worth more than a thousand words 😄 This is how the motor runs on the original Lego firmware. It also produces typical Lego high-pitch whining sounds. I was able to achieve about 72 deg/s angular speed that is smooth. mindstorms_fw_smooth_at_72degs.movWith Pybricks though, the motor movement is a little jerky even at 90 deg/s angular speed. Video movement seems OK, but the sound is kinda jerky. Anyway, Mindstorms firmware can achieve much quite slower angular speeds. pybricks_fw_smooth_at_90degs.movWhat's worse, however, is when a motor is set to pybricks_fw_motor_hold.movThis is the code I run that HOLDs the motor. from pybricks.hubs import InventorHub
from pybricks.parameters import Button, Port, Stop
from pybricks.pupdevices import Motor
hub = InventorHub()
left_wheel = Motor(Port.A)
while True:
pressed_buttons = hub.buttons.pressed()
if Button.LEFT in pressed_buttons:
left_wheel.run_time(120, 3_000, then=Stop.HOLD, wait=False) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You might want to compare the stiffness as well. By default, the Pybricks drivers have higher control constants. This suits many applications, but it’s perhaps less ideal for wheels spinning in mid air. When you lower the pid constants, you’d get about the same smoothness. That said, these motors aren’t well suited for anything below “10%” speed (100 deg/s). With a bit of effort we could maybe get it smooth down to “7%”, but that gain doesn’t seem worth reducing the stiffness for. |
Beta Was this translation helpful? Give feedback.
You might want to compare the stiffness as well. By default, the Pybricks drivers have higher control constants. This suits many applications, but it’s perhaps less ideal for wheels spinning in mid air.
When you lower the pid constants, you’d get about the same smoothness.
That said, these motors aren’t well suited for anything below “10%” speed (100 deg/s). With a bit of effort we could maybe get it smooth down to “7%”, but that gain doesn’t seem worth reducing the stiffness for.