Inventor 2040W Motor Speeds

I’ve recently acquired an Inventor 2040 W, which I intend to incorporate into a robotic buggy. I’ve installed the latest 1.19.18 MicroPython firmware.

I have found what may be a firmware issue (but being totally new to this, it may well be operator error):

When running the driving_sequence.py example, calling the drive_forward(DRIVING_SPEED) function, MotorB turns very much more slowly than MotorA. If however I run the dual_motors.py example, both motors turn at the same (higher) speed. I cannot see anything in the driving_sequence.py script that would set different speeds for the two motors.

Is this simply down to my lack of understanding, does anyone think?

Simon

Posting the problamatic code may help sort it out?

Thanks for the response.

The code is the driving_sequence.py example provided here: pimoroni-pico/micropython/examples/inventor2040w at main · pimoroni/pimoroni-pico · GitHub

I haven’t modified it in any way.

Are you sure you’re not in the turning right part of the sequence - looks like this example cycles through a number of different motor behaviours?

I’ve done a little more digging and believe I’ve identified the problem, which is neither in the script nor in the firmware.

driving_sequence.py is designed to read back and print out the current position of the motor. I noticed that the slow motor was only ever reporting its position as 0. I swapped the motors over, and the problem followed the motor. I may have a faulty (or badly soldered…) motor encoder. The script is probably designed to increase the speed of the motor once it can see that it is turning.

Sorry for the red herring!

Simon

2 Likes