Professional Documents
Culture Documents
Project Report On
Arduino Based Recycling System
th
12 December, 2018
i
Premier University
Department of Electrical & Electronic Engineering
Name of Project:
Arduino Based Recycling System
Supervised by
Akram Ul Haque
Lecturer,
Department of Electrical & Electrical Engineering
Premier University, Chittagong
……………………………….
Signature of Supervisor
Submitted By
………………………………….. …………………………………..
Signature of student Signature of student
ii
Premier University
Department of Electrical and Electronic Engineering
Chittagong-4203, Bangladesh
The project titled “Arduino Based Recycling System” is submitted by Md. Iftakhar Kaiser;
Student ID: 1301411200555 and Md. Yakub Ali; Student ID: 1301411200570 in the session
of July-2018, for the partial fulfilment of the requirement for the degree of Bachelor of Science
in Electrical and Electronic Engineering.
Authors
………………………………….. …………………………………..
Signature Signature
iii
Declaration
This is to endorse that the work presented through this project entitled “Arduino Based
Recycling System” is the outcome of the investigation carried out by us, under the supervision
of Akram Ul Haque, Lecturer, Department of Electrical and Electronic Engineering (DEEE),
Premier University, Chittagong. It is also proclaimed that neither of the particular work nor any
part of the work presented here has been submitted elsewhere for the award of any degree or
diploma.
Supervised by
Akram Ul Haque
Lecturer,
Department of Electrical & Electrical Engineering
Premier University, Chittagong
……………………………….
Signature of Supervisor
Authors
………………………………….. …………………………………..
Signature Signature
iv
Dedicated to
Our Beloved Parents,
Our Siblings
&
Our honourable Teachers
v
ACKNOWLEDGEMENT
At the very beginning, we proclaim that we are very much grateful to the almighty and the most
beneficent, for enabling us to complete the project work.
With great pleasure, we would like to express our heartfelt thanks and deepest gratitude to our
respected project supervisor Akram Ul Haque, Lecturer, Department of Electrical and
Electronics Engineering (DEEE), for having faith in us and for engaging us in this research
work. We are also thankful for his valuable guidance through this project work. He has always
stretched his helping hands whenever we needed. This project, what it is today, is the result of
his constant guidance, helpful suggestion, and constructive criticisms and also his endless
patience. He is the light bearer of this whole research work.
Furthermore, we would like to thank our honourable Dean, Department of Electrical &
Electronic Engineering (DEEE). We also thank to our honourable Chairman, Department of
Electrical & Electronic Engineering (DEEE) and also to our faculty members for their constant
supports. We would also like to thank our lab assistants. We would also like to thank our well-
wishers and all the responded who directly and indirectly supported us during our project work
with their endless help and support. And last but not the least, we thank our classmates for their
endless help and support.
vi
ABSTRACT
vii
Serial No. Contents Page No.
Acknowledgement vi
Abstract vii
Chapter 1: Introduction
1.1 Introduction 02
1.2 Motivation of “Arduino Based Recycling System” 02
1.3 Objectives 03
2.1 Introduction 05
2.2 What is Arduino Based Recycling System? 05
2.3 Importance of Arduino based recycling system 05
2.4 What is drinks & beverage waste? 06
2.5 Negative impacts of waste 06
2.6 Why recycling is necessary? 06
2.7 Concept of Arduino based recycling system 07
3.1 Introduction 09
3.2 Methodology 09
3.3 Proposed “Arduino Based Recycling System” 09
3.4 Block diagram 12
4.1 Introduction 15
4.2 Working principle of capacitive proximity sensor 15
4.3 Schematic diagram with description 19
4.4 An image of hardware 21
4.5 Required Components 21
4.6 Description of components 22
viii
Serial No. Contents Page No.
5.1 Introduction 24
5.2 Flow chart of “Arduino Based Recycling System” 24
5.3 Algorithm of the proposed system 25
6.1 Introduction 27
6.2 Final Observation 27
6.3 Detailed Results 27
Chapter 7: Conclusion
7.1 Introduction 29
7.2 Limitations 30
7.3 Future Directions 30
References 31
Appendixes
Appendix A 33
Appendix B 43
Appendix C 63
ix
Serial No. List of Figure Page No.
3.1 Metal can sensing & removing system 10
3.2 Glass bottle sensing & removing system 11
3.3 Plastic counting & plastic storage 11
3.4 LCD display for based showing message 12
3.5 Block diagram of Arduino based Recycling system 12
4.1 Capacitive proximity sensor 15
4.2 Internal block diagram of capacitive proximity sensor 15
4.3 Dielectric constant Vs. Rated sensing distances (Sr) 16
4.4 Flush mounted capacitive proximity sensor 16
4.5 Capacitive proximity sensor (CR18CN08DPO) 17
4.6 Wiring diagram of CR18CN08DPO 17
4.7 Schematic block diagram of “Arduino Based Recycling System” 18
4.8 Schematic block diagram of “Arduino Based Recycling System” 19
4.9 An image of hardware 21
5.1 Flow chart of “Arduino Based Recycling System” 24
x
Serial No. List of Figure Page No.
A1 Arduino UNO 36
A2 Arduino Nano 36
A3 Arduino Lily Pa 37
A4 Arduino Mega 37
A5 Arduino NETDUINO 37
A6 Arduino Ethernet 38
A7 Arduino UNO Layout 39
A8 Pin diagram of ATMega 328p 40
A9 Block diagram of ATMega 328p 44
A10 How to use 46
A11 Arduino UNO drawing 47
A12 Arduino Mega Pin Mapping 47
B1 24V DC Gear Motor 49
B2 Basic construction of DC motor 49
B3 DC servo motor 50
B4 The parts of a servo motor 51
B5 Wave of different width of pulse 52
B6 Aluminium Multi-Purpose servo bracket 53
B7 24V DC Relay 54
B8 Basic parts of electromechanical relay 54
B9 DC Power Supply 56
B10 Circuit diagram of 24V DC power supply 57
B11 Limit Switches 58
B12 Operation of limit switches 58
B13 Level type actuator of limit switch 59
B14 Precision type limit switch 59
B15 Pin diagram of voltage regulator IC 60
B16 Block diagram of three terminal IC based voltage regulator 61
B17 Block diagram of three terminal adjustable voltage regulator 61
B18 Liquid crystal display 62
xi
Serial No. List of Tables Page No.
6.1 Observation result of the “Arduino Based Recycle System” 28
6.2 Measurement of temperature of system 28
xii
xiii
Chapter 1
Introduction
1.1 Introduction
1.3 Objectives
1
1.1 Introduction
The world population is increasing dramatically. The increase in consumption increasing the
waste. Total waste in the world is enormous. Some of it is recycled but a lot is simply dumped,
causing problem for the people and the environment. Every year we dump a massive 2.12 billion
tons of waste. If all this waste was put on a trucks, they would go around the world 24 times.
Among the type of the waste, the maximum number of waste are built from the bottles or can of
the drinks and beverages. Every year around 4,325,490 used bottles of drinks waste dumped in
the ocean. Thus, polluting the water. More than 100 million bottles are used worldwide every
day. It takes 1 plastic bottle 700 years to start decomposing. Bacteria, which usually helps in
breaking down organic materials don’t react with this types of bottle. Only 1 out of 5 bottles or
cans are recycled. The rest of them just become waste.
For saving the used bottle from turning into waste and managing them, a conventional system
exists called “Bottle Return & Handling Machine”. It can detects the types of bottle and return
the money to the consumer.
To develop a better system, we proposed a “Arduino Based Recycling system” where we add
some new features in the system. We add the option of counting the bottle according to the type
of material, whereas in the conventional system it can count and calculate the money by the QR
code. We also add the option to show the number of bottles and money to be returned in the LCD
display. The best feature is that, we added the option of the bottle being separated into the
predefined storage of their own, so that recycling can be done easily by collecting them from the
storage[16] [17].
In the present scenario, the waste problem is increasing and thus population is a severe problem
in many modern cities all over the world. To overcome the problem, we have come up with an
exclusive idea for a “Arduino Based Recycling System”. In this project, we will demonstrate the
management system of used bottle & can of drinks and beverages by the consumers and the
option of getting money in exchange of the stored number of bottle depending on their type
(Can, Plastic, and Glass).
The system is based on Arduino, Capacitive Proximity Sensor, Motors and LCD display. The
Capacitive Proximity Sensor are mounted on the side of the conveyer belt. The Capacitive
proximity sensor get activated, when the used bottles are passed by their sensing area. The sensor
then sends the data to the Arduino and Arduino operate the predefined servo motor to store that
bottle according to their type (Can, Plastic, and Glass).
2
1.3 Objective
The main objective of this project is to design and construct a “Arduino Based Recycling
System” which accepts used (empty) containers of beverages, detects either the container is of
plastic, metal or glass, and store these bottles in predefined individual storages. It also count the
number of containers of different type (plastic, metal or glass) accepted from the user and
calculate the amount of money to be returned to the user.
3
Chapter 2
2.1 Introduction
4
2.1 Introduction
Recycling have become an important issue in recent times. With this motivation in the mind, of
human’s day to day life, this project aims at designing and implementing, a running model of
“Arduino Based Recycling System”. In this chapter, we will discuss about our Arduino Based
Recycling System and beverage waste management. Here we briefly describe the various
element, which are used in the project.
Arduino Based Recycling System has become an important step before the recycling process.
This system has been one evolutionary step in the field of technology. Recycling is an important
issue nowadays. There is no lack of campaigns working to spread the awareness about it. But it
is still something people find hard to do. The issue is more difficult to tackle in developing
countries. However, coming up with smarter version of recycling methods can make a huge
difference and that is where “Arduino Based Recycling System” came in.
The proposed recycling system allows a person to put in a bottle or can in the system and get
money in return. This provide a great incentive for people to take interest in the process of
recycling. Recycling process are a common part of retail areas and public areas like parks and
hospitals. A “Arduino Based Recycling System” helps to reduce the amount of people who don’t
cooperate in such activities. Nowadays, people take more interest in activates that are interactive
and technology based. The busy lifestyle, especially in urban areas hardly allows people to think
about a recycling bin unless you are a super conscious person in comparison, the Arduino Based
recycling system are more convenient in catching people’s interest and curiosity [8][11].
5
2.4 What is drinks & Beverage waste?
Waste or rubbish, trash, junk, garbage, depending on the type of material or the regional
terminology, is an unwanted or undesired material or substances. It may consist of the unwanted
materials left over from a manufacturing process (Industrial, commercial, mining or agricultural
operations) or from community and household activities. The material may be discarded or
accumulated, stored or treated (Physically, Chemically or biologically), prior to being discarded
or recycled. It is also used to describe something we use inefficiently or inappropriately.
The drinks and beverage waste are those Can and bottles of glass, plastic or metal which has
been consumed by the consumer and then the empty can and bottle turn into waste.
Waste can be regarded as a human concept as there appears to be no such thing as waste in
nature. The waste products created by a natural process or organism quickly become the raw
products used by other processes and organisms. Recycling is predominant, therefore production
and decomposition are well balanced and nutrient cycles continuously support the next cycles of
production. This is the so-called circle of life and is a strategy clearly related to ensuring stability
and sustainability in natural systems. On the other hand there are man-made systems which
emphasize the economic value of materials and energy, and where production and consumption
are the dominant economic activities. Such systems tend to be highly destructive of the
environment as they require massive consumption of natural capital and energy, return the end
product (waste) to the environment in a form that damages the environment and require more
natural capital be consumed in order to feed the system. Where resources and space are finite this
is ultimately not sustainable.
The presence of waste is an indication of overconsumption and that materials are not being used
efficiently. This is carelessly reducing the Earths capacity to supply new raw materials in the
future. The capacity of the natural environment to absorb and process these materials is also
under stress. Valuable resources in the form of matter and energy are lost during waste disposal,
requiring that a greater burden be placed on ecosystems to provide these. The main problem is
the sheer volume of waste being produced and how we deal with it [5] [15].
Recycling is very important as waste has a huge negative impact on the natural environment.
Harmful Chemical & greenhouse gases are released from rubbish in landfill sites. Recycling
helps to reduce the pollution caused by waste. Habitat destruction and global warming are some
the effects caused by deforestation. Recycling reduces the need for raw materials so that the
rainforests can be preserved. Huge amounts of energy are used when making products from raw
materials. Recycling requires much less energy and therefore helps to preserve natural resources.
6
2.7 Concept of Arduino Based Recycling System
Nowadays, drinks and beverage waste is a serious issue. Therefore, for simulating and
optimizing the waste, to better accommodate this demand is arises. In this project, we designed
the management system of used bottle & can of drinks and beverages by the consumers and the
option of getting money in exchange of the stored number of bottle depending on their type
(Can, Plastic, and Glass).The system is based on Arduino, Capacitive Proximity Sensor, Motors
and LCD display. The Capacitive Proximity Sensor are mounted on the side of the conveyer belt.
The Capacitive proximity sensor get activated, when the used bottles are passed by their sensing
area. The sensor then sends the data to the Arduino and Arduino operate the predefined motor to
store that bottle according to their type (Can, Plastic, and Glass).
Capacitive Proximity Sensor and a microcontroller (Arduino UNO-R3) are interfaced for
controlling the movement of servo motors, counting the number of bottles, calculate the amount
of money to be returned and showing it on the LCD display.
7
Chapter 3
Design Methodology
3.1 Introduction
3.2 Methodology
8
3.1 Introduction
In this chapter, we will discuss about our “Arduino Based Recycling System”. Here we briefly
describe about the block diagram and various elements, which are used in the project.
3.2 Methodology
The main objective of this project is to design a recycling system based on the first step before
the recycling process. We designed the management system of used bottle & can of drinks and
beverages by the consumers and the option of getting money in exchange of the stored number of
bottle depending on their type (Can, Plastic, and Glass).
The system is based on Arduino, Capacitive Proximity Sensor, Motors and LCD display. The two
st
capacitive Proximity Sensor are mounted on the side of the conveyer belt. The 1 capacitive
proximity sensor get activated, when the metal cans are passed by its sensing area. The sensor then
sends the data as input to the Arduino and Arduino operate the predefined servo motor 1(can
nd
removing) to store that can in the predefined can storage. The 2 capacitive proximity sensor get
activated, when the glass bottles are passed by its sensing area. The sensor then sends the data as
input to the Arduino and Arduino operate the predefined servo motor 2(glass removing) to store that
bottle in the predefined glass storage. A limit switch is used for the counting of plastic bottle. Two
signal from the two sensor output is used as the counting the number of can and glass bottle. This
two signal and the output of limit switch is used as the input of microcontroller (Arduino).The bottles
are stored in predefined individual storage.
Capacitive Proximity Sensor and a microcontroller (Arduino UNO-R3) are interfaced for
controlling the movement of servo motors (described in Appendix B), counting the number of
bottles, calculate the amount of money to be returned and showing it on the LCD display
(described in Appendix B).
In the conventional management system, we observed that there are only the option of collecting
the bottle and returning money as fixed price per bottle. It doesn’t show the total number of
bottle inputted in the system. There is not any option of storing the bottle automatically in
individual storage. In our proposed system, there is an option of showing the number of bottle
inputted in the system via LCD display. There is also an option of storing the bottle in predefined
individual storage.
9
We hope above feature of our proposed system will help in better recycling process of the waste
bottle of drink & beverages. It will also help the consumer in getting some money from the used
bottle. By this system, the consumer will be more interested about storing their bottle in
“Arduino Based Recycling System” for getting money and thus no bottles of drinks & beverages
will not be dumped as waste in the nature.
Our proposed project totally based in three basic operating part. Firstly, sensing the can and
remove the can from the continuously rotating conveyer belt in the can storage, where only the
can will be stored.
In this part, the capacitive proximity sensor 1 senses the presence of metal can in its sensing area
and transmit a signal to the Arduino as input, the Arduino then switches on the can removing
servo motor and the motor remove & store the can in the can storage.
10
The second part is sensing the glass bottle and remove the glass from the continuously rotating
conveyer belt in the glass storage, where only the glass bottle will be stored.
In this part, the capacitive proximity sensor 2 senses the presence of glass bottle in its sensing
area and transmit a signal to the Arduino as input, the Arduino then switches on the can
removing servo Motor and the motor remove & store the glass bottle in the can storage.
The third part is counting the plastic bottle and let it to move towards the straight end box of the
conveyer belt. The plastic bottle then giving a signal via limit switch for the count in the
microcontroller.
11
We had also connected a LCD display for showing the number of bottle & the amount of money
to be return to the consumer.
Figure 3.5 shows the block diagram of “Arduino Based Recycling System” to reduce the
drinks & beverage waste and to help in the recycling process. The main parts of this project
are:
12
From the block diagram, there is power supply of both DC 24V & DC 5V. The microcontroller
we used in our project is “Arduino UNO-R3”. Almost every microcontroller operates at 5V DC.
The manufacturer data sheets will have information about the allowed limits of the power supply
voltage of microcontroller. The Arduino control the whole operation of this “Arduino Based
Recycling System”. The capacitive proximity sensor is used to sense the type of the bottle and
the servo motors (briefly described in Appendix B) are used to remove the bottle to the
predefined storage after sensing by the sensor. The microcontroller is used for the counting of
bottle and display the message to the consumer. A brief description of “Arduino UNO-R3” is
added in Appendix A.
13
Chapter 4
Hardware Design
4.1 Introduction
14
4.1 Introduction
Hardware implementation of the project is consists of different types of devices. Arduino is the
core of this hardware. In this chapter, we will briefly describe about the hardware.
Capacitive proximity sensors are similar to inductive proximity sensors. The main difference
between the two types is that capacitive proximity sensors produce an electrostatic field instead
of an electromagnetic field. Capacitive proximity switches will sense metal as well as non-
metallic materials such as paper, glass, liquids, and cloth.
The sensing surface of a capacitive sensor is formed by two concentrically shaped metal electrodes of
an unwound capacitor. When an object nears the sensing surface, it enters the electrostatic field of
the electrodes and changes the capacitance in an oscillator circuit. As a result, the oscillator begins
oscillating. The trigger circuit reads the oscillator’s amplitude and when it reaches a specific level the
output state of the sensor changes. As the target moves away from the sensor the oscillator’s
amplitude decreases, switching the sensor output back to its original state.
Figure 4.2: Internal Block diagram of Capacitive Proximity Sensor (courtesy: www.automationdirect.com)
15
Standard targets are specified for each capacitive sensor. The standard target is usually defined
as metal and/or water. Capacitive sensors depend on the dielectric constant of the target. The
larger the dielectric number of a material the easier it is to detect. The following graph shows the
relationship of the dielectric constant of a target and the sensor’s ability to detect the material
based on the rated sensing distance (Sr) [3].
Figure 4.3: Dielectric constant Vs. Rated sensing distance (Sr) (courtesy: sensors-actuators-info.blogspot.com)
Capacitive sensors are shielded. These sensors will detect conductive material such as copper,
aluminium, or conductive fluids, and nonconductive material such as glass, plastic, cloth, and
paper. Shielded sensors can be flush mounted without adversely affecting their sensing
characteristics. Care must be taken to ensure that this type of sensor is used in a dry environment.
Liquid on the sensing surface could cause the sensor to operate.
16
4.2.1 Capacitive Proximity Sensor (CR18CN08DPO)
Capacitive sensors can be used to detect metal objects as well as nearly all other materials.
They sense fluid level, chemical concoctions and fluid level etc. of any object within the range.
These sensors are able to detect dielectric materials like plastic, glass or such fluids.
General Attribute
Wiring Diagram
17
4.3 Schematic diagram of “Arduino Based Recycling System”
4.3.1 Connection diagram with Capacitive Proximity Sensor and Relay
18
4.3.2 Connection diagram with Arduino
19
Descriptions
This schematic diagram of proposed system is drawn in fritzing and proteus. The Arduino
connection part is drawn in proteus and the code is also run in Proteus. In the schematic diagram,
“Arduino Based System” is represented with the connection of equipment as capacitive
proximity sensor, Pilot push switch, Indicator, gear motor, servo motor, limit switch etc. The
system is based on Arduino, Capacitive Proximity Sensor, Motors and LCD display. The two
st
capacitive Proximity Sensor are mounted on the side of the conveyer belt. The 1 capacitive
proximity sensor get activated, when the metal cans are passed by its sensing area. The sensor then
sends the data as input to the Arduino and Arduino operate the predefined servo motor 1(can
nd
removing) to store that can in the predefined can storage. The 2 capacitive proximity sensor get
activated, when the glass bottles are passed by its sensing area. The sensor then sends the data as
input to the Arduino and Arduino operate the predefined servo motor 2(glass removing) to store that
bottle in the predefined glass storage. A limit switch is used for the counting of plastic bottle. Two
signal from the two sensor output is used as the counting the number of can and glass bottle. This
two signal and the output of limit switch is used as the input of microcontroller (Arduino).The
bottles are stored in predefined individual storage. Capacitive Proximity Sensor and a
microcontroller (Arduino UNO-R3) are interfaced for controlling the movement of servo motors,
counting the number of bottles, calculate the amount of money to be returned and showing it on
the LCD display. A brief description of Proteus is added in Appendix C and source code is added
in Appendix C [1] [4].
20
4.4 An image of hardware
21
4.6 Description of Components
A brief description of the components and needed data sheet are given at appendix B.
22
Chapter 5
Software Design
5.1 Introduction
23
5.1 Introduction
The computer software for coding the program is done in “Arduino”. The source code of
program has been converted to a hex file by Proteus. The file then loaded to the simulation file of
Arduino in the proteus.
24
5.3 Algorithm of proposed system
In the proposed system, the can and bottle sensing is basically done by capacitive proximity
sensor depending on their types of dielectric. The whole process of the proposed “Arduino Based
Recycle System” is described below:
1. At first, the motor of the conveyer belt starts by pushing the green pilot push switch from the
control box.
2. Then the bottle/can put into the conveyer belt.
3. When the motor of the conveyer belt (Motor 1) is on, then the capacitive proximity sensors
will be active.
4. If the sensor 1 senses the can into it sensor area, the sensor then send a signal to the Arduino
and Arduino operates the can removing servo to remove the can into can storage.
5. If the sensor 2 senses the glass bottle into it sensor area, the sensor then send a signal to the
Arduino and Arduino operates the glass removing servo to remove the glass bottle into glass bottle
storage.
6. If the two sensor cannot senses the present of can or glass bottle, then the system consider the
extra bottle as a plastic and let it to go forward into the plastic storage at the end of the conveyer
belt.
7. The plastic bottle is counted by a signal from the limit switch.
8. The rest of the bottle is counted by a signal from the can detecting proximity sensor and Glass
detecting proximity sensor. This signal is interfaced with the Arduino. Arduino processes the
signal and helps in counting.
9. The whole counting process & the calculation of money need to be return to the consumer is
shown in LCD display.
25
Chapter 6
Result & Analysis
6.1 Introduction
26
6.1 Introduction
In this chapter we will discuss about the results & performance of our “ARDUINO Based
Recycling System”. Here we will briefly describe the outcome of our project.
● We have made the whole system which is based on Arduino, Capacitive Proximity Sensor,
Motors and LCD display.
st
● The two capacitive Proximity Sensor are mounted on the side of the conveyer belt. The 1
capacitive proximity sensor get activated, when the metal cans are passed by its sensing area.
The sensor then sends the data as input to the Arduino and Arduino operate the predefined servo
motor 1(can removing) to store that can in the predefined can storage.
nd
● The 2 capacitive proximity sensor get activated, when the glass bottles are passed by its
sensing area. The sensor then sends the data as input to the Arduino and Arduino operate the
predefined servo motor 2(glass removing) to store that bottle in the predefined glass storage. A
limit switch is used for the counting of plastic bottle.
● Two signal from the two sensor output is used as the counting the number of can and glass bottle.
This two signal and the output of limit switch is used as the input of microcontroller (Arduino).
This signal is interfaced with the Arduino. Arduino processes the signal and helps in counting.
● Capacitive Proximity Sensor and a microcontroller (Arduino UNO-R3) are interfaced for
controlling the movement of servo motors, counting the number of bottles, calculate the amount
of money to be returned and showing it on the LCD display.
● Capacitive Proximity Sensor operates the relay, by which the two servo are operated via
Arduino. When Capacitive Proximity Sensor energize the relay, the relay then operates the servo
motor controlled by Arduino. The code for operating the servo is written in Arduino IDE. There
is no error while compilation and uploading the program to the Arduino UNO R3.
● The whole counting process & the calculation of money need to be return to the consumer is
shown in LCD display.
27
6.3 Detailed Results with Data
The results from observation are given below:
Before starting the operation of the system After ending the operation of the system
(On mode) (Off mode)
Arduino Arduino Arduino Arduino
○ ○ ○ ○ ○ ○ ○ ○
92 F/33.33 C 92 F/33.33 C 93 F/35 C 95 F/35 C
From the detailed result with data, we can say that, after operating the system for 30 minutes, it
is able to collect nearly 580 bottle and show it on display. The temperature difference of before
and after the operation of the device is also shown. We have used a motor of 50 rpm there. The
collection time of bottle can be increased or decreased by varying the rpm of the motor used in
conveyer belt and the time required for removing the bottle from the conveyer belt
28
Chapter 7
Conclusion
7.1 Conclusion
7.2 Limitations
29
7.1 Conclusion
In the present scenario, the waste problem is increasing and thus population is a severe problem
in many modern cities all over the world. To overcome the problem, we have come up with an
exclusive idea for a “Arduino Based Recycling System”. In this project, we will demonstrate the
management system of used bottle & can of drinks and beverages by the consumers and the
option of getting money in exchange of the stored number of bottle depending on their type
(Can, Plastic, and Glass).
The system is based on Arduino, Capacitive Proximity Sensor, Motors and LCD display. The
Capacitive Proximity Sensor are mounted on the side of the conveyer belt. The Capacitive
proximity sensor get activated, when the used bottles are passed by their sensing area. The sensor
then sends the data to the Arduino and Arduino operate the predefined motor to store that bottle
according to their type (Can, Plastic, and Glass).
The “Arduino Based Recycling System” is easy to use. It reduces the steps needed to recycle and
contribute to slow down the climate change by not giving can and bottle the chance to turn into
waste. It also reduce the demand of raw materials.
It incentivized recycling works and will increase recycling rates. “Arduino Based Recycling
System” can play a pivotal role in increasing recycling rate and make our world a charming,
beautiful, magical pollution free place[17][14].
7.2 Limitations
Though the proposed system is efficient than the convenient system, but it has some limitations
which are given below-
1. We do not compare the physical results between the proposed system and conventional system.
2. It can only calculate the amount of money, but it cannot return money to the consumer.
▫ A “Arduino Based Recycling System” that can be fitted to a standard recycle bin.
▫ Recycling process can be added.
30
References
[1] Microcontrollers and Electronics Blog. [Online]. Available: http://www.ermicro.com
[2] ECETechspire [Online]. Available: http://ecetechspire.blogspot.com
[3] (2009) Sensor basics website. [Online]. Available: sensors-actuator-info.blogspot.com
[4] (2001) Electronic Components Datasheet. [Online]. Available: www.alldatasheet.com
[5] (2003) recycle info website. [Online]. Available: http://www.bottlebill.org/
[6] (2012) reverse vending system. [Online]. Available: http://www.reversevending.co.uk/
[7] L. Trevor (2012) homepage on guardian. [Online]. Available: http://www.guardian.co.uk/
environment/2012/july/04/beijing-recycling-banks-subway bottles/
th
[8] W. Bolton, Programmable logic controller, 4 edition, Elsevier newness, 2006
[9] (2014) homepage on earth911. [Online]. Available: http://earth911.com /news/ 2010 /04/28 /
reverse-vending-machine-rewards-you-for-recycling-on-the-go/
[10] Z. Zamani (2015) homepage on The Sun Daily. [Online]. Available: https://thedailysun
/news/2015/03/14 /world's recycling rate is still low/
[11] X. Chi, S.P. Martin, Y.L.W. Mark, A.R. Markus, “Informal Electronic Waste Recycling: A
sector Review with Special Focus on China” Waste Management, 2011, 31, pp. 731–742.
[12] C. K. N. Gupta and G. L. Shekar, “Electronic Waste Management System In world – A
Review”, Journal of Management & Technology, 2009, 1(1), pp. 11 – 24.
[13] Z. Tarmudi, M. L. Abdullah, A. O. M. Tap, “An Overview of Municipal Solid Wastes
Generation in Malaysia”, Jurnal Teknologi, 2009, 51(F), pp. 1–15
[14] S. Abdouli. “RFID Application in Municipal Solid Waste Management System”,
International Journal of Environmental Research, 2009, 3(3):447-45.
[15] T. F. Lun, “The Study of beverage Container Recycling Process and Potential Market for
Reverse Vending Machine (RVM)”, Master Thesis, Ritsumeikan Asia Pacific University,
Japan,2011.
[16] S. Sharma and A. Monga, “Implementation of Reverse Vending Machine Based on FPGA”,
International journal of Emerging Technologies in Computational and Applied Sciences, 2014,
14-153, pp. 265-271.
[17] M. H. A. Wahab, A. A. kadir, M.R.M. Tomari, M. H. Jabbar, “Smart Recycle Bin: A
Conceptual Approach of Smart Waste Management with Integrated Web Based System”, In Proc. Of
Intl. Conf. on IT Conv. and Security (ICITCS 2014), 28-30th Oct. 2014, Beijing, pp. 1-4.
[18] M. Stojanov, “Recycling: Feature and World Practice”, RSP, 2015, 45, p.p. 211-220.
[19] siemens in details. [Online]. Available: www.siemens.ca
[20] For support. [Online]. Available: www.support.industry.siemens.com
31
APPENDIX
32
Appendix-A
Microcontroller (Arduino)
A.1 Microcontroller
Microcontrollers have become common and very popular in many areas, and can be found
hidden in many categories of products like home appliances, computer equipment, automobiles,
etc. From a microwave oven to Refrigerator to high tech robots contains a microcontroller.
Microcontrollers are used in running the traffic light at an intersection, in automobiles, the
engine, the anti-lock brakes, the cruise control, industrial automation and so on. From the
simplest gadgets, like digital cameras, cell phones, printing machines etc, to highly sophisticated
satellite, robots and nuclear missile systems, the microcontrollers have become ubiquitous.
Arduino is an open-source computer hardware and software company, project and user
community that designs and manufactures kits for building digital devices and interactive objects
that can sense and control the physical world. Arduino boards may be purchased preassembled,
or as do-it-yourself kits; at the same time, the hardware design information is available for those
who would like to assemble an Arduino from scratch.
The project is based on a family of microcontroller board designs manufactured primarily by
Smart Projects in Italy, and also by several other vendors, using various 8-bit AtmelAVR
33
microcontrollers or 32-bit Atmel ARM processors. These systems provide sets of digital and
analog I/O pins that can be interfaced to various extension boards and other circuits. The boards
feature serial communications interfaces, including USB on some models, for loading programs
from personal computers. For programming the microcontrollers, the Arduino platform provides
an integrated development environment (IDE) based on the Processing project, which includes
support for C and C++ programming languages.
The first Arduino was introduced in 2005. The project leaders sought to provide an inexpensive
and easy way for hobbyists, students, and professionals to create devices that interact with their
environment using sensors and actuators. Common examples for beginner hobbyists include
simple robots, thermostats and motion detectors. Adafruit Industries estimated in mid-2011 that
over 300,000 official Arduinos had been commercially produced, and in 2013 that 700,000
official boards were in users' hands.
Arduino started in 2005 as a project for students at the Interaction Design Institute Ivrea in Ivrea,
Italy. At that time program students used a "BASIC Stamp" at a cost of 8000tk, considered
expensive for students. Massimo Banzi, one of the founders, taught at Ivrea. The name
"Arduino" comes from a bar in Ivrea, where some of the founders of the project used to meet.
The bar itself was named after Arduino, Margrave of Ivrea and King of Italy.
34
EEPROM used by other microcontrollers at the time. AVR chips became popular after they were
designed into the 8-bit Arduino platform.
There are many other microcontrollers and microcontroller platforms available for physical
computing. PIC board 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 850 tk
Cross-platform - The Arduino software runs on Windows, and Linux operating systems.
Most microcontroller systems are limited to Windows.
Simple, clear programming environment - The Arduino programming environment is
easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as
well. For teachers, it's conveniently based on the Processing programming environment,
so students learning to program in that environment will be familiar with the look and
feel of Arduino
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 Arduino is based on Atmel's ATMEGA8 and
ATMEGA168 microcontrollers. The plans for the modules 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.
35
Installation: Step-by-step instructions for setting up the Arduino software and connecting it to
an Arduino Uno, Mega2560, Duemilanove, Mega, or Diecimila.
Windows
Mac OS X
Linux
Environment: Description of the Arduino development environment and how to change the
default language.
Arduino UNO
36
Arduino Lily PAD
NETDUINO
37
Ethernet, etc.
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It
contains everything needed to support the microcontroller; simply connect it to a computer with
a USB cable or power it with a AC-to-DC adapter or battery to get started. The Uno differs from
all preceding boards in that it does not use the FTDIUSB-to-serial driver chip. Instead, it features
the Atmega8U2 programmed as a USB-to-serial converter.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno
and version1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest
in a series of USB Arduino boards, and the reference model for the Arduino platform.
A.11 Summary
Microcontroller ATmega328
Operating Voltage 5V
38
Digital I/O Pins 14 (of which 6 provide PWM output)
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Length 68.6 mm
Width 53.4 mm
Weight 25 g
39
A.12 Pin Diagram of Atmega328p microcontroller
A.13 Power
The Arduino Uno can be powered via the USB connection or with an external power supply. The
power source is selected automatically.
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
POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts.
The power pins are as follows:
● VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
● 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
40
the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can
damage your board. We don't advise it.
● 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
● GND. Ground pins.
●IOREF. This pin on the Arduino 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 for working with
the 5V or 3.3V.
A.14 Memory
The ATmega328 chip found on the Uno has the following amounts of memory:
Flash 32k bytes (of which .5k is used for the bootloader)
SRAM 2k bytes
EEPROM 1k byte
Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of
20-50 kOhms. 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 Serial chip.
●External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.
●PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
●SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
using the SPI library.
●LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
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 analogReference() function.
Additionally, some pins have specialized functionality:
41
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire
library.
AREF. Reference voltage for the analog inputs. Used with analogReference().
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.
See also the mapping between Arduino pins and ATmega328 ports. The mapping for the
Atmega8, 168, and 328 is identical.
A.15 Communication
The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or
other microcontrollers. The ATmega328 provides 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 USB and 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, a. ino file is required. The Arduino software includes a serial monitor which allows simple
textual data to be sent to and from the Arduino 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 and 1).A Software Serial library allows for serial
communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For SPI
communication, use the SPI library.
A.16 Programming
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino
Uno from the Tools > Board menu (according to the microcontroller on your board). For details,
see the reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to
upload new code to it without the use of an external hardware programmer. It communicates
using the original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit
Serial Programming) header using Arduino ISP or similar; see these instructions for details.
42
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available. The
ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map of
Italy) and then resetting the 8U2.
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.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and
Linux) to load a new firmware. Or you can use the ISP header with an external programmer
(overwriting the DFU bootloader). See this user-contributed tutorial for more information.
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno 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 uses this capability to allow you
to upload code by simply pressing the upload button in the Arduino environment. This means
that the bootloader 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 bootloader 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 this data.
The Uno 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 reset line; see this forum
thread for details.
43
A.18 USB Overcurrent Protection
The Arduino Uno has a resettable poly fuse 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.
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Four screw holes allow
the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8
is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
44
A.21Pin Description of ATmega 328P:
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port B output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even
if the clock is not running. Depending on the clock selection fuse settings, PB6 can be used as
input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the inverting
oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip clock source, PB7..6
is used as TOSC2.1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.
A.21.5 Port C (PC5:0)
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
PC5..0 output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even
if the clock is not running.
A.21.6 PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is
unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the
minimum pulse length will generate a Reset, even if the clock is not running.
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port D output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even
if the clock is not running.
45
A.21.8 AVCC
AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. It should be
externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be
connected to VCC through a low-pass filter. Note that PC6..4 use digital supply voltage, VCC.
A.21.9 AREF
In the TQFP and QFN/MLF package, ADC7:6 serve as analog inputs to the A/D converter.
These pins are powered from the analog supply and serve as 10-bit ADC channels.
Arduino can sense the environment by receiving input from a variety of sensors and can affect its
surroundings by controlling lights, motors, and other actuators. The microcontroller on the board
is programmed using the Arduino programming language (based on Wiring) and the Arduino
development environment (based on Processing). Arduino projects can be stand-alone or they
can communicate with software on running on a computer (e.g. Flash, Processing, MaxMSP).
Arduino is a cross-platform program. You’ll have to follow different instructions for your personal
OS. Check on the Arduino site for the latest instructions. http://Arduino.cc/en/Guide/HomePage
Once you have downloaded/unzipped the Arduino IDE, you can plug the Arduino to your PC via
USB cable. Now you’re actually ready to “burn” your first program on the Arduino board. To
select “blink led”, the physical translation of the well-known programming “hello world”, select
File>Sketchbook> Arduino-0017>Examples>Digital>Blink
Once you have your sketch you’ll see something very close to the screenshot on the right. In
Tools>Board select Now you have to go to Tools>Serial Port and select the right serial port, the
one Arduino is attached to.
46
A.23 Dimensioned Drawing
47
A.25 Overview
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P)
of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
Weight 25 g
48
Appendix-B
B.1 24V DC Gear Motor
A DC motor in simple words is a device that converts electrical energy (direct current system)
into mechanical energy. A motor is an electrical machine which converts electrical energy into
mechanical energy. The principle of working of a DC motor is that "whenever a current carrying
conductor is placed in a magnetic field, it experiences a mechanical force". The direction of this
force is given by Fleming's left hand rule and its magnitude is given by F = BIL. Where, B =
magnetic flux density, I = current and L = length of the conductor within the magnetic field.
The very basic construction of a DC motor contains a current carrying armature which is
connected to the supply end through commutator segments and brushes. The armature is placed
in between north south poles of a permanent or an electromagnet as shown in the diagram below:
49
As soon as we supply direct current in the armature, a mechanical force acts on it due to
electromagnetic effect of the magnet. Now to go into the details of the operating principle of DC
motor it’s important that we have a clear understanding of Fleming’s left hand rule to determine
the direction of force acting on the armature conductors of DC motor.
If a current carrying conductor is placed in a magnetic field perpendicularly, then the conductor
experiences a force in the direction mutually perpendicular to both the direction of field and the
current carrying conductor. Fleming’s left hand rule says that if we extend the index finger, middle
finger and thumb of our left hand perpendicular to each other, in such a way that the middle finger is
along the direction of current in the conductor, and index finger is along the direction of magnetic
field i.e. north to south pole, then thumb indicates the direction of created mechanical force [3].
A servo motor is an electrical device which can push or rotate an object with great precision. If
you want to rotate and object at some specific angles or distance, then you use servo motor. It is
just made up of simple motor which run through servo mechanism. If motor is used is DC
powered then it is called DC servo motor, and if it is AC powered motor then it is called AC
servo motor. We can get a very high torque servo motor in a small and light weight packages.
Doe to these features they are being used in many applications like toy car, RC helicopters and
planes, Robotics, Machine etc.
Servo motors are rated in kg/cm (kilogram per centimetre) most hobby servo motors are rated at
3kg/cm or 6kg/cm or 12kg/cm. This kg/cm tells you how much weight your servo motor can lift
at a particular distance. For example: A 6kg/cm Servo motor should be able to lift 6kg if the
load is suspended 1cm away from the motors shaft, the greater the distance the lesser the weight
carrying capacity. The position of a servo motor is decided by electrical pulse and its circuitry is
placed beside the motor.
50
It consists of three parts:
1. Controlled device
2. Output sensor
3. Feedback system
It is a closed loop system where it uses positive feedback system to control motion and final
position of the shaft. Here the device is controlled by a feedback signal generated by comparing
output signal and reference input signal. Here reference input signal is compared to reference
output signal and the third signal is produces by feedback system. And this third signal acts as
input signal to control device. This signal is present as long as feedback signal is generated or
there is difference between reference input signal and reference output signal. So the main task
of servomechanism is to maintain output of a system at desired value at presence of noises.
Working principle of Servo Motors
A servo consists of a Motor (DC or AC), a potentiometer, gear assembly and a controlling
circuit. First of all we use gear assembly to reduce RPM and to increase torque of motor. Say at
initial position of servo motor shaft, the position of the potentiometer knob is such that there is
no electrical signal generated at the output port of the potentiometer. Now an electrical signal is
given to another input terminal of the error detector amplifier. Now difference between these two
signals, one comes from potentiometer and another comes from other source, will be processed
in feedback mechanism and output will be provided in term of error signal. This error signal acts
as the input for motor and motor starts rotating. Now motor shaft is connected with
potentiometer and as motor rotates so the potentiometer and it will generate a signal. So as the
potentiometer’s angular position changes, its output feedback signal changes. After sometime the
position of potentiometer reaches at a position that the output of potentiometer is same as
external signal provided. At this condition, there will be no output signal from the amplifier to
the motor input as there is no difference between external applied signal and the signal generated
at potentiometer, and in this situation motor stops rotating.
Figure B4: The parts of a servo motor (L) and an assembled servo (R) (courtesy: https://www.servodatabase.com)
51
Controlling Servo Motor
All motors have three wires coming out of them. Out of which two will be used for Supply (positive
and negative) and one will be used for the signal that is to be sent from the MCU. Servo motor is
controlled by PWM (Pulse with Modulation) which is provided by the control wires. There is a
minimum pulse, a maximum pulse and a repetition rate. Servo motor can turn 90 degree from either
direction form its neutral position. The servo motor expects to see a pulse every 20 milliseconds
(ms) and the length of the pulse will determine how far the motor turns. For example, a 1.5ms pulse
will make the motor turn to the 90° position, such as if pulse is shorter than 1.5ms shaft moves to 0°
and if it is longer than 1.5ms than it will turn the servo to 180°.
Servo motor works on PWM (Pulse width modulation) principle, means its angle of rotation is
controlled by the duration of applied pulse to its Control PIN. Basically servo motor is made up
of DC motor which is controlled by a variable resistor (potentiometer) and some gears. High
speed force of DC motor is converted into torque by Gears. We know that WORK= FORCE X
DISTANCE, in DC motor Force is less and distance (speed) is high and in Servo, force is High
and distance is less. Potentiometer is connected to the output shaft of the Servo, to calculate the
angle and stop the DC motor on required angle.
Servo motor can be rotated from 0 to 180 degree, but it can go up to 210 degree, depending on
the manufacturing. This degree of rotation can be controlled by applying the Electrical Pulse of
proper width, to its Control pin. Servo checks the pulse in every 20 milliseconds. Pulse of 1 ms
(1 millisecond) width can rotate servo to 0 degree, 1.5ms can rotate to 90 degree (neutral
position) and 2 ms pulse can rotate it to 180 degree [2].
52
Aluminium Multi-Purpose Servo Bracket
High quality brushed aluminium multi-purpose servo bracket. Works great for making multi-
axis joints for use in robot arms and legs and making the position of servo motor stable.
Relays are generally used to switch smaller currents in a control circuit and do not usually control
power consuming devices except for small motors and Solenoids that draw low amps. Nonetheless,
relays can "control" larger voltages and amperes by having an amplifying effect because a small
voltage applied to a relays coil can result in a large voltage being switched by the contacts.
53
Protective relays can prevent equipment damage by detecting electrical abnormalities, including
overcurrent, undercurrent, overloads and reverse currents. In addition, relays are also widely
used to switch starting coils, heating elements, pilot lights and audible alarms.
54
Relays involve two circuits: the energizing circuit and the contact circuit. The coil is on the
energizing side; and the relays contacts are on the contact side. When a relays coil is energized,
current flow through the coil creates a magnetic field. Whether in a DC unit where the polarity
is fixed, or in an AC unit where the polarity changes 120 times per second, the basic function
remains the same: the magnetic coil attracts a ferrous plate, which is part of the armature. One
end of the armature is attached to the metal frame, which is formed so that the armature can
pivot, while the other end opens and closes the contacts. Contacts come in a number of different
configurations, depending on the number of Breaks, poles and Throws that make up the relay.
For instance, relays might be described as Single-Pole, Single-Throw (SPST), or Double-Pole,
Single-Throw (DPST). These terms will give an instant indication of the design and function of
different types of relays.
1. Break -This is the number of separate places or contacts that a switch uses to open or close a
single electrical circuit. All contacts are either single break or double break. A single break (SB)
contact breaks an electrical circuit in one place, while a double break (DB) contact breaks it in
two places. Single break contacts are normally used when switching lower power devices such
as indicating lights. Double break contacts are used when switching high-power devices such as
solenoids.
2. Pole -This is the number of completely isolated circuits that relays can pass through a switch.
A single-pole contact (SP) can carry current through only one circuit at a time. A double-pole
contact (DP) can carry current through two isolated circuits simultaneously. The maximum
number of poles is 12, depending upon a relays design.
3. Throw -This is the number of closed contact positions per pole that are available on a switch.
A switch with a single throw contact can control only one circuit, while a double-throw contact
can control two.
1. General Purpose Relays are electromechanical switches, usually operated by a magnetic coil.
General purpose relays operate with AC or DC current, at common voltages such as 12V, 24V,
48V, 120V and 230V, and they can control currents ranging from 2A-30A. These relays are
economical, easy to replace and allow a wide range of switch configuration.
2. Machine Control Relays are also operated by a magnetic coil. They are heavy-duty relays
used to control starters and other industrial components. Although they are more expensive than
general purpose relays, they are generally more durable. The biggest advantage of machine
control relays over general purpose relays is the expandable functionality of Machine Control
Relays by the adding of accessories. A wide selection of accessories is available for machine
control relays, including additional poles, convertible contacts, and transient suppression of
electrical noise, latching control and timing attachments.
3. Reed Relays are a small, compact, fast operating switch design with one contact, which is NO.
Reed Relays are hermetically sealed in a glass envelope, which makes the contacts unaffected by
contaminants, fumes or humidity, allows reliable switching, and gives contacts a higher life
expectancy. The ends of the contact, which are often plated with gold or another low resistance
material to increase conductivity, are drawn together and closed by a magnet. Reed relays are capable
of switching industrial components such as solenoids, contactors and starter. motors. Reed
55
relays consists of two reeds. When a magnetic force is applied, such as an electromagnet or coil,
it sets up a magnetic field in which the end of the reeds assume opposite polarity. When the
magnetic field is strong enough, the attracting force of the opposite poles overcomes the stiffness
of the reeds and draws them together. When the magnetic force is removed, the reeds spring back
to their original, open position. These relays work very quickly because of the short distance
between the reeds.
56
Rectifier
Rectifier is a device which converts the sinusoidal ac voltage into either positive or negative
pulsating dc. P-N junction diode, which conducts when forward biased and practically does not
conduct when reverse biased, can be used for rectification i.e. for conversion of ac into dc. The
rectifier typically needs one, two or four diodes. Rectifiers may be either half-wave rectifiers or
full-wave rectifiers (center-tap or bridge) type. The output voltage from a rectifier circuit has a
pulsating character i.e., it contains unwanted ac components (components of supply frequency f
and its harmonics) along with dc component. For most supply purposes, constant direct voltage
is required than that furnished by a rectifier. To reduce ac components from the rectifier output
voltage a filter circuit is required.
Thus filter is a device which passes dc component to the load and blocks I ac components of the
rectifier output. Filter is typically constructed from reactive circuit I elements such as capacitors
and/or inductors and resistors. The magnitude of output dc voltage may vary with the variation of
either the input ac voltage or the magnitude of load current. So at the output of a rectifier filter
combination a voltage regulator is required, to provide an almost constant dc voltage at the
output of the regulator. The voltage regulator may be constructed from a Zener diode, and or
discrete transistors, and/or integrated circuits (ICs). Its main function is to maintain a constant dc
output voltage. However, it also rejects any ac ripple voltage that is not removed by the filter.
The regulator may also include protective devices such as short-circuit protection, current
limiting, thermal shutdown, or over-voltage protection.
57
B.5 Limit Switches
Presence Sensing is the act of detecting the presence or absence of an object with a contact or
non-contact sensing device. The sensors then produce an electrical output signal that can be used
to control equipment or processes.
Mechanical limit switches are contact sensing devices widely used for detecting the presence or
position of objects in industrial applications. The term limit switch is derived from the operation
of the device it-self. As an object (or target) makes contact with the operator of the switch, it
eventually moves the actuator to the "limit" where the electrical contacts change state.
Through this mechanical action, electrical contacts are either opened (in a normally closed
circuit) or closed (in a normally open circuit). Inductive proximity, capacitive proximity, and
photoelectric sensors perform this same process through non-contact sensing.
58
Limit Switch Terminology
1. Pretravel — the distance or angle that the actuator must go through to trip the contacts
2. Operating Point — position of the actuator at which the contacts snap to the operated position
3. Release Point — the position of the actuator at which the contacts return to their original state
4. Differential — distance (degrees) between contacts trip and contacts reset
5. Overtravel — movement of the actuator beyond the contacts trip point
6. Initial Position — position of actuator when no external force is applied to the
actuator Some other important terms associated with limit switches:
7. Operating force (torque) — force required to move the actuating element
8. Minimum return force (torque) — minimum force required to return actuator to its initial
position
9. Total Travel — the maximum allowable distance the actuating element can travel
10. Repeat Accuracy — ability of a switch to repeat its characteristics precisely from one
operation to the next operation
59
B.7 Voltage Regulator IC
A voltage regulator is one of the most widely used electronic circuitry in any device. A regulated
voltage (without fluctuations & noise levels) is very important for the smooth functioning of
many digital electronic devices. A common case is with micro controllers, where a smooth
regulated input voltage must be supplied for the micro controller to function smoothly.
Voltage regulators are of different types. In this article, our interest is only with IC based voltage
regulator. An example of IC based voltage regulator available in market is the popular 7805 IC which
regulates the output voltage at 5 volts. Now let’s come to the basic definition of an IC voltage
regulator. It is an integrated circuit whose basic purpose is to regulate the unregulated input voltage
(definitely over a predefined range) and provide with a constant, regulated output voltage.
Figure B15: Pin Diagram of Voltage Regulator IC (7805 & 7812) (courtesy: https://www.google.com)
A negative fixed voltage regulator is same as the positive fixed voltage regulator in design,
construction & operation. The only difference is in the polarity of output voltages. These IC’s are
designed to provide a negative output voltage. Example: - 7905, 7906 and all those IC’s in the
79XX series.
60
Figure B16: Block diagram of a 3 terminal IC based voltage regulator (courtesy: https://techterms.com)
An adjustable voltage regulator is a kind of regulator whose regulated output voltage can be
varied over a range. There are two variations of the same; known as positive adjustable voltage
regulator and negative adjustable regulator. LM317 is a classic example of positive adjustable
voltage regulator, whose output voltage can be varied over a range of 1.2 volts to 57 volts.
LM337 is an example of negative adjustable voltage regulator. LM337 is actually a complement
of LM317 which are similar in operation & design; with the only difference being polarity of
regulated output voltage.
There may be certain conditions where a variable voltage may be required. Right now we shall
discuss how an LM317 adjustable positive voltage regulator IC is connected. The connection
diagram is shown below.
Figure B17: Block diagram of 3 adjustable voltage regulator using LM317 (courtesy: https://techterms.com)
61
B.7 Liquid Crystal Display (LCD)
Liquid crystal display (LCD), electronic display device that operates by applying a varying
electric voltage to a layer of liquid crystal, thereby inducing changes in its optical properties.
LCDs are commonly used for portable electronic games, as viewfinders for digital cameras and
camcorders, in video projection systems, for electronic billboards, as monitors for computers,
and in flat-panel televisions.
Liquid crystals are materials with a structure that is intermediate between that of liquids and
crystalline solids. As in liquids, the molecules of a liquid crystal can flow past one another. As in
solid crystals, however, they arrange themselves in recognizably ordered patterns. In common
with solid crystals, liquid crystals can exhibit polymorphism; i.e., they can take on different
structural patterns, each with unique properties. LCDs utilize either nematic or smectic liquid
crystals. The molecules of nematic liquid crystals align themselves with their axes in parallel, as
shown in the figure. Smectic liquid crystals, on the other hand, arrange themselves in layered
sheets; within different smectic phases the molecules may take on different alignments relative to
the plane of the sheets.
The optical properties of liquid crystals depend on the direction light travels through a layer of
the material. An electric field (induced by a small electric voltage) can change the orientation of
molecules in a layer of liquid crystal and thus affect its optical properties. Such a process is
termed an electro-optical effect, and it forms the basis for LCDs. For nematic LCDs, the change
in optical properties results from orienting the molecular axes either along or perpendicular to the
applied electric field, the preferred direction being determined by the details of the molecule’s
chemical structure. Liquid crystal materials that align either parallel or perpendicular to an
applied field can be selected to suit particular applications.
62
Appendix C
C.1 Proteus
Proteus-8 is used as a simulation software. We used because it has some special feature. Those
features are:
●Total support for buses including components pins, inter-sheet terminals, module ports and wires.
●Proteus-8 is a single application with many service modules offering different functionality
(Schematic capture, PCB layout, etc.)
●Proteus-8 consists of a single application (PDS.EXE). This is the framework or container which
hosts all of the functionality of Proteus, ISIS, ARES, 3DV all open as tabbed windows within
this framework and therefore all have access to the common database.
●The common database contains information about parts used in the project. A part can contain
both a schematic component and a PCB footprint as well both user and system properties. Shared
access to this database by all application modules make possible a huge number of new features,
many of which will evolve over the course of version 8 lifecycle.
63
C.2 Source Code of Arduino
#include <Servo.h> int currentState2 = 0; if (buttonState1 == HIGH)
64
} } lcd.print(" ");
{ { lcd.print(counter1*2);
} if(currentState3 != lcd.print("CAN:");
previousState3)
if(currentState2 != lcd.print(counter2);
previousState2) {
lcd.print(" ");
{ if(currentState3 == 1)
lcd.print("Price:");
if(currentState2 == 1) {
lcd.print(counter2*3.5)
;
{ counter3 = counter3 + 1;
lcd.print("TK");
counter2 = counter2 + 1; Serial.println(counter3);
lcd.setCursor(0, 2);
Serial.println(counter2); }
lcd.print("PLASTIC:");
} }
lcd.print(counter3);
} previousState3 = currentState3;
lcd.print(" ");
previousState2 = currentState2; delay(10);
lcd.setCursor(0, 3);
delay(10); lcd.clear();
lcd.print("Price:");
if (buttonState3 == HIGH) lcd.setCursor(0, 0);
lcd.print(counter3*1.5);
{ lcd.print("GLASS:");
lcd.print("TK");
currentState3 = 1; lcd.print(counter1);
delay(200);
65