Enter the world of robotics with Grab-it – Part 1

Enter the world of robotics with Grab-it – Part 1

The “Grab-it” 5-axis robot arm from JOY-IT is perfect for hobbyists, schoolchildren and students looking to take their first steps into the world of electronics, mechanics and programming. Since all standard single-board computers (SBCs) and microcontrollers are compatible, you are not restricted to a particular platform and can begin working quickly. In this example, we will focus on the Raspberry Pi Model 4 with a Moto Pi and the Arduino Uno with a Motorino. Thanks to the high-torque servo motors and powerful gripper, small loads can easily be grasped and moved from A to B.

Assembly and calibration of the motors

The Grab-it robot arm kit comes in a practical, multipurpose case containing:

  • Aluminium robot arm, serial number: Robot02
  • Raspberry Pi Model 4 with 2 GB and power supply
  • Moto Pi for controlling the servos
  • 20 W power supply for the control board
  • Memory card with NOOBS, tools and instructions
  • 1.5 m HDMI cable (HDMI Micro > HDMI) for 4K playback

The robot arm is compatible with the following motors:

  • Torque: 21.5 kg·cm at 7.4 V
  • Voltage: 5–7.4 V DC
  • 360° mechanical angle and 180° working range
  • Metal gearbox
  • Control via pulse width modulation (PWM)

Recommended additional accessories:

The aluminium robot arm is moved by six motors that can be controlled separately and is mounted on a rotating turntable (360°). The 4.5 mm thick acrylic base plate is equipped with mounting holes for all common SBCs and microcontrollers. Spacers allow the base plate to be easily attached to surfaces such as workbenches or desks.

The robotic arm can easily be mounted on a desk or worktop.
The robotic arm can easily be mounted on a desk or worktop.

Step-by-step assembly and calibration of the motors

The following items are required for assembly:

  • Assembly materials: Phillips screwdriver, flat-nose pliers, Allen key (included), tweezers (if necessary)
  • laptop and Raspberry Pi with Moto Pi or Arduino with Motorino for calibrating the motors
  • Assembly instructions from JOY-IT
Der Roboterarm kommt mit diesem Zubehör
The robot arm comes with these accessories
Im Karton sind befinden sich diese Inhalte
The box contains these items

Assembly instructions:

  • Remove the film from the base plate.
  • Attach one of the round servo levers to one of the round plates using four screws.
  • Next, mount a servo motor onto the plate. Place the plate on the servo and secure it with four screws and nuts. Ensure that the servo gear is aligned exactly in the centre.
  • In the fourth step, mount the bearing. Insert the four long screws through the first ring and place the bearing on top. Next, attach the second ring and secure it in place with the four long brass sleeves.
  • Place the round plate from step 2 with the servo mount on top of the servo head from step 3, then fasten it in the centre with a screw.
  • Finally, place the plate with the servo on the bearing mount and secure it with four nuts (see Figure 03).
Nach den ersten Schritten sind die ersten Servos verbaut.
After completing the initial steps, the first servos are installed (Figure 03).
  • Attach a bearing to the first angle bracket.
  • Screw the angle bracket to the round plate.
  • Then screw this to the bearing.
  • It can then be mounted on the base plate and secured on the underside with brass sleeves. Caution! Ensure that the thread does not protrude from the sleeves and that the nuts are attached to the threaded pins beforehand. These can then be tightened from above. The plastic spacers can now be attached to the underside (Figure 04).
  • Finally, attach the servo levers to the remaining servos (Figure 05).
Die ersten Servomotore werden auf der Grundplatte angebracht
The first servo motors are attached to the base plate (Figure 04).
Das Aufstecken der Servohebel und Kalibrieren der Motor ist ein wichtiger Schritt.
It is important to attach the servo levers and calibrate the motor (Figure 05).

ATTENTION: The servo motors must be calibrated in their basic position before installation! (Instructions below.)

  • Screw the two U-plates together using four screws and nuts each.
  • Secure the servo with four screws and nuts, then connect the servo arm to the robot arm with four screws (Figure 06).
Der Roboterarm nimmt langsam Gestalt an (Bild 06).
The robot arm is slowly taking shape (Figure 06).
  • Screw another U-plate to an angle bracket and attach it to a servo holder.
  • Then attach a bearing to the familiar position.
  • Insert a servo motor and fasten it in the usual way with four screws and nuts. Finally, attach the servo motor to the robot arm with four screws.
  • Place two servo holders on top of each other and secure them together with screws and nuts.
  • Install the bearing and servo motor as usual.
  • Attach the last servo to the gripper as usual (Figure 07).
Der Aufsatz für den Greifer wird montiert.
The gripper attachment is mounted (Figure 07).
  • The robot claw must be assembled. To do this, screw the four claw fingers alternately with the short brass spacers. Nuts are used on one side and screws on the other to secure them in place.
  • Then, four brass spacers are attached to the servo. Ensure there is a washer under and above each spacer. Next, insert a screw through the sheet metal and secure it to the servo. Place two washers on the screw.
  • Next, insert a bearing into the gripper.
  • Attach the first claw to the servo using a washer and a nut.
  • For the second claw, attach a servo lever using four screws.
  • Attach the second claw and secure it in place with a screw.
  • Attach a servo lever to the angle bracket and secure it to the gripper arm with a screw.
  • Screw the claw to the angle bracket (see Figure 8).
Im letzten Schritt wird der Greifer montiert.
The final step is to mount the gripper (Figure 08).

Calibrating the motors

Before installing and using the servo motors, they must be calibrated in position. This ensures that the entire working range of the robot arm is utilised and that the correct starting position for the Grab-it is obtained. For optimal adjustment, set the motors to a value of 1500. Only the claw motor is programmed to a value of 1600. To calibrate, connect the respective motor to the control unit (e.g. MotoPi with Raspberry Pi or Motorino with Arduino).

  • The Raspberry Pi with the MotoPi board attached should then be connected to its power supply (or, alternatively, the Arduino with Motorino).
  • Then, connect the external 5V power supply for the servo motors to the MotoPi.
  • The ‘calibration script’ is started as described below. (Note: indentations in Python.)
  • Now the following steps must now be carried out for each servo motor to be installed:
    • Connect the servo motor to its respective position on the MotoPi (see Figure 09).
All the servo motors are connected to the correct GPIOs on the Moto Pi.
All the servo motors are connected to the correct GPIOs on the Moto Pi (Figure 09).

The modified library is copied to the Raspberry Pi, after which the following commands are executed:

In the terminal, navigate to the folder and install the library with the following command:

Create the new file with the following command:

Write the following code into the file:

Save the file with Ctrl+O and exit the editor with Ctrl+X. Start the calibration with the following command:

Das Ausführen der Kalibrierdatei ist ein wichtiger Schritt beim Aufbau des Roboterarms.
Running the calibration file is an important step in setting up the robot arm (Figure 10).

Initial movements with the Raspberry Pi and Moto Pi

Installing the Raspberry Pi OS

  • Installing the Raspberry Pi OS
    • Installing the desired OS (e.g. OS Lite 64 bit)
Installation des entsprechenden Raspberry Pi OS, z.B. OS Lite 64-Bit
Installing the appropriate Raspberry Pi OS, e.g. OS Lite 64-bit (Figure 11).
  • Copy the Wi-Fi name and password to the SD card. Copy the route file to the SD card. Insert the SD card into the Pi.
    • Start the Pi and run the OS (it starts automatically).
  • Copy the library to the Raspberry Pi.
  • Create a file.
  • Enter the calibration code (as described above).

Pulse width modulation (PWM)

PWM is a method of changing the width of an electrical pulse in order to digitally control analogue values, such as position, speed, or brightness. An Arduino can only output 0 V (LOW) or 5 V (HIGH), not actual intermediate values. With PWM, intermediate values are simulated by switching very quickly between HIGH and LOW.

Servo motors, such as those used in the Grab-it device, do not understand analogue signals; rather, they understand special PWM signals at 50 Hz (i.e. every 20 ms). This means that a control pulse is sent every 20 ms, the length of which indicates the position. The servo measures how long the pulse is high, not how often. There are several ways to generate a PWM signal. The RPi.GPIO and pigpio variants are suitable for Grab-it.

Option 1:

Option 2:

Code example: simple movements, gripping, turning

Once the motors have been calibrated to the correct position, the robot arm assembled and all components connected, the arm can be moved for the first time. To do this, simply run the relevant code on the Raspberry Pi. The library should have been copied during calibration. The code for the initial movements can be downloaded here (Figure 12).

Ein erstes Code-Beispiel lässt den Arm drehen, greifen und bewegen.
A first code example allows the arm to rotate, grasp and move (Figure 12).

Alternative control with Arduino

Connection & cabling with the Motorino

The JOY-IT Motorino Shield is a plug-in board (‘shield’) for the Arduino Uno. It serves as an alternative to the Raspberry Pi and Moto Pi combination and includes:

  • 6 servo connections for your robot arm
  • an additional power supply for servos (up to 12 A)
  • Button, LED and sensor connections

Procedure:

  • Plug in the shield
  • Connect the servos
  • Connect the power supply
  • Connect the Arduino to the PC
  • Optional: Connect the LED and button connections

Sample code using the Servo.h library:

Simple control via potentiometers or buttons

Potentiometers or buttons are a great way to control the robot arm easily and precisely:

Buttons

Each button triggers a single action:

  • Move servo left/right
  • Open/close gripper
  • Save/recall position
  • Start automatic routine

Potentiometers

A potentiometer provides an analogue value that is converted proportionally into a servo angle:

  • Potentiometer left → small servo angle
  • Potentiometer right → large servo angle

Potentiometers enable fine manual control of each axis.

To control with buttons, you need two to six buttons depending on the desired axis control, as well as pull-down resistors, cables and a breadboard to connect the buttons.

You can use simple rotary potentiometers for the potentiometers, for example one per servo axis. Since the Raspberry Pi cannot process analogue inputs, you must also use an ADC converter to convert the input signals.

An example of the code for simple button control is shown below:

Differences from the Pi variant

  • The Arduino works directly with PWM hardware, generating the servo control signals itself and reacting in real time — ideal for precise movements.
  • In contrast, the Raspberry Pi is a fully-fledged computer that generates PWM signals via software or an external module, such as the PCA9685.
  • The Arduino runs ‘stand-alone’ without an operating system, and the code starts immediately upon switching on.
  • The Raspberry Pi allows more complex programmes to be run via Python, AI and camera control, but precise timing support is required.
  • The Motorino Shield fits directly onto the Arduino, whereas the Pi is usually connected to the servos via I²C (PCA9685).

From construction to control: the next step

The Grab-it robot arm is ideal for implementing initial projects with the Raspberry Pi or Arduino. Controlling and operating the servo motors is a particularly exciting aspect of this project, which receives special attention. In the first part, we got the Grab-it to perform its first movements. The second part of this article presents exciting project ideas and shows how to program a web interface for controlling the robot arm via a PC or smartphone.

Images: reichelt elektronik, JOY-IT, Adobe Stock


To the second part of the article:
Examples & Extensions: Enter the world of robotics with Grab-it – Part 2

Leave a Reply

Your email address will not be published. Required fields are marked *