View Single Post
  #1   Spotlight this post!  
Unread 19-12-2009, 14:33
buddyb's Avatar
buddyb buddyb is offline
Registered User
FRC #1885 (ILITE)
Team Role: Programmer
 
Join Date: Dec 2009
Rookie Year: 2008
Location: Haymarket, VA
Posts: 65
buddyb has a spectacular aura aboutbuddyb has a spectacular aura aboutbuddyb has a spectacular aura about
[FTC]: Breaking DC Gearboxes Fix

I saw a topic a while back about teams ripping apart the gearboxes on DC motors, and have searched for it quite a bit, yet can't seem to find it. So, I hope that posting a new topic here is acceptable.

Near the beginning of the school year, our team (1885) started prototyping various shooters, but we had a slight problem: our gear ratio needed to be at least 9:1 to shoot the balls a decent range. We found that- if we stopped the program running the shooter with the power still on- RobotC automatically made the motors force the shooter to come to an immediate stop. This ripped two gearboxes to shreds after around 6 tests of our shooter.

However, we were able to find that if we turned the power switch off *before* the program, the shooter would come to a gradual stop, and not tear up any gearboxes. So, I took a few minutes to make some code that would rev a shooter down in RobotC. [[Attached]]

All it does is makes the power for the predefined motors approach 0 (in increments of 5) once every 200ms. Using this code, we haven't had a single gearbox rip apart on us (after running the shooter at 9:1 literally hundreds of times).

So, I hope you enjoy the code. A bit of set up is needed, but it should be worth the saved gearboxes.

Additional note: Thanks to the NXT using 16-bit unsigned ints for Encoder values, it is highly suggested that you not use PID control on your shooter, or any peripheral using 9:1 or greater gear ratios, at that. When the encoder values overflow [the motors reach 32,565 faster than you'd think], the PID control algorithm slams the motor to -100 power (or 100, if you were having that motor go in reverse). This also tore up a few gearboxes.

Best of luck with your robots!
-Buddy
Attached Files
File Type: txt nt.txt (2.1 KB, 85 views)
__________________
FRC - Team 1885 - Programmer.

Last edited by buddyb : 19-12-2009 at 14:48.
Reply With Quote