a1tD0000006lSqpIAE

Course: Introduction to Dobot
Lesson 4: Suction Cup Attachment

  • 9-12 grade
  • Beginner

Lesson Description:

Objective:
Learn to use the suction cup attachment for Dobot, and write code to control it.

image description

Lesson Modules


Teaching Tips:


Air Pump

Here are the instructions to complete the air pump installation:

#1  Connect power line labeled SW1 on the pump box with the interface on the Dobot labeled GP1.

#2  Tighten air pump kit onto the end of the Dobot with the butterfly nut.

#3  Connect GP3 of Joint4 servo line with forearm connector GP3.



Switching between Gripper and Suction Cup

The Gripper kit shares the air pump with the Suction Cup, so switching between the gripper and suction attachments is very simple.

#1  Remove the gripper by unscrewing it from the air pump.
#2  Replace it with the suction cup, and reattach the air pump.

#3  Attach the air tube to the adapter. 

(It isn't always easy to attach the tube, don't worry, you won't break it.)





Blockly

These two blocks control most of the Gripper functionality.

Choose Tool

Tell the program what attachment you are using for the Dobot.

This should be done at the beginning of each program or whenever 


Suction Cup On/Off

Turn the suction cup on and off during the run of the program.


They can be found here:




Here is an example of a responsive program using these blocks:



1. Tell the program what attachment you are using for the Dobot.

2. Repeat the inner blocks (steps 3-8) 10 times.

3. Move to a location you specify.

4. Power on the suction cup.

5. Pause for 1 second (and do nothing during this time)

6. Move to a location you specify.

7. Power off the suction cup.

8. Pause for 1 second (and do nothing during this time)



Challenge (see teacher tips for solution)

Write a program that:

  1. Picks up a block with the suction cup
  2. Places it down in a location you specifty
  3. Picks up another block (from the same location from step 1)
  4. Places it down 50 units (on the Y axis) away from the previous block
  5. Repeat this process twice more

When your program is done running, you should have a line of 4 blocks each spaced about 2 blocks apart.


Script

Here is the same program completed in the Script programming environment:

dType.SetEndEffectorParamsEx(api, 59.7, 0, 0, 1)
for count in range(10):
  current_pose = dType.GetPose(api)
  dType.SetPTPCmdEx(api, 2, 200,  0,  0, current_pose[3], 1)
  dType.SetEndEffectorSuctionCupEx(api, 1, 1)
  dType.SetWAITCmdEx(api, 1, 1)
  current_pose = dType.GetPose(api)
  dType.SetPTPCmdEx(api, 2, 200,  0,  0, current_pose[3], 1)
  dType.SetEndEffectorSuctionCupEx(api, 0, 1)
  dType.SetWAITCmdEx(api, 1, 1)

Teaching Tips:


General Troubleshooting:

Ensure that your Dobot is:

  • Plugged into power
  • Powered on
  • Connected to your computer via USB
  • Connected via DobotStudio


Check the firmware in the Settings menu, and make sure it matches the task you are trying to complete.

If your Dobot is not moving as you expected, press the Home button and allow it to recalibrate.

Suction Cup Troubleshooting:

The suction cup is properly attached, and I can hear the air pump working, but the suction isn’t working and my Dobot won’t pick anything up.

    • This is most likely a port connection issue. Double check that your suction cup attachment and your air pump are plugged into the correct ports. The correct port for the suction cup is GP3, which is the input labeled #1 on Dobot’s forearm. The correct port for the air pump is
    • This could also be an issue of proximity. You must touch suction cup to the object you intend to pick up in order for it to form a seal and move the object. Try changing your code by moving the arm slightly further in the Z direction.