You are on page 1of 56

Abstract

This paper proposes to create a Robotic Arm with Real-Time Image Processing and Arduino which can either be
automated or can be operated manually. In the present era, we are making a robot capable of detecting and placing
pre-specified objects. The code for the detection of colour has been written in Python and the code for hardware is
written in embedded c. System has an IR sensor to turn on the camera, the robotic arm detects the pre-specified
objects and segregates them based on colour (RGB). The program includes controlling the robotic arm, capturing
the object image processing, identifying the RGB object, using a local page to control the motor manually, and
performing all tasks automatically using Arduino.

CHAPTER 1
INTRODUCTION

INTRODUCTION
1.1 BASIC TOPICS OF THE PROJECT
In today’s scenario, the robot with high accuracy, high output, and no error is in demand, the precise work or
repetitive work is better done with robots. For the robot the sensor or camera is common sense for the machine-like
image processing to detect and identify an object and its characteristic which helps to perform a required task. A
Robotic arm can decide the object based on colour like Red, Green, and Blue using camera and image processing.
The main aim of the project is to make a robot that has the capability of pick a pre-specified object and placing it in
separate divisions based on colour. Arduino has found its way in many useful and changeable implementations in
robotic systems. The python code has been formulated for detecting colour o the objects and Arduino creating a
robotic arm. The pick and place robotic arms handle repetitive tasks while making it available to human workers to
focus on more complicated work. Robotic arms are usually mounted on a stable stand, pick and place robotic arms
are positioned to reach different areas to perform work. For, example in order to fulfilment applications in which
items are placed onto a conveyor, picking bin or directly into a packaging container, the robot should come with
four to five axes. This project is been designed the robotic arm with four degree of freedom which will assist/replace
workers in the industry. The main objective of the project is to design and fabricate the robotic arm which may
perform various operations in industry such as pick and place the object, material handling, which can be controlled
automatically and manually. Cotton is most vital commodity in world and it's cultivated by large areas in India.
Cotton picking is completed mostly by hands in India primarily by women. Cotton is picked from cotton ball by
human hands. Generally workers attend field within the morning to start out picking and continuously work till
evening. Generally a white open flower takes 50-55 days to develop to the stage where white and harvestable lint is
showing. Higher heat accelerated the cotton ball maturity level but doesn't end in genetic improvement .So we aim
to utilize the best knowledge of science to style such efficient machine which may do perform add field and reduces
human efforts. This machine pick cotton in farm and can reduce the surplus man power required while cotton
harvesting. As extra money is required in farm for labour work and the harvesting of cotton is performed in some
intervals of your time. This makes small scale farmers to spend money on the labour for harvesting. Therefore this
machine will save the cash of small scale farmers; it'll reduce the trouble required will performing the picking
operations.
In this world, there are many people with disabilities due to illness, accidents and aging. People with disabilities
have caregivers who constantly support in their daily living. But, growing burden on caregivers and endangering
dignities of care-receivers have been becoming social issues. When it comes to having meals, care-receivers may
not be able to eat satisfactorily. Some self-feeding assistive robotic arm systems, such as My Spoon [1], Handy 1
[2], I-Arm [3] and Jaco [4], have been developed. These systems are commercially available so far. However, these
systems can only be used in limited environments, and various bowls cannot be used in them.

1.2 PROBLEM STATEMENT

Need to build a manually and automatically controlled robot capable of picking, lifting, placing Arm mechanism
 Manual mode
 Automatic mode
objects, and colour-based object detection.

1.3 SCOPE OF THE PROJECT

Identification of coloured objects by the robotic arm can be controlled both automatically and manually for
industrial purposes. The arm can segregate among three colours and placed accordingly. The hardware
implementation was carried out using Arduino. This proposed solution gives better results when compared to the
earlier existing systems such as efficient image capture, etc.

1.4 MOTIVATION

Robotic hands that appear and act like human hands are constructed in away that makes them very similar to the
real thing. This simple human-like hand uses multiple motors with one long tendon roped through the fingers to
close and relax the hand, and move the fingers independently. Android Controlled Robotic Arm Introduction Dept.
of CSE, CBIT 3 2022-2023 Robot arms are designed to manipulate and transport parts, tools, or special
manufacturing elements through reprogrammable movements to perform a variety of tasks. This is why they are
commonly used in industrial environments, although there are also scale versions dedicated to stem education and
hobby robotics.
1.5 OBJECTIVE

• This project aims to build a Robotic Arm with Real-Time Image Processing on a mobile robot unit that will be
operated automatically and manually using Arduino.
• To help visually impaired by using various fields of technology.
• To build a robot that can select objects based on colour.
• To design of an autonomous robot is proposed which can detect, search, pick up and drop any object.
• To reduce human efforts and time consumption .

CHAPTER 2

LITERTURE REVIEW
[1]Design and Analysis of Pick and Place Robot
Authors: S. Mohanavelan, M. Madhan Kumar, K. Mohanprabhu, M. Narendhiran, B. Om Adhavan
Published in: International Journal of Engineering Science and Computing, March 2019
Robots are springing up everywhere like mushrooms having found a steady hold in the production industry. Not
only do they increase the productivity and efficiency of the system, but they also improve the accuracy and the
uniformity of the products .They are a sign of an ever developing technology. One of the most important indications
would be the industrial pick and place robot. The main objectives of this project are to design and implement a 5-
DOF pick and place robotic arm. This project can be operational in controlling, stating with simple tasks such as
gripping, lifting, placing and releasing. This pick and place robot is designed by using SOLIDWORKS18 software
and fabricated by using 3D-printing technology.3D-printed models are assembled with servo motors and connected
with Arduino and Bluetooth module. Using Bluetooth module, arm is controlled using smartphone. The gripper
should be analyzed to calculate the stress and deformation that occurs, in which the structural analysis of the gripper
using the finite element method is performed.

[2] Pick and Place Robotic Arm Using Arduino


Authos: Harish K 1, Megha D 2, Shuklambari M 3, Amit K 4, Chaitanya K Jambotkar
Published in: International Journal of Science, Engineering and Technology Research (IJSETR) Volume 6, Issue 12,
December 2017
In recent years the industry and daily routine works are found to be more attracted and implemented through
automation via Robots. The pick and place robot is one of the technologies in manufacturing industries which
is designed to perform pick and place operations. The system is so designed that it eliminates the human error
and human intervention to get more precise work. There are many fields in which human intervention is
difficult but the process under consideration has to be operated and controlled this leads to the area

in which robots find their applications. Literature suggests that the pick and place robots are designed,
implemented in various fields such as; in bottle filling industry, packing industry, used in surveillance to
detect and destroy the bombs etc. The project deals with implementing an pick and place robot using Robo-
Arduino for any pick and place functions. The pick and place robot so implemented is controlled using RF
signal. The chassis is supported for the displacement of robotic arm by four Omni wheels. The robotic arm
implemented has two degrees of freedom. Many other features such as line follower, wall hugger, obstacle
avoider, metal detector etc can be added to this robot for versatility of usage.

[3] Wireless Mobile Robotic Arm


Authors: MohdAshiqKamarilYusoffa, Reza EzuanSaminb, Babul Salam Kader Ibrahimc, ,Published in:
International Symposium on Robotics and Intelligent Sensors 2012 (IRIS 2012), 1072 – 1078.
This book various aspects of designing a Robot is described. It deals with different types of Arm design,
controlling techniques, vehicle design etc. ER. Rajput, in this book the operation and control of robots is discussed.
Arduino cookbook, in this book details and methods of interfacing hardware components such as DC motor,
Servo motor and RF Transmitter and Receiver is been discussed.

4]Wireless Control of Pick and Place Robotic Arm Using an Android Application
MuhammedJabir.N.K,Neetha John , MuhammedFayas , Midhun Mohan , MithunSajeev, Safwan.C.N
The work is designed to develop a pick and place robotic arm vehicle with a soft catching gripper that is designed to
avoid extra pressure on the suspected object (Like Bombs) for safetyreasons. The robotic vehicle is android
application controlled for remoteoperation. At the transmitting end using android application device, commands are
sentto the receiver to control the movement of the robot either to move forward, backward and left or right etc. At
the receiving end four motors are interfaced to the microcontrollerwhere two of them are used for arm and gripper
movement of the robot while the othertwo are for the body movement of the vehicle.

The main advantage of this robot is its softcatching arm that is designed to avoid extra pressure on the suspected
object for safety reasons. The android application device transmitter acts as a remote control that hasthe advantage
of adequate range, while the receiver end Bluetooth device is connectedto the microcontroller to drive DC motors
via motor driver IC for necessary operation. Remote operation is achieved by any smart-phone/Tablet etc., with
Android OS; upon a GUI (Graphical User Interface) based touch screen operation.

EXISTING SYSTEM
 The final step on this path of innovation are intelligent robots, like SOFIA.
 These robots are controlled by computers that run program instructions and send them to the manipulator so that it
can make the required movements.
 They also send information to the control computer about the process's status,
 enabling intelligent decision-making and real-time process control.
 The Aizu Wakamatsu hospital has more than 100 of these robots now, and some or most of them have screens on their
breasts to pay attention to youngsters in the hospital, cheer up the populace, and assist with medical care.
 In the existing model, there is no robotic arm for collecting and delivering medicine or food items. There is no
automatic UV disinfection system

4.2 PROPOSED SYSTEM

 The system consists of three motors for providing arm movement.


 The arm is attached with cardboard and a camera to detect the object which needs to be picked up. This is ensured by
controlling the arm motors through proper command and using a microcontroller Arduino UNO.
 An IR sensor is placed in order to detect the presence of an object within its proximity.
 Then arm will be picked up the objects and placed them in the respective box.
CHAPTER 3
SYSTEM REQUIREMENT SPECIFICATION

3.1 INTRODUCTION
System requirement specifications gathered by extracting the appropriate information to implement the system. It is the
elaborative conditions which the system need to attain. Moreover, the SRS delivers a complete knowledge of the system to
understand what this project is going to achieve without any constraints on how to achieve this goal. This SRS not providing
the information to outside characters but it hides the plan and gives little implementation details.

3.2 Hardware Requirements


• Arduino Uno
• DC motors
• Motor driver
• Power supply
• IR sensors

3.3 Software Requirements


• Windows 8 or later version
• Embedded C
 Arduino IDE

3.4 Summary The chapter 3 considers all the system requirements which we require to develop this proposed system. Section
3.1 grants specific requirements like programming languages, frameworks are being used and under which platform this
project has been done in detail. The hardware requirements and software requirements for this project have been explained in
section 3.2 and 3.3.

3.5 Functional Requirements :

1. System should automatically detect objects using IR sensor.


2. System should automatically recognize objects based on color.
3. System cannot be controlled by unauthorized person.
3.6 Non Functional Requirements:

1. System should pick the object and place in the box.


2. Software’s should be support for all the sensor values and installation can be changed.
CHAPTER 4

SYSTEM DESIGN
System Architecture

Fig Block diagram


The program is so written i.e., while executed it sends commands to the motor driver IC as per its requirement for
running the motor for the movement of the robot as explained in the subject above in L293D. The android phone
screen is used for sending commands for left, right, forward and backward and center is for stop through its inbuilt
Wi-Fi module system. 12V battery powers the circuit in series with a diode D2 that nearly provides 5 through
regulator IC LM 7805 for the microcontroller which has standard connections like crystal, reset arrangement
indication LED etc. A blue tooth device being powered from a reversed biased Zener diode D1, is interfaced to the
microcontroller
Data Flow Diagram:
1. The DFD is also called as bubble chart. It is a simple graphical formalism that can be used to
represent a system in terms of input data to the system, various processing carried out on this
data, and the output data is generated by this system.
2. The data flow diagram (DFD) is one of the most important modeling tools. It is used to
model the system components. These components are the system process, the data used by
the process, an external entity that interacts with the system and the information flows in the
system.
3. DFD shows how the information moves through the system and how it is modified by a
series of transformations. It is a graphical technique that depicts information flow and the
transformations that are applied as data moves from input to output.
4. DFD is also known as bubble chart. A DFD may be used to represent a system at any level of
abstraction. DFD may be partitioned into levels that represent increasing information flow
and functional detail.

Data Flow Diagram:


Level 0:
Use Case Diagram:

A use case diagram in the Unified Modeling Language (UML) is a type of behavioral
diagram defined by and created from a Use-case analysis.
Its purpose is to present a graphical overview of the functionality provided by a system in
terms of actors, their goals (represented as use cases), and any dependencies between those use
cases.
The main purpose of a use case diagram is to show what system functions are performed for
which actor. Roles of the actors in the system can be depicted.
Class Diagram:
In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of
static structure diagram that describes the structure of a system by showing the system's classes,
their attributes, operations (or methods), and the relationships among the classes. It explains which
class contains information.

Activity Diagram:

Activity diagrams are graphical representations of workflows of stepwise activities and actions with
support for choice, iteration and concurrency. In the Unified Modeling Language, activity diagrams
can be used to describe the business and operational step-by-step workflows of components in a
system. An activity diagram shows the overall flow of control.

Interaction Diagram / Sequence Diagram :

A sequence diagram in Unified Modeling Language (UML) is a kind of interaction diagram that
shows how processes operate with one another and in what order. It is a construct of a Message
Sequence Chart. Sequence diagrams are sometimes called event diagrams, event scenarios, and
timing diagrams.

CHAPTER 5
System Implementation

The block diagram of the proposed system is shown in Fig1. It consists of an Arduino Microcontroller IC, four DC
Motors with driver IC, two servo motors and power supply. The pick and place robotic arm consists of a
robotic arm placed on a moving vehicle (chassis). The vehicle is able to move along any type of surfaces
irrespective of it is smooth or rough. The pick and place robot uses four motors for the operation of the
chassis, two servo motors for the operation pick and place operation. The pick and place arm consists of an arm
assembly with a jaw, which is only able to move in up and down direction.

There are two motors for the arm assembly, one for the up and down motion and other for jaw opening and closing.
For the controlling of motor, motor driver IC and Arduino micro controller is used. The input signal or controlling
signal is given from a wireless play station, which is interfaced with the microcontroller by a Wi-Fi module. When
the signal is sent from the play station it is decoded in the controller and proper controlling signal is sent to
actuators (dc motors or servo motor) in the system.
CHAPTER 4

SYSTEM REQUIREMENTS

HARDWARE REQUIREMENTS
 Arduino
 IR Sensor
 Relay
 Wifi ESP 8266 or Bluetooth
 DC motor
 H-bridge
 Power Supply

SOFTWARE REQUIREMENTS

 Embedded C
 Arduino IDE

MODULE OF THE PROJECT


Arduino
Arduino is an open-source hardware and software company, project and user community that designs and
manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive
objects that can sense and control both physically and digitally. Its products are licensed under the GNU Lesser
General Public License (LGPL) or the GNU General Public License (GPL), permitting the manufacture of Arduino
boards and software distribution by anyone. Arduino boards are available commercially in preassembled form or as
do-it-yourself (DIY) kits. Arduino board designs use a variety of microprocessors and controllers. The boards are
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards
or breadboards (shields) and other circuits. The boards feature serial communications interfaces, including
Universal Serial Bus (USB) on some models, which are also used for loading programs from personal computers.
The microcontrollers are typically programmed using a dialect of features from the programming languages C and
C++. In addition to using traditional compiler toolchains, the Arduino project provides an integrated development
environment (IDE) based on the Processing language project.
The Arduino project started in 2003 as a program for students at the Interaction Design Institute Ivrea in
Ivrea, Italy, aiming to provide a low-cost and easy way for novices and professionals to create devices that interact
with their environment using sensors and actuators. Common examples of such devices intended for beginner
hobbyists include simple robots, thermostats and motion detectors.
The name Arduino comes from a bar in Ivrea, Italy, where some of the founders of the project used to meet.
The bar was named after Arduin of Ivrea, who was the margrave of the March of Ivrea and King of Italy from 1002
to 1014.
Arduino/Genuino Uno is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins (of
which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an
ICSP header and a reset button. It contains everything needed tosupportthe microcontroller;simplyconnectitto a
computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. You can tinker with
your UNO without worrying too much about doing something wrong, worst case scenario you can replace the chip
for a few dollars and start over again. "Uno" means one in Italian and was chosen to mark the release of Arduino
Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the reference versions of Arduino,
now evolved to newer releases. The Uno board is the first in a series of USB Arduino boards, and the reference
model for the Arduino platform; for an extensive list of current, past or outdated boards see the Arduino index of boards.
[1]
Fig 4.1 : Arduino

Arduinospecification:

Microcontroller ATmega328P
OperatingVoltage 5v
Input voltage 7-12v
Input voltage limit 6-20v
Digital I/O Pins 6
Analogue input Pins 6
DC current perI/O pins 20 mA
DC current for 3.3v Pin 50 mA
Flash Memory Of which o.5KB is used
SRAM 2 KB
EEPROM 1KB
Clock Speed 16MHz
Length 68.6mm
Width 53.4nm
Weight 25g

Table4.2

Arduinoprogramming:

The Arduino/Genuino Uno can be programmed with the (Arduino Software (IDE)).Select "Arduino/GenuinoUnofromthe
Tools >Board menu (according to the microcontroller on your board). The ATmega328 on the Arduino/Genuino
Uno comes preprogrammed with a boot loaderthat allows us to upload new code to it without the use of an external
hardware programmer. It communicates using the original STK500 protocol (reference,Cheaderfiles).

We can also bypass the boot loader and program the microcontroller through the ICSP (In-Circuit Serial Programming)
header usingArduinoISPorsimilar. The ATmega16U2/8U2 is loaded with a DFU boot loader, which can be activatedby:
 On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and
then rese ing the8U2.
 On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground,
making it easier to put into DFU mode.[1]

Warnings:

The Arduino/Genuino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and
overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of
protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the
short or overload is removed.

Differenceswithotherboards:

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it
features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.[1]

Power:

The Arduino/Genuino Uno board can be powered via the USB connection or with an external power supply. The
power source is selectedautomatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be
connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be
inserted in the GND and VIN pin headers of the POWERconnector.
The board can operate on an external supply from 6 to 20 volts. If supplied with less than7V, however, the 5V pin
may supply less than five volts and the board may become unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is 7 to 12volts.
The power pins are as follows:

 VIN. The input voltage to the Arduino/Genuino board when it's using an external power source (as opposed
to 5 volts from the USB connection or other regulated power source). One can supply voltage through this
pin, or, if supplying voltage via the power jack, access it through thispin.
 5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with
power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-
12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We
don't adviseit.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum currentdraw is 50 mA.
 GND. Groundpins.
 IOREF.This pin on the Arduino/Genuino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the
appropriate power source or enable voltage translators on the outputs to work with the 5V or 3.3V.[1]

Memory:

The ATmega328 has 32 KB (with 0.5 KB occupied by the boot loader). It also has 2 KB of SRAM and 1 KB of
EEPROM (which can be read and written with the EEPROMlibrary).[1]

Input &Output:

Each of the 14 digital pins on the Uno can be used as an input or output, usingpinmode(), digital write (), and digital
read () functions. They operate at 5 volts. Each pin can provide or receive 20 mA as recommended operating
condition and has an internal pull- up resistor (disconnected by default) of 20-50k ohm.A maximumof 40mAis the
value that must not be exceeded on any I/O pin to avoid permanent damage to the microcontroller.
In addition, some pins have specialized functions:

 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins
are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serialchip.
 External Interrupts: 2 and 3. These pins can be configuredto triggeran interrupt on a low value, a
rising or falling edge, or a change invalue. See the attach interrupt () function fordetails.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog write () function.
 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
using the SPIlibrary.
 LED: 13. There is a built-in LED driven by digital pin 13. When the pin isHIGH
value, the LED is on, when the pin is LOW, it's off.
 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wirelibrary.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024
different values). By default they measure from ground to 5 volts, though is it possible to change the upper
end of their range using the AREF pin and the analog reference ()function.
There are a couple of other pins on the board:

 AREF. Reference voltage for the analog inputs. Used with analog Reference().
 Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to
shields which block the one on the board.[1]

Fig 4.2: Pin Specification

Communication:

Arduino/Genuino Uno has a number of facilities for communicating with a computer, another Arduino/Genuino
board,orothermicrocontrollers.TheATmega328provides UART TTL (5V) serial communication, which is available on
digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication over USBand
appears as a virtual com port to software on the computer. The 16U2 firmware uses the standard USB COM drivers,
and no external driver is needed.However, on Windows, an
.inf file is required.The Arduino Software (IDE) includes a serial monitor which allows simple textual data to be
sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the
USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and1).
A Software serial libraryallows serial communication on any of the Uno's digital pins. The
ATmega328alsosupports I2C (TWI) and SPI communication. The Arduino Software (IDE) includes a Wire library
to simplify use ofthe I2C bus; seethe documentationfor details. For SPI communicatio n, use the SPI library.

Automatic (Software)Reset:

Rather than requiring a physical press of the reset button before an upload, the Arduino/Genuino Uno board is
designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow
control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nano farad
capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino
Software (IDE) uses this capability to allow you to upload code by simply pressing the upload button in the interface
toolbar. This means that the boot loader can have a shorter timeout, as the lowering of DTR can be well-
coordinated with the start of the upload. This setup has other implications. When the Uno is connected to either a
computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the
following half-second or so, the boot loader is running on the Uno.While it is programmed to ignore malformed
data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board
after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it
first starts, make sure that the software with which it communicates waits a second after opening the connection
and before sending thisdata.
The Uno board contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can
be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by
connecting a 110 ohm resistor from 5V to the resetline.[1]

POWER SUPPLY
Fig Power Supply
The transformer 230Volts will be stepped down to 12-0-12 one side of the 12V is given to the 7805 and Lm317.In
this project the microcontroller requires +5V power supply. The design description of power supply is given below.

Transformer: A transformer is a device that transfers electrical energy from one circuit to another through
inductively coupled conductors without changing its frequency. A varying current in the first or primary winding
creates a varying magnetic flux in the transformer's core, and thus a varying magnetic field through the secondary
winding. This varying magnetic field induces a varying electromotive force (EMF) or "voltage" in the secondary
winding. This effect is called mutual induction. If a load is connected to the secondary, an electric current will flow
in the secondary winding and electrical energy will be transferred from the primary circuit through the transformer
to the load. This field is made up from lines of force and has the same shape as a bar magnet. If the current is
increased, the lines of force move outwards from the coil. If the current is reduced, the lines of force move inwards.
If another coil is placed adjacent to the first coil then, as the field moves out or in, the moving lines of force will
"cut" the turns of the second coil. As it does this, a voltage is induced in the second coil. With the 50 Hz AC mains
supply, this will happen 50 times a second. This is called MUTUAL INDUCTION and forms the basis of the
transformer.
Rectifier:A rectifier is an electrical device that converts alternating current (AC) to direct current (DC), a process
known as rectification. Rectifiers have many uses including as components of power supplies and as detectors of
radio signals. Rectifiers may be made of solid-state diodes, vacuum tube diodes, mercury arc valves, and other
components. A device that it can perform the opposite function (converting DC to AC) is known as an inverter.
When only one diode is used to rectify AC (by blocking the negative or positive portion of the waveform), the
difference between the term diode and the term rectifier is merely one of usage, i.e., the term rectifier describes a
diode that is being used to convert AC to DC. Almost all rectifiers comprise a number of diodes in a specific
arrangement for more efficiently converting AC to DC than is possible with only one diode. Before the development
of silicon semiconductor rectifiers, vacuum tube diodes and copper (I) oxide or selenium rectifier stacks were used.
Filter:The process of converting a pulsating direct current to a pure direct current using filters is called as filtration.
Electronic filters are electronic circuits, which perform signal-processing functions, specifically to remove
unwanted frequency components from the signal, to enhance wanted ones.

Regulator:A voltage regulator (also called a ‗regulator‘) with only three terminals appears to be a simple device,
but it is in fact a very complex integrated circuit. It converts a varying input voltage into a constant ‗regulated
‘output voltage. Voltage Regulators are available in a variety of outputs like 5V, 6V, 9V, 12V and 15V. The
LM78XX series of voltage regulators are designed for positive input. For applications requiring negative input, the
LM79XX series is used. Using a pair of ‗voltage-divider resistors can increase the output voltage of a regulator
circuit. It is not possible to obtain a voltage lower than the stated rating. You cannot use a 12V regulator to make a
5V power supply. Voltage regulators are very robust. These can withstand over-current draw due to short circuits
and also over-heating. In both cases, the regulator will cut off before any damage occurs. The only way to destroy a
regulator is to apply reverse voltage to its input. Reverse polarity destroys the regulator almost instantly. Fig: 3u
shows voltage regulator.
The LED and its series resistor (220ohm) serve as a pilot light to indicate when the power supply is on and also
helps to the reservoir capacitor is completely discharged after power is turned off. Then I know it's safe to remove
or install components for the next experiment

Figure 5v power supply with over voltage protection.

IR SENSOR
Fig IR Sensor
An infrared sensor is an electronic device that emits in order to sense some aspects of the surroundings. An IR
sensor can measure the heat of an object as well as detects the motion. These types of sensors measure only infrared
radiation, rather than emitting it that is called a passive IR sensor. Usually, in the infrared spectrum, all the objects
radiate some form of thermal radiation. These types of radiations are invisible to our eyes, that can be detected by an
infrared sensor. The emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an IR
photodiode that is sensitive to IR light of the same wavelength as that emitted by the IR LED. When IR light falls
on the photodiode, the resistances and the output voltages will change in proportion to the magnitude of the IR light
received.

Fig IR Sensor principle

IR Sensor Circuit Diagram and Working Principle


An infrared sensor circuit is one of the basic and popular sensor module in an electronic device. This sensor is
analogous to human’s visionary senses, which can be used to detect obstacles and it is one of the common
applications in real-time. This circuit comprises of the following components
 LM358 IC 2 IR transmitter and receiver pair
 Resistors of the range of kilo-ohms.
 Variable resistors.
 LED (Light Emitting Diode).

Principle of Working
The principle of an IR sensor working as an Object Detection Sensor can be explained using the following figure.
An IR sensor consists of an IR LED and an IR Photodiode; together they are called as Photo – Coupler or Opto –
Coupler.

Fig Working of IR Sensor


When the IR transmitter emits radiation, it reaches the object and some of the radiation reflects back to the IR
receiver. Based on the intensity of the reception by the IR receiver, the output of the sensor is defined.

IR Sensor Circuit
Fig typical IR sensing circuit

It consists of an IR LED, a photodiode, a potentiometer, an IC Operational amplifier and an LED.

IR LED emits infrared light. The Photodiode detects the infrared light. An IC Op – Amp is used as a voltage
comparator. The potentiometer is used to calibrate the output of the sensor according to the requirement.

When the light emitted by the IR LED is incident on the photodiode after hitting an object, the resistance of the
photodiode falls down from a huge value. One of the input of the op – amp is at threshold value set by the
potentiometer. The other input to the op-amp is from the photodiode’s series resistor. When the incident radiation is
more on the photodiode, the voltage drop across the series resistor will be high. In the IC, both the threshold voltage
and the voltage across the series resistor are compared.

If the voltage across the resistor series to photodiode is greater than that of the threshold voltage, the output of the
IC Op – Amp is high. As the output of the IC is connected to an LED, it lightens up. The threshold voltage can be
adjusted by adjusting the potentiometer depending on the environmental conditions.
The positioning of the IR LED and the IR Receiver is an important factor. When the IR LED is held directly in front
of the IR receiver, this setup is called Direct Incidence. In this case, almost the entire radiation from the IR LED will
fall on the IR receiver. Hence there is a line of sight communication between the infrared transmitter and the
receiver. If an object falls in this line, it obstructs the radiation from reaching the receiver either by reflecting the
radiation or absorbing the radiation.

DC MOTOR
Fig DC MOTOR
Electric motors are broadly classified into two different categories: Direct Current (DC) motor and Alternating
Current (AC) motor. In this article we are going to discuss about the DC motor and its working. And also how a
gear DC motors works.
A DC motor is an electric motor that runs on direct current power. In any electric motor, operation is dependent
upon simple electromagnetism. A current carrying conductor generates a magnetic field, when this is then placed in
an external magnetic field, it will encounter a force proportional to the current in the conductor and to the strength
of the external magnetic field.It is a device which converts electrical energy to mechanical energy. It works on the
fact that a current carrying conductor placed in a magnetic field experiences a force which causes it to rotate with
respect to its original position.
Practical DC Motor consists of field windings to provide the magnetic flux and armature which acts as the
conductor.

Fig Brushless DC Motors Work


The input of a brushless DC motor is current/voltage and its output is torque. Understanding the operation of DC
motor is very simple from a basic diagram is shown in below. DC motor basically consist two main parts. The
rotating part is called the rotor and the stationary part is also called the stator. The rotor rotates with respect to the
stator.

Fig Brushless DC Motors


DC MOTOR
The rotor consists of windings, the windings being electrically associated with the commutator. The geometry of the
brushes, commutator contacts and rotor windings are such that when power is applied, the polarities of the
energized winding and the stator magnets are misaligned and the rotor will turn until it is very nearly straightened
with the stator’s field magnets.

As the rotor reaches alignment, the brushes move to the next commutator contacts and energize the next winding.
The rotation reverses the direction of current through the rotor winding, prompting a flip of the rotor’s magnetic
field, driving it to keep rotating.

Advantages of DC Motor:
1. Provide excellent speed control for acceleration and deceleration
2. Easy to understand design
3. Simple, cheap drive design

L293D: An H-Bridge

An H-Bridge is nothing but an electronic circuit. Using such a circuit, you can supply current in two directions.
Thats it. The L293D is an H-Bridge with two possible outputs. Meaning, you can connect two things to it... and you
can control the direction of current flow in both.
Lets say you have a DC motor, as in the diagram below:

Fig An H-Bridge in terms of switches

If you close both S1 and S2, you'll short circuit the entire thing. Same goes with S3 and S4. Such a condition, in
technical terms, is called a shoot through. So we won't consider shoot throughs.

Now, if you close switches S1 and S4, current flows through the motor from left to right. If you close S3 and S2,
current flows from right to left. In these two conditions, the direction of rotation is different.

This is exactly whats needed in most robotics projects using differential drive wheels. But having physical switches
would be very inconvenient. You'd need more motors to close and open switches. And to control those motors you'd
need even more switches. Ah well. You probably get the point.

So what the researchers made was an electronically controlled switch: a transistor. And people used those transistors
and made circuits similar to the one shown above. The only difference was that instead of physical switches, they
had electronic switches.

Pin-out diagram
Pins on an L293D chip
As I had mentioned earlier, you get two output ports with the L293D. In the above pinout diagram, the left and right
sides denote the two outputs. The OUTPUT1 / OUTPUT2 pair forms one output and OUTPUT3 / OUTPUT4 froms
another pair. Current can flow through these pairs as dictated by the INPUT1 / INPUT2 and INPUT3 / INPUT4
pairs.

Vss is the logical voltage supply for a 1. For example, if you connect it to a 5V supply, 5 volts into any of the
INPUTs would mean a logical 1. However, if you connect it to a 36V supply, the same 5 volts into any INPUT
would mean a logical 0.

How did that happen? Well, you can roughly consider Vss/2 as the "threshold" for a logical 1. If a voltage is above
Vss/2, then its a 1... otherwiseits a 0. So for the 36V case... if any INPUT is given a voltage greater than 18V, only
then will it be considered a logical 1.

Vs is the actual voltage that needs to be output. This has nothing to do with the logical 0s and 1s.

GND represents grounds. These are needed for the multiple solid state switches that are burned into the IC.

ENABLE pins enable/disable the corresponding sides. Putting a logical 1 into ENABLE1 would enable
INPUT1/INPUT2 and OUTPUT1/OUTPUT2. Similarly, ENABLE2 would enable the other two input and output
pins. A logical 0 disables the corresponding side.

RELAY
Fig 4-Channel Relay

Features of 5-Pin 5V Relay


 Trigger Voltage (Voltage across coil) : 5V DC
 Trigger Current (Nominal current) : 70mA
 Maximum AC load current: 10A @ 250/125V AC
 Maximum DC load current: 10A @ 30/28V DC
 Compact 5-pin configuration with plastic molding

 Operating time: 10msec Release time: 5msec


 Maximum switching: 300 operating/minute (mechanically)

EMBEBBED C LANGUAGE

Embedded C is one of the most popular and most commonly used Programming Languages in the development of
Embedded Systems. So, in this article, we will see some of the Basics of Embedded C Program and the
Programming Structure of Embedded C.
Embedded C is perhaps the most popular languages among Embedded Programmers for programming Embedded
Systems. There are many popular programming languages like Assembly, BASIC, C++ etc. that are often used for
developing Embedded Systems but Embedded C remains popular due to its efficiency, less development time and
portability.
Introduction to Embedded C Programming Language
Before going in to the details of Embedded C Programming Language and basics of Embedded C Program, we will
first talk about the C Programming Language.

The C Programming Language, developed by Dennis Ritchie in the late 60’s and early 70’s, is the most popular and
widely used programming language. The C Programming Language provided low level memory access using an
uncomplicated compiler (a software that converts programs to machine code) and achieved efficient mapping to
machine instructions.

The C Programming Language became so popular that it is used in a wide range of applications ranging from
Embedded Systems to Super Computers.

Embedded C Programming Language, which is widely used in the development of Embedded Systems, is an
extension of C Program Language. The Embedded C Programming Language uses the same syntax and semantics
of the C Programming Language like main function, declaration of datatypes, defining variables, loops, functions,
statements, etc.

Before digging in to the basics of Embedded C Program, we will first take a look at what an Embedded System is
and the importance of Programming Language in Embedded Systems.
What is an Embedded System?
An Embedded System can be best described as a system which has both the hardware and software and is designed
to do a specific task. A good example for an Embedded System, which many households have, is a Washing
Machine.

We use washing machines almost daily but wouldn’t get the idea that it is an embedded system consisting of a
Processor (and other hardware as well) and software.
Basics of Embedded C Program Image

Embedded Systems can not only be stand-alone devices like Washing Machines but also be a part of a much larger
system. An example for this is a Car. A modern day Car has several individual embedded systems that perform their
specific tasks with the aim of making a smooth and safe journey.

Some of the embedded systems in a Car are Anti-lock Braking System (ABS), Temperature Monitoring System,
Automatic Climate Control, Tyre Pressure Monitoring System, Engine Oil Level Monitor, etc.

Programming Embedded Systems


As mentioned earlier, Embedded Systems consists of both Hardware and Software. If we consider a simple
Embedded System, the main Hardware Module is the Processor. The Processor is the heart of the Embedded System
and it can be anything like a Microprocessor, Microcontroller, DSP, CPLD (Complex Programmable Logic Device)
and FPGA (Field Programmable Gated Array).

All these devices have one thing in common: they are programmable i.e. we can write a program (which is the
software part of the Embedded System) to define how the device actually works.

Embedded Software or Program allow Hardware to monitor external events (Inputs) and control external devices
(Outputs) accordingly. During this process, the program for an Embedded System may have to directly manipulate
the internal architecture of the Embedded Hardware (usually the processor) such as Timers, Serial Communications
Interface, Interrupt Handling, and I/O Ports etc.

From the above statement, it is clear that the Software part of an Embedded System is equally important to the
Hardware part. There is no point in having advanced Hardware Components with poorly written programs
(Software).

There are many programming languages that are used for Embedded Systems like Assembly (low-level
Programming Language), C, C++, JAVA (high-level programming languages), Visual Basic, JAVA Script
(Application level Programming Languages), etc.

In the process of making a better embedded system, the programming of the system plays a vital role and hence, the
selection of the Programming Language is very important.

Factors for Selecting the Programming Language


The following are few factors that are to be considered while selecting the Programming Language for the
development of Embedded Systems.

Size: The memory that the program occupies is very important as Embedded Processors like Microcontrollers have
a very limited amount of ROM.
Speed: The programs must be very fast i.e. they must run as fast as possible. The hardware should not be slowed
down due to a slow running software.
 Portability: The same program can be compiled for different processors.
 Ease of Implementation
 Ease of Maintenance
 Readability
Earlier Embedded Systems were developed mainly using Assembly Language. Even though Assembly Language is
closest to the actual machine code instructions, the lack of portability and high amount of resources spent on
developing the code, made the Assembly Language difficult to work with.

There are other high-level programming languages that offered the above mentioned features but none were close to
C Programming Language.

Basics of Embedded C Program


Now that we have seen a little bit about Embedded Systems and Programming Languages, we will dive in to the
basics of Embedded C Program. We will start with two of the basic features of the Embedded C Program:
Keywords and Datatypes.

Keywords in Embedded C
A Keyword is a special word with a special meaning to the compiler (a C Compiler for example, is a software that is
used to convert program written in C to Machine Code). For example, if we take the Keil’s Cx51 Compiler (a
popular C Compiler for 8051 based Microcontrollers) the following are some of the keywords:

 bit
 sbit
 sfr
 small
 large
These are few of the many keywords associated with the Cx51 C Compiler along with the standard C Keywords.

Data Types in Embedded C


Data Types in C Programming Language (or any programming language for that matter) help us declaring variables
in the program. There are many data types in C Programming Language like signed int, unsigned int, signed char,
unsigned char, float, double, etc. In addition to these there few more data types in Embedded C.

The following are the extra data types in Embedded C associated with the Keil’s Cx51 Compiler.

 bit
 sbit
 sfr
 sfr16

Difference between C and Embedded C


There is actually not much difference between C and Embedded C apart from few extensions and the operating
environment. Both C and Embedded C are ISO Standards that have almost same syntax, datatypes, functions, etc.

Embedded C is basically an extension to the Standard C Programming Language with additional features like
Addressing I/O, multiple memory addressing and fixed-point arithmetic, etc.

C Programming Language is generally used for developing desktop applications whereas Embedded C is used in the
development of Microcontroller based applications.

Guide to IoT Protocols and Standards

IoT communication protocols are modes of communication that protect and ensure optimum security to the data
being exchanged between connected devices.

The IoT devices are typically connected to the Internet via an IP (Internet Protocol) network. However, devices such
as Bluetooth and RFID allow IoT devices to connect locally. In these cases, there’s a difference in power, range,
and memory used. Connection through IP networks are comparatively complex, requires increased memory and
power from the IoT devices while the range is not a problem. On the other hand, non-IP networks demand
comparatively less power and memory but have a range limitation.

As far as the IoT communication protocols or technologies are concerned, a mix of both IP and non-IP networks can
be considered depending on usage.
Types of IoTProtocolsTypes of IoT Protocols
IoT protocols and standards can be broadly classified into two separate categories.

1. IoT Network Protocols

IoT network protocols are used to connect devices over the network. These are the set of communication protocols
typically used over the Internet. Using IoT network protocols, end-to-end data communication within the scope of
the network is allowed. Following are the various IoT Network protocols:
• HTTP (HyperText Transfer Protocol)

HyperText Transfer Protocol is the best example of IoT network protocol. This protocol has formed the foundation
of data communication over the web. It is the most common protocol that is used for IoT devices when there is a lot
of data to be published. However, the HTTP protocol is not preferred because of its cost, battery-life, energy saving,
and more constraints.

Additive manufacturing/3D printing is one of the use cases of the HTTP protocol. It enables computers to connect
3D printers in the network and print three-dimensional objects and pre-determined process prototypes.

• LoRaWan (Long Range Wide Area Network)

It is a long-range low power protocol that provides signal detection below the noise level. LoRaWan connects
battery operated things wirelessly to the Internet in either private or global networks. This communication protocol
is mainly used by smart cities, where there are millions of devices that function with less power and memory.

Smart street lighting is the practical use case of LoRaWanIoT protocol. The street lights can be connected to a LoRa
gateway using this protocol. The gateway, in turn, connects to the cloud application that controls the intensity of
light bulbs automatically based on the ambient lighting, which helps in reducing the power consumption during day-
times.

• Bluetooth

Bluetooth is one of the most widely used protocols for short-range communication. It is a standard IoT protocol for
wireless data transmission. This communication protocol is secure and perfect for short-range, low-power, low-cost,
and wireless transmission between electronic devices. BLE (Bluetooth Low Energy) is a low-energy version of
Bluetooth protocol that reduces the power consumption and plays an important role in connecting IoT devices.
Bluetooth protocol is mostly used in smart wearables, smartphones, and other mobile devices, where small
fragments of data can be exchanged without high power and memory. Offering ease of usage, Bluetooth tops the list
of IoT device connectivity protocols.

2. IoT Data Protocols


IoT data protocols are used to connect low power IoT devices. These protocols provide point-to-point
communication with the hardware at the user side without any Internet connection. Connectivity in IoT data
protocols is through a wired or a cellular network. Some of the IoT data protocols are:

• Message Queue Telemetry Transport (MQTT)

One of the most preferred protocols for IoT devices, MQTT collects data from various electronic devices and
supports remote device monitoring. It is a subscribe/publish protocol that runs over Transmission Control Protocol
(TCP), which means it supports event-driven message exchange through wireless networks.

MQTT is mainly used in devices which are economical and requires less power and memory. For instance, fire
detectors, car sensors, smart watches, and apps for text-based messaging.

• Constrained Application Protocol (CoAP)

CoAP is an internet-utility protocol for restricted gadgets. Using this protocol, the client can send a request to the
server and the server can send back the response to the client in HTTP. For light-weight implementation, it makes
use of UDP (User Datagram Protocol) and reduces space usage. The protocol uses binary data format EXL
(Efficient XML Interchanges).

CoAP protocol is used mainly in automation, mobiles, and microcontrollers. The protocol sends a request to the
application endpoints such as appliances at homes and sends back the response of services and resources in the
application.

• Advanced Message Queuing Protocol (AMQP)

AMQP is a software layer protocol for message-oriented middleware environment that provides routing and
queuing. It is used for reliable point-to-point connection and supports the seamless and secure exchange of data
between the connected devices and the cloud. AMQP consists of three separate components namely Exchange,
Message Queue, and Binding. All these three components ensure a secure and successful exchange and storage of
messages. It also helps in establishing the relationship of one message with the other.
AMQP protocol is mainly used in the banking industry. Whenever a message is sent by a server, the protocol tracks
the message until each message is delivered to the intended users/destinations without failure.

• Machine-to-Machine (M2M) Communication Protocol


It is an open industry protocol built to provide remote application management of IoT devices. M2M
communication protocols are cost-effective and use public networks. It creates an environment where two machines
communicate and exchange data. This protocol supports the self-monitoring of machines and allows the systems to
adapt according to the changing environment.

M2M communication protocols are used for smart homes, automated vehicle authentication, vending machines, and
ATM machines.

• Extensible Messaging and Presence Protocol (XMPP)

The XMPP is uniquely designed. It uses a push mechanism to exchange messages in real-time. XMPP is flexible
and can integrate with the changes seamlessly. Developed using open XML (Extensible Markup Language), XMPP
works as a presence indicator showing the availability status of the servers or devices transmitting or receiving
messages.

Other than the instant messaging apps such as Google Talk and WhatsApp, XMPP is also used in online gaming,
news websites, and Voice over Internet Protocol (VoIP).

IoT Protocols Offers a Secured Environment for Exchange of Data

As per an article published by Forbes, approximately “32,000 smart homes and businesses are at risk of leaking
data.” Therefore, it becomes important to explore the potentials of IoT protocols and standards, which creates a
secure environment. Using these protocols, local gateways and other connected devices can communicate and
exchange data with the cloud.
CHAPTER 6:
Software Description:
1 Arduino IDE
Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are
able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output -
activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending
a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language
(based on Wiring), and the Arduino Software (IDE), based on Processing.
The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users. It runs on Mac,
Windows, and Linux. Teachers and students use it to build low cost scientific instruments, to prove chemistry and
physics principles, or to get started with programming and robotics. Designers and architects build interactive
prototypes, musicians and artists use it for installations and to experiment with new musical instruments. Makers, of
course, use it to build many of the projects exhibited at the Maker Faire, for example. Arduino is a key tool to learn
new things. Anyone - children, hobbyists, artists, programmers - can start tinkering just following the step by step
instructions of a kit, or sharing ideas online with other members of the Arduino community.
There are many other microcontrollers and microcontroller platforms available for physical computing. Parallax
Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer similar functionality. All of
these tools take the messy details of microcontroller programming and wrap it up in an easy-to-use package.
Arduino also simplifies the process of working with microcontrollers, but it offers some advantage for teachers,
students, and interested amateurs over other systems:
• Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. The least
expensive version of the Arduino module can be assembled by hand, and even the pre-assembled Arduino modules
cost less than $50
Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems.
Most microcontroller systems are limited to Windows.
• Simple, clear programming environment - The Arduino Software (IDE) is easy-touse for beginners, yet flexible
enough for advanced users to take advantage of as well.
• Open source and extensible software - The Arduino software is published as open source tools, available for
extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting
to understand the technical details can make the leap from Arduino to the AVR C programming language on which
it's based. Similarly, you can add AVR-C code directly into your Arduino programs if you want to.
• Open source and extensible hardware - The plans of the Arduino boards are published under a Creative Commons
license, so experienced circuit designers can make their own version of the module, extending it and improving it.
Even relatively inexperienced users can build the breadboard version of the module in order to understand how it
works and save money.
5.2 Embedded C:

 When designing software for a smaller embedded system with the 8051, it is very common place to develop
the entire product using assembly code. With many projects, this is a feasible approach since the amount of
code that must be generated is typically less than 8 kilobytes and is relatively simple in nature. If a hardware
engineer is tasked with designing both the hardware and the software, he or she will frequently be tempted to
write the software in assembly language.
 The trouble with projects done with assembly code can is that they can be difficult to read and maintain,
especially if they are not well commented. Additionally, the amount of code reusable from a typical
assembly language project is usually very low. Use of a higher-level language like C can directly address
these issues. A program written in C is easier to read than an assembly program.
 Since a C program possesses greater structure, it is easier to understand and maintain. Because of its
modularity, a C program can better lend itself to reuse of code from project to project. The division of code
into functions will force better structure of the software and lead to functions that can be taken from one
project and used in another, thus reducing overall development time. A high order language such as C allows
a developer to write code, which resembles a human’s thought process more closely than does the equivalent
assembly code. [25]The developer can focus more time on designing the algorithms of the system rather
than having to concentrate on their individual implementation. This will greatly reduce development time
and lower debugging time since the code is more understandable.
 By using a language like C, the programmer does not have to be intimately familiar with the architecture of
the processor. This means that someone new to a given processor can get a project up and running quicker,
since the internals and organization of the target processor do not have to be learned. Additionally, code
developed in C will be more portable to other systems than code developed in assembly. Many target
processors have C compilers available, which support ANSI C.
 All of this is not to say that assembly language does not have its place. In fact, many embedded systems
(particularly real time systems) have a combination of C and assembly code. For time critical operations,
assembly code is frequently the only way to go. One of the great things about the C language is that it allows
you to perform low-level manipulations of the hardware if need be, yet provides you the functionality and
abstraction of a higher order language.

CHAPTER 7
TESTING
Testing is the process of evaluating a system or its component(s) with the intent to find whether it satisfies the
specified requirements or not. Testing is executing a system in order to identify any gaps, errors, or missing
requirements in contrary to the actual requirements.

Testing Principle

Before applying methods to design effective test cases, a software engineer must understand the basic principle
that guides software testing. All the tests should be traceable to customer requirements.

Testing Methods

There are different methods that can be used for software testing. They are,

1. Black-Box Testing

The technique of testing without having any knowledge of the interior workings of the application is
called black-box testing. The tester is oblivious to the system architecture and does not have access to
the source code. Typically, while performing a black-box test, a tester will interact with the system's user
interface by providing inputs and examining outputs without knowing how and where the inputs are
worked upon.

2. White-Box Testing

White-box testing is the detailed investigation of internal logic and structure of the code. White-box
testing is also called glass testing or open-box testing. In order to perform white-box testing on an
application, a tester needs to know the internal workings of the code. The tester needs to have a look
inside the source code and find out which unit/chunk of the code is behaving inappropriately.
Levels of Testing

There are different levels during the process of testing. Levels of testing include different methodologies that
can be used while conducting software testing. The main levels of software testing are:

 Functional Testing:

This is a type of black-box testing that is based on the specifications of the software that is to be tested.
The application is tested by providing input and then the results are examined that need to conform to
the functionality it was intended for. Functional testing of software is conducted on a complete,
integrated system to evaluate the system's compliance with its specified requirements. There are five
steps that are involved while testing an application for functionality.

 The determination of the functionality that the intended application is meant to perform.

 The creation of test data based on the specifications of the application.

 The output based on the test data and the specifications of the application.

 The writing of test scenarios and the execution of test cases.

 The comparison of actual and expected results based on the executed test cases.

 Non-functional Testing

This section is based upon testing an application from its non-functional attributes. Non-functional
testing involves testing software from the requirements which are non-functional in nature but important
such as performance, security, user interface, etc. Testing can be done in different levels of SDLC. Few
of them are
Unit Testing

Unit testing is a software development process in which the smallest testable parts of an application, called
units, are individually and independently scrutinized for proper operation. Unit testing is often automated but it
can also be done manually. The goal of unit testing is to isolate each part of the program and show that
individual parts are correct in terms of requirements and functionality. Test cases and results are shown in the
Tables.
Pick and Place Robot

Unit Testing Benefits

 Unit testing increases confidence in changing/ maintaining code.


 Codes are more reusable.
 Development is faster.
 The cost of fixing a defect detected during unit testing is lesser in comparison to
that of defects detected at higher levels.
 Debugging is easy.
 Codes are more reliable.

TEST CASES Expected Outcome Actual Outcome Results

Interfacing Arduino Motor Should Rotate Forward and Reverse Passed


With DC Motor according to inputs Movements achieved

Interfacing Arduino Pick and Place Arm Movement achieved as Passed


With Pick and Place should operate as per per command
ARM instructions

Wireless Movement Receive Data Through Worked Properly Passed


RF and Perform according to commands
Accordingly Received

IR Sensor Should Sense Obstacle is Avoided Passed


Obstacle Avoidance and Avoid obstacle upon detection

DEPT OF , , BENGALURU Page 50


Pick and Place Robot

Integration Testing:

Integration testing is a level of software testing where individual units are combined and
tested as a group. The purpose of this level of testing is to expose faults in the interaction
between integrated units. Test drivers and test stubs are used to assist in Integration
Testing. Integration testing is defined as the testing of combined parts of an application to
determine if they function correctly. It occurs after unit testing and before validation
testing. Integration testing can be done in two ways: Bottom-up integration testing and
Top-down integration testing.

1. Bottom-up Integration

This testing begins with unit testing, followed by tests of progressively higher-level
combinations of units called modules or builds.

2. Top-down Integration
In this testing, the highest-level modules are tested first and progressively, lower-
level modules are tested thereafter.

In a comprehensive software development environment, bottom-up testing is


usually done first, followed by top-down testing. The process concludes with multiple tests
of the complete application, preferably in scenarios designed to mimic actual situations.
Table 8.3.2 shows the test cases for integration testing and their results.
Integration Testing:

DEPT OF , , BENGALURU Page 51


Pick and Place Robot

Sl # Test Case : - ITC-1


Name of Test: - Robot Movement and Pick and Place
Item being tested: - Movement of Robot
Sample Input: - Power On
Should pick the waste and also place correctly on collector point
Expected output: -

Functioned Properly
Actual output: -

Remarks: - Pass.

System testing:

System testing of software or hardware is testing conducted on a complete, integrated


system to evaluate the system's compliance with its specified requirements. System testing
falls within the scope of black-box testing, and as such, should require no knowledge of the
inner design of the code or logic. System testing is important because of the following
reasons:

 System testing is the first step in the Software Development Life Cycle, where the
application is tested as a whole.

 The application is tested thoroughly to verify that it meets the functional and
technical specifications.

 The application is tested in an environment that is very close to the production


environment where the application will be deployed.

 System testing enables us to test, verify, and validate both the business
requirements as well as the application architecture.

System Testing is shown in below tables

DEPT OF , , BENGALURU Page 52


Pick and Place Robot
Sl # Test Case : - STC-1
Name of Test: - System testing
Item being tested: - Synchronization
Give Inputs From All Input Modules
Sample Input: -

Expected output: - Robot Should Perform Actions According to Input


Actual output: - All Functions Worked Properly
Remarks: - Pass

DEPT OF , , BENGALURU Page 53


Pick and Place Robot
CONCLUSION

The aim of this work is the development of wireless control of a pick and place robot using Android
application .It is controlledby an android application called blue control. The micro controller used is an
Atmega328 and Arduino software is used toprogram it. Number of joints on the arm determines the type
of object it can handle. The main feature of this is the soft catching arm. We know that when handling
the explosive items like bomb it will be handled smoothly. Excessive pressure will cause explosion. So
this robot has microcontroller based electrical pressure sensor which has higher sensitivity than
mechanical pressure sensors.The maximum weight that can be carried by this model is depends on the
capacity of DC motors used. Very useful and interesting can be made by interfacing the „Pick and Place
Robot‟ with explosive detectors, metal detectors, wireless cameras, night vision cameras...Etc. for
findingthe bombs and proper visual assistance.

FUTURE SCOPE
DEPT OF , , BENGALURU Page 54
Pick and Place Robot

The robot so programmed for pick and place operation can be made versatile and more
efficient by providing the feedback and making it to work on own than any human
interventions. It can be made possible by image processing tool interfaced with thisArduino.
The features that can be added on to improve its efficiency, make it operate on its own
thought without any human intervention are line follower, wall hugger, obstacle avoider,
metal detector, bomb diffuser etc.

REFERENCE
DEPT OF , , BENGALURU Page 55
Pick and Place Robot

[1]. ArkaSain, JanardanDattani and Dhara M Mehta, “Design and Implementation of Wireless
Control of Pick and Place Robot Arm”, International Journal of Advanced Research in
Engineering and Technology (IJARET), p-ISSN: 0976-6480 and e-ISSN: 0976-6499, Volume
9, Issue 3, May – June 2018.
[2].M.J.Sawarkar, TruptiR.Raut, Nutan P. Nemad, Sonal C. Meshram, Pournima P. Tabhane,
“Pick and Place Robotic Arm Using Android Device”, International Research Journal of
Engineering and Technology (IRJET), e-ISSN: 2395-0056 and p-ISSN: 2395-0072, Volume:
04, Issue: 03, Mar-2017.
[3]. MuhammedJabir.N.K, Neetha John, MuhammedFayas,Midhun Mohan, MidhunSajeev,
Safwan.C.N, “Wireless Control of Pick and Place Robotic Arm Using an Android
Application”, International Journel of Advanced Research in Electrical, Electronics and
instrumentation Engineering, p- ISSN: 2320-3765, e-ISSN: 2278-8875, Volume 4, Issue 4,
April 2015.
[4].BabuGanesh. K, HariShankar.K, KolanchiMani.V, Thennarasu.S, Ramu.S, “Android
Controlled Robotic Arm Vehicle”, Advances in Natural and Applied Sciences, p-ISSN: 1995-
0772, e-ISSN: 1998-1090, 2017 February 11.
[5]. M.T. Islam, M.A. Wazed and T.Mohammad, “Design and Fabrication of a 5 DOF
Dexterous Robotic Arm for Industrial Tasks”, International Conference on Mechanical
Engineering 2007, ICME07-AM-58, 29-31 December 2007.
[6].N.Rishikanth, Dr. J. Suresh Kumar, Dr.A.Srinath, “Design and Analysis of Intelligent
Robotic Arm”, International Journal of Scientific & Engineering Research Volume 8, Issue
12, December-2017 ISSN 2229-5518.
[6].A shly baby, Chinnu Augustine, ChinnuThampi, Maria George, Abhilash A P and Philip C
Jose, “Pick and Place Robotic Arm Implementation Using Arduino”, IOSR Journal of
Electrical and Electronics Engineering (IOSR-JEEE),

DEPT OF , , BENGALURU Page 56

You might also like