Clawbot improvements

  1. 3 years ago


    28 Apr 2013 Moderator, ROBOTC Tech Support Rockstar, Los Angeles 8888
    Edited 11 months ago by jpearman

    I was testing the simple P controller from this thread and found a couple of small issues with the clawbot assembly. In fixing these issues I ended up making a few other minor modifications and then started thinking about Foster's thread from last year, where could you spend $100 and improve the basic Clawbot.

    Issue 1
    Claw does not attach to the arm securely.

    The two gussets are spaced wider than the C channel onto which the claw attaches, I guess you could simply tighten the screws until the gussets bend but that's not how I like to do things. You can see the problem in the Clawbot CAD.

    The solution is the add some 1x25 bar as a spacer on each side, here I cut the bar to 2 inches long and also replaced the long screws with individual short screws on each side.

    (click for larger version)

    Issue 2
    The attachment of the arm C channel to the two 84 tooth gears distorts the gears. Again, you can see the issue on the Clawbot CAD.

    The problems arrises due the the fact that the inner surface of the mounting holes are slightly inset from the outer surface of the gear. When the 1 inch beam is attached the space between the two gears is only 0.93 inches, when the C channel is also installed and the screws tightened down this distorts the gear. The solution is to add steel washers between the attachment points and both gears as below.

    (click for larger version)

    You may notice that I also added a second 1 inch beam for stability.

    Having sorted out these two small problems, I then set about adding some other improvements to make the Clawbot easier to control.

    Improvement 1, add a potentiometer.

    A pot was added to the arm.

    (click for larger version)

    The shaft had to be replaced with a longer one, 1/2 inch standoffs (beams) were added, some of the bearing flat rivets were replaced with screws. I have dropped my arm down one hole also from the default position.

    Improvement 2, IME added to the claw motor.

    I wanted to add a potentiometer to the claw but, if added to the motor, the range is slightly larger than the pot allows. I took the easy way out and just added an IME. One minor issue is that it takes at least two IME cables to get back to the cortex, as explained below, I also encoded the drive so this meant three IME cables were needed to get the necessary length. It would be nice if VEX added 24" and 36" IME cables to their product lineup.

    Improvement 3, IME's added to the drive.

    I encoded both drive motors, actually this was done some time ago as I had been beta testing the version of ROBOTC with built in PID control.

    The parts needed for these upgraded do not come cheap, assuming that all you have is the basic dual control starter kit then this is what is needed.

    In the next post I will look at what some of these improvements allow when combined with improved software.

  2. jpearman

    28 Apr 2013 Moderator, ROBOTC Tech Support Rockstar, Los Angeles 8888

    Here is some code to go with the encoded clawbot. There are three parts to this code, drive control, arm control and claw control (surprise, surprise).

    Drive control.

    Simple arcade drive, I'm using my smart motor library underneath all of this code so the motors are protected from tripping their internal PTC devices. The root function here is called DriveSystemArcadeDrive, call this with forward and/or turn speeds.

    Arm control

    This is an implementation of the simple P controller from this thread.. A task is started for manual control or call SetArmPosition to control in autonomous, see the code for details.

    Claw control

    The code protects the claw motor from overheating in two ways. First, the underlying smart motor library will limit power if the motor stalls. I was going to reduce the detected limiting current for this motor but, due to the fact the claw is spring loaded, this caused some unwanted oscillations so I left it at the default. Secondly, the code also monitors the IME and limits power at the open and closed positions. The code auto calibrates the encoder the first time the claw is closed, it also monitors the IME during closing and reduces power if it detects reduced movement when only partially closed (when picking something up).


    I put in an example autonomous routine (nothing very exciting) to show how calls are made when in this mode.

    There's too much code to put inline so here's the file, needs a bit more cleaning, just a quick hack. The smart motor library is included.



or Sign Up to reply!