Motor Voltage

What is the voltage of the V5 motor? And is the voltage constant if the motor is running at 100% power?

I believe the voltages range from -12 to 12

2 Likes

So if I were running the motor at max speed would 12 volts be constant? and that would assume the motor is rotating forward meaning it would be -12 volts in reverse?

removed as what I said was misleading.

What are you trying to do ? Are you planning to read back voltage ?

2 Likes

I am trying to convert the current to watts, by multiplying the current (in amps) by the voltage of the motor. I am running a V5 motor at full speed using different pinion gears, to test different gearing ratios for certain tasks. Is there an exact voltage measurement when the motor is at constant full speed?

current * voltage would give you input motor power. Output motor power is torque * angular speed.
https://simplemotor.com/calculations/

but save yourself some work. VEXcode can return output power as watts
motor.power()
https://api.vexcode.cloud/v5/html/classvex_1_1motor.html#ad28191e6a53a12411ed90d36c47b075d

7 Likes

If current * voltage is input power, is the resulting input power measured in watts? Also, what voltage would I multiply the current by if the motor is running at full speed? Thanks

Again, it’s a variable, you can’t just pick a fixed value (which is true when using internal PID). We can read back from the motor, but it’s not exposed in the VEXcode C++ API. we can add that but it will be after worlds now before any more VEXcode updates are released. You could calculate using efficiency I guess which is input power / output power

edit, if you are using voltage control of the motor, just use the voltage you are sending.

4 Likes

Also, the difference between {input_motor_power = applied_voltage * motor_current} and the {output_motor_power = torque * speed } is the heat losses in the motor coils due to their non-zero resistance.

The higher current flows through the motor the higher torque it generates, but also the higher losses (into heating motor coils) it experiences.

As jpearman said, if you control motor by requesting VEXcode to send it specific voltage then you can multiply that requested voltage by the returned motor.current().

void spin (directionType dir, double voltage, voltageUnits units)

5 Likes

If I wanted to read back the motor voltage and multiply it by the motor current, to display the motors input power (repeating this process every 5 seconds), how would I do this?

As I said above, it’s not possible using C++ API to read back motor voltage.

3 Likes

Is there any way to calculate input power then and display this to the brain, without the voltage? By the way, I am doing this for a project and I want to calculate efficiency myself using the input and output power of the motor to do this.

According to the Vexcode api https://api.vexcode.cloud/v5/html/classvex_1_1motor.html#a0c99309ac584f2e323a49331fde53e8c you should be able to get the motor’s power without having to multiply by the voltage.

AFAIK that is for output power of the motor at the shaft, not input or consumed power.

I am not sure, just saw it on vexcode api.

yes, that’s for output power, I am looking for input power

Ryan, could you, please, describe exactly what are you trying to do, including exact command by which you control the motor.

For example, if you say that you control the motor with

motor.spin(directionType::fwd, 12.0, voltageUnits::volt); // spin() api

Then we will tell you that by multiplying your input value of 12.0 volts by the output of current(currentUnits::amp), you will get your input power in watts, that you can later compare to the motor.power(powerUnits::watt) output. The difference between those two is the power losses into heat when non-zero current flows through the motor coils with non-zero resistance. And @jpearman could tell you if formula for computing motor.efficiency() is based on those values.

On the other hand, if the argument that you send to motor.spin() command is not voltage, but requested output RPM, then the motor’s internal PID control will adjust voltage depending on the output load to maintain target RPM. The actual voltage could vary over time and currently V5 API does not have a way to report its value.

If you understand everything that was said so far, then you could try to log and plot the input values and measured velocity(), current(), power(), and efficiency().

A nice experiment would be to derive the motor input voltage from the above values when it operates in PID velocity control mode and overlay it with the graphs of the direct voltage control.

3 Likes

I apologize for my previous lack of specificity. I am running a gearbox using a single motor at full power (-200 rpms). I am using Motor1.spin(directionType::rev, 100, vex::velocityUnits::pct);. My goal is to take the input and output values from the motor and display these values to the brain every 5 seconds. I am then planning on reading these values into a simple C++ calculator program and calculate the efficiency of the motor myself. I will then swap out the size of the pinion gear which I am using, to change the gearing ratio. After, I plan to graph my data and see which gear ratio is most efficient for powering the gearbox that I have built. I am not looking to control the speed of the motor using voltage, I am simply just trying to get the input power values from the motor by multiplying the voltage by the current of the motor. The trouble I am having is that I am unable to calculate the motor input power due to the inability to read voltage values to the brain. I do appreciate your help so far, as I am new to VEXCode. Thanks!

Since it seems that VexCode does not have the functionality that you need, I suggest you switch to an alternative such as PROS, which has a get_voltage() method for the motor.

2 Likes

I’m sorry, I misread you response. I do believe that by controlling the motor with voltage, we could then multiply that voltage by the current. However, do you know if the voltage would stay at a constant 12 volts if we controlled the motor with 12 volts? Also, I don’t really understand this: