Bang Bang Control with a Ratchet

I’m using a single flywheel with an external gearing of 15:1, and turbo motor gears, resulting in a 36:1 gear ratio. Right now I’m using a modified TBH for velocity control, but now that I’m using a ratchet could I use bang-bang code without destroying my gears (LS) or motors? Would it work well?

I have never tried Bang bang with a ratchet, but I bet it could work. Seems like you wouldn’t get all the benefits when using a ratchet though.

I feel like bang bang without a ratchet would destroy your motors

Not if you do it right.

Try it out, it takes 30 seconds to program. You’ll get the fastest possible recovery times, and accuracy will depend on the flywheel’s build quality and the noise and lag in your velocity calculation. The best way to control a flywheel is probably a hybrid of bang-bang and PID, but bang-bang isn’t bad on its own, you can get good accuracy for close shots and close to 90% on long shots if the hardware is tuned right.

I know it takes no time, but I don’t want to have to redo my gearbox again. I also don’t want to be picking pieces of LS gear out of my hair for the next week.

I haven’t gotten any gear teeth in my hair yet, so I think bang-bang is safe with a ratchet.
We’re currently using a “perfect” motor setting for low (battery adjustable) and 127 for high. To deal with the noise, we’re using hysteresis. The shooting took some getting used to (as our scores reflect), but after that learning curve, we were better than before (we need to practice more but our robot only has the base and the elevator on it currently ;))
PS… Our ratio is around 2600 RPM, so I can’t say for sure it’s safe with 3600 PRM.

can somebody fill me in on what “bang bang” is? I have heard of it but never what it actually is and how to use it.

Bang bang is a very simple, and aggressive velocity control that at it’s simplest form has 2 powers.
the code is simple. If speed is to low, set motors to high and if it is too fast set motors to low.

Have you tried using smaller wait times between encoder checks. For bang bang to work, it is best (in my experience) to have a wait time of 10-30ms between checks.