Claw will close but won't open

One of my students has programmed their robot to open the claw before driving forward. The claw works just fine and their program continues without any problems until near the end of their program. The claw has closed around a ball and when told to open, it will not do so. I commented all code above this command and the claw will open, but will not do so when the code above it is included. They are running the motor at full power (127) for 3 seconds. Any ideas? Do we need to try a different motor on the claw?

1 Like

posting the code will make it possible to help. Probably just an oversight in the code, I’ve never heard of a motor refusing to move in only one direction.

it could also be that the tension on the claw means the motor isn’t strong enough to open it. pictures of the claw setup would help to confirm or disprove this.

4 Likes
task main()
{
	wait1Msec(2000);

	motor[Claw] = 50;
	wait1Msec(400);

	motor[Arm] = 30;
	wait1Msec(250);

	motor[Arm] = 0;
	wait1Msec(300);

	SensorValue[rightE] = 0;
	SensorValue[leftE]  = 0;

	while(SensorValue[rightE] < 1100)
	{
		if(SensorValue[rightE] == SensorValue[leftE])
		{

			motor[Right] = 80;
			motor[Left]  = 80;
		}
		else if(SensorValue[rightE] > SensorValue[leftE])
		{

			motor[Right] = 60;
			motor[Left]  = 80;
		}
		else
		{

			motor[Right] = 80;
			motor[Left]  = 60;
		}
	}

	motor[Left] = 0;
	motor[Right] = 0;
	wait1Msec(2000);

	motor[Claw] = -50;
	wait1Msec(700);

	motor[Claw] = 0;
	wait1Msec(300);

	motor[Right] = 60;
	motor[Left] = -60;
	wait1Msec(1400);



	SensorValue[rightE] = 0;
	SensorValue[leftE]  = 0;

		while(SensorValue[rightE] < 550)
	{
		if(SensorValue[rightE] == SensorValue[leftE])
		{

			motor[Right] = 80;
			motor[Left]  = 80;
		}
		else if(SensorValue[rightE] > SensorValue[leftE])
		{

			motor[Right] = 60;
			motor[Left]  = 80;
		}
		else
		{

			motor[Right] = 80;
			motor[Left]  = 60;
		}
	}

	motor[Right] = 0;
	motor[Left] = 0;
	wait1Msec(3000);


	motor[Arm] = -30;
	wait1Msec(300);

	motor[Arm] = 0;
	wait1Msec(300);


	motor[Claw] = 127;
	wait1Msec(3000);

}

The claw is setup in the standard clawbot configuration VEX uses.

Based on your code, this value is never getting greater than 550.

Well if the Arm motor correctly moves at -30 power for 300 msec, then this is not the case. And its an open loop so the drive should exit that loop correctly. There is a good possibility that the motor is burning out because the power is never adjusted to reflect the closed position of the claw. I would recommend lowering the power of the claw after it has grasped the ball so that the motor is not overworked for a longer period of time. I do agree that a claw setup would be useful.

4 Likes

Thank you. We will give this a try.

True but that is for the Encoder on one of the shafts.

this is probably it. You’re telling the claw motor to keep turning closed even when the claw is closed. this will easily burn out the motor, making it too weak to open the claw again.

the vex claw should be tensioned to stay closed, so you shouldn’t need to apply motor power on it to keep it clamped. just tell the claw motor to stop moving after it closes and it should be good.

4 Likes

And also It just dawned on my that this is a single 393 motor. Without tensioning the claw, a single 393 will struggle to hold a ball in a claw for more than a couple seconds without beginning to lose power.

4 Likes