Hi! So our robot uses a flywheel mechanism to get the disks into the high goals but I’ve noticed that whenever the wheel spins it tends to go up and down in rpm. I don’t believe this is a build issue, is there something in the program that can change this? Thank you.
Can you send pictures of your flywheel and code to aid with troubleshooting?
Are you setting the voltage or the rpm of the flywheel? If you could include some sample code it would be very helpful for figuring out what’s going on. For flywheels, your best bet is probably going to be setting the voltage so you can get maximum performance. Here’s how you would do that in pros, but it will be similar no matter what you’re using:
// flywheel motor on port 1
pros::Motor flywheel(1);
// set flywheel voltage to 127 (full)
flywheel.move(127);
Do you have access to flywheel weights? It could be an inertia issue more than a coding issue. When the wheel doesn’t have enough inertia, it could cause dips in speed.
Does it stop changing in rpm after a while, if so it could be because you don’t have it coded to go at full speed and so it goes to fast, then over corrects when trying to slow down to the right speed, and then it speeds up again, etc. until it managed to keep a constant speed. We had this happened when we were running our flywheel at 80%.
Well there is the rpm drop when it launches a disc. This is normal but you can reduce it by adding another motor or adding a flywheel weight.
I’ve had this problem before and I just added another motor to solve it. I think it might be from too much load on the motor caused my friction.
This is usually caused because vex’s default motor speed PID isn’t designed for a flywheel. This means the PID overshoots it’s target a lot, causing the speed change you are seeing.
The easiest way to fix this is to use voltage to control the speed. However, the speed will still go up and down a little, but it is a lot better. When my team tried this, we got a change in speed of about 50-60 rpm when idle.
The more complicated way to fix this is to make your own flywheel speed controller, using a custom PID or TBH. After making a TBH controller, my team’s flywheel speed only went up and down by around 5-10 rpm when idle.
I am going to try and do the voltage like you are saying now. Thank you so much for ur response!
Below is my current Code:
//Disk Shooter
if (Controller1.ButtonX.pressing())
{
shooterMotor.spin(vex::directionType::rev, 127, vex::velocityUnits::pct);
}
else if (Controller1.ButtonA.pressing())
{
shooterMotor.spin(vex::directionType::rev, 72, vex::velocityUnits::pct);
}
else if (Controller1.ButtonB.pressing())
{
shooterMotor.spin(vex::directionType::rev, 68, vex::velocityUnits::pct);
}
else if (Controller1.ButtonY.pressing())
{
shooterMotor.spin(vex::directionType::rev, 20, vex::velocityUnits::pct);
}
Hello. I tried to upload an image but it says I cant because I am a new user. I will respond with it as soon as I can!
hey! i think this actually is a build issue. last year, while competing in pitching in, we tried out a flywheel mechanism. we had the same problem too. it has to do with friction and the disks(or balls, in last year’s case), causing the flywheels to slow down slightly. when multiple disks are shot at the same time, it slows the flywheel down.