i would appreciate it if anyone could send me some links about the encoder and how to wire it. we have it pretty much set up, but it does not seem to be working. so i’m checking the wiring aspect of it and i am not sure if the motor should be attached to a victor or a spike.
What model of encoder are you using?
Most FIRST encoders will have 4 pins (some have a 5th).
One of these should be labelled VCC in the datasheet, and should be connected to the red pin of a digital input port for power.
Another is labelled GROUND and should be connected to the black pin of a digital input port.
The other two are the signals for Channel A and Channel B. Each one should go into the white pin of a digital input (assuming you want to detect direction as well as speed).
If there is a fifth pin, it is most likely for index and you can ignore it.
A motor can go either to a Victor or a Spike. The Spike can only make the motor run full forward, full reverse, or not at all. The Victor lets you vary the speed of the motor as well. Which one you choose depends on the application. Note that big motors (like the CIMs, Fisher Price, or Globe) should go to a Victor with a 30A or 40A fuse - the Spike is fused at 20A, which is well below what the bigger motors can draw.
We are using this model of encoder (don’t know how much that helps, I don’t know as much about the electronics as Karen does, but I at least know which encoder we are using )
fixed the link so it links to the encoder details not the motor
Wire the RED wire to the +5V pin (normally red) of a digital input.
Wire the BLACK wire to the GND pin (normally black) of a digital input.
Wire the BLUE wire to the SIG pin (normally white) of a digital input.
Wire the YELLOW wire to another SIG pin (normally white) of a second digital input.
This means that you will need all 3 pins of one digital input, and one pin (signal) from a second digital input.
Make sure that the BLUE wire goes into digital input 1 through 6; then, using Kevin Watson’s encoder code (www.kevin.org/frc), go through the step-by-step instructions in the readme file to get it working. Remember where you plugged in each signal (blue and yellow) cable when you work through it.