Shop OBEX P1 Docs P2 Docs Learn Events
Robot protection — Parallax Forums

Robot protection

alnajjaralnajjar Posts: 12
edited 2004-12-30 13:34 in Robotics
I am designing a robot arm for an exhibit at the science center but need to protect teh motors from being damaged by being over driving·either past their limit or pushing against an obstacle.

Is there a simple·circuit where I can detect whether the motor is stalled (current should shoot up very heigh while it is stuck)?· Are there·any standard solutions?


Al Najjar·

Comments

  • kelvin jameskelvin james Posts: 531
    edited 2004-12-28 05:29
    Detecting over-current on a stalled motor is not really a good option, as your arm can still do damage to itself, the motors or anyone nearby. The number one issue with robot arms is safety and then trying to control it so it won't self-destruct. The motors (depending on how many axis you have on the arm) all need some sort of limits as to how far they can rotate.
    If you you want to keep it simple, you can use a mechanical hard limit switch, like a object on the arm that activates a micro switch, or proximity switch, photosensor , etc. that can send a signal to stop the motor. Another route is to use a positional encoder that is a software controlled " soft stop" that the processor monitors the motors postion and the limits are set by programming. I would recommend the hard stop, easy to set up, inexpensive, and reliable.

    kelvin
  • alnajjaralnajjar Posts: 12
    edited 2004-12-28 15:38
    I have tried the limit switch option in the past and it is messy with lots of wires and not so pretty ways of attaching the switches.· In a science museum where people play freely with these things many thing can go wrong.· even with limit switches people can still over drive the motors by pushing against objects or squeezing to hard on an object with the gripper.

    I have tried getting a signal from the pot embedded in the servos of the arm but that is unreleable since I cannot read it in isolation of its own circuitry.

    I am not sure why you said that the current detection is not reliable,· there is a very pronounced spike in the current when the motor is stalled or near stalled. I was thinking of using a comparator with adjustable reference and then provide the output to the BS2 to shutdown that motor.· Considering that the robot don't have much load to move around, there should be a big difference between free and stalled motor current.

    Al Najjar
  • Tronic (Greece)Tronic (Greece) Posts: 130
    edited 2004-12-30 13:34
    I used a current detection thru a simple RC circuit shown in photo below to detect the edge positions
    of a robotic grip using DC motors. This way when the grip is fully closed and DC motor stalls (stop turning)
    it drops the voltage a few volts (like 0.5 volts).·
    With this simple circuit i measure time it takes to charge the capacitor under stress and compare the
    result with a measure I take in the beginning of the program tha held as reference for no-stress voltage
    level.


    This is a sample·from my program (comments are in greek - sorry!)
     
    ' -----[noparse][[/noparse] Variables ]-------------------------------------------------------
    grip_open    VAR    Bit    ' Μεταβλητή κατάστασης για τέλος διαδρομής ανοίγματος πένσας
    grip_closed  VAR    Bit    ' Μεταβλητή κατάστασης για τέλος διαδρομής κλεισίματος πένσας
    measureRC    VAR    Word    ' Μεταβλητή για τη μέτρηση της σταθεράς του χρόνου RC
    limit_beak   VAR    Word    ' Μεταβλητή ορίου τέλους διαδρομής για τα ράμφη
    M1a      CON    14    ' Σταθερές σχετικές με τις θύρες των κινητήρων DC
    M1b      CON    15    ' M1 = Κινητήρας DC στο X2
     
    ' -----[noparse][[/noparse] Initialization ]-------------------------------------------------
    'DEBUG "Wait until grip limits are adjusted", CR
    ' Βρες την οριακή τιμή για την πένσα
      LOW M1a:   HIGH  M1b    ' Κλείσε τα ράμφη της πένσας
      GOSUB RCT              ' Πέρνα στη subroutine μέτρησης RC
      limit_beak = measureRC ' Βάλε τη μέτρηση που βρήκες σαν όριο
      PAUSE 50
      LOW M1a:   LOW  M1b    ' Σταμάτησε τον κινητήρα
      PAUSE 10
      HIGH M1a:  LOW  M1b   ' Ανοιξε τα ράμφη της πένσας
      GOSUB RCT              ' Πέρνα στη subroutine μέτρησης RC
      limit_beak = (limit_beak + measureRC) /2 ' Βάλε τον μεσο ορο απο τις μέτρησεις που βρήκες σαν όριο
      PAUSE 50
      LOW M1a:   LOW  M1b    ' Σταμάτησε τον κινητήρα
      measureRC = 0
     
    --------main code part -----------
        CASE 63
          GOSUB snap
        CASE 56
          GOSUB unsnap
    ----------------------------------
     
    ----------------Subroutines-----------------------
    snap:
     DO
      grip_open = 0
      IF grip_closed = 1 THEN RETURN
      LOW   M1a:   HIGH  M1b:
      GOSUB RCT
    'DEBUG "κλείσε "  'μετράει RC
      IF measureRC < limit_beak -2 THEN GOSUB L_Closed
     LOOP WHILE (IN8 = continue) AND (grip_closed = 0)
    GOSUB motor_off
    RETURN
    
    unsnap:
     DO
      grip_closed = 0
      IF grip_open = 1 THEN RETURN
      HIGH   M1a:   LOW  M1b:
      GOSUB RCT
    'DEBUG "&#940;&#957;&#959;&#953;&#958;&#949; "  '&#956;&#949;&#964;&#961;&#940;&#949;&#953; RC
      IF measureRC < limit_beak -2 THEN GOSUB L_Open
     LOOP WHILE (IN8 = continue) AND (grip_open = 0)
    GOSUB motor_off
    RETURN
     
    
    RCT:
    measureRC = 0
      HIGH limit_RC
      PAUSE 1
      RCTIME limit_RC, 1, measureRC   ' &#924;&#941;&#964;&#961;&#951;&#963;&#949; &#964;&#951;&#957; &#964;&#953;&#956;&#942; &#964;&#951;&#962; &#963;&#964;&#945;&#952;&#949;&#961;&#940;&#962; &#964;&#959;&#965; &#967;&#961;&#972;&#957;&#959;&#965; RC &#964;&#959;&#965; &#954;&#965;&#954;&#955;&#974;&#956;&#945;&#964;&#959;&#962;
                                      ' &#960;&#959;&#965; &#963;&#965;&#957;&#948;&#941;&#949;&#964;&#945;&#953; &#956;&#949; &#964;&#951; &#952;&#973;&#961;&#945; limit_RC
      PAUSE 100
    RETURN
     
    L_Open:
      grip_open=1
    'debug "&#945;&#957;&#959;&#953;&#954;&#964;&#972;!",CR
    GOSUB motor_off
    RETURN
    L_Closed:
      grip_closed=1
    'debug "&#954;&#955;&#949;&#953;&#963;&#964;&#972;!",CR
    GOSUB motor_off
    RETURN
    motor_off:
      LOW  M1a:  LOW  M1b          ' &#931;&#946;&#942;&#957;&#949;&#953; &#964;&#959;&#965;&#962; &#954;&#953;&#957;&#951;&#964;&#942;&#961;&#949;&#962;
    RETURN
    
    
    353 x 288 - 10K
Sign In or Register to comment.