Introduction

Robot arms are pretty familiar sights in the 21st century. For decades these mechanical appendages have been put to use on assembly lines manufacturing everything from automobiles to electronic circuit boards.

Robot arms are also very popular robotics experimenters projects, in fact we discussed another robot arm when I built the MeArm a while back.

Today we will be constructing another robot arm, one with more power and capabilities than the MeArm. The arm we will be working on today is the DF Robot 5 DOF Robotic Arm kit.

Once we get the arm built we will also put together a simple Arduino controller so that we can control the movement of the arm and its gripper.

Let’s begin by looking at what it is we will be building.

DFRobot 5 DOF Robotic Arm Kit

The DFRobot 5 DOF Robotic Arm Kit consists of all of the servo motors, brackets, fasteners and other hardware that you will need to construct a small but powerful robotic arm complete with a gripper mechanism.

Robot arm with controller

The brackets and supports for the arm are constructed from black anodized aluminum which makes for a strong support.

The arm is powered by 5 servo motors, all standard sized:

  • Two 15Kg/cm servos for the base and elbow
  • One 5.5 Kg/cm servo for the wrist
  • Two 4 Kg/cm servos for the gripper mechanism

The servos, brackets and hardware come packages in individual plastic bags with identifying labels.  The gripper mechanism comes assembled except for the servo motors.

Robot arm parts

A complete parts list for the DFRobot 5 DOF Robotic Arm Kit is shown here:

 

QTY PART NUMBER DESCRIPTION
2 SER0001 Hitec HS311 Standard Servo  3.5Kg 180°
2 SER0019 DSS-M15 DF Metal Geared Standard Servo 15Kg 180°
1 SER0020 DF05BB Standard Servo 5Kg
1 FIT0014 LG-NS Robot Gripper
4 FIT0038 Aluminum Multi-purpose Servo Bracket
3 FIT0040 Long U-Bracket
3 FIT0041 Persons Bearing Kit
1 FIT0042 L-Bracket
1 Wire Covering 1 Metre
15 Small Self Tapping Screws
23 M3 Screws and Nuts

The only tools required to assemble the arm are a phillips screwdriver (a #1 works well) and a set of pliers.

5 Degrees of Freedom

As with most robot arms the DFRobot kit is advertised as a “5 DOF” or 5 degrees of freedom robot arm. What exactly does the term “degrees of freedom” mean?

Turns out it can mean different things depending upon what field you are in.

If you are an aeronautical engineer then to you degrees of freedom will be likely be represented by the classic three dimensions and directions an object can move in:

  • Forwards & Backwards
  • Up & Down
  • Left & Right
  • Roll
  • Pitch
  • Yaw

Degrees of freedom

In robotics however “degrees of freedom” or DOF is usually considered to represent the number of movable joints that a mechanism has. For a robot arm this usually means the number of motors that the arm has.

Our robot arm has 5 motors and thus is advertised as a “5 DOF” robot arm.

Robot Arm Sections

The servo motors each power a different section of the arm and going forward will be referred to by the name of the section that they power.

I have named the arm sections to loosely correspond with the equivalent sections on a human arm, which is a point of reference that most of us should be familiar with. In some cases (around the gripper) there is no corresponding section on a human arm so I names those sections as descriptively as I could.

5 DOF robot arm sections

The sections are as follows:

  • Base – The base of the robot arm, corresponds to a human shoulder. The base is fixed in place, at least for now.
  • Elbow – The first section on the arm. Like a human elbow it allows the harm to bend.
  • Wrist – The second section on the arm. It permits better positioning of the gripper assembly.
  • Grip Pivot – Thss allows the gripper to be rotates 90 degrees in either direction. The human hand and arm don’t have such a joint, rotating a hand is done with several different muscles in the arm instead.
  • Jaws – The gripper mechanism itself, operating much like a bench vice or pliers.

In operation the base of the arm will need to be fastened down securely to a solid surface. The arm is capable of a lot of torque and momentum so it needs to be safely secured.

Robot Arm Assembly

The DFRobot 5 DOF robot arm kit is typical of many 5 DOF robot arms so you may have a kit similar to it. You can also piece together this arm or a custom version of it using the parts DFRobot has on their website.

Assembly of the robot arm will be done in the following sequence:

  1. Assemble Gripper
  2. Assemble Base Motor mount
  3. Assemble Double U-Bracket
  4. Assemble Elbow Motor Mount with Brackets
  5. Assemble Wrist Motor Mount with Gripper mount
  6. Install Base Motor
  7. Join Base to Double U-Bracket
  8. Install Elbow Motor
  9. Join Double U-Bracket to Elbow Mount with Brackets
  10. Install Wrist Motor
  11. Join Elbow Mount with Brackets to Wrist Motor Mount
  12. Install Gripper
  13. Wire & test!

Here are the details of each of the steps:

Assemble Gripper

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
1 LG-NS Robot Gripper Assembly FIT0014
2 Hitec HS-311 Servo Motor SER0001
2 Horn mounting screws from servo attachments

Gripper assembly

Assembly Instructions

  • Set both servos to 0 degree position (full ccw)
  • Take gripper and position 90 degrees to one of the motors
  • Insert shaft of servo into back of gripper assembly, mesh with gear.
  • Test to see if alignment is correct
  • Insert and tighten horn mounting screw to secure gripper back to motor shaft
  • Manually manipulate gripper jaws until they are at the full open position. Take care not to go beyond that.
  • Insert servo motor in position under jaw, mesh with gear.
  • Test to see if alignment is correct
  • Insert and tighten horn mounting screw to secure gripper jaw mechanism to motor shaft.
  • Test both servo motors to verify proper operation of the gripper.

Assemble Base Motor mount

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
1 Multi-Purpose Servo Bracket FIT0038
1 Persons Bearing Kit FIT0041

Base motor mount

Assembly Instructions

  • Place servo mounting bracket so that servo would be mounted forward and flat plate with two holes is at back.
  • Insert screw from Persons Bearing Kit into hole on back left side of servo bracket with screw head on side facing servo motor.
  • Insert bearing from Persons Bearing Kit over screw on outer side of servo bracket. Ensure that the beveled part of the bearing is flush with the servo bracket.
  • Insert lockwasher on top of bearing.
  • Thread cap nut onto screw.
  • Tighten screw and cap nut securely.
  • Verify that bearing can still spin freely after screw is tightened.

Assemble Double U-Bracket

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
2 Long U-Bracket FIT0040
4 Screws and Nuts from bag

Double u-bracket

Assembly Instructions

  • Align the two U-Brackets with the short sections pressed against each other and the mounting holes aligned. If you have pre-drilled mounting holes like I have you’ll want to ensure that they are lined up the same way, otherwise the orientation is irrelevant.
  • Use 4 of the screws and nuts from the bag to fasten the brackets together.  Make sure to fasten them securely.

Assemble Elbow Motor Mount with Brackets

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
1 Multi-Purpose Servo Bracket FIT0038
1 Persons Bearing Kit FIT0041
1 Long U-Bracket FIT0040
1 L-Bracket FIT0042
4 Screws and Nuts from bag

Elbow motor mount

Assembly Instructions

  • Place servo mounting bracket so that servo would be mounted forward and flat plate with two holes is at back.
  • Insert screw from Persons Bearing Kit into hole on back left side of servo bracket with screw head on side facing servo motor.
  • Insert bearing from Persons Bearing Kit over screw on outer side of servo bracket. Ensure that the beveled part of the bearing is flush with the servo bracket.
  • Insert lockwasher on top of bearing.
  • Thread cap nut onto screw.
  • Tighten screw and cap nut securely.
  • Verify that bearing can still spin freely after screw is tightened.
  • Align the mounting holes on the short side of the L-Bracket to the mounting holes on the short flat bottom of the U-Bracket. The L-Bracket should be at a right angle to the U-Bracket, see the illustration for details.
  • Fasten the L-Bracket to the U-Bracket using the screws provided with the L-Bracket. The screw heads should be on the L-Bracket side.
  • Align the mounting holes on the long side of the L-Bracket with the mounting holes on the bottom right side of the servo mounting bracket.
  • Fasten the L-Bracket to the servo mounting bracket using 4 of the screws and nuts from the bag. The screw heads should be on the L-Bracket side.

Assemble Wrist Motor Mount with Gripper mount

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
2 Multi-Purpose Servo Bracket FIT0038
1 Persons Bearing Kit FIT0041
4 Screws and Nuts from bag

Wrist motor mount

Assembly Instructions

  • Place one servo mounting bracket so that servo would be mounted forward and flat plate with two holes is at back.
  • Insert screw from Persons Bearing Kit into hole on back right side of servo bracket with screw head on side facing servo motor (note that this is the opposite side as used in the previous motor mount assembly instructions).
  • Insert bearing from Persons Bearing Kit over screw on outer side of servo bracket. Ensure that the beveled part of the bearing is flush with the servo bracket.
  • Insert lockwasher on top of bearing.
  • Thread cap nut onto screw.
  • Tighten screw and cap nut securely.
  • Verify that bearing can still spin freely after screw is tightened.
  • Align the second servo mounting bracket underneath the first one at a right angle so that the second servo would have its shaft on the right side of the assembly. Align the mounting holes, see the illustration for more details.
  • Fasten the two servo mounting brackets with 4 of the screws and nuts from the bag. The screw heads should face the bottom servo mount. Tighten securely.

Install Base Motor

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
1 DF metal Geared 15kg Standard Servo SER0019
1 Metal horn from 15kg Standard Servo accessories
4 Screws and Nuts from Multi-Purpose Servo Bracket

Base motor with mounting screws and horn

Assembly Instructions

  • Rotate motor to 0 degree position (full ccw).
  • Mount motor with shaft aligned with bearing at back, use 4 screws and nuts supplied with the servo bracket to fasten the motor securely.
  • Place horn on motor shaft, leave in place for the moment.

Join Base to Double U-Bracket

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
4 Screws from bag
1 Set screw from 15kg Standard Servo accessories

Base to double u-bracket horn screws and setscrew

Assembly Instructions

  • Take one end of U-Bracket assembly and slip the large hole over the bearing on the base motor mounting bracket.
  • The other side of the U-Bracket needs to go on top of the servo motor horn, with the holes lined up with the 4 threaded holes on the horn. The U-Bracket should be aligned so that it is flat(at the same angle) with the base, i.e extended all the way down. See the illustrations for details.
  • Once the U-Bracket is positioned correctly over the servo motor horn fasten it using 4 of the screws from the bag.  The servo motor does not come with screws for the horn in its accessory bag.
  • Test the motor sweeping it 180 degrees and observe the arm (U-Bracket Assembly) for correct movement. Be careful as the motor has a lot of torque and the movement when the power is first applied could injure you.
  • If the arm is aligned with the horn correctly then use the set screw supplied with the servo motor to fasten the horn to the servo motor shaft.

Install Elbow Motor

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
1 DF metal Geared 15kg Standard Servo SER0019
1 Metal horn from 15kg Standard Servo accessories
4 Screws and Nuts from Multi-Purpose Servo Bracket

Base motor with mounting screws and horn

 

 

Assembly Instructions

  • Rotate motor to 0 degree position (full ccw).
  • Mount motor with shaft aligned with bearing at back, use 4 screws and nuts supplied with the servo bracket to fasten the motor securely.
  • Place horn on motor shaft, leave in place for the moment.

Join Double U-Bracket to Elbow Mount with Brackets

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
4 Screws from bag
1 Set screw from 15kg Standard Servo accessories

Base to double u-bracket horn screws and setscrew

Assembly Instructions

  • Take the remaining open end of U-Bracket assembly and slip the large hole over the bearing on the elbow motor mounting bracket.
  • The other side of the U-Bracket needs to go on top of the servo motor horn, with the holes lined up with the 4 threaded holes on the horn. The U-Bracket should be aligned so that the elbow mount with brackets is facing down towards the U-Bracket but not touching it. See the illustrations for details.  You may need to take some “trial and error” to get this correct.
  • Once the U-Bracket is positioned correctly over the servo motor horn fasten it using 4 of the screws from the bag. You may need to move the horn to align the mounting holes on the U-Bracket with the threaded holes on the servo horn.
  • Test the motor sweeping it 180 degrees and observe the upper arm (Elbow Mount with Bracket Assembly) for correct movement. Be careful as the motor has a lot of torque and the movement when the power is first applied could injure you. Be sure that the motor does not collide with the U-Bracket assembly at one end of travel.
  • If the arm is aligned with the horn correctly then use the set screw supplied with the servo motor to fasten the horn to the servo motor shaft.

Install Wrist Motor

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
1 DF05BB Standard Servo 5Kg SER0020
1 Servo Horn from DF05BB Standard Servo accessory bag
4 Screws and Nuts from Multi-Purpose Servo Bracket

Elbow motor

Assembly Instructions

  • Rotate motor to 0 degree position (full ccw).
  • Mount motor onto the upper servo mounting bracket (the one with the bearing). Align the servo shaft with the bearing at back, use 4 screws and nuts supplied with the servo bracket to fasten the motor securely.
  • Place horn on motor shaft, leave in place for the moment.

 

Join Elbow Mount with Brackets to Wrist Motor Mount

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
1 Set screw from DF05BB Standard Servo accessory bag
4 Screws from self-tapping screw bag

Double u-bracket to elbow

Assembly Instructions

  • Take the open end of U-Bracket or the Elbow Mount with Bracket assembly and slip the large hole over the bearing on the wrist motor mounting bracket.
  • The other side of the U-Bracket needs to go on top of the servo motor horn, with the holes lined up with the the holes on the horn. The wrist motor mount should be aligned so that it is facing down towards the Elbow Mount with Bracket assembly but not touching it. See the illustrations for details.  You may need to take some “trial and error” to get this correct.
  • Once the U-Bracket is positioned correctly over the servo motor horn fasten it using 4 of the small self-tapping screws from the bag. You may need to move the horn to align the mounting holes on the U-Bracket with the holes on the servo horn.
  • Test the motor sweeping it 180 degrees and observe the wrist motor mount for correct movement. Be careful as the motor has a lot of torque and the movement when the power is first applied could injure you. Be sure that the motor does not collide with the Elbow Mount with Bracket assembly at one end of travel.
  • If the arm is aligned with the horn correctly then use the set screw supplied with the servo motor to fasten the horn to the servo motor shaft.

Install Gripper

Parts Required

 

QTY PART DESCRIPTION PART NUMBER
4 Screws and Nuts from Multi-Purpose Servo Bracket

Motor mount screws

Assembly Instructions

  • Mount the Gripper wrist servo motor onto the Wrist Motor Mount, aligned so that the motor shaft is on the left side of the motor mount. This will place the motor shaft in the approximate center of the arm assembly.
  • Use 4 screws and nuts supplied with the servo bracket to fasten the motor securely.

You’ve now completed the mechanical assembly of the arm.

It would be a good idea to reset and exercise all of the servo motors to be sure everything is working properly and aligned correctly. If necessary adjust the position of the junctions by removing the 4 screws securing the servo horn to the frame and reposition as required.

Robot arm

Now let’s put together a simple controller and put the arm through its paces!

Arduino Controller

I mounted a PCA9685 16-channel PWM controller directly onto my robot arm so that I could control all of the motors using the I2C bus.

If you need information on the PCA9685 or on servo motors in general I recently published an article and video all about servo motors, check them out to bring yourself up to speed with servos.

While I have great plans for the robot arm right now I just need a simple controller that can adjust the position of all five servo motors.  So I have built one designed around an Arduino Nano.

Arduino Nano

I usually base my Arduino projects around the Arduino Uno, its a popular and inexpensive microcontroller board that has lots of inputs and outputs. But sometimes it won’t fit the bill.

This is one of those cases.

I wanted to build a controller that had 5 potentiometer, one to control each motor. It would then send information over the I2C bus to the PCA9685 to control the servos.  I’d also like it to be easy to upgrade to using 6 potentiometers for a 6 DOF arm (which is essentially my 5 DOF arm with a turntable at the base).

An Arduino Uno has 6 analog inputs so at a glance it seems perfect for the job. But there is a catch. Two of the analog inputs can’t be used in this design.

Analog inputs A4 and A5 on the Arduino Uno do double duty as the SDA (Data) and SCL (Clock) lines on the I2C bus. Even if your Uno has separate SDA and SCL pins they are just internally connected to A4 and A5.

So if you use I2C (which I’m doing) then you can’t use analog pins A4 and A5, they are spoken for.

It turns out that the Arduino Nano has eight analog inputs, two more than the Uno. So even though the Nano uses the same “double duty I2C” arrangement for pins A4 and A5 it still has enough analog inputs leftover to do the job.

Even if I eventually add a sixth potentiometer!

The Nano is just as easy to work with in most respects as the hUno, especially if you mount it onto a solderless breadboard or use an adapter socket. Remember to change the board type in your Arduino IDE to “Arduino Nano” or you’ll get an error when compiling your code.

Wiring up the Controller

The wiring for our simple robot arm controller is pretty simple, especially as we are using the PCA9685 to do the servo connections.

To cut down on any confusion I’m showing the wiring on two diagrams. This matches up with my arrangement of mounting the PCA9685 directly on the arm. You can if you wish mount the PCA9685 on the same board or breadboard that you are using for the Arduino Nano, it’s up to you.

I like the PCA9685 directly on the arm as I think it cuts down on the wiring and avoids having to extend any of the servo motor cables.  And I also intend to mount other I2C devices on my arm so it just makes sense to have one I2C connection for all of them.

Controller Hookup - Arduino Nano

The “Arduino section” of our wiring diagram has the Nano and the 5 potentiometers. The controls are wired with one side to ground and the other side to 5 volts, obtained from the Arduino Nano.

The wipers of each potentiometer are connected to the analog inputs on the Arduino Nano as follows:

  • Base – A0
  • Elbow – A1
  • Wrist – A2
  • Grip Pivot – A3
  • Grip Jaws – A6

Note that A4 and A5 are used for the I2C connections, which run to the other diagram.

Keep in mind that you’ll need a USB cable with a mini USB (not micro USB) connector to connect the Arduino Nano to your computer. Mini USB connectors are not that common these days.

Now let’s move over to the PCA9685 side of the hookup.

Controller Hookup - PCA9685

The I2C connections are made to one of the connectors on the end of the PCA9685, either connector will work.

You’ll then need to connect your 5 (or 6) servo motors to the module. Make sure you get the connectors in the right way round.

Finally you will need a power supply that has enough current to drive the five servo motors. A 6-volt 2 amp supply would be ideal. The power supply is connected directly to the connector on the PCA9685 module.

Once you have it all wired up it’s time for some code!

Arduino Code

The code for the simple robot arm controller is presented here. Remember, you’ll find a link in the Resources section to a ZIP file that has this code already written for you.

The sketch make use of the Adafruit PWM Library which you will need to install into your Arduino IDE. Just search the Library Manager for “Adafruit PWM”, it should be the first result.

If you need help installing the library or want to learn more about this library and the PCA9685 check out my article about using servo motors.

 

The sketch includes both the Adafruit PWM library and the Wire library which is essential for communicating via the I2C bus.

A few constants are defined for the PWM controller, the pulse width minimum and maximum for the PWM signal and the frequency of et hsignal. The values in the sketch will work correctly for the motors included with the DF Robot 5 DOF Robot Arm kit.

A number of variables get defined next:

  • A “control” variable that represents the analog port the potentiometer is connected to.
  • A “motor” variable that represents the PWM output connector on the PCA9685 board.
  • A “mtrDegree” variable that represents the angle (from 0 to 180) that you want the motor shaft positioned to.

In the setup we just initialize the PWM object and set the frequency of the PWM oscillator to 50 Hz, which is standard for analog servo motors.

We then define two functions:

  • moveMotorDeg – This function takes the motor name and position in degrees as inputs. It then moves the requested motor to that position.
  • getDegree – This function takes the potentiometer name as an input and outputs the position in degrees.

The loop is pretty simple, thanks to the two functions we defined. It really is the same routine repeated five times, once per motor.

The potentiometer position is determined using the getDegree function. Then this information is passed to the moveMotorDeg function to move the corresponding motor to the desired position.

After doing this routine for each motor a short delay is induced, then the loop starts all over again. The result is that the servo motors move in response to the potentiometer positions.

Testing the Robot Arm

Hook everything up and provide a suitable power supply and get ready to test your arm.

Make sure you fasten the arm down securely to a base that has enough mass to support it.  And keep your hands and digits out of the way when you first power up the arm, the servos will immediately move into position and they won’t stop for your fingers!

The arm is solid and is capable of lifting a reasonable amount of weight. If you’ve worked with a small experimenters arm like the MeArm before you will find this one to be a notable improvement.

The gripper is especially useful, its actually capable of picking up small items in a repeatable fashion.

Plan on spending a few hours “playing” with your new arm, it’s addictive!

Expanding the Robot Arm

This finishes the construction of the arm but by no means does it finish with the harm. This is actually just the beginning of the DFRobot 5 DOF robot arm project, at least for me.

I have already mounted one sensor onto the harm for my next batch of experiments. It’s an MPU5060 gyroscope and altimeter device that I mounted up on the arm wrist to measure position. This beauty works on I2C so it will be simple to interface.

Cameras, distance sensors, limit sensors, force sensitive resistors – the sky’s the limit as to what you can attach to a solid robot arm like this one.

So I can guarantee that you’ll be seeing more of this arm in the workshop. Consider this article and video to be part one of a series.

I hope this article inspires you to build a robot arm like this one. The DFRobot kit is inexpensive and contains some high quality parts that will last for a long time.

I’d love to hear about your robot arm designs. Please let me know about your creations and any problems you might experience building the arm in the comments below.

 

Resources

 

DFRobot – DFRobot website, for robot arms and much much more.

5 DOF Robot Arm – The DFRobot 5 DOF Robot Arm kit.

Get the Code! – The Arduino controller sketch in an easy-to-use ZIP file.

 

DFRobot 5 DOF Robot Arm – Building the Robotic Arm
Summary
Build the DF Robot 5 DOF Robot Arm
Article Name
Build the DF Robot 5 DOF Robot Arm
Description
Build the DF Robot 5 DOF Robot Arm kit, a set of high quality parts for assembling an inexpensive robot arm. We will also build a controller based on the Arduino Nano and a PCA9685 PWM module.
Author
Publisher Name
DroneBot Workshop
Publisher Logo
Tagged on:     

3
Leave a Reply

newest oldest most voted
arsalan ayaz

i want to control my robotic arm with arduino uno r3 can u help me plz and this is not compiling on my arduino r3

Mark

Been looking at these kits. The video provides a good description. Now all I need is spare time.
I’m still playing with robot car mods right now. No harm adding an arm to the list.
My aim is to communicate with a mobile wi-fi 8266 module, added to an arduino controller.
Maybe throw in a mobile wifi ipcam? Just to see what it can do?

Emil

Does anyone know how to smooth out the servo movements and or control the speed at which the servos travel so they are not so jerky?