Motors overheating?

Hey guys, so our teams been having a bit of trouble with our lift now working. Initially the lift was just shutting down for no reason, but then I realized that the slow red blinking light was displayed on the cortex beside “Robot”. I found out that was a microprocessor issue so because I’ve got a PD controller running on it I figured maybe there was just to much it had to plough through. So I stripped it down to a bare bones controller (no comments). How ever the lift is shutting down at odd times. For instance. We’ll be running it and it works perfectly. Then we’ll turn it off then on and it won’t work, repeat that and then on like the 3 try it’ll work again perfectly. I think it may be the motors over heating but it doesn’t make sense how it will run then stop then after I turn it off/on 1-3 times it’ll start working perfectly again. The code is in the attachments.
IMG_0214.jpg
IMG_0212.jpg

Do you mean that the motors completely stop and don’t move at all? Or do they strain or squeal a little bit? If they don’t move at all, it is probably not them overheating. Check your wiring that everything is connected solid and that the cortex connects fully each time you test.

As a random side note, on a Mac you can take screenshots with Command+Shift+3 for full screen or 4 for a selection. If you’re in bootcamp this is supposed to do screenshots: “To capture the entire screen simply press Function (fn) + Shift + F11”, haven’t tried though. Other virtual machines have other methods, just google it.

Are all your batteries charged up?

Have you had a look at the following flowchart?
http://content.vexrobotics.com/docs/VEX_Robot_Troubleshooting_Flowchart_0811.pdf

Can you disengage your motors mechanically from your lift to check for unusual amounts of friction in your lift? Do you need more elastics to counterbalance the weight of the lift, etc?

If you are trying to cycle power on your Cortex, is the backup battery keeping the Cortex alive? Would it help to disconnect and then reconnect the backup battery?

Thanks for the quick reply Kevin!

Sorry about that I just took photos on my phone because the internet at our school isn’t compatible with windows OS. Before I stripped the program the whole robot basically was shutting down (no squeal). Once stripped though the motors are squealing when not working and barley move. Here is the proper code. Yes all the batteries we use are fully charged. However I have never seen that flow chart before. Our lift is currently on the 1-5 breaker so I’ll try distributing them. Also we’ve checked for friction and we have just enough elastics to to hold up the lift and not raise on its own.



#include "Main.h"

void OperatorControl ( unsigned long ulTime )
{
      float error; 
      int btn; 
      int pot; 
      int btn2; 
      int input; 
      float output; 
      float dterm; 
      int lasterror; 

      input = 250 ;
      while ( 1 ) // Insert Your RC Code Below
      {
            btn = GetJoystickDigital ( 1 , 6 , 2 ) ;
            btn2 = GetJoystickDigital ( 1 , 6 , 1 ) ;
            pot = GetAnalogInput ( 1 ) ;
            if ( btn == 1 )
            {
                  input = input + 4 ;
                  if ( input > 1150 )
                  {
                        input = 1150 ;
                  }
            }
            else if ( btn2 == 1 )
            {
                  input = input - 4 ;
                  if ( input < 250 )
                  {
                        input = 250 ;
                  }
            }
            error = (input - pot) ;
            dterm = error - lasterror ;
            lasterror = error ;
            output = (0.4 * error) + (0.1 * dterm) ;
            if ( output > 127 )
            {
                  output = 127 ;
            }
            else if ( output < -127 )
            {
                  output = -127 ;
            }
            SetMotor ( 2 , - output ) ;
            SetMotor ( 3 , output ) ;
            SetMotor ( 4 , output ) ;
            SetMotor ( 5 , - output ) ;
            JoystickDigitalToMotor ( 1 , 5 , 2 , 127 , 1 , -127 , 6 ) ;
            Arcade2 ( 1 , 1 , 3 , 1 , 10 , 0 , 0 ) ;
            Wait ( 10 ) ;
      }
}

Do you have IMEs on this robot?

Only one but it’s not plugged in and functioning. Just the IME sensor is connected to the motor.

Without testing it, I think your code seems generally fine. However, there might be some issue in the calculations. When you run the robot, see if the output variable value or motor powers are what they should be. I don’t know easyC well, is there a debug stream or a live view of variables and motor powers?

Just to see if I’m understanding correctly, the value that input is being set to is supposed to be the pot value you want the lift to go to?

Make a really simple program (probably what you already tried) that is only setting the motor power to the joystick value, and see what happens.

Hey so we tried the PID program then a very simple program and turns out it was just the gearing set up we had couldn’t take the load.

Update:

So switching between the simplified and PD program i’m getting this yellow-ish slow blinking on the robot led. This could be a microprocessor issue but if it is what am I supposed to do? How am I supposed to simplify the program any further?