We have been using Jaguars on our robot with PWM. They work great for us. Yesterday, we tried to use the Victor that came with the KOP. For some reason, the Victor would not put out any more than 5 volts. Thus, the motor ran way too slow. We checked, and there were 12 volts going into the Victor. Any idea why we are experiencing such a large voltage drop?
Did you change the code, so that it knows it’s controlling a Victor instead of a Jaguar?
Yes, we are declaring an object of type Victor and using
Victor *liftMotor;
to declare the variable,
liftMotor = new Victor(5);
to declare the victor
liftMotor->SetSpeed(1);
to set the speed of the victor (We use 0 and -1 in place of 1 as well)
We tried following the factory re-calibration procedures without any luck. We are getting 2.7 volts output without a motor connected and 1.7 volts with a motor connected.
We also tried
liftMotor->Speed()
No luck.
Whenever I have questions about where a problem is, I like to use a simpler device to help in the troubleshooting. In this case the small hobby servos supplied in the kit of parts make a great debugging tool. Substitute one in place of the Victor. You also need to provide a jumper between the two pins next to that PWM output. The jumper is needed to provide power for a hobby servo, but is removed when running an externally powered device such as a Victor.
I believe the hobby servos supplied with the KOP will move through an angle of about 120 degrees (full forward to full reverse) If you only get a much smaller move (such as 90 degrees total) than your code or something else upstream in the problem. If you get something close to 120 degrees total movement, than the Victor is the problem.
My guess is that if you do this test you will find the servo does not move as much as expected and the problem is in the code or driver station somewhere. Victors seem to fail catastrophically when they go, but there are many things in the code that are more likely to cause a partial output problem like this.
Do a test and make sure you know where the problem is originating first. There is not a lot of time left to be looking in the wrong location.
Do you mean we should unplug the Victor, plug in a servo to the same PVM output, and set the jumper to make that output 6v all without changing any code? We tried just that swapping out the Victor for a servo and without any code changes. The servo would only move about 45 degrees in either direction.
The other thing we tried was swapping the Victor with a Jaguar on the same PVM. The Jaguar worked fine.