I am helping my kids build a robot and it has two arms that extend out and retract.
Each arm is controlled by two VEX 393 motors. The motors have 12 tooth gears. These gears are then connected to 84 tooth gears and the arm is fixed on this 84 tooth gear. Each arm extends about 2 feet using 1/2 inch flat aluminum strips. The end of the arm has two wheels that have another VEX motor connected to move them.
When I lift the main robot body with these arms, the body starts to move down with its own weight and the motors move on their own with the weight.
I have tried to explain the schematic structure of the robot in the attachment.
I am using Arduino to control the motors.
Each time I stop running the motor, I “detach” them and “attach” them again when I want to run.
Can someone tell me how can I retain the body in the “lifted” position and prevent the motors from spinning backward on their own?
Is there a way to keep the torque of the motors without moving them?
Things I have tried:
Adding rubber bands to increase the strength of the arm. But not successful.
Apply a small control value to the motors. Eg Servo.write(92) or something like that. I’m not exactly sure what you are using now or what are reasonable values. I’m assuming you are using the servo library
Often the devil is in the details, so perhaps a number of photos would help us understand the problem. In using rubber bands, you should try to physically disconnect the motors and apply rubber bands until the structure can almost lift itself, therefore the motors are providing only minimal force. If rubber bands are placed incorrectly, they can actually make your problem worse.
The Vexmen have a good point: your Arduino board might not be configured to provide enough direct power to these motors, so if you don’t have some sort of power switching Arduino “shield” or something, your motors might be under-powered. When loaded down, Vex motors can draw a lot of amps.
Highwayman also has a good suggestion: provide a holding torque value when the motors get the system into position. But be aware that the 393 motors can not sustain too much holding torque for very long: they will over heat. So the holding torque value must be kept below a certain value. In Vex RobotC, that value is only about 10 to 20 out of a max of about 127.
7.2V Tenergy 3000mAh Flat NiMH High Power Battery Packs with Tamiya Connectors
I am supplying this power directly to the motors and using the Arduino to send the signal.
My typical schematic of a wiring a motor looks like the attached image (the sketch shows Arduino MEGA, but I have now changed to Arduino101).
I hope jpearman will correct me if I’m wrong, but I think what he’s asking about is: do you have the negative wire of the external battery connected to ground on the Arduino? I’m not sure how the M29 does its switching, but if it works like I think it does, it might need to have a common ground with the battery. I think the M29 uses mosfets, so it might need that for the Arduino to drive it, but I’m not 100% sure.
Any chance you can get a potentiometer on the arm so you can control the hold strength using a feedback loop? (PID or P or PI control loop). The Vex one is a variable resistor. Not sure what the values look like but it should be OK at 5 volts of the arduino, you will just get a different value range.
Thanks for the tip.
I will try putting the motors on 92 speed instead of detaching them as I was doing currently.
Will report how that goes.
While we are at this. I would be also interested to know if there is a way to control the speed of the VEX motor using Arduino code? Right now my motors turn at 100RPM (i guess) and I have to use a 12 tooth gear with an 84 tooth gear to reduce the speed. I know i can reduce speed by sending lowe number to servo.write() but then I will loose the torque, right?
I’m a bit sketchy when it comes to understanding how the Arduino works (no pun intended), but as far as I know, there is no way to reduce speed on a 393 motor via only software without also losing torque. I think you would need to use gears, or some kind of mechanical transmission system if you wanted to keep torque high while reducing speed on the fly.
Seems like the battery shorted somewhere. I’ve made the mistake of accidently shorting batteries while measuring them, and they get hot fast. If the fire started near the batteryitself, it might’ve shorted near where the wires meet the battery pack.