Question about V5 motor internal sensors

Hi, we are having minor motor issues where our chassis does not drive perfectly straight. In order to avoid the usual debates (is it friction, is it bad motor) and just blindly replacing things until fixed, we decided to take the telemetry approach and display motor parameters on screen and try to make sense of the data.

We understand clearly there is a temperature sensor on board and the optical encoder wheel is responsible to show velocity at the output shaft in RPMs. Question is what else is sensed and what is calculated / approximated?

For example, assuming Input Power = Current * Voltage, Output Power = Torque * Angular Velocity and Efficiency = Output Power / Input Power (please correct if wrong and sorry to all electrical engineers out there), we tried to display voltage as power/current, but the displayed result was weird, a fluctuation between 0 and 4.

Also, confused about API. The old resource we use at VEX Help mentions motor voltage as a method:

But the VEX Command Help built into the VS Code VEX Extension excludes voltage instead lists only the following:

There’s efficiency, power, temperature, torque, velocity but no voltage. Also we see a tendency to express everything in percentage now, but not very clear what that percentage represents/shows. Unless the help system is simply not finished in which case apologies for jumping the gun. So, is there another official resource where we can find proper syntax for all the vex. functions to be used in C++ / Python? I know the Library is replacing the old stuff but can’t seem to find this.

Sorry for long post, question was what exactly sensors are on that board inside a V5 motor and what does the end user have access to in C++ and/or Python via VEX Extension? Thanks.

2 Likes

You directly set the voltage. You can tell the motor to spin at 12 volts and the motor will always be supplied 12 volts. Cool idea, and I like the use of physics.

Until we current limit, then voltage will be decreased.

4 Likes

We measure
motor position using internal quadrature encoder, from this we can derive velocity.
motor current.
motor voltage.
motor temperature (or at least the temperature on the PCB)

These are available in all text based languages.

That’s just because for rev 0.1 of the extension we pulled help from VEXcode, not everything had a help page. The best place to find the implemented API is always to look in the vex header files or use intelisense. The SDK used by the VSCode extension is the same as available in VEXcode.

bear in mind that motor control is done using a pwm waveform, this makes measuring actual current/voltage at the motor tricky even when we use filtering on the raw values, you will see some instability in the values you read back.

8 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.