Robotic Gripper with Arduino and Potentiometer

In this tutorial, you will learn how to make a Robotic gripper with Arduino and a potentiometer. The robotic gripper is controlled with a potentiometer. We are making this robotic project with the Ettron Arduino Robotic and electronic starter kit.

Arduino kit for beginners
Ettron Arduino Robotic and Electronic Starter Kit

TO BUY THE STARTER KIT, SEE DETAILS AT THE END OF THIS ARTICLE

Previously, I made a tutorial, where I unboxed the Ettron Robotic and electronic starter kit for kids, teenagers and the absolute beginner, if you have not read the tutorial, then, check it out. In that very tutorial, I listed all the parts contained in the starter kit, and promised to make both video and written tutorials on how to use the starter kit. This very tutorial you are reading now, is the first tutorial made with the Ettron Arduino robotic and electronic starter kit. I will continue making tutorials on how to use the starter kit, so, if you have not gotten your copy of the starter yet, see details on how to get the starter kit at the end of this tutorial, especially if you reside in Nigeria, which is where the Arduino starter kit is packed. We ship nationwide and overseas if need be.

This very project I am making in this tutorial, is a beginner’s robotic project that spurns the desire in kids, teenagers and the absolute beginner to fall in love with STEM education. Our aim is to educate to innovate.

This project is a simple project that teaches how to control a robotic gripper by turning the knob of a potentiometer.

Materials for the Project

The materials required to make this project are:

  1. Ettron Robotic and electronic starter kit.
  2. Computer system
  3. Internet connection

If you do not have the Ettron Arduino robot and electronic starter kit, but you have the other parts listed below, then you can make the project.

The parts needed from the starter kit for the project are:

  1. Arduino Uno board
Arduino starter kit

2. Arduino USB cable

Arduino starter kit - USB cable

3. Robotic gripper parts (acrylic claw)

Robotic gripper
Acrylic robotic gripper parts

4. SG90 Servo motor

Arduino, robotic and electronic kit - SG90 servo motor
SG90 Servo motor

5. 5K Potentiometer

5k Potentiometer
5k Potentiometer

6. Breadboard

arduino robotic and electronic starter kit
breadboard

7. 220Ω Resistor

220 ohms resistor
220ohms resistor

8. Jumper wires

Arduino robotic and electronic starter kit
Jumper wires (Male-Male, Male-Female, Female-Female

9. Star screw driver

Star screw driver
Star screw driver

The project is a robotic project, a robot design consists of three areas.

  1. Mechanics
  2. Electronics
  3. Computer programming

And these three areas make up the two parts involved in robot design, which are:

  1. Software and
  2. Hardware

Mechanics and electronics make up the hardware part of the project, while computer programming makes up the software part.

I am assuming you know nothing about the design we are going to make, so, I will show you all the steps required to use the Ettron robotic and electronic starter kit to make the project, and if for any reason you encounter some difficulties you couldn’t surmount while carrying out the project, feel free to contact our tech support team. As our customer, giving you a technical support to use our starter kit, is one of your privileges. So, make sure you contact us if you need our assistance. You can reach us via email or WhatsApp. Or you can use the comment box at the end of this tutorial. 

Setting up the Computer for Programming the Robotic Gripper

First, let us set up the computer system for the programming part of the project. We need a computer system and internet connection. We need the internet connection to download the software that we shall use to program the robot. The software we shall use is called “Arduino integrated development environment or Arduino IDE.”
Follow the steps below to download and install the software.

Step one: Connect your computer to the internet and open a browser

Step two: Click the Download button below

download Arduino IDE

https://www.arduino.cc/en/software

The software download page will open as shown

Download Arduino ide

Click on the area marked red, and the page shown below will open.

download arduino IDE

The Arduino platform is open source, this means that the makers made the software free and available for anyone to use as they like. The only way they get rewarded is through freewill donations and contributions. The page gives you the option to contribute to the program while downloading the software. If you do not want to donate, you can go ahead and download the software. Click “Just download” to download the software free.

Step three: Chose a location on your computer to save the software. I recommend you save it on Desktop.
Once the download has started, you allow it to complete, this might take some time, depending on the signal strength of your internet.

Step four: After the download has completed, right click on the downloaded file on your browser, then click show folder, you will be taking to the folder where the Arduino IDE download file is located.

Step five: Right click on the downloaded file, then click run as administrator. Then click yes when prompted with installation query. It will initialize and then prompt you to make installation preference settings. You will see windows with boxes that can be checked. Make sure to check all the boxes.

Step six: Click next and click install to start the installation.
Click install when prompted to install software and drives
Once the installation is completed, you close the window.

Step seven: Navigate to desktop and open the installed software, by double clicking on the Arduino shortcut icon, or right clicking on the icon and then click open, click yes when asked user control query.

Arduino robotic gripper

The software will open as shown below. the software is ready for us  to use to program our robot gripper project.

Robotic gripper with arduino

Now that we have downloaded the Arduino IDE and have installed and set it up on our computer to be used in programming the robot with Arduino Uno board, we no longer need the internet.  You can disconnect your internet and continue with making the project.  The next phase in the robot making project process is to tackle the three areas involved in robot making that we listed above. We will be starting with mechanics.

The Mechanics of the Robotic gripper

Mechanics takes care of the motive part of the project, that is, the part that is concerned with the movement of the robotic gripper. This is where the robot gripper parts come in. It is in mechanics that we make sure we fix the acrylic claw parts very well, so that, we will have a firm grip while using the robotic gripper.

To fix the acrylic robotic claw, watch the video I made for that, see video below.

In the video, I showed every process required to fix the acrylic claw parts to make the gripper, using the acrylic parts, screws, nuts, standoffs, SG90 servo motor and the star screw driver.

See image below

arduino robotic gripper

After fixing the mechanical parts as shown in the video, you will get this.

Robotic gripper

Making the electrical connections for the Arduino robotic gripper

Now the gripper, which is the mechanical part is ready, we move over to the electronic part. This part entails connecting all the electronic components that are required to make the robot work. You can use the circuit diagram below as a guide. Or, you can use the video tutorial as a guide. In the video tutorial, I showed how all the connections are made.

Circuit diagram for robotic gripper
Circuit diagram of the Robotic gripper with Arduino and potentiometer

Programming the Robotic gripper with Arduino

After making the electrical connections which is the electronics part of robotics, it Is time to move over to the computer programming part. Here, we will use the Arduino IDE we installed earlier.

Open the Arduino IDE software as you did the first time you installed it. Once the IDE is open as shown below.

Robotic gripper with arduino

Click Ctrl A to highlight everything on the programming window. Press delete or backspace to delete any Arduino code or sketch (Arduino code is called sketch) already on the IDE, now, you have an empty window to enter your Arduino code.

Arduino IDE

Highlight all the code below, copy and paste in the Arduino IDE

Design Sketch or Code

//we included the servo motor library
  #include <Servo.h>
//we declared a servo variable, and named it myservo
  Servo myservo;    
//we declared an integer variable called potpin, 
//and initialized it as A1, which is where the potentiometer is connected.
  int potpin = A1; 
//we declared an integer variable called val 
  int val;
//This is the setup function, whatever code that is inside this function,
//runs just once immediately the Arduino is powered
  void setup()
//This is the curly brace, that encloses the void setup function codes
  {
//We declared that, we attached the servo motor signal pin, to pin 8 of the Arduino board.
  myservo.attach(8);
//This curly brace, closes the setup function
  }
//This is the void loop function. Whatever code that is inside this function, runs forever,
//as long as the Arduino board is on
  void loop()
//This is the curly brace, that encloses the void loop function codes
  {
//We assigned the analog-read value, of the potpin variable, to the variable, val
  val = analogRead(potpin);
//We mapped the values assigned to val, to the angles the servo motor can move.
//That is, from angle 0 degrees to 180 degrees
  val = map(val, 0, 1023, 0, 180);
//We gave a command to the servo motor variable, to move to the mapped angular 
//values of the variable val as given by the turning of the potentiometer, 
  myservo.write(val);
//This tells the servo motor, to wait for 15 milliseconds
  delay(15);
//This is the closing brace of the void loop function, which causes the loop to repeat forever,
//as long as the Arduino board is connected to power
  }

The code in the Arduino IDE without comments is shown below

Sketch without comment

In Arduino programming, whatever that is written after the double forward stroke does not have any effect on the code. It is used for writing comments, so, the explanation of what each code line does is written in as a comment before the code line beginning with double forward strokes.

Follow these steps to upload the Arduino code to the computer:

Follow these steps to upload the Arduino code to the computer:

  1. Plug the Arduino Uno Board to the computer via the Arduino USB cable.
  2. Click the tools button on the Menu bar.
  3. Click on Port and select the port bearing the name Arduino

Now your Arduino Uno board is ready to accept Arduino code.

To upload the Arduino code, press Ctrl U or click the upload button circled red as shown in the image below.

uploading the sketch to the arduino board

After uploading the Arduino code, give it few seconds to compile and upload, what the Arduino board, once you see the LED onboard the Arduino board flicker, then you know that the code has been uploaded. You also see it written on the IDE that the code is done uploading.

done uploading icon

Now you can test your project. Turn the knob of the potentiometer, you will see the robotic gripper opening and closing in response to you turning the knob of the potentiometer.

Congratulations! you have made your first project with the Ettron Arduino robotic and electronic starter kit.

If you encountered any challenges making the robotic gripper project, please, do not hesitate to reach out to use for technical support.

I hope you enjoyed making the robotic gripper with Arduino project. More projects are coming, so make sure you subscribed to subscribe to our channel while watching the video, so you don’t miss any tutorials when they are uploaded.

You can as well check out these other tutorials:

What is Arduino and how to use Arduino
water level indicator with ultrasonic sensor and Arduino
How to use a breadboard

TO BUY THE STARTER KIT, PLACE ORDER VIA:

WhatsApp: +2349030295926
Email:          ettroninfo@gmail.com

PAY ON DELIVERY NATIONWIDE

Leave a Reply

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