Reach Us +44-7482-875032
Automatic Pick and Place Robot Manipulation Using a Microcontroller
ISSN: 2168-9679

Journal of Applied & Computational Mathematics
Open Access

OMICS International organises 3000+ Global Conferenceseries Events every year across USA, Europe & Asia with support from 1000 more scientific Societies and Publishes 700+ Open Access Journals which contains over 50000 eminent personalities, reputed scientists as editorial board members.

Open Access Journals gaining more Readers and Citations
700 Journals and 15,000,000 Readers Each Journal is getting 25,000+ Readers

This Readership is 10 times more when compared to other Subscription Journals (Source: Google Analytics)
All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

Automatic Pick and Place Robot Manipulation Using a Microcontroller

Manjula VS* and Karamagi RI
Department of Computer Science and Information Systems Engineering, St. Joseph College of Engineering and Technology, Dar es Salaam, Tanzania
*Corresponding Author: Manjula VS, Department of Computer Science and Information Systems Engineering, St. Joseph College of Engineering and Technology, Dar Es Salaam, Tanzania, Tel: +255 689 304 186, Email: [email protected]

Received Date: Jun 01, 2018 / Accepted Date: Jun 09, 2018 / Published Date: Jun 18, 2018

Keywords: Microcontroller; PCB; Transformer; Resistor


Automation is defined as a technology that is concerned with the use of mechanical, electronic, and computer-based systems in the operation and control of production [1]. This technology includes transfer lines, mechanized assembly machines, feedback control systems, and robots [2,3]. There are three broad classes of industrial automation: fixed automation, programmable automation, and flexible automation [4].

The aim of this paper is to design a Robotic System capable of picking objects from a pre-defined location and placing them at a target destination [5]. The system is based on embedding a C program onto the PIC16F877A microcontroller using mikroC PRO for PIC [6,7]. The robot controller is made from a printed circuitboard (PCB) designed using Autodesk Eagle and the robot arm is modelled using Autodesk Inventor [8,9].

Robot anatomy

The vast majority of today’s commercially available robots possess one of the four basic configurations: [1,2]

• Polar configuration

• Cylindrical configuration

• Cartesian coordinate configuration

• Jointed-arm configuration

• Compliance Assembly/Articulated Robot Arm (SCARA) Robot Motions.

Robot motion

The robots movement can be divided into two general categories: arm and body motions, and wrist motions. The individual joint motions associated with these two categories are sometimes referred to by the term “degrees of freedom”, and a typical industrial robot is equipped with 4 to 6 degrees of freedom.

The robot motions are accomplished by means of powered joints. Connecting the various manipulator joints together are rigid members that are called links. The joints used in the design of industrial robots typically involve a relative motion of the adjoining links that is either linear or rotational. Linear joints involve a sliding or translational motion of the connecting links Figure 1. This motion can be achieved in a number of ways (e.g., by a piston, a telescoping mechanism, and relative motion along a linear track or rail).


Figure 1: The five basic robot anatomies: (a) Polar (b) Cylindrical (c) Cartesian, (d) Jointed-arm (e) SCARA.

Laws of Robotics

Isaac Asimov conceived the robots as humanoids, devoid of feelings, and used them in a number of stories. His robots were welldesigned, fail-safe machines, whose brains were programmed by human beings. [3] Anticipating the dangers and havoc such a device could cause, he postulated rules for their ethical conduct. Robots were required to perform according to three principles known as “Three laws of Robotics” which are as valid for real robots as they were for Asimov’s robots and they are:

• A robot should not injure a human being or, through inaction, allow a human to be harmed.

• A robot must obey orders given by humans except when that conflicts with the First Law.

• A robot must protect its own existence unless that conflicts with the First or Second law.

These are very general laws and apply even to other machines and appliances. They are always taken care of in any robot design.

Kinematic Model

Forward position kinematics

In the forward kinematics, if we are given the joint angles, we have to find out the position of the end effector. In this manner, we construct the different transformation matrices and combine them in the right way, the result being equation , where “ee” denotes end effector and “bs” denotes base i.e., the pose frame of the robot manipulator. This would be done by the use of the Denavit-Hartenberg convention. The transformation that relates the last and first frames in a serial manipulator arm, and thus the solution to the forward kinematics problem is then represented by the compound transformation matrix. The axes are moving; thus, the compound homogeneous transformation matrix is found by premultiplying the individual transformation matrices. [4]

equation (1)

L1,l2 and l3 are the lengths of the arm; θ12 and θ3 are the twisted angles respectively.

The pose of the first link, relative to the reference frame is given by:

equation (2)

equation (3)

This corresponds to a rotation by an angle θ2 and translation by a distance l1 i.e., the length of the first link.

The pose of the third link, relative to the second link is given by Figure 2:

equation (4)


Figure 2: A Three DOF – 2D Manipulator.

The pose of the end effector, relative to the third link is given by:

equation (5)

The solution to the forward kinematics problem is a 3 × 3 matrix given by,

equation (6)

equationequation (7)

Inverse position kinematics

The inverse kinematics problem is the opposite of the forward kinematics problem. If we are given the desired position of the end effectors, we can be able to find out the joint angle. This would be done by two types of solutions. They are:

• Closed form (or) Analytical solution

• Numerical solution.

The closed form (or) analytical solution is a set of equation that fully describe the connection between the end effector position and joint angles. The numerical solution is found through the use of numerical algorithms.

Mechanical Design

Multi-functional steering bracket

It is a common type of bracket that is suitable for South Korea's HS322, HS422, Tower Pro MG995, MG996, SG5010, Hitec, Parallax, Futaba and other brands of (about 40 × 20 × 36 mm) standard servo. It is made from a 2 mm hard punch forming aluminium alloy material that has high strength, light quality and surface sandblasting oxidation treatment (Figure 3). It reserves a variety of M3 and M4 mounting holes, with other structures capable of being connected by flexible installation method.


Figure 3: Multi-functional Steering Bracket.

U-shaped bracket

The bracket suits standard servos of the size of about 40 × 20 × 36 mm and is compatible with all commercially available conventional servos (MG995, SG5010, Hitec's HS322, HS422, Parallax, Futaba etc.) The bracket surfacing is done by sandblasting oxidation and its size is 56 × 25 × 64.5 mm. It is composed from a 2 mm hard aluminium plate with high hardness, light weight and very high precision technology. Its net weight is about 21 grams (Figure 4).


Figure 4: U-shaped Bracket.

Long U-shaped beam

The beam has a sandblasting oxidation surfacing, size of 90 × 29 × 42 and weighs about 50 grams (Figure 5).


Figure 5: Long U-shaped Beam.

Mechanical claw

The robotic claw is efficient for all gripping needs. It is made from aluminium and is heavy-duty. The claw opens to about 2 inches and depending on the servo motor used, it can pick up some relatively heavy objects. Because the fingers move parallel to each other, a better grip is achieved Figure 6. There is a mounting plate on the bottom which accepts the standard spacing found on servo mounts. The servo mounting holes are 34 mm apart.


Figure 6: Mechanical Claw or Gripper.

Metal rudder plate

It is made from a Computer Numeric Control (CNC) Aluminium for an adjustable type servo arm. It consists of M3 tapped mounting holes with spacing of 14 mm Figure 7. The servo disc diameter is 20 mm. The pinking aperture and quantity are 5.5 mm and 25 mm, respectively. It is suitable for (40 × 20 × 36 mm) standard servos and is easy to repair.


Figure 7: Metal Rudder Plate.

MG996R servo motor

The TowerPro MG996R servo motor is a high-torque digital servo with metal gearing, shock-proofing and an accurate Printed Circuit Board (PCB) and Integrated Circuit (IC) control system. The servo can rotate approximately 120 degrees (60 in each direction). Servo code, hardware or libraries may be used to control the motor. Its weight is about 55 grams with dimensions of approximately 40.7 × 19.7 × 42.9 mm. It has a stall torque of 9.4 kgf·cm (4.8 V) and 11 kgf·cm (6 V) with an operating speed of 0.17 s/60 (4.8 V) and 0.14 s/60º (6 V). The operating voltage is 4.8 V to 7.2 V with a running current of 500 mA to 900 mA (6V) and stall current of 2.5 A (6V) (Figure 8). The dead bandwidth is 5μs. It is stable and has a double ball bearing design. The temperature range is from 0°C to 55°C.


Figure 8: TowerPro MG996R Servo Motor.

Electrical and Electronic Design


The PIC16F877A is one of the PIC Micro families of microcontrollers which is currently popular among professionals and hobbyists alike. This is because the PIC16F877A is easily programmed and with the FLASH memory technology allows up to a thousand re-writes [5]. The superiority of this microcontroller compared with others within its peer group show that the PIC has the speed and flexibility for many uses, from automotive industries and controlling home appliances to industrial instruments, remote sensors, electrical door locks and safety devices. It is also ideal for smart cards as well as for battery supplied devices because of its low consumption. Low cost, low consumption, easy handling and flexibility make the PIC16F877A applicable even in areas where microcontrollers had not previously been considered (example: timer functions, interface replacement in larger systems, coprocessor applications, etc.) [6]. In system programmability of this chip (along with using only two pins in data transfer) makes possible the flexibility of a product, after assembling and testing have been completed (Figure 9). This capability can be used to create assemblyline production, to store calibration data available only after final testing, or it can be used to improve programs on finished products. Features of the PIC Microchip microprocessors are that they are easily programmed, have built in EEPROM, and an abundance of development tools. The PIC16F877A microprocessor has 8K of flash program memory, 256K of EEPROM, and 3 timers, making it an excellent choice for this research [5].


Figure 9: PIC16F877A microcontroller.


The quartz crystal unit is one of the most remarkable electronic devices developed by man. Today, the low cost for the frequency precision that is derived from it is unparalleled by any other device. Recently, however, it is beginning to get some competition from MEMS (Microelectromechanical Systems) resonators. Quartz is a compound/ mineral comprised of silicon and oxygen (SiO2) as shown in Figure 10.


Figure 10: Atomic lattice of silicone dioxide, quartz. The structure as a whole has no center of symmetry. The absence of a center of symmetry is a necessary condition for the piezoelectric effect.

Silicon (27.7%) and Oxygen (46.6%) are two of the most abundant elements on earth. Quartz is all around us in large quantities (about 10% to 14% of the Earth’s crust is SiO2) and is easily seen. In 1880, the brothers Jacques and Pierre Curie discovered the direct piezoelectric effect on quartz. They were able to measure a charge on the surface of natural quartz whose magnitude was proportional to the pressure applied on it. In 1881, the French physicist Gabriel Lippmann predicted the converse piezoelectric effect (a crystal is strained when a voltage is applied to it) using the principle of conservation of electricity. Later that same year, it was verified by the Curie brothers [7]. The HC-49S is a 2-pin piezoelectric crystal oscillator with size dimensions of 11×5×11 mm. It is used to generate clock pulses, by resonance, required for the synchronization of all the internal operations in the microcontroller (Figure 11). The frequency is 8 Mhz and frequency tolerance is ±20 parts per million (ppm). The load capacitance is 20 pF and effective resistance is 30 Ω.


Figure 11: HS-49S Crystal Oscillator (8 MHz).


Transformers are used either to increase or to decrease ac voltage. Transformers are made by using two separate sets of wire windings, which are wound on a metal core and are called the primary and the secondary windings. A transformer that increase voltage is called a step-up transformer and one that decrease voltage is called a stepdown transformer. Transformers do not operate with dc voltage applied, since dc voltage does not change in value. Notice in Figure 12 that ac voltage is applied to the primary winding of the transformer. There is no connection of the primary and secondary windings. The transfer of energy from the primary to the secondary winding is due to magnetic coupling or mutual inductance. The transformer relies on electromagnetism to operate. The primary and secondary windings of transformers are wound around a laminated iron core. The iron core is used to transfer the magnetic energy from the primary winding to the secondary winding. The operation of a transformer relies on the expanding and collapsing of the magnetic field around the primary winding. When current flows through a conductor, a magnetic field is developed around the conductor. When ac voltage is applied to the primary winding, it causes a constantly changing magnetic field around the primary winding. During times of increasing ac voltage, the magnetic field around the primary winding expands. After the peak value of the ac cycle is reached, the voltage decreases toward zero. When the ac voltage decreases, the magnetic field around the primary winding collapses. The collapsing magnetic field is transferred to the secondary winding [8].The transformer used steps down 230 volts to 6volts with a current limit of 2A at a frequency ranging from 50 to 60 Hertz.


Figure 12: 7805(left) and 78c06(right) voltage regulators.

Voltage regulators

A voltage regulator converts a varying input voltage into a constant ‘regulated’ output voltage. Thus, a voltage regulator supplies a constant voltage at the output regardless of the magnitude of load current supplied. Integrated Circuit (IC) voltage regulators are relatively cheap as compared to regulators designed using op-amps. IC voltage regulators are available in a variety of output voltages. The LM78xx series of voltage regulators are designed for positive voltage input. There are negative voltage regulators that are marked LM79xx. These are fixed output voltage regulators. The other types of voltage regulators are adjustable output voltage regulators, switching regulators, and special types of regulators. In switching regulators, a switch is turned on and off at a rate so as to supply a periodic pulse of current to the load; the average of these pulses being equal to the requirement. All other types of regulators are called linear voltage regulators. With proper heat sink, the LM78xx ICs can handle output current even somewhat more than 1000 mA. Linear voltage regulators are manufactured by companies like Fair Child and ST Microelectronics [9].The xx in LM78xx indicates the fixed output voltage it is designed to provide. LM7805 provides +5V regulated output voltage while LM7806 provides +6V. LM7905 gives an output voltage of -5V. Capacitors of suitable values are connected at the input and output pins depending upon the respective voltage levels.


The carbon composition resistor consists of a resistive carbon composition material with leads embedded in its opposite ends. The whole structure is surrounded by an insulating paint coating and moulded into a cylinder. The resistance material is a mixture of powdered carbon and insulation. Carbon composition resistors (CCR) are fixed form resistors. They are made out of fine carbon particles mixed with a binder (for example clay). After baking, they exhibit a solid form. They are used to reduce current flow, adjust signal levels, to divide voltages, bias active elements etc.

Capacitors are used to store an electric charge. An electrolytic capacitor is a type of capacitor that uses an electrolyte to achieve a larger capacitance than other capacitor types. An electrolyte is a liquid or gel containing a high concentration of ions (Figure 13).


Figure 13: (a) Carbon Composition Resistor (CCR), (b) Electrolytic Capacitor, (c) Ceramic Disc Capacitor, (d) pn-junction Diode, (e) Light Emitting Diode, (f) Push-button switch.

A ceramic capacitor uses a ceramic material as the dielectric. The two most common types are multi-layer ceramic capacitors and ceramic disc capacitors. Ceramic capacitors are usually made with very small capacitance values, typically between 1 nF and 1 μF, although values up to 100 μF are possible.

A pn-junction diode is formed when a p-type semiconductor is fused to an n-type semiconductor creating a potential barrier voltage across the diode junction. The most common function of a diode is to allow an electric current to pass in one direction (called the diode's forward direction), while blocking it in the opposite direction (the reverse direction).

A Light Emitting Diode (LED) is an optical semiconductor device that emits light when a voltage is applied. When the Light Emitting Diode (LED) is forward biased, free electrons in the conduction band recombine with the holes in the valence band and release energy in the form of light. The process of emitting light in response to the strong electric field or flow of electric current is called electroluminescence.

A push button is a momentary or non-latching switch which causes a temporary change in the state of an electrical circuit only while the switch is physically actuated. An automatic mechanism (i.e., a spring) returns the switch to its default position immediately afterwards, restoring the initial circuit condition.

Simulation and Testing

The simulation circuit for the PCB design was implemented using Autodesk Eagle. The circuit is energized by a direct current (DC) power supply circuit that is connected to the mains voltage. A bridge rectifier is used to convert the AC supply voltage into a DC voltage. The circuit contains ripples thus a filtering capacitor is used to smoothen the DC output before it is fed to the regulator. The voltage regulator gives a constant DC voltage and current output to be fed to the microcontroller circuit. The PIC input voltage is +5V and that of the servo motors is +6V.

Three push button switches are on-board. The switch (S1) is used as the external reset switch that activates the Master Clear ( equation ) pin. The equation pin, when enabled, will hold the device in reset mode as long as the pin is pulled low. During normal operation, it needs to be pulled high typically through a resistor to V+. When an external equation reset occurs, the program counter will be reset to the top of the program execution or memory location 0x00 which is the start of all program memory. The second switch (S2) and third switch (S3) are both connected to PORTA. PORTA is set as an input port to initiate the execution of a line of statements. PORTB and PORTD are set as output ports. PORTB outputs are directed to the servo connector slot to activate the data pins of the servo motors. PORTD outputs are used to switch on the LEDs to signify which servo motor is currently in operation and to show when the circuit is active.

Figure 14a shows the printed circuit board (PCB) top view of the microcontroller module targeted for the manufacturer. On it are all the circuit components laid out in the most appreciable manner. Figure 14b shows the PCB bottom view of the controller module showing the current path and drill holes.


Figure 14: Simulation circuit of microcontroller module.

Figure 15 illustrates the simulation model for the servo connector. The servo slots have five 3-pins to place the servo motors. The first pin takes a +6V from the regulation circuit, the second pin receives the data signal from the PORTB outputs and the third pin is grounded.


Figure 15: (a) PCB Top view of microcontroller module. (b) PCB Bottom view of microcontroller module.

Figure 16a displays the PCB top view of the servo connector module. On it are the five slots for the servo motors and the data slot from the microcontroller. Figure 16b highlights the PCB bottom view of the servo connector module.


Figure 16: Simulation circuit of servo connector.


The robot arm was fixed to a wooden stage that encompassed its workspace for operation. It worked with the mains supply voltage and its circuitry was fixed with it on the stage. Pick and place destinations were made available along a linear translation.

Figure 17 shows the robot in operaton as it starts to pick the small box from its initial position and Figure 18 shows the robot at the near completion of its operation as it places the box at its target depot location (Figures 19-23).


Figure 17: (a) PCB top view of servo connector, (b) PCB bottom view of servo connector.


Figure 18: Robot picking up the box.


Figure 19: Robot placing the box.


Figure 20: Robot 3D model.


Figure 21: Robot drawing model in Autodesk Inventor.


Figure 22: Proteus Simulation of Robot System.


Figure 23: Output waveforms of servo operation.

Future Implementations

The future designs suggest that the robot may be associated with battery power to continue operations when there are shortages or fluctuations in the mains supply. A locomotive vehicle system when incorporated allows it to move on the ground and perform operations in variable workspaces. The robot may be linked to an aerial vehicle or drone that will allow it to perform manipulations in space. A vision system and artificial intelligence integration shall enable the robot to have image processing and feature extraction capabilities that will aid it in selectively manipulating its targets. With a voice recognition ability, the robot may perform operations from speech inputs via sound processing technology. A motion recognition system using accelerometer and gyroscope sensors means users may command the robot with gestures. Computer and Smart Phone Graphical User Interfaces (GUIs) may be designed to control the robot wirelessly by WiFi frequencies.


The robot was tested successfully and was capable of picking objects and migrating them across a 10-inch horizontal, with accuracy, precision and efficiency. The repeatability and speed of operation was high making the robot suitable for dexterous tasks.

Conflict of Interest

The authors declare there is no conflict of interest with the publication of this paper.


Citation: Manjula VS, Karamagi RI (2018) Automatic Pick and Place Robot Manipulation Using a Microcontroller. J Appl Computat Math 7: 408. DOI: 10.4172/2168-9679.1000408

Copyright: © 2018 Manjula VS, et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Select your language of interest to view the total content in your interested language

Post Your Comment Citation
Share This Article
Article Usage
  • Total views: 817
  • [From(publication date): 0-2018 - Aug 18, 2019]
  • Breakdown by view type
  • HTML page views: 756
  • PDF downloads: 61