My team has a single flywheel launcher that we have programmed to run on what we call “manual control”. This basically involves not using any sensors to set the flywheels speed, and we usually set it to about 80/127 motor power. If we load the balls at a consistent rate, we can make 60% of our shots, and the 40% are due to human error and not loading them at the right time (if we wait too long, the flywheel goes too fast and we overshoot, if we don’t wait long enough it undershoots)
So we figured that it was time to implement a TBH or PID code to try to keep our launching at a consistent speed. For now, due to the fact that it is simpler, we are going with the TBH code. We programmed it in, and did our best to fine tune it by adjusting the gain and by adjusting the speeds the launcher is to be set at. If we launch about 50 balls, we miss the first ten due to either overshooting or undershooting (one run it will always overshoot, and the next it will always undershoot) then the next 20 will make it in almost with 100% accuracy, then the last 20 or so are all over the place.
We ruled out any issues with battery voltage (even though the code should compensate for that already) and we tried adjusting the gain more as described in the thread about TBH tuning that was recently posted, but no matter what we do we cant seem to find that sweet spot.
Bpalms had stated that “Once you do start tuning however, it essentially takes 5 minutes to get the value right, and your flywheel should be golden.”
we have been trying for over a month and just keep getting frustrated with coding and usually get burned out for a few days, then revisit it.
I also tired this method of tuning posted by VEX9185:
First, I would double the number. It will now be 0.0005. Now run the flywheel and shoot some balls, while writing velocity into the debug stream. Then, use an Excel (or whatever you prefer) spreadsheet to make a graph. See if the speed up is overcompensating. If it is, lower the gain by 0.0001, and raise it if it can gain more. Keep tuning. I would go for 0.000X0 or 0.000X5 because that is relatively quick to get to.
Nothing seems to be working, and we have been struggling with this for awhile. It seems like it should be pretty simple to get this down, so would anyone care to share ideas for how to get the proper Speed Values to launch at, and the proper way to go about tuning the gain? We are guessing at the values and experimenting with the gain, and i feel like we are managing too many variables at once… any help would be MUCH appreciated and i would also like to know if anyone has actually had success with the TBH code. Thank You!