This is our team’s first year with FRC. We had done FTC before, but never anything this big! We understand some basic concepts about motors: Spike is a motor relay, and Jaguar is a motor controller.
Our main question is encoders. When should we use them? Do most teams use encoders on their drivetrain? Also, what encoders should we use?
If any team has a general tutorial about wiring diagrams and connecting electric parts, a link would be greatly appreciated!
US Digital provides 2 E4P encoders in the kit, info here: http://www.usdigital.com/first
They can attach straight to the gearboxes [CIMple] you got and can be used to find the distance your robot travels and how fast.
The encoder’s should come with instructions on how to attach them and wiring diagrams are here: http://www.usdigital.com/products/cables-connectors/cables/4-pin/ca-mic4-w4-nc
In short the A and B channel go to the digital inputs on the digital side card.
All 3 programming languages have built in support for these encoders, if you specify which one you could get some help with that as well.
They are mainly used to find how far you have driven for Auton but can be used for other things.
When should we use them?
The answer to this is almost to easy… use them when you need to. If you want to have good control of your drive train during autonomous in order to position your robot precisely, use them. If you have an omni-directional drive system set up and want to use them to improve controlability, go for it. If you want to be able to adjust the speed of your shooter (if it’s one using a spinning wheel like a baseball pitching machine, for example) in order to get different distance shots, having an encoder will help maintain accuracy.
Do most teams use encoders on their drivetrain?
For your “typical” 6-wheel drop center drive train, encoders really aren’t needed for tele-op. The robot is perfectly controllable with out them. They can be useful in some situations (like improving a mecanum drive train to go straight easier), but really aren’t necessary. They do come in handy for autonomous, if you can develop code that uses them appropriately.
Also, what encoders should we use?
The US Digital encoders included in the KoP really are great. I would recommend sticking with those (or similar ones from US Digital) unless you have a good reason to go elsewhere.
I don’t recall finding these in our kit, and they are not on the official FRC Kit Checklists. However, we did buy some with our AndyMark FIRST Choice Credits.
Encoders are good for measuring the rotation of things that go around a bunch of times, like drive wheels. My team has used them to measure the heading of a ball shooter turret, the speed of the flywheel in the same shooter, and the height of a screw-driven elevator, among other things. We have used encoders in our drive train, but I would not say that most teams use them, as they are unnecessary unless you need to precisely calculate the position of your bot, as you would with a good autonomous program. The US Digital encoders that (I thought) come with the kit are good for most applications, and the company makes a variety of other kinds if you need something different. I haven’t been the one wiring the encoders on my team, so I don’t know the specifics of the wiring requirements, but the kit encoders should come with a diagram denoting which wires are power, ground, and signal, which all (if I recall correctly) plug into the digital sidecar.
If you need to measure something that won’t make a full rotation or doesn’t need to be particularly precise, consider using a potentiometer, which changes its resistance depending on the angle. We’ve used potentiometers on grabber arms and low-budget steering systems. As long as you choose the device to fit the application and don’t do anything needlessly complex, you probably won’t go wrong. Best of luck this season, and welcome to FRC!
The E4P envoders provide feedback on how much a shaft is rotating. You can compare the input of the speed and displacement of the robot to the actual feedback of the encoder and have the robot correct the error through PID control loops.