Advertisement
Intermediate Time: 4–5 weeks Robotics

Pick and Place Industrial Robot

Build a SCARA-type pick and place robot integrated with conveyor belt and computer vision for object sorting.

SCARAPick and PlaceComputer VisionConveyorPLCIndustrial
DifficultyIntermediate
Duration4–5 weeks
Components10 items
Steps3 steps

Introduction

Build a SCARA-type pick and place robot integrated with conveyor belt and computer vision for object sorting. This comprehensive guide covers everything from design through implementation, testing, and deployment.

Theory & Background

SCARA (Selective Compliance Assembly Robot Arm) has 2 rotary joints in horizontal plane (θ1, θ2) + vertical linear axis (Z) + end-effector rotation (θ4). Horizontal IK: given target (x,y), compute θ2 = ±acos((x²+y²-L1²-L2²)/(2L1L2)). θ1 = atan2(y,x) - atan2(L2sin(θ2), L1+L2cos(θ2)). Implement both elbow-up and elbow-down configurations. Generate smooth trajectories using trapezoidal velocity profiles for stepper control.

Advertisement

Components & Requirements

10 components required for this project.

#ComponentPurposeQty
1SCARA Robot Kit (Delta 4-DOF)Pick and place mechanismx1
2Stepper Motors (NEMA 23)SCARA arm jointsx3
3Linear Actuator (Z-axis)Vertical pick motionx1
4Conveyor Belt (12V motor drive)Object transportx1
5Webcam (Logitech C920)Object detectionx1
6Raspberry Pi 4Vision processingx1
7Arduino Mega + RAMPS 1.4Stepper motor controlx1
8Vacuum Pump + Suction CupObject picking toolx1
9Proximity Sensor (inductive)Object detection on beltx2
10Sorting Bins (3 positions)Sorted object destinationsx3

Step-by-Step Implementation

Follow these 3 steps carefully.

1
SCARA Kinematics

SCARA (Selective Compliance Assembly Robot Arm) has 2 rotary joints in horizontal plane (θ1, θ2) + vertical linear axis (Z) + end-effector rotation (θ4). Horizontal IK: given target (x,y), compute θ2 = ±acos((x²+y²-L1²-L2²)/(2L1L2)). θ1 = atan2(y,x) - atan2(L2sin(θ2), L1+L2cos(θ2)). Implement both elbow-up and elbow-down configurations. Generate smooth trajectories using trapezoidal velocity profiles for stepper control.

2
Object Detection and Classification

Use OpenCV + MobileNet SSD for multi-class object detection on conveyor. Alternatively, train custom classifier with 3 object classes (red cylinder, blue cube, green sphere) using transfer learning (TensorFlow + ResNet50). Detect object position in camera image, transform to robot workspace coordinates using camera calibration matrix (pixel → mm on conveyor surface using checkerboard calibration + known camera height).

3
Conveyor Synchronization

Object moves on conveyor while robot picks. Measure conveyor speed using a rotary encoder on belt roller. When proximity sensor detects approaching object, calculate: time to reach pick zone, projected pick zone position accounting for belt movement during robot move time. Adjust pick target position to meet object at the right instant — similar to how a goalkeeper anticipates ball trajectory.

Code & Implementation

Core code for pick_place_vision.py:

pick_place_vision.py Python
import cv2, numpy as np

def detect_objects(frame):
    """Simple color-based object detection"""
    hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
    objects = []
    # Red objects
    mask_r = cv2.inRange(hsv, (0,120,70), (10,255,255))
    mask_r |= cv2.inRange(hsv, (170,120,70), (180,255,255))
    contours, _ = cv2.findContours(mask_r, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
    for cnt in contours:
        if cv2.contourArea(cnt) > 500:
            M = cv2.moments(cnt)
            cx = int(M['m10']/M['m00']); cy = int(M['m01']/M['m00'])
            objects.append({'color': 'red', 'pixel': (cx, cy)})
    return objects

def pixel_to_robot(px, py, H):
    """Convert image pixel to robot coordinates using homography H"""
    pt = np.array([[[px, py]]], dtype=np.float32)
    robot_pt = cv2.perspectiveTransform(pt, H)
    return robot_pt[0][0]

Testing & Troubleshooting

Test Pick and Place Industrial Robot by verifying each subsystem individually before full integration.

!
Troubleshooting Tips

Verify power voltages, check ground connections, use serial monitor for debug.

Real-World Applications

*Electronics PCB component placement
*Food sorting and packaging
*Pharmaceutical pill sorting
*Semiconductor chip handling
*Postal parcel sorting
*Agriculture produce grading
*Quality inspection and rejection
*Toy and consumer product assembly

Extensions & Next Steps

  • Implement deep learning for defect detection during pick
  • Add force feedback on gripper for fragile object handling
  • Build dual-arm system for assembly operations
  • Implement bin picking from random pile using depth camera
  • Add conveyor tracking for continuous-motion picking without stopping belt

Interactive Playground

Coming Soon

An interactive simulator will be available here — simulate circuits and run code in-browser without hardware.

Frequently Asked Questions

What is the cycle time of a typical pick and place operation?
For a SCARA robot picking from a conveyor: approach to object (~0.5s), pick (vacuum on + 0.2s), retract (0.3s), move to bin (0.5–1.0s depending on distance), place (release vacuum + 0.2s), return to pick position (0.5s). Total cycle: 2.5–3.0 seconds per pick, or 20–24 picks per minute. Industrial robots achieve 0.5–1.5 second cycle times with optimized path planning and simultaneous motion between axes.
Advertisement