We need a few things to make our project. And here are they;

28byj-48 Stepper Motor:

Stepper motors are commonly used in our daily used materials like they are in CD-ROMS, in AC cooling units, turntables, and so many other things,

They can have 4 or more 4 coils but basically, 4 coils in unipolar arrangement, and each coil are rated with 5 volts.

This motor has a stride angle of 5.625/64 degrees. The 64 here tells us that it takes 64 steps to complete one rotation and every step angle will be 5.625 degrees.

This motor does not provide High Torque as I mentioned earlier I made this just to show the working of the robotic arm and for some basic payload.

This motor has five wires at the output and if we look at its internal wire diagram we can see that four wires of color, Blue, Pink, Yellow, and Orange are for Four coils and the fifth wire is for +5volts.

To make the stepper motor work, we need to energize its coil alternatively and if we design a circuit then our working code should work according to something like this.

 (refer to image)

Anyways, this was just for explanation, we will be using a library that eliminates this mess by handling it at the backend.

Making It:

Our robotic arm has three stepper motors at 3 axes.

And three potentiometers were used to control the positions of our motors. For the gripper motor I used two pushbuttons for two functions;

Base motor

The base motor was supported by two lids ( recovered from old storage containers)

The first lid had a hole to keep the motor in place and was glued together. The second lid had a hole to keep the coupler in place which was made from an old ballpoint. (Check the image attached above)

Second Motor

The second motor was glued with the 4 Cm piece of plastic attached to the base plate.

Third Motor

The third motor was glued to a 6cm piece of plastic which was attached to the second motor and exactly like other motors, this motor’s coupler was also made from Ballpoint.

The last servo motor aka the gripper was attached to the third motor via the same plastic material which was glued to the third motor.

The Griper

I used plastic from an old water bottle and made two holes then passed a piece of wire through them at one end I tied the wire to two freely moveable parts of plastic while another side of it was tied to a servo motor which was connected to the other side of the plastic.(It was exactly like the 3d model I made and attached above)

I couldn't get enough pictures from the build(only videos) that's why I explained them exactly like they were through the 3D model using TnkerCad.

-------------------------------------------------------------------------------------------------------------------------------------------------------------

(I have uploaded the STL file here and I have attached a Link to tinkercad but if you want to 3d print it then you'll have to resize it and maybe some modifications too, cause I made it just to visualize my robot.

Code and Schematics:

Circuit Scheme is really simple and everything was connected to Arduino as it's defined in code.

Components like;

were powered directly from Arduino 5v rail while All stepper motors were connected to their drivers and they were powered by separate 8 volts.

All wires of motors were connected according to the diagram and pots and buttons were soldered on PCB.

This Thing was powered by my homemade 12 volts power supply but the maximum I gave to it was 8 volts.

Next, I connected Arduino to pc and uploaded the code.

I used [AccelStepper] and [servo] libraries. This made my work so easy.

In the first section, I define the pins for the motor that I used on Arduino. Then Potentiometer there pins and a variable for them to store data.

Each motor was given an instance to name them so that later we can call them easily.

In the void loop, the input analog values from the pot(0-1023) are used for the position of the motors. If the value is decreasing then the number of steps will also decrease. And vice versa.

The code is very simple it is exactly like controlling each motor separately. Since it was the simplest one that’s why everything was so simple and easy.