Joystick keeps losing power (Please Help!)

My teams main controller keeps losing power and prevents our arm from stacking cones on the stationary and mobile goals, if anyone could help, then it would be greatly appreciated!

A similar issue once happened to me… I would recommend making sure the back of your controller is securely in place as slight bumps could be knocking the batteries loose.

As @John B. says, it might be that your batteries can easily come out, so they keeping the controller still and check if that’s the problem.

If this only happens at competitions:

  1. it might be that the competition switch is loose where it clicks into the back of the joystick, or that your joystick has some of those teeny metal pins that are bent or broken, preventing a secure “click in” of the competition switch.
    → Our driver has gotten into the habit of holding the competition switch in with one hand the entire time (kind of reaching around the side of the joystick from the normal hand position), and we put arcade control on the other joystick channel for her.

  2. Does the problem persist if you disconnect the 9V backup battery? A low or dead 9V can cause connection problems.

If this happens without the competition switch, just when driving around in your lab:

  1. Check the battery connection to the cortex or power expander; if the plugs have degraded a little and become loose-fitting, they can lose the physical connection intermittently.
    → You could test this option by driving the robot (in a controlled fashion) into the field perimeter; that level of jostling could trigger the disconnect and then you’d know.
    → Using a $5 battery extension cable on all robots prolongs the life of the plug on the very-expensive cortex and power expander.

  2. Check the battery wires themselves; plug each into a voltmeter; while it’s plugged in, gently move the battery around in the air, so that the wire between the battery and the white plug is at different angles. If the voltmeter registers different voltage when you move the battery around (or cuts out entirely), then you know it’s a battery-wire problem.
    → Strongly encourage your team to never, ever hold the battery just by the plug & wire.
    → Depending on the severity, this problem can be fixed with a blob of hot glue or some duct tape.

  3. Do you have integrated motor encoders (IMEs) on your robot? Last year they gave us a huge number of completely random errors that were difficult to track down. If you have IMEs (even if they are not being used in your code), unplug the I2C port from the cortex and see if the problem recurs.

That’s all I got. Hope this helps.