# Power Level of Motors

Hello. We are a VEX Robotics team in highschool. This is our first year and we’re new to this project. We are using the clawbot. We have already learned to code and are able to use our robot. However, we don’t understand the significance of the power given for the motors. The examples of coding you have on your website always use 127, 63, 0 and vice versa with negatives. Why is that? What happens when you use different powers? Also, what does the power represent? We know that the speed of a robot can be affected by the gears, weight, and other factors. So what is the importance of the power?

1 Like

I am going to assume you are using cortex, but please correct me if you are using V5. In theory, the motors, can be set to any speed from 127 to -127. 127 is the max power and 0 is at rest. The 63 is used because it is half of 127(in case you don’t want to use max power), but once again, you can put any number from 127 to -127 as those numbers are just examples.

3 Likes

The numbers represent the speed of the motors. 127 is hogh speed spinning clockwise, 63 is half speed and 0 means the motor will not spin at all. It is the same for negative just the motor will spin counter clockwise. You could set the numbers anywhere between -127 and 127 and the motor will spin as fast or slow as you tell it to.

1 Like

7517H, in response, we are using the cortex. However, when we explain to our teacher what we’re doing, we always say that the power level is 127. This is also his first year working with this project. He asks us to explain what that means with units but we can’t because we just put it as 127 in our coding. Our understanding of the project is shallow and we’re unable to say.

So it’s just raw value, it doesn’t represent a specific unit of energy.

SBC, I realize that I may have confused you with what I was asking. I understand that the 127 is full power, 63 half, and 0 as resting. The negatives make the motors spin counter clockwise. We have also experimented with changing the speeds because our robot is inconsistent when we code it. However, I see no difference with the changes from the the regular power. It may just be the robot or our mistakes that don’t allow us to see the answer. I am asking what does the power represent in a formula. Like speed is distance traveled over the time it took to travel. I don’t think the power of the motors affect the speed because speed has many variables. So what does power represent?

Forgive me if I’m off my rocker here

I believe the -127 to 127 input is a PWM input (I have absolutely no idea what this represents) From what I can tell it does not directly control power (in a linear sense) Kind of like what @Mr.Sir-Lening has said. ie. 127 might be “full power” but 63 might not actually send half of “full power” to the motor, it could send less or more power to the motor.

For instance, 100 is barely distinguishable from 127.

1 Like

Thank you. That helps Gameoa. If we have any questions later, we hope everyone could help once again.

1 Like

Show us code, and pics. Different “power” should result in different motor speed, unless code has errors or bot has issues.

1 Like

Those value actually represent voltage which is electric potential difference across the motor. Essentially, increasing that number will send more voltage to the motor meaning that the motor will dissipate more energy (spin faster) because its resistance is constant in the absence of a load.

1 Like

I believe that 127 (and 0) gives “2 to the seventh” PWM (so voltage) levels, so seemingly continuously variable. There are several forum threads on this, just have to dream up search terms.
Off topic, forum needs real wikis.

Ok I found it
https://www.arduino.cc/en/Tutorial/PWM
This same thing was said in a thread a while back, but it was a while back and I cannot find it.

1 Like

Does this have anything to do with what I’m looking for? Best power level for motors

1 Like

127 is used because the range [-128,128) has 2^8 possible values, or 1 byte, or a char.

3 Likes

In simple terms the value is controlling motor voltage, more accurately the pwm (pulse width modulation) control of the motor.

several years ago we did lots of testing and analysis of 393 motors.