Brickpi3 firmware an medium motors

I do a lot of work on https://github.com/ev3dev/ev3dev-lang-python , one of the problems we have with brickpi3 is that it cannot detect if a connected motor is a medium motor vs. a large motor. According to David Lechner in https://github.com/ev3dev/ev3dev/issues/1059

The firmware in BrickPi3 (and earlier BrickPi models) doesn’t know about different kinds of motors, so we just treat everything like an NXT motor

We can make a medium motor run on a brickpi3 by treating it like a NXT motor but this is less than ideal because there are some things that are different such as the max speed of the motor. Are there any plans to update the firmware to support detecting which type of motor is connected?

There are no plans to detect the motor type. It would require a hardware and firmware change.

Regardless of the motor type (NXT, EV3 large, or EV3 medium), the encoder values are still accurate (360 degrees per rotation), but yes, as you said, the speed potential for each motor is different.

The functions implemented in firmware for position and speed control work regardless of the motor type. For example, if you set the motor target speed to 200 degrees per second, the motor should run at nearly exactly 200 dps (assuming the motor isn’t over-loaded).

The max motor speed will significantly depend on the robot. Besides the motor type, the battery voltage has a large impact on the max motor speed. For example, an EV3 medium motor with no load might run at 110 RPM at 7.2v, and an EV3 large motor with no load might run at 150 RPM at 12v. When you start adding a load, an EV3 large motor might run faster than an EV3 medium motor at the same voltage.

Ack…how do I officially submit a feature request for brickpi4? :slight_smile:

I just added it to the list of things to consider for a future version of BrickPi.

BrickPi is targeted at moderate to advanced users. I’m not sure how there would be an advantage to detecting the motor types. If someone is advanced enough to need to be working with things like maximum speed constants and take advantage of automatically detecting the motor type, I think they should be advanced enough to program the robot according to how they built it.

Can you expand a little on why you want this feature, and what advantages it would offer?

ev3dev supports several different types of motors (power functions motors, NXT, EV3, etc) and we end up having to assume that they all have the characteristics of a large EV3 motor. max_speed is just one of the properties where this assumption is incorrect. The python library uses the motors max_speed for some calculations, some sanity checks (did the user ask the motor to go faster than it possible can? if so raise an exception).