Robotic Arm Ft. Arduino Mega, TheGHIZmo, Aarav G

by danibcorr in Circuits > Arduino

2144 Views, 43 Favorites, 0 Comments

Robotic Arm Ft. Arduino Mega, TheGHIZmo, Aarav G

IMG_20221220_173524.jpg
HOW TO BUILT A ROBOTIC ARM | ft. Arduino Mega, theGHIZmo, Aarav G
IMG_20221220_173542.jpg

This project consists on building and programming a robotic arm able of performing movements manually by joystick control and repeating recorded movements, all controlled by an Arduino Mega. The main reason for using the Arduino Mega is because of its large number of I/O pins plus extra GND and VCC sockets.

The robotic arm can etiher be operated directly through the Manual Mode or reproduced an Automated programmed movement or even a Party move 🎊🎉.

This project has arisen for the development of the final practice of the subject of Creative Electronics, a subject belonging to the University of Malaga (UMA), School of Telecommunications.

The whole project has been carried out by Clara Rubio Almagro, Laura Sánchez Sánchez and Daniel Bazo Correa, students of Electronic Systems Engineering at the University of Málaga 🦾.

The main idea, the structure of the robotic arm, the starting code and the tools/utilities can be found in this link.

In order to unify content, manage document versions, code and so on, we have decided to create a GitHub repository. Link.

Supplies

image.png
image (1).png
20221123_112740_HDR.jpg

The necessary components are:

  • A microcontroller. In this case, an Arduino Mega. Although any other microcontroller with enough pins or adding some expansion board would be valid, link.
  • A voltage regulator 5 V for the motors, link.
  • 2 joysticks for manual control, link.
  • LCD screen with which to visualize the behaviour of the robot (the state in which we are), link.
  • 4 servomotors, link.
  • 4 buttons, link.
  • And we also need the robot parts, which have been printed in 3D.
  • A few screws, nuts and washers.

Changes Made

After analysing the initial project, we found ourselves in the position of having to make some changes. These changes are presented below:

  • In the original project, the control box had a touch screen to move through the different modes. We have used an LCD screen which will show which mode the robotic arm is in, in combination with four buttons to change modes.
  • We also designed our new control box to better accommodate the modifications to the LCD screen and buttons.
  • On the robotic arm we have changed some parts that we have not found in stores. Therefore, we have chosen to do the design and 3D printing. Specifically, the printed parts have been the replacements for the two brass tubes in the starting project. The rest of the pieces are the same as in the original project.
  • We changed the functionality. We added two different modes: an automatic mode and a party mode.

Button Module

placa_botones.png
image (3).png
image (4).png

We have designed and soldered a module for the four buttons. The design in question is the one shown in the first image of this section. Subsequently, the buttons have been configured as input with Pull-UP resistors.

The result obtained after soldering is shown in the last two images of this section.

Once the module was soldered, we tested it with a simple program.

Downloads

Building the Arm

image (6).png
image (7).jpg
image (5).png
20221126_115535.jpg

As for the construction of the arm, we have followed the same steps as the link. As an illustration, we will show some of the parts of the process in the assembly of the robot arm and advice you, so you won't make the same mistakes we did.

First of all, let's start with the base. We had a problem with the space between the base and the lid, which we filled with EVA (Ethylene Vinyl Acetate) rubber as it's shown in the last picture.

With the gripper and the rest of the arm we had the same printing problem. Due to the precision/configuration and the type of 3D printer used, we to had to sand most of the printed parts to make them fit together, especially the gears.

The last problem was with the screws, nuts and washers. We didn't have all those elements the creator had (in the original project) so we decided to replaced them with M3 screws and an elastic rubber at the end of each screw, so we get the nut fixed in place. It would be valid to place any nut with some silicone coating to prevent its displacement, or to place Teflon or some similar component. Also, we didn't found the same brass pipes so we ended up printing them.

All the STLs are below.

Design

Cover_Design.jpeg
Base_Design.jpeg
Support_LCD_Design.jpeg
IMG_20221205_154734.jpg
20221205_093022.jpg
IMG-20221127-WA0017.jpeg
20221127_181757.jpg
20221127_181814.jpg

Once we have prepared all the components that are going to be inside the control box, it is the turn to design the box.

The design was created to have the joysticks attached to the bottom and both, the LCD and the buttons, to the top. The design has been thought with the intention of reducing costs in materials and printing time, so we get a large space to place the breadboard and the Arduino. 

Base Design

Captura.PNG
Captura2.PNG
Captura3.PNG
Captura4.PNG

We made a wood base to attach the whole project (base and console). In this way we make sure everything stays where has to be. Finaly, we painted it in black to match the other pieces.

Component Testing

image (8).jpg
imagen (9).png
image (10).png

Our recommendation is to test each component separately. Therefore, all the code used to test the components are provided bellow.

Although the connections are shown in the image (the first image in this section) with the connections we have made in the case of the LCD panel using the test code.

As for the joysticks, it is important to know which are their axes together with the range of values in which each axis is located but those values may change in your case. In this way we can configure the robot arm to move in a restricted area acquiring greater control over its positions.

In the case of motors, it is important to place the data input pins to microcontroller inputs that support PWM for their movement. There are 2 types of motors, those with a rotation angle of 180 degrees and those with 360 degrees (the main problem with this type of motors is that we will not be able to know their position). In our case, the motors used have been the MG90S which are 180 degree motors. Therefore, we have initially placed the robot arm in a certain position in which we knew the angle at which the motors would be located to subsequently establish a range of possible rotation values (degrees of freedom) for each servomotor.

When testing the components together or making the final design of the project, it must be taken into account that there are many elements to be connected that require power supply. In order to avoid as many failures as possible we will have to take different power supply copies. In our case, the Arduino Mega already has different VCC sockets so we have not connected more than 4-5 elements per socket. In addition, to avoid current loops, among other possible problems, it is recommended to use a single ground. Algo we used a voltage regulator to supply more current and a power bank (2.5 A).

Code

Diagram_EN.drawio.png

Starting from the code of the original project named at the beginning of this document, we have created a state machine. The state machine used in the programming is shown above. It has 3 main states from which it will jump as the corresponding buttons are pressed. With the intention of knowing the state in which we are and to provide a more friendly interface, we show the current state through the LCD screen. At first the robotic arm would be in Initial Mode.

If the robotic arm is in Initial Mode and someone presses the yellow button, it will switch to Manual Mode, in which the person can control the robotic arm with the joysticks on the control box. When the robotic arm is in this mode, if someone presses the red button it will return to Initial Mode.

If the robotic arm is in Initial Mode and someone presses the blue button, it will switch to Automatic Mode. In this mode the arm plays some programmed movements that you can change in the code. The idea was to recreate the behaviour of an industrial robot. If someone presses the red button it will return to Initial Mode.

If the robotic arm is in Initial Mode and someone presses the green button, it will switch to Party Mode. In this mode the arm simulate being on a party and moves the arm like a real party animal 😎. If someone presses the red button it will return to Initial Mode.

Downloads

Final

IMG_20221220_173542.jpg

With all the above steps done, the robot is now ready for the party 🥳🎉🎊.

Thanks for the support and all people involved in this project.