View unanswered posts | View active topics It is currently Fri Aug 18, 2017 10:46 am

 Page 1 of 1 [ 5 posts ]
 Print view Previous topic | Next topic
Preventing Burned Out Motors
Author Message
Moderator

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Preventing Burned Out Motors
I did not think that this post belongs in the Beginners Tips section, so I put it here.

Since many people have burned out motors by putting too much torque on them, and the motors are expensive, I wrote a code that acts like a circuit breaker when too much torque is applied. It will temporarily stop the motor until the user presses a button to release it. All you need is an encoder. I have only written it for one motor, and because every robot is different, you will have to add more code to make it work for multiple motors. You can change the amount of torque that is needed before the motors stops by changing the value of the variable "threshold". Here is the code:

 Code:#pragma config(Sensor, dgtl1,  quad,                sensorQuadEncoder)//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//task clutch(){  int quadPrev = 0; //stores previous encoder value  float threshold = .01; //variable to increase or decrease the torque at which the motor stops.  SensorValue(quad) = 0; //reset encoder  wait1Msec(100); //initialize  while(true){    if(motor[port2] > 20 || motor[port2] < -20){ //checks if motor is running at a reasonable speed      wait1Msec(100); //checks for stop and go movement      while(motor[port2] > 20 || motor[port2] < -20){        quadPrev = SensorValue(quad); //set quadPrev equal to the current encoder value        wait1Msec(100);//let the motor run a little        if(abs(quadPrev - SensorValue(quad)) < (abs(motor[port2]) * threshold)){        //IMPORTANT PART: checks if the axle has moved the correct amount in proportion to the motor speed          motor[port2] = 0; // stops motor          hogCPU(); //stops task main from executing until the release button is pressed          while(!vexRT[Btn6U]){ //this button releases the motor             motor[port2] = 0; //stops the motor which is not running correctly            //insert all user controls except for the motor that is being stopped          }          releaseCPU(); //starts running task main again        }      }    }  }}task main(){  StartTask(clutch);  while(true){  motor[port2] = vexRT[Ch1];    wait1Msec(1);//needed for multitasking to work correctly  }}

That's it. If you implement this, let me know how it goes.

_________________
sudo rm -rf /

Sun Nov 21, 2010 11:13 am
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 409
Re: Preventing Burned Out Motors
Thanks for the great tip!

What type of motors are you seeing burnt out?

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support

Mon Nov 22, 2010 5:38 pm
Moderator

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Re: Preventing Burned Out Motors
We have seen regular motors being burned out. When people use old motors to try and lift their robot, they seem to give out under the torque. I have also heard about the high strength motors shorting if you add too much torque too quickly, but I've never actually seen this.

_________________
sudo rm -rf /

Tue Nov 23, 2010 1:59 am
Rookie

Joined: Fri Jul 27, 2012 1:55 am
Posts: 1
Re: Preventing Burned Out Motors
Nice post. I like it. Thanks for sharing these information. Keep it up.

Fri Jul 27, 2012 1:59 am
Guru

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Re: Preventing Burned Out Motors
We don't have Cortex but the Tetrix motors we used for the Mindstorms can burn out quite easily. I opened up one of the burnt out motors and found that it has a series inductor inside the motor. If the motor is stalled, the stall current can easily fry the inductor causing it to open circuit. If you bypass the burnt out inductor by shorting it, the motor came back to life again. In the 2010 FTC competition, we fried over 10 motors, Ouch! That forced us to add stall protection in our library code.
http://proj.titanrobotics.net/hg/Ftc/20 ... ib/drive.h
Basically, it detects if the power applied to the motors is exceeding some threshold but the wheels are not moving for a set period of time. When that happens, we cut the power to the motor and beep the speaker.

Fri Jul 27, 2012 4:12 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 5 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.