Vex V5 flywheel Motor Speeding Up and Slowing Down at High Speeds

This was not a problem before, but two to four days ago, my blue flywheel motor started showing signs of giving up way too early as soon as I pressed a button on my controller to make it spin, speeding up really fast and then stalling, speeding up again, and stalling, etc. It would also abruptly stop when pressing a button on my controller that wasn’t even programmed into the code. The gear ratio of the flywheel I’m using is a 84T gear driving a 15T high strength gear.

At first I thought it was a problem with the code but I couldn’t find anything wrong with what my programmer in my team has put down, so I assumed it was something I couldn’t identify. Anyways, these are the things I tried doing to solve the issue, but did not work:

(We used VEXCcode V5 to code everything)

  • I looked into the code to see if it was a programming issue, such as the motor trying to reset itself to default (50%) velocity from the 70% velocity we wanted, but even by setting the motor velocity to 50% the motor velocity worked as if it were following the y values of a sine or cosine wave above the x axis.
  • I copy and pasted the code into a new file, thinking the the file we had had some issues such as ghost code, but still achieved the same result.
  • Copy and pasted on a different computer, but still the same response.
  • Created code on a new computer that only had the flywheel controller code in it, same result
  • We were told that it may be an issue with how the motor reads some values, so we replaced it with another blue motor, but the same result occurred.
  • I replaced the gears of the flywheel, thinking it was a friction issue, but same issue occurred.
  • We tried different buttons on the controller thinking it was one of the buttons causing a problem, same result.
  • We tried different ports on the brain, same result.
  • We used the green and red motor gear ratio on the blue motor, same result.


1 Like

Have you tried using the ‘Devices’ page on the brain to spin the flywheel without running a program?

Does it do this when the motor is set to full speed?

The built-in PID controller for the motor doesn’t handle a flywheel very gracefully at less than full speed (it will accelerate to / past the set speed, then slow down to / below the set speed, and so forth).

Also, a suggestion for @jpearman (or another VEX engineer): is it possible to display motor temperature on the brain dashboard page?

1 Like

Same here. We have a flywheel ‘breathing problem’ and it oscillates between eg 3-4W at around 300-330 blue cartridge RPM (geared to be equivalent to around 2000-3000rpm?), using the devices page. It doesn’t go to 0W though

Our most recent flywheel design does this too. It’s two motors, no cartridges. We assumed the problem was that vex’s motor controllers are unreliable when spinning something with so much momentum at higher speeds. As such, we tried solving it with a custom pid loop to keep the motor controller from overshooting in both directions from our intended velocity, but to no avail. Switching to a one motor flywheel seems to help, but the problem is merely dampened. I have questions about running the motors open loop with an external rotational sensor, but we’ll see.

I have not tried using Devices to manually spin the motor, but I already tried it at maximum velocity, with the same result.

Instead of controlling with velocity, control with voltage. There will be no oscillation

1 Like

Do you have any resources that can help with this, such as knowing which voltage values will equate to a certain velocity? I dont want to misuse the values or else I may make the motors worse

You can’t misuse them

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

Something like this would work I don’t use vexcode so I’m not sure.


You multiply percent values by 120 and use millivolts

Motor.spin(fwd, percent*120, voltageUnits::mV);