Hello, we are team 6191. We used motors to rotate arms, like the arm to deliver gears in 2017. A bit like the robot of team 5801(https://www.youtube.com/watch?v=ZElU-wQjTag). We deliver gears by rotating the box forward and the gear can be pull up smoothly.
However, we have trouble on maintaining an arm in a chosen position. The way we used is to turn on and off the motor alternatively in very short time so that the arm seems to stay in the same place. After a few matches, our motor controller burned and the delivery box couldn't even stay in 0 degree.
Also, it swayed when the robot moved.
We hope this can be solved by changing the hardware device. Can you guys share your experiences?
You'll want to bring encoders into the conversation and look into PID. That way, you have the means to measure where your mechanism currently is and a way to tell the motors to take care of keeping the mechanism in that place. (As it's close, it applies very low voltage to maintain. As it's further away, it sends more voltage. You'll see what I mean when you take a look at PID)
I'd also recommend finding ways to have a natural rest. Don't put it up 90 degrees. Have it go a bit beyond that so it can rest on something. That way, it's less likely to fall down and it's also resting so the motors aren't needed. When it's on the floor, motor need is even less.
Although, I'm curious. Why are you focusing so much on your gears? Wouldn't you want to spend this time to make sure your cube delivery mechanism is dialed in?
Thanks for your response. Actually the gear box is just an example.
We've tried to alter the code of encoders, which is downloaded from the FRC website. We've got some numbers output, but we can't understand their meanings.
Can you show us the correct output of encoders? (Sorry we can't show you our outcome now)
That's a bit of a vague question. Are you using quadrature encoders?
Generally speaking, encoders are going to give you a tick count. That count needs to be calibrated to the distance traveled per tick. Once you have that, you can determine how many counts you need to move to reach your desired distance. You'll want to be able to reset the count to 0 and read N number of counts in your code. When you have that working, you'll want to spend some time tuning your count to make sure it matches the physical setup of your system.
You're trying to get to the point where your encoders output that count.
Thank you very much. We use magnetic encoders. We've got some result of our code, and there comes another question. We'd like to know the unit of those numbers. Does that regarding to reset?
You'll need to do some calibration work to determine the unit.
Keep in mind, the encoder ticks for a 4" wheel will have different values than the ticks for a 6" wheel.