Table of Contents

DIY Computer-Controlled Robotic Arm: 5 DoF Robotic Arm for Kids Using PictoBlox

Keyboard-Controlled-Robotic-Arm
Project Description

Introduction

Get yourself an extra hand to help you out with moving stuff (at least on your table) with the DIY computer-controlled robotic arm. This 5 DoF robotic arm project is perfect for kids to take a sneak peek into the world of industrial robots and see how they work. You can easily build the pick and place robotic arm with the components available in the 5 DoF robotic arm kit and program it in PictoBlox – our Scratch blocks-based graphical programming software. Download PictoBlox from HERE.

Ready for some robotic arm action?

Let’s begin!

Making the Base of the Smartphone-Controlled Robotic Arm

Let’s start with the assembly.

  1. Mount the servo horn on the Inner Bearing Disc using self-threading M2 screws found in metal servo accessories. Use the four holes which are closer to the center.Making the Base of the Robot Arm Making the Base of the Robot Arm
  2. Make an 80mm custom standoff using two 30mm male to female standoffs and one 20mm female to the female standoff. Similarly, make 3 more.Making the Base of the Robot Arm
  3. Fasten these standoffs to the Inner Bearing Disc using M3 bolts of 8mm length. Make sure that you attach the standoffs on the side opposite to that of the servo horn.Making the Base of the Robot Arm
  4. Attach the Metal Servo to the Base Servo Motor Plate using M4 bolts of 16mm length and M4 nuts. Make sure that the servo shaft is at the center of the plate.Making the Base of the Robot Arm
  5. Now, we need to set the servo angle to 90 degrees. For that, first, connect the Metal Servo to evive’s servo channel S1.Connecting servo
  6. Then, connect the Adapter and switch ON evive. Set VVR to 6V by rotating the VVR knob.
    To set the angle, open evive’s menu and select Controls, then Servos, then Servo 1. Rotate the potentiometer1 of evive and set the servo angle to 90°.Control Menu Servo Selected Servo Select MenuSetting Servo to 90 degrees
  7. Next, sandwich the Bottom Outer Bearing Disc, Bearing, two Middle Outer Bearing Disc, Top Outer Bearing Disc. and the Base Servo Motor Plate together.Making the Base of the Robot Arm
  8. Align the holes of the outer rings and hold them in place using four M4 bolts of 25mm length and M4 nut.Making the Base of the Robot Arm Making the Base of the Robot Arm
  9. Finally, lock the servo horn to the servo shaft using the servo screw. Make sure that the standoffs are aligned to outer bearing bolts.Making the Base of the Robot Arm
  10. Now, mount the other end of the standoffs to the Robotic Arm Base using M3 bolts of 8mm length. Make sure that the Base is mounted in such a way that the servo is closer to the rear end of the base.Making the Base of the Robot Arm Making the Base of the Robot Arm

With this the base of the Robotic Arm is ready, our entire robotic arm assembly will be made on it.

Making the Left Side of the Robotic Arm

Now, that the base is ready, let’s make the left side of our Smartphone-Controlled Robot

  1. Mount another metal servo to the Side Servo Mounting Plate using M4 bolts of 16mm length and M4 nuts. Make sure that the servo shaft is nearer to the end. Making the Left Side of the Robot Arm Making the Left Side of the Robot Arm
  2. Set the servo angle to 45° as done before using the evive’s firmware.
  3. Next, attach the servo horn to the Left Lower Arm using self-threading screws. Making the Left Side of the Robot Arm Making the Left Side of the Robot Arm
  4. Align and place the servo horn on the metal servo shaft and fix it using the servo screw.Making the Left Side of the Robot Arm Making the Left Side of the Robot Arm
  5. Make two custom standoffs of 60mm length by attaching male-to-female standoffs and female-to-female standoffs of 30mm length each and mount them on the left side Servo Mounting Plate using M3 Bolts of 8mm. The standoffs will be on the same side as the Left Lower Arm.Making the Left Side of the Robot Arm
  6. Now, mount the left Side Servo Mounting Plate to the left side of the Base Servo Motor Plate using M3 bolts of length 12mm and M3 NutMaking the Left Side of the Robot Arm
  7. Next, take the Left Middle Arm and attach it to the left Side Servo Mounting Plate using M4 bolt of 16mm length and M4 nut.  Keep it loose enough for the arm to rotate freely.Making the Left Side of the Robot Arm
  8. Next, take the Triangular Junction Plate and mount the other end of the Left Middle Arm to it using M4 bolt of 16mm length and M4 Nut. Keep it loose enough for the arm to rotate freely.Making the Left Side of the Robot Arm
  9. Now, take another Left Lower Arm and mount it to the first Left Lower Arm using M4 bolts of 25mm length and M4 nuts. Add two Spacers in-between the arms to maintain a 10mm distance.Making the Left Side of the Robot Arm
  10. Next, insert the 3D Printed Spacer in-between the Left Lower Arms.Making the Left Side of the Robot Arm

With this, the left side of the robot arm is completed. 

Making the Upper Arm Assembly

Take the two Right Upper Arms.

Next, bring together the Triangular Junction Plate’s center hole, Left Lower Arm’s top hole, Spacer, first Right Upper Arm’s second hole, Left Lower Arm’s top hole, second Right Upper Arm’s second hole and fasten them together using M4 bolt of 40mm length and M4 nut.  Keep it loose enough for the arms to rotate freely.Making the Upper Arm Assembly

Completing the Right Side of the Robotic Arm

Now, let’s complete the other half of the Robotic Arm i.e. the Right Side.

  1. Now, take the right side Servo Mounting Plate and attach another Metal Servo on it using M4 bolts of 16mm length and M4 nuts. Making the Right Side of the Robot Arm
  2. Set the servo angle to 90° using evive’s firmware. Make sure that the servo shaft is closer to the rear end.
  3. Next, take the Right Lower Arm and attach the metal servo horn to it using servo screws. Making the Right Side of the Robot Arm Making the Right Side of the Robot Arm
  4. Then, attach the servo horn to the servo shaft using the servo screw.Making the Right Side of the Robot Arm
  5. Next, fasten the right side Servo Mounting Plate to the Base Servo Motor Plate using M3 bolts of 12mm length and M3 nuts.Making the Right Side of the Robot Arm
  6. Then, attach the Side Servo Mounting Plate to the 60mm length Standoff using M3 bolts of 8mm length.
  7. Next, fix the two Right Upper Arms together with the Spacers sandwiched in between using M4 bolts of 25mm length and M4 nut.Making the Right Side of the Robot Arm
  8. Now, take the Right Middle Arm and fasten it to the Right Lower Arm using M4 bolt of 16mm length and M4 nut on one side.
  9. Then, attach the other end of the Right Middle Arm to the Right Upper Arm using M4 bolt of 40mm length and M4 nut. Add three spacers in-between to maintain a proper distance. Keep it loose enough for the arms to rotate freely.Making the Right Side of the Robot Arm
  10. Attach the Left Upper Arm to the third hole to the Triangular Junction Plate using M4 bolt of 16mm length and M4 nut.  Keep it loose enough for the arms to rotate freely.Making the Right Side of the Robot Arm

Yay! With this, the assembly of the robotic arm is almost ready. All we need to add is the pick and place mechanism. So that the robot arm can pick any object and place it where we guide it to. 

Making the Gripper Assembly

Our Computer Controlled Robotic Arm is also capable to lift and drop things. Thus, it’s time to turn our normal robotic arm into the Pick and Place Robotic Arm by adding the gripper assembly to it.

  1. Take the End-Effector Rotational Micro Servo Plate and attach a micro servo to it using M2 bolts of 12mm length and M2 nuts.Making Gripper Assembly
  2. Set the servo angle to 90° using evive’s firmware as done before.
  3. Mount a Rotational Servo Plate to the Left Upper Arm using an M4 bolt of 16mm length and M4 nut. Keep it loose enough for the arms to rotate freely. Making Gripper Assembly
  4. Fix the End-Effector Rotational Micro Servo Plate inside the rectangular slot of the Rotational Servo Plate. Make sure that the servo head faces downward.Making Gripper Assembly
  5. Take another Rotational Servo Plate and attach it to the other side of the End-Effector Rotational Micro Servo Plate using M4 bolts of 30mm length and M4 nuts. insert a spacer between the two Right Upper Arms. Keep it loose enough for the arm to rotate freely. Making Gripper Assembly
  6. Next, insert the micro servo in the slot on the Gripper Part 1 and fasten it using M2 bolts of 12mm length and M2 nuts.Making Gripper Assembly
  7. Set the servo angle to 30° using evive’s firmware.
  8. Attach two M3 Standoff of 15mm length to the Gripper Part 1 using M3 bolts of 8mm length.Making Gripper Assembly
  9. Take Gripper Claw 1 and Gripper Claw 2 and attach them to the Gripper Plate 1 using M4 bolts of 16mm length and M4 nuts. Make sure that the Gripper Claw 1 is near the servo shaft and the gears of the claw perfectly fit together and are symmetric. Keep the bolts loose.Making the Gripper Claw assembly
  10. Now, take the Gripper Link and attach a micro servo single-sided horn to it using self-threading screws. Keep it loose enough so that they can rotate freely.Making the Gripper Claw assembly
  11. Take the Gripper Claw 1 and attach the other end of the Gripper Link to it using an M3 bolt of 12mm length and M3 nut. Keep it loose enough for the claw to rotate freely.
  12. Open the gripper claw by moving the Gripper Claw 1 and Gripper Claw 2 apart and then fix the micro servo horn to the micro servo’s shaft. Making the Gripper Claw assembly
  13. Finally, mount the servo screw on the micro servo horn to secure it.Making the Gripper Claw assembly
  14. Now, take a Gripper Plate and attach a dual-sided micro servo horn to it using self-threading screwsMaking the Gripper Claw assembly
  15. Fix the servo horn to the rotational servo’s shaft using a servo screw. Make sure the Gripper Plate is perpendicular to the micro servo.Making the Gripper Claw assembly
  16. Finally, take the gripper assembly and fix it on the Gripper Plate. On the other side of the Gripper Plate attach the Gripper Part 2 such that the standoffs align to the holes and fix it using M3 nuts.Making the Gripper Claw assembly

In case any of the M4 nuts come out or become loose during the assembly, use M4 Lock Nuts in their place at the joints.

With this the assembly of the Robotic Arm is complete.Computer-Controlled Robtotic Arm

Making the Connections

Now let’s move on to the circuitry. We are going to use evive as the brain to control our robotic arm.

Before connecting the servos to the evive, extend the wires of all the servos.

  1. Next, make the connection of metal servo as below:
  2. Connect the VCC and GND of the Base, Link 1, and Link 2 servo to the breadboard as we are going to make the VCC and GND of them common.
  3. Connect Signal Pin as:
    1. Base Servo – Digital Pin 2 of evive.
    2. Link 1 – Digital Pin 3 of evive.
    3. Link 2 – Digital Pin 4 of evive.
  4. Now, let’s connect the remaining two micro servos.
  5. Connect VCC and GND of both the micro servo to the +5V pin and GND pin of evive.
  6. Connect Signal Pin as:
    1. Rotational Servo – Digital Pin 5 of evive.
    2. Gripper Servo – Digital Pin 6 of evive.

Now, connect the positive terminal of the VVR pin to the VCC column and the negative terminal to the GND column.

The complete circuit will look like this. Computer Controlled Robotic Arm_Fritzing Diagram

Now, it’s time to power up the evive. Connect the 12V adapter to evive and switch it ON by sliding the power switch to EXT. Set the VVR to 6V by rotating the VVR knob. As higher voltage may damage your servo.

With this, the connections are complete.

Calibrating the Robotic Arm

Time to calibrate our robot arm. We are going to use PictoBlox for the same. 

  1. Open PictoBlox. Connect evive to the computer using the USB cable.
  2. Click on the board and select evive and then select the appropriate port.Select Uno boardPort Connection
  3. Now, click on the Add Extension button and add the Robotic Arm extension from the list.Select Robotic Arm Extension
  4. As we need to calibrate the robotic arm in real-time i.e. the Stage Mode, we first need to upload the stage mode firmware to it. Create a script with when evive starts up as the hat block and snap the upload stage mode firmware block below it.upload stage formware_robotic arm
  5. Switch to Upload mode by toggling the mode button.
  6. Then, click on the Upload Code button.
  7. Once uploaded successfully, switch back to the Stage Mode.

Now, let’s create the script for calibration. 

  1. Drag and drop the when flag clicked hat block.
  2. Next, drag and drop the Connect servos – base () link 1 () link 2 () rotational () gripper () block. It will define the PWM pins to which each of the servos are connected.Connect Servos block
  3. Then, drag and drop the Set offset along length () & Z () block. It will add the offset on the end effector position along the specified length direction and the Z direction.set offset block
  4. Next, drag and drop the Calibrate angles – base () link 1 () link 2 () rotational () gripper () block for calibrating the angles of the servo motor and save them in evive’s memory.calibrate angles block
  5. Finally, drag and drop the Go to X () Y () Z () in () ms block. It will move the robotic arm end-effector to the specified X, Y and Z position in the specified time.go to block
  6. Click on the green flag to run the script.

Calibrating the Base Servo:

If the robotic arm is not straight, then change the base offset angle and run the script. Use the trial and error method to calibrate the servos.Calibarting Base ServoCalibarting Base Servo

Calibrating the Rotational Servo:

If the rotational servo is not in the center, try changing the rotational angle in the calibrate angles block.

Calibrating the Link 1 and Link 2 Servos:

Now, let’s calibrate the Link 1 Servo and Link 2 Servo.

Using a scale, measure the distance of the end effector from the head of Rotational Servo to the base center in the Y and Z direction. If it is 200mm in both directions, then it’s ok; otherwise, change the link 1 and link 2 angles in the calibrate angles block, so that the distance is 200mm along both the axes.

Calibrating the Link 1 and 2Servo:

evive Alert
If you need to change any angle by more than 25 degrees, then disassemble the Robotic Arm and carefully reassemble it.

Run the script every time you calibrate a part.

Finding Gripper Opening and Closing Value:

Now, let’s get the opening and closing value of gripper. 

  1. For that, let’s write a small script.
  2. Drag and drop a when flag clicked hat block into the scripting area.
  3. To run the code continuously, use the forever block.
  4. First, using the set () servo angle to () in () ms, set the angle of the gripper servo to the value obtained by rotating potentiometer 1.
  5. Next, make a variable named Gripper Angle to save the current angle of the servo.
  6. Finally, set the value of the Gripper Angle variable to the gripper servo angle using get current () servo angle block.gripper open and close angle
  7. Now, run the script.

Note the value of Gripper Open Angle and Gripper Close Angle using potentiometer 1.

With this, the calibration of the robotic arm is complete.

Making it Computer-Controlled Robotic Arm

Now, we are going to make a manually controlled pick and place robot using the keys of your computer. Write the code for the same.

Create the script to initialize the robotic arm when the flag is clicked.Computer Controlled Robotic aRm Code

Following are the controls for the robotic arm:Computer Controlled Robotic aRm Code Computer Controlled Robotic aRm Code

Conclusion

With this, your DIY computer-controlled robotic arm is ready!

Project Downloads - Code and Files

Circuit Diagram

Circuit Diagram DescriptionCircuit Diagram Fritzing Diagram

Make the connection as shown:

Explore Related Projects by STEMpedia

This project will show you how to make an expressive and energetic humanoid bipedal robot.

Explore Community Projects