[FTC]: [FTC] Motor Controller problems

Is anyone else having motor controller problems? Ours seems to run the big motor (from the kit) either full on or off. We looked at the output signal with a scope and no matter what values we use in RobotC, we don’t seem to get PWM, just on (12V) or off (0V) or full reverse (-12V). Is it possible we have a bad motor controller? Could it be user error?

Couple of questions:

  1. How do you have the motors wired? How are the connections going from the motor to the controller and from controller to the NXT?
  2. What’s the snippet of code that you have to drive the motors?
  3. Have you tried just driving the NXT motors?
  4. Are you using motor encoders (not that it should matter)?
  5. Are you using ROBOTC 1.44? It was just updated and released early this week - see www.robotc.net for details.

If your motors are miswired, it can cause the problems you are having. Several possible sources of miswiring are:

  • You have “PID speed control set” but the encoders are not connected. No changes will be detected on the encoders so the PID algorithm will adjust to maximum speed.
  • You have the four wire motor encoder connected backwards. The orange lead should be on the “fat” side of the motor controller.
  • the motor leads are connected “opposite”. That is, they’re connected so that when the motor is going forward (positive) the encoder is counting reverse (negative). Simply swap the motor leads.
  • Motor encoder 1 is connected to motor encoder 2 input and vice versa.

I spent an hour with my initial robot wondering what had happened until I got this straightened out.

A good way to test that you have your wiring accurate is to use the “NXT Devices” command found in the debugger. Here’s how to do this:

  1. Download the file included in this post. It’s a small program that alternately drives each of the motors forward and then reverse for two seconds.
  2. Compile the program and download to NXT.
  3. Run the program with the ROBOTC debugger window “NXT Devices” open.
  4. Monitor the results in the debugger window and verify that they are the expected ones.

More detailed instructions are included in the comments of the test program. This program will also be included in the sample programs folder for the next ROBOTC release.

FTC Test Motors.c (4.11 KB)


FTC Test Motors.c (4.11 KB)

You appear to either be mixing two symptom-descriptions together, or making the mistake of thinking that the motors know how to decode PWM signals.

What I think you should see is this chain of signals.

NXTBrick –> HiTechnicBrick: See PWM, or I2C, or some such encoded signal

HiTechnicBrick –> BigMotor: See a signal that encodes speed and direction into a (relatively) slowly varying (from +12V to -12V) analog voltage.

If you are looking for PWM pulses at the 2-wire input to the big motors, I think you are looking for the wrong thing.

If you send proper commands to the HiTechnic Motor-Control brick, and it only produces full on +12V or full off (-12V), and if those signal aren’t modulated in any way once they are on or off, then I think you might have a bad HiTechnic brick.

Blake

Hey folks, thanks for all the responses. We fixed the problem by upgrading to RobotC 1.45. Although, I will say that it was not at all obvious where to get version 1.45 from. Just in case there is someone else having problems with motors or servos, you can download the latest version of RobotC (for the FTC) from:

http://www.education.rec.ri.cmu.edu/content/events/ftc/robotc/

Thanks again for all the help.