You are on page 1of 76

WASTE ACCUMULATION AND COMPRESSED EJECTOR (WACE-R)

A PROJECT REPORT
Submitted by

ANEESH HARI C H (JIT16EC001)


RENJITH S (JIT16EC010)
AKASH S RAJ (LJIT16EC012)
to

APJ Abdul Kalam Technological University in partial fulfillment of


the requirements for the award of the Degree

of

Bachelor of Technology In
Electronics and Communication Engineering

Department of Electronics and Communication Engineering


John Cox Memorial C.S.I Institute of Technology
Kannammoola, Thiruvananthapuram,
Kerala – 695011
MAY 2020
DECLARATION

We undersigned hereby declare that the project report “Waste Accumulation and Compressed Ejector
(WACE-R)” submitted for partial fulfillment of the requirements for the award of degree of Bachelor of
Technology of the APJ Abdul Kalam Technological University, Kerala is a bonafide work done by us
under supervision of Mrs.Seena M K. This submission represents our ideas in our own words and ideas
or words of others have been included, we have adequately and accurately cited and referenced the
original sources. We also declare that we have adhered to ethics of academic honesty and integrity and
have not misrepresented or fabricated any data or idea or fact or source in my submission. we understand
that any violation of the above will be a cause for disciplinary action by the institute or the University and
can also evoke penal action from the sources which have thus not been properly cited or from whom
proper permission has not been obtained. This report has not been previously formed the basis for the
award of any degree, diploma or similar title of any other University.

Kannammoola

May 2020
DEPARTMENT OFELECTRONICS AND COMMUNICATION ENGINEERING
JOHN COX MEMORIAL C.S.I INSTITUTE OF TECHNOLOGY
KANNAMMOOLA, THIRUVANANTHAPURAM, KERALA – 695011

CERTIFICATE

This is to certify that this report entitled “WACE -R”submitted by ANEESH HARI C H, RENJITH
S and AKASH S RAJ to the APJ Abdul Kalam Technological University in partial fulfillment of the
requirements for the award of the Degree of Bachelor of Technology in Electronics and Communication
Engineering is a bonafide record of the project work carried out by they under our guidance and
supervision. This report in any form has not been submitted to any other University or Institute for any
purpose.

Mrs.Seena M K
Assistant professor
Dept. of ECE
(Project Guide)

Mrs. SudeshnaJ S Mrs. Liji R F


Assistant professor Head of Department
Dept. of ECE Dept. of ECE
(Project Co-ordinator) JCM CSIIt
ACKNOWLEDGEMENT

We would like to express our heartfelt gratitude to


our respected
Mrs. Liji R F, Head of the Department,Electronics and Communication Engineering,
JCMCSIIT, for providing us opportunities and facilities for doing this seminar without which
this effort would not have seen light.
We sincerely express our gratefulness to our project guide Mrs. Seena M K, Assistant
professor, Department of Electronics and Communication Engineering, JCMCSIIT, for her
proper guidance and valuable suggestions. We thank her for all the care and concern she has
given to us.
We are greatly thankful to our project coordinator Mrs. Sudeshna J S, Assistant
professor, Department of Electronics and Communication Engineering, JCMCSIIT.
We are also thankful to our principal Dr. D P. Balachandran, JCMCSIIT for his
valuable suggestions.
Above all, we would like to thank God Almighty for giving us strength and showing the ways at
all points of obstruction.
Last but never the least we extend our sincere thanks to our parents and our friends for
their steady help, support and timely advice at various stages of this venture.
We once again extend our sincere thanks to all of them.

Aneesh Hari C H
Renjith S
Akash S Raj

i
ABSTRACT

WACE-R

(Waste Accumulation and Compressed Ejector- Robot)

The current waste management systems are unable to efficiently deal with the tons of
garbage that’s generated every day. Automating the processes of garbage sorting and disposal,
by switching to AI for smart recycling and waste management, is expected to bring in better
disposal methods to recycle sustainably. Here we introduce a robot named WACE-r, that is based
on AI and ML. The limited natural resources requires efficient methods and systems for cleaning
and recycling the waste for a better environment. Therefore construction of a recycling system is
needed to save the resources and minimises the wastes. For this reason, in this paper we have
proposed a robot that is capable of sorting the plastic wastes with the help of pick and place
robot. These inorganic plastic wastes are shredded using the shredder machine, which is the
second part of our project. These shredded plastic wastes are ejected out of the shredder by small
pieces, thus minimising the space for plastic waste storage and sorting. By doing so these plastic
wastes won’t flow through the rain water and causes severe health problems. The present
scenario problems due to plastic wastes can be minimised, and the recycling becomes more
easier using WACE-r.

ii
CONTENTS

Chapter no. Page no.


ACKNOWLEDGEMENT i
ABSTRACT ii
LIST OF TABLES iii
LIST OF FIGURES iv
LIST OF v
ABBREVIATION
1
CHAPTER 1 INTRODUCTION

CHAPTER 2 LITERATURE SURVEY 2

2.1 Waste Management by a Robot- A Smart 2


and Autonomous Technique
2.2 Automatic Garbage Separation Robot Using 3
Image Processing Technique
2.3 Waste Segregation Using Smart Robotic 3
Arm
2.4 A Smart Waste Management and 4
Monitoring
System usingAutomaticUnloading Robot
2.5 Automatic Garbage Collection using 4
Firebird-5 Robot
2.6 Fabrication of Plastic Compression 5
Molding Machine
2.7 Designandfabrication of Crusher machine 5
for plastic wastes
2.8 Hydraulic Air Compressor (HAC) 6
Demonstrator
2.9 Autonomous Garbage Collector – 6
ROBODUMPSTER
2.10 AGATOR - Automatic Garbage Collector 7
Robot Model

CHAPTER 3. METHODOLOGY 9

3.1 Image processing 9


3.2 Image recognition 9
3.3 Model training 9
3.4Object Recognition Using Deep Learning & 9
machine learning
3.5 Object Detection in Google Colab with 10
Custom datase

CHAPTER 4. ELECTRONIC COMPONENTS 12

4.1 Pick and place robot 12


4.1.1 PI –Camera 12
4.1.2 Raspberry PI 3 12
4.1.3 DC Motors 13
4.1.4 L293D Motor Driver– Arduino 15
4.1.5 Line Follower IR 17
4.1.6 Bluetooth module 18
4.1.7 HC-SR04 Ultrasonic Sensor 19
4.2 Shredder Machine 22
4.2.1 RFID Reader 22
4.2.2 Laser based Transmitter and receiver 24
4.2.3 Relay Module 25
4.2.4 DC Motor (Conveyor) 27
4.2.5 DC Motor (Shredder) 28
4.2.6 Thermal Printer 30

CHAPTER 5 SYSTEM ANALYSIS 32

5.1 Pick & Place Robot 32


5.2 Shredder Machine 33

CHAPTER 6 CIRCUIT DIAGRAM 36

6.1 Pick & Place Robot 36


6.2 Shredder Machine 37

CHAPTER 7 WORKING 38

7.1 Pick & Place Robot 38


7.1.1 Pick and Place Flow 39
7.2 Shredder Machine 40
7.2.1 Shredder Flow Chart 41

CHAPTER 8 RESULT 42

8.1 Tensor board 42


8.2 Image processing Raspberry Pi 43
8.3 Pick and Place program 49

CHAPTER 9 IMPLEMENTATION 60

CHAPTER 10 CONCLUSION 61
10.1 Future Scope 62

REFERENCES
LIST OF TABLES

No. Title Page No.

Table 4.1 Specification of DC motors 15

Table 4.2 Specification of DC (Conveyer) 28

Table 4.3 Specification of DC Motor Shredder 29

iii
LIST OF FIGURES

Figure No. Title Page No.

Fig 4.1 Pi camera 12

Fig 4.2 Raspberry PI 3 12

Fig 4.3 DC Motor 14

Fig 4.3 (a) Placement of motors 14

Fig 4.4 L293D Motor Driver 15

Fig 4.5 Line Follower IR 16

Fig 4.6 Bluetooth module 17

Fig 4.7 UltraSonic Sensor 18

Fig 4.8 Representation of trigger signals 19

Fig 4.9 RFID Reader 20

Fig 4.10 Laser Transmitter & Receiver 22

Fig 4.11 Relay 24

Fig 4.11(a) Ports of Relay 25

Fig 4.12 DC motor(Conveyer) 26

Fig 4.13 DC Motor (Shredder) 27

Fig 4.14 Thermal Printer 28

iv
Fig 5.1 Pick & Place Robot 29

Fig 5.2 Shredder machine 30

Fig 5.3 Shredder Bin 32

Fig 5.4 Conveyer System 33

Fig 6.1 Circuit dig. of Pick & Place Robot 36

Fig 6.2 Circuit dig. of shredder bin 37

Fig 7.1 Pick and Place Flow chart 39

Fig7.2 Shredder bin flow chart 41

Fig 8.1 Tensor board charts 42

v
LIST OF ABBREVIATIONS

ABBREVIATION EXPANSION

IR Infrared
Wi-Fi Wireless Fidelity
GUI Graphical User Interface
GSM Global System for Mobile communication

PIC Peripheral Interface Controller


RF Radio Frequency
AGSR Automatic Garbage Separation Robot
RFID Radio Frequency Identification
MATLAB Matrix Laboratory
DC Direct Current
SoC System on Chip
HAC Hydraulic Air Compressor
LED Light Emitting Diode
GPIO General Purpose Input Output
SMSC Short Message Service Centre
NC Normally Closed
RPM Revolutions per Minute
UART Universal Asynchronous Receiver
Transmitter

TTL Transistor-Transistor Logic


USB Universal Serial Bus
MCU Microcontroller Unit

vi
CHAPTER 1

INTRODUCTION

In this highly developing society time and man power are critical constrains for completion
of task in large scales. The automation is playing important role to save human efforts in most of
the regular and frequently carried works. One of the major and most commonly performed works
is picking and placing of plastic wastes including plastic bottles and accessories in the
surroundings we live.

The pick and place robot is a microcontroller based mechatronic system that detects the
object, picks that object from source location and places at desired location.

The main exploration in this project 1s about robotics project including adescription of the
recently programmed behaviours. The reports begin with an overview of the robot integrated
system. It then continues with a description of the aspects of the robot; including robotic arm
mechanisms their motor and servoactuators.

This complete system allows the robot wander about its environment and to interact with
certain objects that it encounters. The sensors provide the robot with its only information about the
environment that it inhabits. These sensors include IR sensors, ultrasonic sensors etc. on the robot
platform which collects data while the programmedbehaviors translate the information into
commands to its actuators. The robot’sbehaviors include line following, pick the object up, and
deliver them to it’s environment.

This system also comprises of a shredder machine which can grind the collected plastic
wastes by the pick and place robot. The idea was to make a series of machines that were to
decrease the problem of plastic waste throughout the world by reshaping it into new products on a
local basis.

1
CHAPTER 2

LITERATURE REVIEW

2.1 Waste Management by a Robot- A Smart and Autonomous Technique

This project is devised to render the task of muck collection from differing places and then
dump it at a particular location from where the muck is conveniently taken for the action of reusing
and recycling. By intimating the notification of level of garbage filled in the fixed dustbin to the
garbage car, we can decrease the number of trips of the garbage collecting vehicle, thus saving
power and money. Also by introducing the RF Module on the fixed dustbin part, we are making
this system fully automated. Thus, by implementing this project in real time scenarios we can
make a contribution towards the enhancement of Smart City Project, thereby making the dream of
CLEAN INDIA GREEN INDIA come true. A number of different research papers have been
surveyed to gather the related information regarding the project. A Smart Dustbin was presented,
based on IoT that contained the smart bin which was being made on a platform, based on Arduino
Uno board that had been linked with ultrasonic sensor and a GSM modem. Some researchers also
made a conclusion that numerous issues like durability, perpetuation and affordability were seen
during the designing of these bins. The scientists also suggested the technique for management and
disposal of garbage, in which the garbage bin had been made to interface and connect with a
system which was based on microcontroller and also had IR systems along with a main system that
clearly displayed the current weight and level of the waste in the bin. In other systems the present
status of dustbin was made to see on a web page that was mobile based, by using the Wi-Fi. The
author also suggested a way for managing the picking up of garbage from different location of the
cities and common living area. In this system, the amount of trash in the dustbin was sensed by the
ultrasonic sensor that will thereby report the present situation of the trash bin to recommended
authority via GSM module. Some systems also developed a GUI that was MATLAB based. Some
researchers also analysed Decision System that may also be warned by trash collection in the urban
regions. This system was made to handle the impotent collection of waste in the city areas that are
too inaccessible. Some of them placed a camera in those areas of the urban regions that were facing
severe problems. A number of bins had been placed throughout the city that were governed by an
2
embedded device, low in cost and which helped a lot in estimating about the fill level of waste in
the dustbins. A unique ID had been given to each bin so as to detect and analyse that which among
the all bins has been filled and is ready to be dumped or emptied. This was predominantly
categorized into two areas: one that is the transmitter section and the rest one was the section of the
receiver. The first area was composed of a sensors and microcontroller that will keep track of the
level of waste and sends the concerned information onto the control room, with the use of the RF
Transmitter, after that the RF Receiver collects and receives the sent information and again moves
it to the concerned person, to make the bin devoid as fast as it can. The mobile software application
has been designed to indulge people in the task of collecting and dumping the solid and other
types of waste. A number of detailed ways associated to the view from persons about the current
situation of the area with allusion to hygiene and cleanliness, classes of taking shots and then
uploading it to computer server application, are being given that will make the computer
applications far more useful and helpful so as to earnestly dower in a course of waste management.

2.2 Automatic Garbage Separation Robot Using Image Processing Technique

The robot detect the object by the ultrasonic sensor can collect the garbage automatically
by sensing using web camera by the image processing technique using mat lab, the robot can be
able to separate the garbage into degradable and non-degradable waste. Embedded c programming
used for the arm and gripper movement by the PIC micro-controller and the separation of garbage
is done by the image processing technique of size, colour and texture. Although the final AGSR
(Automatic Garbage Separation Robot) was a relative success, the team has created an outline for
future improvement in terms of research and theory, implementation, and program management.
On a high level, more research should have been done regarding the interfacing between modules
so that a specific implementation plan could have been created. This would have allowed the team
to avoid on-the-fly creation of code with limited functionality and debugging. In addition, more
time should have been spent researching mechanical design of the robotic arm, whose problems
led to a limited functionality of the robot.

3
2.3 Waste Segregation Using Smart Robotic Arm

Waste segregation and recycling are effective ways of reducing dumped trash.
Unfortunately, these practices are not widely implemented in the country. People have been
negligent when it comes to proper waste disposal, ignoring labels and throwing recyclables that
can still be reused. Most of the people are unaware or ignore the fact the waste segregation and
recycling can reduce cost, reduce drain in our resources, and lessen the waste being produced.
Typical composition of garbage people throw in are 5.8% metals, 3.5% glass, 1.6% plastic, 12.9%
papers, 1.8% textiles and 53.7% biodegradables which means only the remaining 20.7% of the
wastes should really be going to our landfills. In our country, recycling centres do manual process
of sorting wastes so it increase human interface. For this we implement a system which minimizes
human interference in the waste collecting and segregation process. Materials such as paper, glass
and metals are the wastes that need to be segregated in this project. It contains the arm which picks
similar type of objects and place them by reading the tags on them. They have used the RFID and
image processing is used to scan the tags. This was based on comparison technology. The android
app was used to compare materials. This system used to sort the objects according to their textures.
Ultrasonic sensors were used to determine sensors.

2.4 A Smart Waste Management and Monitoring System using Automatic Unloading Robot
A Smart waste management system is a step forward to make the manual collection and
detection of wastes automated in nature. The developed system integrated by using the smart
Vehicle System and the Smart Monitoring and controlling, in which it would pioneer work for
solid waste collection, monitoring and management processes. The currently employing method in
which concerned municipal employee has to look for the filled waste bins manually across
different spots in an area/street for checking regularly whether the waste bin is filled or not, which
is complex and time consuming process. This automation of waste also reduces the human effort
and consequently the cost of the whole process. Robot model is used for carrying and unloading
the solid wastes in dustbin by using D C motor. This Method is most effective in large corporation
areas. This method can be implemented practically. In future, some additional features will add to
this project to crush and recycling plastics and other materials automatically.

4
2.5 Automatic Garbage Collection using Firebird-5 Robot

Firebird-5 robot recognizes the object by the utilization of sharp IR sensor and it can gather the
object automatically by detecting that object utilizing web camera mounted on robot by the image
processing strategy utilizing mat lab as stage after this, the firebird-5 robot has the ability to
identify the object into round or not round. Embedded c programming dialect is utilized for the
arm and holding activity of the robot development by the ATMEGA2560 controller and the
division of garbage is finished by the image processing procedure of shape, colour. Although the
completion of Automatic Garbage Collection Robot was a relative success, the team has exposure
to do a work for future improvement in terms of research and theory, implementation, and program
management. In addition, more time should have been spent researching mechanical design of the
robotic arm, whose problems led to a limited functionality of the robot. And also providing bin for
the collection of the object into garbage or not a garbage. Improved code for movement of the
robot in a well-defined path will be provided.

2.6 Fabrication of Plastic Compression Molding Machine

Compression moulding is a well known technique to develop variety of products. It is a


closed moulding process with high pressure application Solid plastic waste can be recycled by the
process of compression moulding and this will not only reduce environmental pollution as a result
of plastic waste but it will also lead to production of useful plastic materials for both home and
industrial use. This project aims at effectively converting waste plastic into useful products like
bricks and many more products depending upon the mould. Environmental pollution can be
effectively reduced and it further decreases the problem of waste plastics in the society. Rather
than dumping the waste plastics going into the landfill, it can be converted into useful products at a
much lower cost after undergoing certain specific processing. It also avoids the widespread
littering of plastic wastes and protects the environment. RE.

5
2.7 DESIGN AND FABRICATION OF CRUSHER MACHINE FOR PLASTIC WASTES

This project involves the process of designing the crusher considering forces required for
crushing and ergonomic factor that an operator needs. The design of this machine is such that it
would require optimum load to crush bottles and will thus not strain the user or operator. After the
completion of design process, it could be manufactured and transformed into a Recycle aid able
machine. The crusher thus would help in recycling plastic waste. It would also help in reducing the
volume of waste generated and will thus help in effective waste management. The crushing of used
water bottles will also ensure that the bottles are no used beyond the shelf life of its plastic.
Therefore this project will prove to be a useful asset in many ways. This machine helps in
increasing the volume of transportation by reducing the volume of plastic bottles by shredding
them into pieces. This helps in reducing the emissions at the time of transportation and also used to
recycle plastic wastes.

2.8 Hydraulic Air Compressor (HAC) Demonstrator

This paper has outlined the performance of historical HAC installations. These were
renewable hydropower to pneumatic power conversion installations that operated with high
thermodynamic efficiency but suffered from diminished yield due to solution of pressurized gas
that lowered the overall efficiency of the devices. Another deficiency of the historical technology
was that HAC were limited in application to situations of geographical co-occurrence of
hydropower resources and demand for pneumatic power. These deficiencies are priorities
addressed in the HAC Demonstrator project, which implements the HAC concept in either closed
loop or open loop configuration, and overcomes the two principal deficiencies of the historic
installations. A closed or open loop concept allows the concept to be applied anywhere and permits
the use of co-solutes to be added to the circulating water to reduce solubility loss. An illustrative
example calculation permitting the comparison of the discounted cost of compressed air supplied
from i) a compressor station utilizing screw compressors, ii) ‘on-hire’ diesel fuelled compressor
fleet, and iii) a HAC following the design of the Ainsworth HAC, suggests that in a modern
context, closed loop or open loop HACs may become a disruptive energy efficiency technology in
the domain of stationary industrial scale compressors.

6
2.9 AUTONOMOUS GARBAGE COLLECTOR – ROBODUMPSTER

A 7 DOF autonomous customized ROBOTIC ARM has been developed, which is 16 cm


high and weighs 2.2kgs. It can also be programmed using multiple programming languages to do
various moves. The features in the robot developed are wireless operation, real time operation
using PC and automatic operation. We can use normal motors to minimize the cost. Due to such
motors, high torque cannot be produced to lift heavy objects. Use of normal DC motors can result
in complex connections. Therefore, we have used Dynamite AX-12 actuators. It can work in both
the modes i.e. DC continuous mode and fixed rotation mode. These actuators can be connected in
series so as to ease the connections. Alternative method could have been taken by changing the
sensors used. It can amplify tendency to detect obstacles. Colour detection is another approach
against edge detection. A camera can be used in place of IR sensors whereas; it will be a costly
product. Robots that can incrementally acquire new knowledge from autonomous interactions with
the environment will accomplish tasks by means their designers did not explicitly implement, and
will adapt to unanticipated circumstances of unstructured environments. Already, robotic arm can
autonomously perform task decomposition necessary to carry out high-level, complex commands
given through gesture and speech. The robotic arm developed is a true open platform robot where
users are encouraged to modify both hardware and software. The robot is compatible with various
programming languages including C++, Lab VIEW and MATLAB etc. With its modular design,
all the hardware can be fabricated by the user with relatively inexpensive tools.

2.10 AGATOR (Automatic Garbage Collector) as Automatic Garbage Collector Robot


Model

This research aims to design and make AGATOR (Automatic Garbage Collector), a rotor
robot model as automatic garbage collector to counter accumulation of garbage in the river which
has no flow effectively and efficiently. The method of implementation is design and construction.
This method includes the identification of needs, analysis of the components required specifically,
hardware and software engineering, developing, and testing. The test results obtain data by
specification of AGATOR includes IC ATMega16 with 5 Volt voltage and 1,1 mille ampere

7
current, IC Driver with 12 Volt voltage and 1,2 Ampere current, and Limit switch as the controller.
Support devices of the robot are mechanical robot, robot control system, sensor system, and
actuator robot. The maximum load drives the garbage receptacle until 5 kg. The average speed of
robot when take out the garbage is 0,26 m/s. AGATOR is designed as robot model of automated
garbage collector consists of these steps: requirements analysis, design, manufacturing and testing.
This tool consists several parts: ultrasonic sensor, limit switch, LED sensor, toolbox, and circuit
which are : a) AVR ATMega16 microcontroller minimum series system, b) AVR ATMega8
microcontroller, and c) power supply circuit. AGATOR performance went pretty well, then can be
applied automatically to pick up garbage on the waters which do not have flow. For further
research will be considered in the use of tools that can be applied in all situations, namely when the
water flow is strong, moderate, weak, or no flow. Installing RFID as a tool to identify AGATOR’s
position when working on the river. Making an addition system at the garbage receptacle in order
to be able to place the garbage directly to river bank when the garbage receptacle has been full

8
CHAPTER 3

METHODOLOGY

In the proposed system image processing is used for this classification. The proposed system is
comprised of modules that include Image processing

3.1 Image processing

Image processing includes importing the image for creating dataset with the help of LabelImg tool,
analyzing and manipulating the image and outputting the result. Image processing is one of the
computer vision technique which composed of Image recognition, object detection, Image super
resolution and more.

3.2 Image recognition

Image recognition in computer vision technique for recognizing objects in images or videos.
Image recognition is a main output of deep learning and machine learning algorithms. When
humans look at a photograph or watch a video, we are easily able to spot people, objects, scenes,
and visual details.

3.3 Model training

The goal is to teach a computer to behave similar to humans: to gain a level of knowledge of what
an image contains. Image recognition is the main technology behind driverless cars, enabling them
to detect a stop sign or to distinguish a pedestrian from a lamppost. It is also useful in a great
variety of applications such as disease identification in bio imaging, industrial inspection, and
robotic vision.

3.4 Object Recognition Using Deep Learning & machine learning

Deep learning techniques have become a popular and important method for doing object
recognition. Deep learning models such as convolutional neural networks, or CNNs, are used to
automatically learn an object’s inherent features for identifying the object. For example, it can

9
learn to find differences between cats and dogs by analyzing huge collection of training images
and learning on the features that make cats and dogs different. Highly accurate object detection
algorithms and methods like R-CNN, Fast RCNN, Faster-RCNN, RetinaNet are there for
implementation. Deep learning offers a high level of accuracy but at the same time requires a large
amount of data for making accurate predictions. Machine learning techniques are used for object
recognition and offer different approaches than those used in deep learning.

3.5 Object Detection in Google Colab with Custom dataset

We propose a method to train a Tensorflow model for object detection in google Colab, based on
custom datasets. There are mainly three steps performed. These include: Making dataset, Model
training and inference. Here the dataset is created using LabelImg tool. The model is trained based
on the dataset and corresponding inference must been generated. 1. Making dataset It is a process
of creating a dataset with appropriate number of photos (different kinds of bottles). LabelImg tool
is used to create dataset. Object detection class will create a folder of image objects, extract each
image, save each to the new folder created and return an extra array that contains the path to each
of the image. The image files are renamed in the format
objectclass_id.jpg(i.e.bottle_001.jpg,bottle_002.jpg. Then in LabelImg, which defined the
bounding box where the object is located, and saved annotations in Pascal Voc format.

Install packages, repositories and environment variables used for object detection in Tensorflow.

• Extract dataset by download the file system dataset created and zip file has the structure.

• Empty png files used here to avoid error in creation of files.

• From the dataset it creates the TFRecord. Algorithm will train model in dataset.

• Edit the model config file by Set the fields of the config file

• Different initial checkpoint models are update before training.

• Training model is performed training with data and configuration. Validation is performed. 3.
Inference Based on the trained model there are various steps performed to run inference are
export trained model, upload image, run inference.

10
• Export trained model converts last trained model to the format to run inference.

• Upload image for inference which upload the test image file to run inference in the next step.

• It performs inference of the uploaded image in dataset and result are generated as per the rate of
accuracy

11
CHAPTER 4

COMPONENTS ANALYSIS

4.1 Pick and place robot

4.1.1 Pi –camera

Fig 4.1 Pi camera

The Camera Module can be used to take high-definition video, as well as stills
photographs. t’s a leap forward in image quality, colour fidelity, and low-light
performance. It supports 1080p30, 720p60 and VGA90 video modes, as well as
still capture. It attaches via a 15cm ribbon cable to the CSI port on the Raspberry
Pi.The image of the objet is caputered using this camera and it is processed by the
Raspberry Pi.Camera module is placed in the pick and place robot inorder to
identify the object infront of it causing the obstruction.

4.1.2 Raspberry pi 3

Fig 4.2 Raspberry pi 3


12
Built specifically for the new Pi 3, the Broadcom BCM2837 system-on-chip (SoC)
includes four high-performance ARM Cortex-A53 processing cores running at
1.2GHz with 32kB Level 1 and 512kB Level 2 cache memory, a VideoCore IV
graphics processor, and is linked to a 1GB LPDDR2 memory module on the rear of
the board. The Raspberry Pi 3 features the same 40-pin general-purpose
input-output (GPIO) header as all the Pis going back to the Model B+ and Model
A+. Any existing GPIO hardware will work without modification; the only change
is a switch to which UART is exposed on the GPIO’s pins, but that’s handled
internally by the operating system. The Raspberry Pi 3 shares the same SMSC
LAN9514 chip as its predecessor, the Raspberry Pi 2, adding 10/100 Ethernet
connectivity and four USB channels to the board. As before, the SMSC chip
connects to the SoC via a single USB channel, acting as a USB-to-Ethernet adaptor
and USB hub.

Raspberry Pi 3 Features:

SoC: Broadcom BCM2837


CPU: 4× ARM Cortex-A53, 1.2GHz
GPU: Broadcom VideoCore IV
RAM: 1GB LPDDR2 (900 MHz)
Networking: 10/100 Ethernet, 2.4GHz 802.11n wireless
Bluetooth: Bluetooth 4.1 Classic, Bluetooth Low Energy
Storage: microSD
GPIO: 40-pin header, populated
Ports: HDMI, 3.5mm analogue audio-video jack, 4× USB 2.0,
Ethernet, Camera Serial Interface (CSI), Display Serial Interface
(DSI)

13
4.1.3 DC Motors

Fig 4.3 DC MOTOR

The metal gears have better wear and tear properties.The gearbox is sealed and
lubricated with lithium grease and requires no maintenance.Although motor gives
30 RPM at 12V, the motor runs smoothly from 4V to 12V and gives the wide range
of RPM, and torque.There are manily 4 motors placed inside this robot 2 for total
body movement and 2 for the gripping & arm controlling

Fig 4.3 (a) Placement of motors

14
Specification of DC motors

Rated RPM 45
Operating Voltage(VDC) 12
Rated Torque(kg-cm) 4.2
Stall Torque(Kg-Cm) 16
Load Current(A) 0.3
No-Load Current 60mA
Gearbox Diameter (mm) 37
Motor Diameter(mm) 32
Motor Length(mm) 75
Shaft Diameter (mm) 6
Shaft Length (mm) 22

Table 4.1 Specification of DC motors

4.1.4 L293D Motor driver – Arduino

Fig 4.4 L293D Motor driver

15
The Motor Driver is a module for motors that allows to control the working speed and
direction of two motors simultaneously .This Motor Driver is designed and developed
based on L293D IC. This device is a monolithic integrated high voltage, high current four
channel driver designed to accept standard DTL or TTL logic levels and drive inductive
loads (such as relays solenoides, DC and stepping motors) and switching power transistors.

This device is suitable for use in switching applications at frequencies up to 5 kHz. The
L293D is assembled in a 16 lead plastic packaage which has 4 center pins connected
together and used for heatsinking. The L293DD is assembled in a 20 lead surface mount
which has 8 center pins connected together and used for heatsinking.

L293D is a 16 Pin Motor Driver IC. This is designed to provide bidirectional drive currents
at voltages from 5 V to 36 V.

Fig 4.4 (a) Pin Diagram

L293D Features

 600mA output current capability per channel


 1.2A peak output current per channel
 enable facility
 overtemperature protection
 logical “0” input voltage up to 1.5V (high noise immunity)
 internal clamp diodes

16
4.1.5 LINE FOLLOWER IR

Fig 4.5 LINE FOLLOWER IR

Sensor with a combined IR-LED and IR-receiver mounted side by side. The sensor can detect
wheter a surface is light or dark. Suitable for linefollowing robots and optical counters. The trim
potentiometer sets the light level where the output activates. Its is Perfect for black & white line
detection for smart car and has a Blackline for low-level output, a white line for high-level output.

Features:

 The working voltage: 5V


 The output format: digital signal (0 and 1)
 A fixed bolt hole for easy installation
 Small PCB board size: 3.5cm x 1cm
 A single weight: 4.5g
 Detector distance: 25mm

17
 Build-in Tcrt5000 Sensor NSOR
 Applicable to a variety of platforms including Arduino / AVR / ARM /PIC

4.1.6 Bluetooth module

Fig 4.6 Bluetooth module

HM-10 BLE Bluetooth 4.0 CC2541 Wireless Module is a BLE module for an embedded system
to get BLE wireless communication with BLE capable devices (e.g. Android, iPhone, and iPad).

It is fully configurable by a rich and well documented AT command-set and allows transparent
data communication via serial UART (default baud rate 9600bps). The Bluetooth 4.0 HM-10 is
basically a breakout board for cc2541, it broke out the LED pins, RX/TX and also adding
the voltage regulator that regular 5v to 3.3 v.

HM-10 and HM-11 series Bluetooth module use TI CC2540 chip, configure 256KB space and
support the AT command. Users can change the role (master, slave mode) and the serial port baud
rate, equipment name, matching password and other parameters on-demand. It is very flexible to
use.

18
The most complete, most convenient, and most stable Bluetooth data transmission, remote
control and data acquisition module. Master-slave in one, transparent transmission, replacing the
serial port. Remote control, transparent transmission, MCU is unnecessary. Remote data
acquisition, transparent transmission, MCU is unnecessary.Ardiuno does not have inbuilt
bluetooth connectivity We need to connect the raspberry pi and arduino for proper working.This
bluetooth module is connected with the arduino and paired with Pi so they can transmit and recieve
data.

4.1.7 HC-SR04 Ultrasonic Sensor

Fig 4.7 Ultrasonic sensor

The ultrasonic sensor (or transducer) works on the same principles as a radar
system. An ultrasonic sensor can convert electrical energy into acoustic
waves and vice versa. The acoustic wave signal is an ultrasonic wave
traveling at a frequency above 18kHz. The famous HC SR04 ultrasonic

19
sensor generates ultrasonic waves at 40kHz frequency. Typically, a
microcontroller is used for communication with an ultrasonic sensor. To
begin measuring the distance, the microcontroller sends a trigger signal to the
ultrasonic sensor. The duty cycle of this trigger signal is 10µS for the
HC-SR04 ultrasonic sensor. When triggered, the ultrasonic sensor generates
eight acoustic (ultrasonic) wave bursts and initiates a time counter. As soon
as the reflected (echo) signal is received, the timer stops. The output of the
ultrasonic sensor is a high pulse with the same duration as the time difference
between transmitted ultrasonic bursts and the received echo signal.

Fig 4.8 Representation of trigger signals

The microcontroller interprets the time signal into distance using


thefollowing function Distance in cm =(Echo pulse
width (micro second))/58
Theoretically, the distance can be calculated using the TRD (time/rate/distance)
measurement formula. Since the calculated distance is the distance traveled from the
ultrasonic transducer to the object—and back to the transducer—it is a two-way trip.
By dividing this distance by 2, you can determine the actual distance from the
transducer to the object. Ultrasonic waves travel at the speed of sound (343 m/s at
20°C). The distance between the object and the sensor is half of the distance traveled
by the sound wave.[iv] The following equation calculates the distance to an object

20
placed in front of an ultrasonic sensor:

Distance =(Time taken*speed of sound)/2

Ultrasonic sensors emit short, high-frequency sound pulses at regular intervals.


These propagate in the air at the velocity of sound. If they strike an object, then
they are reflected back as echo signals to the sensor, which itself computes the
distance to the target based on the time-span between emitting the signal and
receiving the echo.

As the distance to an object is determined by measuring the time of flight and


not by the intensity of the sound, ultrasonic sensors are excellent at suppressing
background interference.

Virtually all materials which reflect sound can be detected, regardless of their
colour. Even transparent materials or thin foils represent no problem for an
ultrasonic sensor.

microsonic ultrasonic sensors are suitable for target distances from 20 mm to 10


m and as they measure the time of flight they can ascertain a measurement with
pinpoint accuracy. Some of our sensors can even resolve the signal to an
accuracy of 0.025 mm.

Ultrasonic sensors can see through dust-laden air and ink mists. Even thin
deposits on the sensor membrane do not impair its function.

Sensors with a blind zone of only 20 mm and an extremely thin beam spread are
making entirely new applications possible today: Fill level measurement in
wells of microtiter plates and test tubes, as well as the detection of small bottles
in the packaging industry, can be implemented with ease. Even thin wires are
reliably detected.

Ultrasound is reliable in any lighting environment and can be used inside or


outside. Ultrasonic sensors can handle collision avoidance for a robot, and being

21
moved often, as long as it isn’t too fast.

Ultrasonic rangefinders are commonly used as devices to detect a collision.

HC-SR04 Sensor Features

 Practical Measuring Distance: 2cm to 80cm


 Accuracy: 3mm
 Measuring angle covered: <15°
 Operating Current: <15mA
 Operating frequency:40khz

4.2 Shredder Bin

4.2.1 RFID Reader

Fig 4.9 RFID Reader

RFID Reader/Writer RC522 SPI S50 CARD which works on non-contact


13.56mhz communication, is designed as low power consumption, low cost and
compact size read and write chip, is the best choice in the development of smart
meters and portable hand-held devices.It uses the advanced modulation system,

22
fully integrated at 13.56MHz with all kinds of positive non-contact communication
protocols. Support 14443A compatible answer signal. DSP deal with ISO14443A
frames and error correction.This module can fit directly in handheld devices for
mass production. The module uses the 3.3V power supply and can communicate
directly with any CPU board by connecting through the SPI protocol, which
ensures reliable work, good reading distance.

Features :

 Highly integrated analog circuitry to demodulate and decode responses.


 Supports ISO/IEC 14443 A/MIFARE.
 Typical operating distance in reading/Write mode up to 50 mm.
 Supports ISO/IEC 14443 A higher transfer speed communication up to 848 kBd.
 SPI up to 10 Mbit/s.
 FIFO buffer handles 64 bytes send and receive.
 Flexible interrupt modes.
 Power-down by software mode.
 Programmable Timer.
 2.5 V to 3.3 V power supply.
 CRC coprocessor.
 Internal self-test.

23
4.2.2 Laser based Transmitter & Reciever

Fig 4.10 Laser Transmitter & Reciever

Laser Diode Modulewavelength of 650nm and operating voltage of 5V.The laser head is
composed of a light-emitting tube, condenser lens and adjustable copper sleeve and it is assembled
when delivered, the focal length of the lens is adjusted glued by strong glue stick, which can work
directly after connecting to a 5v dc power supply.

This Laser Non-modulator Tub Sensor Receiving Module Laser output High Level is a
sensor for Raspberry Pi and Arduino to receive the laser output and decode it digital data. At Input,
the module Receive laser signal when output high level; Does not receive laser signal when output
low level. On detecting a laser signal, output goes at a high level (5V) until the laser signal is there.

Features Receiver Module:

 Working Voltage: 5V DC
 Operating Temperature: -30ºc ~ 85ºc
 Output high level when received the laser signal
 Output low level when not receive laser signal

Features of Laser Module:

24
 Voltage: 3.0 V – 5 V.
 Driver: APC circuit.
 Line length: about 135 mm.
 Transmit power: 58mW.
 Operating Current: 40mA.
 Operating Current: 40mA.
 Operating temperature: -36◦C ~ 65◦C.

4.2.3 Relay module

Fig 4.11 Relay Module

`This relay module can be connected to 240V AC or 28V DC power into a variety of other
electrical partsThe main purpose Relay is a function of the automatic isolation switching
elements This 1-channel 5V control Single-Pole Double-Throw (SPDT) High-level trigger
AC power relay board can be controlled directly via a microcontroller and switch up to
10A at 250 VAC. The inputs of 1 Channel 5V Relay Module are isolated to protect any
delicate control circuitry.

25
The default state of the relay when the power is off for COM (Power) to be connected to
NC (Normally Closed). This is the equivalent of setting the relay board IN pin to HIGH
(has +5V sent to it).

Fig 4.11(a) Ports of Relay

Features :

 1 channel relay module.


 One normally closed contact and one normally open contact.
 High impedance controller pin.
 Default High-level trigger.
 Pull-down circuit for the avoidance of malfunction.
 Power supply indicator lamp.
 Can be controlled various appliances & other Equipment With Large current.
 Standard TTL Level logic controlled.

26
4.2.4 DC Motor (Conveyer)

Fig 4.12 DC motor(Conveyer)

The motor has a normal operating voltage range of 1.0 to 3.0VDC but can handle a max load of up
to 12VDC and a no load speed of 150RPM (@1.0V DC, 110Ma

The supply voltage range is 10-12V with the polarity markers at the base of the motor. The overall
body of the motor is made up of metal. The motor has a D type shaft with a shaft length of 21mm
and a diameter of 6mm.

Specification of the conveyer motor

Operating voltage (v) 12

No load Current (mA) <30

No load speed 150 RPM


Full load current (mA) <140
Rated power (W) 0.38
Rated current (mA) ≤140
Rated Torque (N-cm) 2.93
Rated speed 145 RPM

27
Shaft length (mm) 21
Shaft diameter (mm) 6
Base motor RPM 3000
Gear ratio 20K

Operating temperature (°C) -10 ~ +60

Table 4.2 Specification of DC (Conveyer)

4.2.5 DC Motor (Shredder)

Fig 4.13 DC Motor (Shredder)

MY1016 250W 24V 2750RPM DC motor Comes with an 11-tooth, #25 chain sprocket as
well as a 4-bolt mounting bracket (threaded M6) on the base. As this is DC motor it is capable of
rotation in either the clockwise or counterclockwise direction by just reversing the battery polarity
to the motor and can be speed controlled.

28
Specifications of Shredder motor

Voltage 24V DC

Rated speed 2750 RPM

Rated current 13.7A

Output 250W

No-load currency ≤1.6A

No-load rate speed 3350rpm

Rating Torque 0.90N·m

Rating speed 2750rpm

Rating current ≤13.7A

Max Carry 80KG

Efficiency 78%

Wiring 2 (Black & Red)

Model Number MY1025

Number of Teeth on Sprocket 11

Cable Length approx. 34cm

Weight 1.9KG

Table 4.3 Specification of DCMotor Shredder

29
4.2.6 Thermal printer

Fig 4.14 Thermal Printer

This printer uses very common 2.25" wide thermal paper. Operating range 5 Volt to 9 Volt
regulated DC power supply that can provide 1.5 Amps or more during high-current printing.To
send data to the printer, we will use a 5V TTL serial connection. This is not the same as the 10V
RS232 serial from a computer’s 9-pin serial port — don’t connect the printer directly to a standard
PC port or you may damage it. It’s possible to use something like an FTDI cable to talk to the
printer, but we’re going to assume that nearly everyone will want to use it with a microcontroller.
This tutorial shows how to wire it up to an Arduino, and our example code is Arduino-compatible.
Any microcontroller that can output TTL serial will work, with suitable adaptation to the code.

Features of the Thermal Printer

 Requires 2.25" wide, 50 ft or shorter thermal paper


 Requires 5-9VDC @ 1.5Amp power supply during print
 Printing Speed: 50-80mm/s
 Resolution: 8 dots/mm, 384 dots/line
 Effective Printing Width: 48mm

30
 Character Set: ASCII,GB2312-80(Chinese)
 Print Font: ANK:5×7, Chinese: 12x24,24×24
 Paper Type: Thermal paper
 Paper Width: 57.5 ±0.5mm
 Paper Roll Diameter: max 39mm
 Protocol: TTL Serial, 19200 baud
 Mean Cycles Before Failure: 5 million lines
 Power Supply (Adapter): DC5V-9V
 Outline Dimension (WxDxH): 111x65x57mm
 Installation Port Size: 103 x 57mm
 Color: Black
 Operating Temp: 5°C ~ 50°C
 Operating Humidity: 10% ~ 80%
 Storage Temp: -20°C ~ 60°C
 Storage Humidity: 10% ~ 90%
 Screws: M2.5

31
CHAPTER 5

SYSTEM ANALYSIS

5.1 Pick & Place Robot

Fig 5.1 Pick & Place Robot

Robotics deals with the design of robots their manufacture and applications.
Robotics gained more importance in the modern era since it require less cost to
operate than a human labour to do the same task, also once programmed robot will
perform better than an experienced human labour. Now a days industry is turning
towards computer based monitoring of tasks mainly due to the need for the increased
productivity and delivary of the final products with maximum quality. Due to the
inflexibility and generally high cost of hard computerization systems lead to the use
of industrial robots. In this project we are introducing a robotic arm which is capable
of picking up and placing the objects. The robotic arm used here is similar to a 2 grip

32
claw which is programmed to perform the pick and place functions.

In our project the main objective of the robot is to pick up plastic bottles in
its path.This particular model of pick &place robot is equipped with an extra camera
and an Rapsberry pi ,inorder to capture and to process the image of the object in
front of it.Once it identifies the plastic bottle it picks the bottle and place it to the pre
defined destination.RFID tag is attached to the robot in order to interact with the
shredder machine.

5.2 SHREDDER MACHINE

Fig 5.2 Shredder machine

Shredder is a mechanical device used to cut plastic into Undefined Flakes, we design
this project for recycling of plastic, Recycling Reduces the waste Management

33
Solution. Shredder Machine Includes Crusher Setup with Single Axle Shaft basic
purpose is to Cutting of material Depends of Shear Strength and Impact Strength. In
this project the shredder is equipped with microcontroller in order to start
shredding whenever an plastic bottle is dropped inside the shredder machine.There
are manily two ways for dropping the bottle into the shredder one is done by the
robot (pick and place) and by manually dropping into the bottle guide.Manual
Dropping is done by human and inorder to promote this practice for recyeling and
bonus ticket is printed.This encourages people to collect more ticker/bonuses which
will drastically help in recycling plastic bottles.

For the automatic bottle collection part,an conveyer belt is attached near the
shredder so that when the robot drops the bottle it needs to fall to the shredder
inorder to crush the bottle. Our design of the fully pledged Shredder Bin is shown
below.

Fig 5.3 Shredder Bin

34
Fig 5.4 Conveyer System

The conveyer belt has cleats which will hold the bottles,till it falls to the guide of the
shredder machine.An high power DC motor is connected to the shredder machine
gearshaft via an chain drive assembly.Chain drives increases efficiency while
delivering the power from the motor to the shaft.

35
CHAPTER 6

CIRCUIT DIAGRAM

6.1 Pick & Place Robot

Fig 6.1 Circuit dig. of Pick & Place Robot

36
6.2 Shredder Bin

Fig 6.1 Circuit dig. of Shredder Bin

37
CHAPTER 7

WORKING

7.1 Pick & Place Robot

As the name suggests,the pick and place robot will pick the objects and places
it wherever based on what we design. Here in this robot we uses Raspberry pi for
monitoring the certain functions of our project and Arduino for controlling the
remaining functions like movement of robot and it’s arm for picking and placing the
objects.

An ultrasonic sensor is attached to the front portion of the robot for detecting the
obstacles in front of the robot while it moves. The raspberry pi has got it’s own
camera labelled pi cam in the circuit diagram, which will take images only when the
ultrasonic sensors detects the object.The information about the presence of objectis
given to the Raspberry Pi unit and this will make the Pi’s camera to take theimage
and send it to the pi.It will compare that images with the database we provided and
when both matches the Pi will give a trigger to Arduino for its movement to pick that
bottle using the robot arm. Then this bottle is dumped into the shredder's conveyor
chamber by the line follower and the shredding unit will work. Also, when the Pi's
camera image doesn’t matches with the database we provided this will trigger the
Arduino for it’s wheel movement and making the robot move forward for detecting
another objects in front of it using the ultrasonic sensor.

The database of various plastic bottles is stored in the pi’s memory, and the
robot has been trained several times for picking only those objects when it senses it’s
presence. The Pi is programmed to take the sensors (ultrasonic sensor and Pi camera

38
images) output and based on those inputs it triggers the Arduino for the movement of
robot’s arm and wheel. The information shared between the Raspberry pi and
Arduino is through the Bluetooth module. The line follower software programs are
stored in the Arduino for it’s movement towards the shredder.

Stepper motors are used for the movement of robot’s wheel and arm. These
are controlled by the Arduino, which arebased on the above mentioned functions.

7.1.1 Pick and Place Flow chart

Fig 7.1 Pick and Place Flow chart


39
7.2 SHREDDER BIN

The pick and place robot will put the plastic bottles collected by its arm into the
dumping section of the shredder. This section is joined to the conveyor belt system.
In this section, a RFID sensor is placed, so that when the plastic bottle's presence is
detected, the information is passed on to the Arduino. This will make the dc motor of
the conveyor belt and the shredder motor to switch ON, there by putting the plastic
bottles into the shredding chamber and the plastics will be grinded or shredded into
pieces making easier for the recycling purposes.

There is a second section provided in the shredding chamber, where we can put the
waste bottles for recycling purposes. Here we provide a reward coupon for those
people. For that purpose we had placed a Laser detection sensor which will senses
the plastic bottles presence and will give information to Arduino for printing the
reward coupon. The thermal printer placed at a safer section outside the shredder
will print the coupon and we can take it for claiming the rewards.

A relay is used to control the switching of shredder motor, thereby making it ON


only when Arduino triggers it. The voltage fluctuations problem is solved with this
relay. All the software programs for switching ON and OFF of conveyors motor and
shredding motor, RFID sensing, laser detection and printing unit is done in the
Arduino.

40
7.2.1 SHREDDER BIN FLOW CHART

Fig7.2 Shredder bin flow chart

41
CHAPTER 8

RESULT

8.1 TENSORBOARD

The system is trained using Tensorflow model. The model is used for plastic bottle
detection (object detection) in Google Colab using custom dataset and it is found to
be very efficient in plastic bottle detection. The dataset is created with LabelImg is
tested

Fig 8.1 Tensorboard charts

42
8.2 Image processing Raspberry Pi

# Digital
OCEAN
FLASK
SERVER
RECEIVES
IMAGE
from flask import Flask, request, jsonify
import classify
import base64
import json
import firebase
import env
# Instantiate Flask
app = Flask(__name__)
# health check
@app.route('/status')
def health_check():
return 'Running!'
# Performing image Recognition on Image, sent as bytes via
POST payload
@app.route('/detect', methods=["POST"])
def detect():
imgBytes = request.data
imgdata = base64.b64decode(imgBytes)

43
with open("temp.png", 'wb') as f:
f.write(imgdata)
print("successfully receieved image")

# Pass image bytes to classifier


result = classify.analyse("temp.png")
# Return results as neat JSON object, using
result = jsonify(result)
print(result.json)
response_data = result.json
print(response_data)

db = firebase.Firebase()
db.authenticate()
db.push(response_data)
print("Updated Firebase.")
return result
if __name__ == '__main__':
app.run(host='0.0.0.0', port=80, debug=True)

import
tensorflow as tf
import sys
import os
# Disable tensorflow compilation warnings
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'

44
import tensorflow as tf
def analyse(imageObj):
# Read the image_data
image_data = tf.gfile.FastGFile(imageObj, 'rb').read()
# Loads label file, strips off carriage return
label_lines = [line.rstrip() for line
in
tf.gfile.GFile("tf_files/retrained_labels.txt")]
# Unpersists graph from file
with tf.gfile.FastGFile("tf_files/retrained_graph.pb",
'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
_ = tf.import_graph_def(graph_def, name='')
with tf.Session() as sess:
# Feed the image_data as input to the graph and get
first prediction
softmax_tensor =
sess.graph.get_tensor_by_name('final_result:0')

predictions = sess.run(softmax_tensor, \
{'DecodeJpeg/contents:0':
image_data})

# Sort to show labels of first prediction in order of


confidence

45
top_k =
predictions[0].argsort()[-len(predictions[0]):][::-1]
obj = {}
for node_id in top_k:
human_string = label_lines[node_id]
score = predictions[0][node_id]
obj[human_string] = float(score)

return obj
# This are the
required
credentials and
identifiers for
the Pi to
coordinate with
Firebase.
# These are the preconditions for the product the work.
Everything beyond this initial setup is dynamic.
auth_cred = {
"API_KEY":
"AIzaSyBXA1hmMAA5p8eYk1KwXrgYQsdAk0ehnKI",
"AUTH_DOMAIN":
"anti-plasti.firebaseapp.com",
"DATABASE_URL":
"https://anti-plasti.firebaseio.com/",
"STORAGE_BUCKET":

46
"anti-plasti.appspot.com",
"EMAIL": "test1@test.com",
"PASS": "qwerty",
"B_ID": "B-E-001"
}

import
datetim
e
import pyrebase
from env import auth_cred
class Firebase:

def __init__(self):
pass
def authenticate(self):
self.firebase = pyrebase.initialize_app(
{
"apiKey": auth_cred["API_KEY"],
"authDomain": auth_cred["AUTH_DOMAIN"],
"databaseURL": auth_cred["DATABASE_URL"],
"storageBucket":
auth_cred["STORAGE_BUCKET"]
}
)

47
self.db = self.firebase.database()
self.auth = self.firebase.auth()
self.user =
self.auth.sign_in_with_email_and_password(auth_cred["EMAIL"],
auth_cred["PASS"])
self.uid = self.user["localId"]

def push(self, result):

self.db.child("dummy").child(auth_cred["B_ID"]).update({"current
_result": result, "last_updated": str(datetime.datetime.now())},
self.user["idToken"])

python retrain.py \
--bottleneck_dir=tf_files/bottlenecks \
--how_many_training_steps=500 \
--model_dir=inception \
--summaries_dir=tf_files/training_summaries/basic \
--output_graph=tf_files/retrained_graph.pb \
--output_labels=tf_files/retrained_labels.txt \
--image_dir=training_dataset

48
8.3 PICK AND PLACE PROGRAMME

nclude "Arduino.h"

#include "BTHC05.h"

#include "DCMDriverL298.h"

#include "NewPing.h"

// Pin Definitions

#define BTHC05_PIN_TXD 3

#define BTHC05_PIN_RXD 10

#define DCMOTORDRIVERL298_1_PIN_INT1 2

#define DCMOTORDRIVERL298_1_PIN_ENB 6

#define DCMOTORDRIVERL298_1_PIN_INT2 4

#define DCMOTORDRIVERL298_1_PIN_ENA 5

#define DCMOTORDRIVERL298_1_PIN_INT3 7

#define DCMOTORDRIVERL298_1_PIN_INT4 8

#define DCMOTORDRIVERL298_2_PIN_INT1 12

#define DCMOTORDRIVERL298_2_PIN_ENB 11

#define DCMOTORDRIVERL298_2_PIN_INT2 13

49
#define DCMOTORDRIVERL298_2_PIN_ENA 9

#define DCMOTORDRIVERL298_2_PIN_INT3 A3

#define DCMOTORDRIVERL298_2_PIN_INT4 A4

#define HCSR04_PIN_TRIG A5

#define HCSR04_PIN_ECHO A1

#define IRLINEFOLLOW_PIN_OUT A0

// Global variables and defines

// object initialization

BTHC05 bthc05(BTHC05_PIN_RXD,BTHC05_PIN_TXD);

DCMDriverL298
dcMotorDriverL298_1(DCMOTORDRIVERL298_1_PIN_ENA,DCMOTORDRI
VERL298_1_PIN_INT1,DCMOTORDRIVERL298_1_PIN_INT2,DCMOTORDR
IVERL298_1_PIN_ENB,DCMOTORDRIVERL298_1_PIN_INT3,DCMOTORD
RIVERL298_1_PIN_INT4);

DCMDriverL298
dcMotorDriverL298_2(DCMOTORDRIVERL298_2_PIN_ENA,DCMOTORDRI
VERL298_2_PIN_INT1,DCMOTORDRIVERL298_2_PIN_INT2,DCMOTORDR

50
IVERL298_2_PIN_ENB,DCMOTORDRIVERL298_2_PIN_INT3,DCMOTORD
RIVERL298_2_PIN_INT4);

NewPing hcsr04(HCSR04_PIN_TRIG,HCSR04_PIN_ECHO);

// define vars for testing menu

const int timeout = 10000; //define timeout of 10 sec

char menuOption = 0;

long time0;

// Setup the essentials for your circuit to work. It runs first every time your
circuit is powered with electricity.

void setup()

// Setup Serial which is useful for debugging

// Use the Serial Monitor to view printed messages

Serial.begin(9600);

while (!Serial) ; // wait for serial port to connect. Needed for native USB

Serial.println("start");

51
bthc05.begin(9600);

//This example uses HC-05 Bluetooth to communicate with an Android


device.

//Download bluetooth terminal from google play store,


https://play.google.com/store/apps/details?id=Qwerty.BluetoothTerminal&hl=en

//Pair and connect to 'HC-05', the default password for connection is


'1234'.

//You should see this message from your arduino on your android device

bthc05.println("Bluetooth On....");

pinMode(IRLINEFOLLOW_PIN_OUT, INPUT);

menuOption = menu();

// Main logic of your circuit. It defines the interaction between the


components you selected. After setup, it runs over and over again, in an eternal loop.

void loop()

52
if(menuOption == '1') {

// HC - 05 Bluetooth Serial Module - Test Code

String bthc05Str = "";

//Receive String from bluetooth device

if (bthc05.available())

//Read a complete line from bluetooth terminal

bthc05Str = bthc05.readStringUntil('\n');

// Print raw data to serial monitor

Serial.print("BT Raw Data: ");

Serial.println(bthc05Str);

//Send sensor data to Bluetooth device

bthc05.println("PUT YOUR SENSOR DATA HERE");

else if(menuOption == '2') {

// L298N Motor Driver with Dual Hobby DC motors #1 - Test Code

//Start both motors. note that rotation direction is determined by the


motors connection to the driver.

53
//You can change the speed by setting a value between 0-255, and set the
direction by changing between 1 and 0.

dcMotorDriverL298_1.setMotorA(200,1);

dcMotorDriverL298_1.setMotorB(200,0);

delay(2000);

//Stop both motors

dcMotorDriverL298_1.stopMotors();

delay(2000);

else if(menuOption == '3') {

// L298N Motor Driver with Dual Hobby DC motors #2 - Test Code

//Start both motors. note that rotation direction is determined by the


motors connection to the driver.

//You can change the speed by setting a value between 0-255, and set the
direction by changing between 1 and 0.

dcMotorDriverL298_2.setMotorA(200,1);

dcMotorDriverL298_2.setMotorB(200,0);

delay(2000);

//Stop both motors

54
dcMotorDriverL298_2.stopMotors();

delay(2000);

else if(menuOption == '4') {

// Ultrasonic Sensor - HC-SR04 - Test Code

// Read distance measurment from UltraSonic sensor

int hcsr04Dist = hcsr04.ping_cm();

delay(10);

Serial.print(F("Distance: ")); Serial.print(hcsr04Dist);


Serial.println(F("[cm]"));

else if(menuOption == '5') {

// IR Line Track Follower Sensor - Test Code

//Read IR Line Follower Sensor. irLineFollowVar will be '0' if a black


line was detected

bool irLineFollowVar = digitalRead(IRLINEFOLLOW_PIN_OUT);

Serial.print(F("LineFollow: ")); Serial.println(irLineFollowVar);

55
}

if (millis() - time0 > timeout)

menuOption = menu();

// Menu function for selecting the components to be tested

// Follow serial monitor for instrcutions

char menu()

Serial.println(F("\nWhich component would you like to test?"));

Serial.println(F("(1) HC - 05 Bluetooth Serial Module"));

Serial.println(F("(2) L298N Motor Driver with Dual Hobby DC motors

56
#1"));

Serial.println(F("(3) L298N Motor Driver with Dual Hobby DC motors


#2"));

Serial.println(F("(4) Ultrasonic Sensor - HC-SR04"));

Serial.println(F("(5) IR Line Track Follower Sensor"));

Serial.println(F("(menu) send anything else or press on board reset


button\n"));

while (!Serial.available());

// Read data from serial monitor if received

while (Serial.available())

char c = Serial.read();

if (isAlphaNumeric(c))

if(c == '1')

Serial.println(F("Now Testing HC - 05 Bluetooth Serial


Module"));

else if(c == '2')

57
Serial.println(F("Now Testing L298N Motor Driver with
Dual Hobby DC motors #1"));

else if(c == '3')

Serial.println(F("Now Testing L298N Motor Driver with


Dual Hobby DC motors #2"));

else if(c == '4')

Serial.println(F("Now Testing Ultrasonic Sensor -


HC-SR04"));

else if(c == '5')

Serial.println(F("Now Testing IR Line Track Follower


Sensor"));

analogWrite (motorAspeed, vSpeed);

analogWrite (motorBspeed, vSpeed);

delay(turn_delay);

58
else

Serial.println(F("illegal input!"));

return 0;

time0 = millis();

return c;

59
CHAPTER 9

IMPLEMENTATION

The design of proposed reverse vending machine is constructed by the fulfillment of


certain criteria:

1. Reliability The machine must be able to work with minimum supervision. It must
be able to work within 24 hours without any fail. All the components used in the
design of machines should work properly according to the designated task.

2. Accuracy The machine must be able to differentiate plastic bottles from other
types of bottles and reject the non-plastic bottles. Image processing is used for this
detection. The adding and subtraction of credit points for the insertion of plastic
bottles must also be accurate. Credit points must be added to a user’s account every
time a deposited plastic bottle is accepted, and exact amount of credit points must be
deducted from the user’s account every time a purchase is made.

3. Response Time The machine must be able to complete operation fast. Transaction
time should be minimum for the user. The machine should show fast collection of
data and execution of commands.

4. Efficiency The machine must accept all types of plastic bottles irrespective of its
size, shape and color. The machine should also reject all bottles that are not plastic.

5. Functionality The machine must be able to function and complete process of


operation without fail starting with the detection of plastic bottle up to using credit
for purchasing.

60
CHAPTER 10

CONCLUSION

Nowadays the plastic wastes are causing a lot of health related problems to humans
and also causes damages to Ecosystem. . Plastic bottle waste is increasing day by
day and is non-biodegradable. The improper dumping of plastic wastes are the main
problem behind these issues. Once the plastic wastes are dumped in a proper
manner, it will be easier for the recycling process and thus will reduces the harmful
effects from it. This report has a solution to this issue. The pick and place robot will
pick the plastic wastes including the plastic bottles and will dump these wastes into
the shredder bin which will grind the plastic bottles and wastes into fine powdered
pieces. These deposited wastes can be easily collected and can be processed further
for the recycling purposes. Thus an efficient and proper management of plastic
waste disposal is possible. Here it also gives rewards to the people who put the
plastic bottles in the shredder chamber. This also makes people to follow the same
manner without throwing these wastes in the surrounding causing many issues. This
project aims at reducing the plastic wastes at public places by giving currency or
token in return of plastic bottle wastes. Aiming at reducing the plastic bottle waste
by installing such Shredding bin at public places where people can dispose bottles
into such machines in exchange of reward.

61
10.1 Future Scope

Our project comes with a pair devices manily the Shredder Bin and the Pick & Place
Robot.This can be implemented in public places,work places,colleges,etc where
people are gathered more often.Plastic is inevitable in our day to day life so we can
only reduce the use and maximize the recycling process to reduce waste. Our
Reverse Vending Machine (Shredder Bin) can be placed in multiple areas for
targetting humans to do the work by giving them an reward for dropping a
bottle.This ensures that people will be more encouraged to be a part of the
recycling process. The concept of cash-from-trash is implemented here.And coming
to the pick and place robot Advanced model of this robot can be used to collect
plastic waste from ocean and other water bodies.Humans can’t enter into
large waste dumps like lumps of degradable and non degradable
waste.Here we can implement this advanced model of our robot to go into the waste
dump and collect the plastic waste.It is efficient and more risk free.The advanced
model will need to change its external design and much more processing power.By
combining the pair of the Robot and the Reverse Vending Machine in proper
locations can benefit in efficient plastic reduction and recycling.Thus by reducing
the overall plastic waste in the environment.An powerful step for recyling plastic is
putforward by this pair of machines.

62
REFERENCES

[1]Nayak, Subrat, et al. "TailGator: Design and Development of Autonomous


Trash collecting Robot." Florida conference on recent advances in ro
[2]A Smart Waste Management and Monitoring System using Automatic
Unloading Robot Nithya.L1 , Mahesh.M2botics. 2009.
[3] Waste Management Issues, Solutions & Case Studies,Ministry of Housing &
Urban Affairs Government of India
[4]AUTONOMOUS GARBAGE COLLECTOR – ROBODUMPSTER Rama
Prabha D, SagarMahindru, Akshat Srivastava
[5] About. (n.d.). Retrieved November 6, 2016 from
https://preciousplastic.com/en/about/

[6] Etherinton, R. (October 21, 2013). Precious Plastic by Dave Hakkens.

Retrieved November 6, 2016 from


http://www.dezeen.com/2013/10/21/precious-
plastic-open-source-local-recycling-workshop-dave-hakkens/
[7] Ulrich, K.T., Eppinger, S.D. (2012). Product Design and Development (5th
ed.). New York: McGraw-Hill.
[8] Snäckväxel – kvadratisk. (n.d.). Retrieved November 14 2016 from
http://www.mekanex.se/produkter/vaxlar/snackvaxlar/standard/

[9] Klokopplingar. (n.d.) Retrieved November 14, 2016 from


http://www.mekanex.se/produkter/komponenter/axelkopplingar/klokoppling
ar/

[10] Beardmore, R. (January 22, 2013). Worm Gears. Retrieved November 14,
2016 from
http://www.roymech.co.uk/Useful_Tables/Drive/Worm_Gears.html
63
[11] Black, A. (n.d.). The Ins and Outs of Worm Gears. Retrieved November 14,
2016 from http://www.machinerylubrication.com/Read/1080/worm-gears
[12] Fox Maska, D. (April 1, 2008) V-belt selection it’s a veritable cinch.
Retrieved November 14, 2016 from http://machinedesign.com/archive/v-belt-
selection-its-veritable-cinch
[13] Make: We are all makers. Raspberry Pi 2 first
look.
http://makezine.com/2015/02/02/raspberry-pi-2-first-look/ [Last
accessed 28 Februrary 2016]
[14] HobbyTronics. SparkFun Robot chassis.
http://www.hobbytronics.co.uk/robotics/4wd-chassis-kit [Last accessed
14 February 2016]

64

You might also like