A Project Report ON: Smart Dustbin Using Arduino With GSM and GPS Module

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 70

A PROJECT REPORT

ON
“Smart dustbin using Arduino with GSM and GPS module”
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR
THE AWARD OF
DIPLOMA IN
ELECTRONICS AND TELECOMMUNICATION
ENGINEERING

SUBMITTED TO
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI
SUBMITTED BY
Name Of Students Enrollment No.

1. Sanvatsarkar Sharvey Mayuresh 2010510228


2. Gunjal Vaishnavi Anil 2110510472
3. Shinde Sanika Raju 2010510234
4. Tope Mansi Subhash 2010510243

GUIDED BY
Smt. Pathan J.J.
Government Polytechnic, Awasari (Kh)
2022-2023
“Automatic Rain Sensing Wiper Using Arduino””

Submitted by
Name Of Students Enrollment No.

1. Sanvatsarkar Sharvey Mayuresh 2010510228


2. Gunjal Vaishnavi Anil 2110510472
3. Shinde Sanika Raju 2010510234
4. Tope Mansi Subhash 2010510243

In partial fulfillment of
Diploma in
Electronics and Telecommunication Engineering

Guided by
Smt. Pathan.J.J.

Government Polytechnic, Awasari (Kh)


Institute code-1051
2022 – 2023
CERTIFICATE
This is to certify that the project report entitled “Smart dustbin
using Arduino with GSM and GPS module” was successfully
completed by student of sixth semester Diploma in Electronics and
Telecommunication Engineering

1. Sanvatsarkar Sharvey Mayuresh


2. Gunjal Vaishnavi Anil
3. Shinde Sanika Raju
4. Tope Mansi Subhash
In partial fulfillment of the requirements for the award of the
Diploma in Electronics and Telecommunication Engineering of
Government Polytechnic, Awasari (Kh.) work carried out during a
period for academic year 2022-2023 as per curriculum.

Smt. Pathan .J.J Dr. P.S.Sharma


Project Guide Head Of Department

Dr. D.R. Nandanwar


External Examiner Principal
ACKNOWLEDGEMENT

This project done as final year project title “Smart dustbin


using Arduino with GSM and GPS module” in partial fulfillment of
the requirements for the award of the Diploma in Electronics And
Tele- communication Engineering.
We are really thankful to the Principal Dr.D.R.Nandanwar,
and the Head of Department Dr. P.S. Sharma, Electronics and Tele-
communication Engineering Department, Government Polytechnic,
Awasari(Kh.) for their valuable guidance and assistance without which
the accomplishment of the project would have never been possible.
We also thank Smt. Pathan J.J. for guiding and giving this
opportunity to explore into the real world, realize the interrelation
without which a project can never progress. We are also grateful to
parents, friends and all staff of Electronics and Telecommunication
Engineering Department, for providing us relevant information, and
support.

1. Dr. Sharma P.S.


2. Smt. Bansode A.R.
3. Smt. Devkule S.S.
4. Smt. Hande M.B.
ABSTRACT

In this project, I’ll show you the design and working of a smart

dustbin Circuit using Arduino, which us which the store trash or waste on

temporary basis. They are use to homes, offices, etc. to collect the waste.

Smart dustbin are used often at places like educational school, Colleges,

offices, parks, Arduino will activate the Motor and with the support of the

extended arm, it will list the lid open. After certain time, the lid is

automatically closed. Also the we add the GPS and GSM module in the

dustbin which is send the massage to the registered mobile number.


Content

CHAPTER 1 - INTRODUCTION....................................................1
CHAPTER 2 -BLOCK DIAGRAM.................................................3
2.1 Block Diagram..............................................................................4
2.2Component Used In Block Diagram.................................................5
2.3 Block Diagram Description.............................................................6
CHAPTER 3 - Circuit Diagram.........................................................8
3.1 Circuit Diagram..............................................................................9
CHAPTER 4- INTRODUCTION OF ARDUINO.............................10
4.1 Introduction....................................................................................11
4.2 Pin Diagram...................................................................................17
4.3 Features..........................................................................................19
CHAPTER 5 –HARDWARE DESCIPTION..................................20
5.1 Power Supply...............................................................................21
5.2 GSM Module.................................................................................27
5.3 GPS Module...................................................................................30
5.4 DC Motor…..................................................................................32
5.5 Motor Driver….............................................................................34
5.6 Ultra-sonic Sensor….....................................................................37
5.7 LED...............................................................................................39
5.8 Solar Panels...................................................................................40
CHAPTER 6- PROGRAMMING.......................................................41
6.1 Algorithm..........................................................................................42
6.2 Flowchart..........................................................................................43
6.3Program.............................................................................................44
CHAPTER 7 – RESULT, CONCLUSION AND FUTURE SCOPE.51
7.1 Result.................................................................................................52
7.2 Features..............................................................................................53
7.3 Limitations.........................................................................................53
7.4 Applications......................................................................................53
7.5 Conclusions.......................................................................................54
7.6 Future scope…...................................................................................54
CHAPTER 8 – REFERENCES............................................................55
8.1 Books.................................................................................................56
8.2 Websites............................................................................................56
CHAPTER 9 –APPENDIX....................................................................57
List of Component with Price..................................................................58
CHAPTER 1 INTRODUCTION
Dustbins are small plastic (or metal) containers that are used to store

trash (or waste) on a temporary basis. They are often used in homes,

offices, streets, parks etc. to collect the waste .In some places, littering is a

serious offence and hence Public Waste Containers are the only way to

dispose small waste. Usually, it is a common practice to use separate bins

for collecting wet or dry, recyclable or non-recyclable waste. In this

project, I have designed a simple system called Smart Dustbin using

Arduino, Ultrasonic Sensor, Servo Motor, IR Sensor etc. where the lid of

the dustbin will automatically open itself upon detection of human hand. as

the dustbin is full it will detect by the IR sensor and it will send the signal

to Arduino the the Arduino send the Gps and Gsm module as this signal get

to the Gsm module then the Gsm module will send the message to the

register mobile number. In the recent decades, Urbanization has increased

tremendously. At the same phase there is an increase in waste production.

Waste management has been a crucial issue to be considered. This paper is

a way to achieve this good cause. In this paper, smart bin is built on a

microcontroller based platform Arduino Uno board which is interfaced with

GSM modem and Ultrasonic sensor. Ultrasonic sensor is placed at the top

of the dustbin which will measure the stature of the dustbin. The threshold

stature is set as 10cm. Arduino will be programmed in such a way that

when the dustbin is being


filled, the remaining height from the threshold height will be displayed.

Once the garbage reaches the threshold level ultrasonic sensor will trigger

the GSM modem which will continuously alert the required authority until

the garbage in the dustbin is squashed. Once the dustbin is squashed,

people can reuse the dustbin. At regular intervals dustbin will be squashed.

Once these smart bins are implemented on a large scale, by replacing our

traditional bins present today, waste can be managed efficiently as it avoids

unnecessary lumping of wastes on roadside.


CHAPTER 2 BLOCK DIAGRAM
2.1 BLOCK DIAGRAM :
2.3 BLOCK DIAGRAM DESCRIPTION:

In this block diagram I will shows how to work the project in a simple
method. In he project the main part is controller that is Arduino board. I will
connect different peripherals to the Arduino. There is two input peripherals to
the Arduino that is Ultrasonic sensors which gives the input signal to the
Arduino with respect to the input signal the Arduino operates the output
peripherals that is GPS module, GSM module and Motor. When ultrasonic
sensor 1 will detect the human near the dustbin it will give signal to the
Arduino. When Arduino get signal from the ultrasonic sensor 1 the Arduino
send signal to the motor driver with respect to the signal the motor driver will
actuate the motor. When once complete the motor operation the ultrasonic
sensor 2 automatically actuate and detect the level of the dustbin. With respect
to the level the sensor will send the signal to the Arduino with respect to the
signal Arduino indicate by the led, if the dustbin is filled the it will indicate by
red led also it will send the signal to the GPS module and GSM module and
when modules get signal from Arduino it will actuate its operation.
2.2 COMPONENT USED IN PROJECT:

1. Arduino UNO

2. DC Motor

3. Motor Driver(L293D)

4. LED

5. Battery

6. Ultrasonic sensor

7. Transformer

8. Solar panel

9. GSM Module

10. GPS Module

11. Diode

12. Resistor

13. Switch

14. Led

15. Header Strips

16. Connectors

17. Connecting wires


CHAPTER 3 CIRCUIT DIAGRAM
3 .1 CIRCUIT DIAGRAM :-
CHAPTER 4 INTRODUCTION TO ARDUINO
4.1 INTRODUCTION TO ARDUINO:-

Fig: Ardunio Board

Arduino is an open-source hardware and software company, project


and user community that designs and manufactures single board
microcontrollers and microcontroller kits for building digital devices. Its
products are licensed under the GNU Lesser General Public License
(LGPL) or the GNU General Public License (GPL), permitting the
manufacture of Arduino boards and software distribution by anyone.
Arduino boards are available commercially in preassembled form or as do-
it-yourself (DIY) kits. Arduino board designs use a variety of
microprocessors and controllers. The boards are equipped with sets of
digital and analog input/output (I/O) pins that may be interfaced to
various expansion boards ('shields') or breadboards (For prototyping)
and other circuits. The boards feature serial
communications interfaces, including Universal Serial Bus (USB) on some
models, which are also used for loading programs from personal
computers. The microcontrollers can be programmed using C and C++
programming languages. In addition to using traditional compiler
toolchains, the Arduino project provides an integrated development
environment (IDE) based on the Processing language project.
The Arduino project started in 2005 as a program for students at
the Interaction Design Institute Ivrea in Ivrea, Italy, aiming to provide a
low- cost and easy way for novices and professionals to create devices that
interact with their environment using sensors and actuators. Common
examples of such devices intended for beginner hobbyists include
simple robots, thermostats and motion detectors.Arduino is open-source
hardware. The hardware reference designs are distributed under a
Creative Commons Attribution Share-Alike 2.5 license and are available on
the Arduino website. Layout and production files for some versions of the
hardware are also available. Although the hardware and software designs
are freely available under copy left licenses, the developers have requested
the name Arduino to be exclusive to the official product and not be used for
derived works without permission. The official policy document on use of
the Arduino name emphasizes that the project is open to incorporating work
by others into the official product. Several Arduino-compatible products
commercially released have avoided the project name by using various
names ending in Arduino. Most Arduino boards consist of an Atmel 8-
bit AVR microcontroller (ATmega8, ATmega168, ATmega328,
ATmega1280, ATmega2560) with varying amounts of flash memory, pins,
and features. The 32-bit Arduino Due, based on the Atmel SAM3X8E was
introduced in 2012. The boards use single or double-row pins or female
headers that facilitate connections for programming and incorporation into
other circuits. These may connect with add-on modules termed shields.
Multiple and possibly stacked shields may be individually addressable via
an I²C serial bus. Most boards include a 5 V linear regulator and a
16 MHz crystal oscillator or ceramic resonator. Some designs, such as the
LilyPad, run at 8 MHz and dispense with the onboard voltage regulator due
to specific form-factor restrictions. Arduino microcontrollers are pre-
programmed with a boot loader that simplifies uploading of programs to the
on-chip flash memory. The default bootloader of the Arduino UNO is the
optiboot bootloader. Boards are loaded with program code via a serial
connection to another computer. Some serial Arduino boards contain a
level shifter circuit to convert between RS-232 logic levels and transistor–
transistor logic (TTL) level signals.
4. 2 PIN DIAGRAM:-

Fig: Pin diagram of Arduino(ATMEGA328P)

 Pin Descriptions:-
1. Power USB:- Arduino board can be powered by using the USB cable from
your computer. All you need to do is connect the USB cable to the USB
connection.

2. Power (Barrel Jack):-Arduino boards can be powered directly from the


AC mains power supply by connecting it to the Barrel Jack.

3. Voltage Regulator:-The function of the voltage regulator is to control the


voltage given to the Arduino board and stabilize the DC voltages used by
the processor and other elements.

4. Crystal Oscillator:-The crystal oscillator helps Arduino in dealing with


time issues. How does Arduino calculate time? The answer is, by using the
crystal oscillator. The number printed on top of the Arduino crystal is
16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16 MHz.

5. Arduino Reset:-You can reset your Arduino board, i.e., start your program
from the beginning. You can reset the UNO board in two ways. First, by
using the reset button on the board. Second, you can connect an external
reset button to the Arduino pin labelled RESET.

6. Analog pins:-The Arduino UNO board has six analog input pins A0
through A5. These pins can read the signal from an analog sensor like the
humidity sensor or temperature sensor and convert it into a digital value
that can be read by the microprocessor.

7. Digital I/O:-The Arduino UNO board has 14 digital I/O pins (15) (of which
6 provide PWM (Pulse Width Modulation) output. These pins can be
configured to work as input digital pins to read logic values (0 or 1) or as
digital output pins to drive different modules like LEDs, relays, etc. The
pins labeled “~” can be used to generate PWM.
4.3 FEATURES:-
 The operating voltage is 5V
 The recommended input voltage will range from 7v to 12V
 The input voltage ranges from 6v to 20V
 Digital input/output pins are 14
 Analog i/p pins are 6
 DC Current for each input/output pin is 40 mA
 DC Current for 3.3V Pin is 50 mA
 Flash Memory is 32 KB
 SRAM is 2 KB
 EEPROM is 1 KB
 CLK Speed is 16 MHz
CHAPTER 5 HARDWARE DESCRIPTION
5.1 POWER SUPPLY CIRCUIT:-

Fig: Block diagram of Power Supply

Each of the blocks is described in more detail below:

- steps down high voltage AC mains to low voltage AC.

- converts AC to DC, but the DC output is varying.

- smoothes the DC from varying greatly to a small ripple.

- eliminates ripple by setting DC output to a fixed voltage.

Bridge rectifier:

A bridge rectifier can be made using four individual diodes, but it is


also available in special packages containing the four diodes required. It is
called a full-wave Rectifier because it uses the entire AC wave (both
positive and negative sections).

1.4V is used up in the bridge rectifier because each diode uses 0.7V
when conducting and there are always two diodes conducting, as shown in
the diagram below. Bridge rectifiers are rated by the maximum current
they can pass and the maximum reverse voltage they can withstand (this
must be at least three times the supply RMS voltage so the rectifier can
withstand the peak voltages

Smoothing:

Smoothing is performed by a large value electrolytic capacitor


connected across the DC supply to act as a reservoir, supplying current to
the output when the varying DC voltage from the rectifier is falling. The
diagram shows the unsmoothed varying DC (dotted line) and the smoothed
DC (solid line). The capacitor charges quickly near the peak of the varying
DC, and then discharges as it supplies current to the output.

Voltage regulator:

Voltage regulator ICs are available with fixed (typically 5, 12 and


15V) or variable output voltages. They are also rated by the maximum
current they can pass. Negative voltage regulators are available, mainly for
use in dual supplies. Most regulators include some automatic protection
from excessive current ('overload protection') and overheating ('thermal
protection'). Below is the circuit diagram of power supply which gives
output of 5V, as only that much is required for microcontroller. Its circuit
diagram and designing calculation are given below.
Fig: Circuit diagram of 12V Power Supply

The +12 volt power supply is based on the commercial 7812 voltage
regulator IC. This IC contains all the circuitry needed to accept any input
voltage from 15 to 24 volts and produce a steady +12 volt output, accurate
to within 5% (0.25 volt). It also contains current-limiting circuitry and
thermal overload protection, so that the IC won't be damaged in case of
excessive load current; it will reduce its output voltage instead.

The advantage of a bridge rectifier is you don’t need a center tap on


the secondary of the transformer. A further but significant advantage is
that the ripple frequency at the output is twice the line frequency (i.e.
50Hz) and makes filtering somewhat easier.

The use of capacitor c1 and c2 is to make signal ripple free. The


capacitor used before the regulator is to make ac signal ripple free and then
later which we are using is for safety, if incase there is a ripple left after
regulating, then c2nwill remove it.
We require 12V at the o/p of the regulator.

The drop out voltage of the regulator is 2V As per the data sheet)

Vdc = 12+2 = 14V

So at the regulator input, the voltage applied should be of 14V.

According to the formula,

Vdc = 2Vm/Pi

Assuming there is no ripple Capacitor from

Vm= Vdc .pi/2

=12 x 3.14)/2

=18.84V

Vm= 18.84V

During one cycle, two diodes are conducting

Drop out voltage of one diode = 0.7V

Drop out voltage of two diode = 1.4V

Vim = Vm+ 1.4V

=18.84+1.4= 20.24V

Vim=20.24V

Vrms = Vim/sqrt(2)

= 20.24/sqrt(2)

= 14.31V

Vrms = 14.31V

So we select transformer of 15V.


Similarly

Im=Idc x pi/2

Im=700m x 3.14/2

= 1.099A.

Irms= Im/sqrt(2)

= 1.099A/sqrt(2)

` = 777.11mA

Irms = 777.11mA

So we select the transformer of current rating 1A.

Considering the above transformer rating,

We take the transformer of 0-15V/1A

TRANFORMER – 0-15V/1A Stepdown transformer.

2. Rectifier Design:

PIV of diode = Vm = 12.39V

Im= 628mA
BRIDGE RECTIFIER –

So, we select the bridge IC of 1Ampere rating.

R = Vdc/Idc

= 15 / 400m

= 37.5Ohms.

Vr = 2(Vim – Vdc)

= 2(20.24 – 12)

= 8.24V

C = Vdc/ (FxRxVr)

= 12/ (100x17.5x8.24)

= 832.17uF

So for Safe working we select capacitor of 1000uF

C1 = 1000uF / 35V Electrolytic Capacitor.

C2 = 0.1uF Ceramic Capacitor.

So the power supply made from the above mentioned components gives
the output of 12V.
5.2 GSM MODULE :-

Fig: GSM Module

For communication purpose Bluetooth technology can also be used in the


transmitter section. Bluetooth is a wireless networking standard that is
aimed at remote control and sensor applications which is suitable for
operation in harsh radio environments and in isolated locations. But, the
main disadvantages of Bluetooth is short range, low complexity, and low
data speed. Therefore, GSM is more advantages over Bluetooth for
communication. Hence author use GS modem. A GSM modem is a
specialized type wireless modem that works with a GSM wireless
network. It accepts a SIM card, and operates over a subscription to a
mobile operator, just like a mobile phone. A GSM modem can be an
external
device or a PC Card / PCMCIA Card. An external GSM modem is
connected to a computer through a serial cable or a USB cable. When a
GSM modem is connected to a computer, this allows the computer to
communicate over the mobile network. While these GSM modems are
most frequently used to provide mobile internet connectivity, many of
them can also be used for sending and receiving SMS and MMS
message. GSM Modem sends and receives data through radio waves. In
this project GSM 900 modem is used to send the messages which is
shown in figure. It consists of a GSM/GPRS modem with standard
communication interfaces like RS-232 (Serial Port), USB, so that it can
be easily connected to the other devices. The power supply circuit is also
built in the module that can be turn ON by using a suitable adaptor.

Fig-2 Transmitter Part from Dustbin

The block diagram of transmitter section. Level detector consists of IR


sensors which is used to detect the level of the garbage in the dustbin. The
output of level detector is given to microcontroller. Four IR sensors are
used to indicate the different levels of the amount of the garbage collected
in the dustbin which is placed in public area. When the dustbin is filled up
to the highest level, the output of fourth IR receiver becomes active low.
This output is given to microcontroller to send the message to the Control
room via GSM module as shown in above.

Fig :- Reception Part to GSM

At receiver, control room is present where all the activities are managing.
The number of the control room is depending on the dustbins present in the
area. The person sitting in the control room monitors the entire system. A
GSM Module is connected to the
computer of the control room through
microcontroller. The entire system is monitor by the person sitting in the
control room.
March 2020

5.3 GPS MODULE :-

SIM28ML is a stand-alone or A-GPS receiver. With built-in LNA,


SIM28ML can relax antenna requirement and don’t need for external
LNA. SIM28ML can track as low as -165dBm signal even without
network assistance. The SIM28ML has excellent low power consumption
characteristic (acquisition 16mA, tracking 15mA). SIM28ML supports
various location and navigation applications, including autonomous GPS,
QZSS, SBAS ranging (WAAS, EGNOS, GAGAN, MSAS), RTCM and
A- GPS.

Fig: GPS Module

KEY FEATURES :

1) GPS receiver, supports QZSS, SBAS ranging, supports


WAAS/EGNOS/MSAS/GAGAN
2) 22tracking/66 acquisition-channel, up to 210 PRN channels
3) Small footprint: 10 .1x 9.7 x 2.5mm, 18-pin LCC package
4) 12 multi-tone active interference cancellers and jamming elimination
5) Indoor and outdoor multi-path detection and compensation
6) Max NMEA update rate up to 5 HZ
E&TC Dept., Government Polytechnic Awasari(Kh)
March 2020

7) Advanced software features


1. EPO orbit prediction
2. Always Locate advanced location awareness technology
3. supports logger function
4. supports active interference cancellation (AIC)
8) Pulse-per-second (PPS) GPS time reference
1. Adjustable duty cycle
2. typical accuracy: ±10ns
9) Interface
UART0/UART1
10) Operating temperature: -40 ~ +85ºC
11) Accuracy 2.5m CEP
12) RoHS compliant

The module provides complete signal processing from antenna input to


host port in either NMEA messages. The module requires 2.8V~4.3V
power supply. The host port is configurable to UART. Host data and I/O
signal levels are 2.85V CMOS compatible.

APPLICATION SCHEMATICS :

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

5.4 DC MOTOR:-

A DC motor is any of a class of rotary electrical motors that converts direct


current electrical energy into mechanical energy. The most common types rely on
the forces produced by magnetic fields. Nearly all types of DC motors have some
internal mechanism, either electromechanical or electronic, to periodically change
the direction of current in part of the motor.
DC motors were the first form of motor widely used, as they could be powered
from existing direct-current lighting power distribution systems. A DC motor's
speed can be controlled over a wide range, using either a variable supply voltage
or by changing the strength of current in its field windings. Small DC motors are
used in tools, toys, and appliances. The universal motor can operate on direct
current but is a lightweight brushed motor used for portable power tools and
appliances. Larger DC motors are currently used in propulsion of electric vehicles,
elevator and hoists, and in drives for steel rolling mills.

Fig: DC Motor

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

WORKING PRINCIPLE:-
An electric motor is an electrical machine which converts electrical
energy into mechanical energy. The basic working principle of a DC
motor is: "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.

Fig: Working Principle of DC Motor

FEATURES:

 Runs on DC power or AC line voltage with a rectifier.


 Operating speeds of 1,000 to 5,000 rpm.
 60-75% efficiency rate.
 High starting torque.
 Low no-load speeds.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

5.5 Motor Driver (L293D):-

Fig: L293D Motor Driver

The L293 and L293D are quadruple high-current half-H drivers. These
devices are designed to drive a wide array of inductive loads such as relays,
solenoids, DC and bipolar stepping motors, as well as other high-current and
high- voltage loads. All inputs are TTL compatible and tolerant up to 7 V. Each
output is a complete totem-pole drive circuit, with a Darlington transistor sink and
a pseudo-Darlington source. Drivers are enabled in pairs, with drivers 1 and 2
enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN. When an enable input is
high, the associated drivers are enabled, and their outputs are active and in phase
with their inputs. When the enable input is low, those drivers are disabled, and
their outputs are off and in the high-impedance state. With the proper data inputs,
each pair of drivers forms a full-H (or bridge) reversible drive suitable for
solenoid or motor applications. On the L293, external high-speed output clamp
diodes should be used for inductive transient suppression. On the L293D, these
diodes are integrated to reduce system complexity and overall system size. A
VCC1 terminal,
E&TC Dept., Government Polytechnic Awasari(Kh)
March 2020

separate from VCC2, is provided for the logic inputs to minimize device power
dissipation. The L293 and L293D are characterized for operation from 0°C to
70°C.

FUNCTIONAL BLOCK DIAGRAM :

Fig : functional diagram of L293D

KEY FEATURES :

 Can be used to run Two DC motors with the same IC.


 Speed and Direction control is possible
 Motor voltage Vcc2 (Vs): 4.5V to 36V
 Maximum Peak motor current: 1.2A
 Maximum Continuous Motor Current: 600mA
 Supply Voltage to Vcc1(vss): 4.5V to 7V
 Transition time: 300ns (at 5Vand 24V)
 Automatic Thermal shutdown is available
 Available in 16-pin DIP, TSSOP, SOIC packages

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

PIN CONFIGURATION :

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

Pin Pin Name Description


Number

1 Enable 1,2 This pin enables the input pin Input 1(2) and Input
2(7)

2 Input 1 Directly controls the Output 1 pin. Controlled by


digital circuits

3 Output 1 Connected to one end of Motor 1

4 Ground Ground pins are connected to ground of circuit (0V)

5 Ground Ground pins are connected to ground of circuit (0V)

6 Output 2 Connected to another end of Motor 1

7 Input 2 Directly controls the Output 2 pin. Controlled by


digital circuits

8 Vcc2 (Vs) Connected to Voltage pin for running motors (4.5V to


36V)

9 Enable 3,4 This pin enables the input pin Input 3(10) and Input
4(15)

10 Input 3 Directly controls the Output 3 pin. Controlled by


digital circuits

11 Output 3 Connected to one end of Motor 2

12 Ground Ground pins are connected to ground of circuit (0V)

13 Ground Ground pins are connected to ground of circuit (0V)

14 Output 4 Connected to another end of Motor 2

15 Input 4 Directly controls the Output 4 pin. Controlled by


digital circuits

16 Vcc2 (Vss) Connected to +5V to enable IC function

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

5.6 ULTRASONIC SENSOR :-

HC-SR04 distance sensor is commonly used with both microcontroller and


microprocessor platforms like Arduino, ARM, PIC, Raspberry Pie etc. The
following guide is universally since it has to be followed irrespective of the type
of computational device used. Power the Sensor using a regulated +5V through
the Vcc ad Ground pins of the sensor. The current consumed by the sensor is less
than 15mA and hence can be directly powered by the on board 5V pins (If
available). The Trigger and the Echo pins are both I/O pins and hence they can be
connected to I/O pins of the microcontroller. To start the measurement, the trigger
pin has to be made high for 10uS and then turned off. This action will trigger an
ultrasonic wave at frequency of 40Hz from the transmitter and the receiver will
wait for the wave to return. Once the wave is returned after it getting reflected by
any object the Echo pin goes high for a particular amount of time which will be
equal to the time taken for the wave to return back to the sensor.

Fig: Ultra-Sonic Sensor

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

FEATURES:

 Operating voltage: +5V


 Theoretical Measuring Distance: 2cm to 450cm
 Practical Measuring Distance: 2cm to 80cm
 Accuracy: 3mm
 Measuring angle covered: <15°
 Operating Current: <15mA
 Operating Frequency: 40Hz

PIN DESCRIPTION :

Pin Pin Description


Number Name

1 Vcc The Vcc pin powers the sensor, typically with +5V

2 Trigger Trigger pin is an Input pin. This pin has to be kept high for 10us to
initialize measurement by sending US wave.

3 Echo Echo pin is an Output pin. This pin goes high for a period of time
which will be equal to the time taken for the US wave to return back
to the sensor.

4 Ground This pin is connected to the Ground of the system.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

ULTRASONIC SENSOR WORKING:

As shown above the HC-SR04 Ultrasonic (US) sensor is a 4 pin module, whose
pin names are Vcc, Trigger, Echo and Ground respectively. This sensor is a very
popular sensor used in many applications where measuring distance or sensing
objects are required. The module has two eyes like projects in the front which
forms the Ultrasonic transmitter and Receiver. The sensor works with the simple
high school formula that
Distance = Speed × Time
The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air
and when it gets objected by any material it gets reflected back toward the sensor
this reflected wave is observed by the Ultrasonic receiver module as shown in the
picture below

Now, to calculate the distance using the above formulae, we should know the
Speed and time. Since we are using the Ultrasonic wave we know the universal
speed of US wave at room conditions which is 330m/s. The circuitry inbuilt on
the module will calculate the time taken for the US wave to come back and turns
on the echo pin high for that same particular amount of time, this way we can also
know the time taken. Now simply calculate the distance using a microcontroller
or microprocessor.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

5.7 LED:-

A light-emitting diode (LED) is a semiconductor light source that emits light


when current flows through it. Electrons in the semiconductor recombine
with electron holes, releasing energy in the form of photons. The color of the light
(corresponding to the energy of the photons) is determined by the energy required
for electrons to cross the band gap of the semiconductor.[5] White light is
obtained by using multiple semiconductors or a layer of light-emitting phosphor
on the semiconductor device.

Fig: Light Emitting Diode

WORKING PRINCIPLE:-
A light-emitting diode is a two-lead semiconductor light source. It is a p–n
junction diode that emits light when activated. When a suitable voltage is applied
to the leads, electrons are able to recombine with electron holes within the device,
releasing energy in the form of photons. This effect is called electroluminescence,
and the colour of the light (corresponding to the energy of the photon) is
determined by the energy band gap of the semiconductor.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

Fig: Working Principle of LED

FEATURES:

 Energy Saving:- The LEDs are extremely efficient low energy light sources.
 Light gains:- In 2005 the white LEDs reached outputs of over 30 lumens /
Watt and coloured versions 50 lumens / Watt.
 Long operational life:- up to 50,000 hours.
 Compact light source:- no other lamp possesses such small dimensions for a
comparative light output.
 No radiation:- the LEDs do not emit ultraviolet (UV) or infrared (IR) radiation.
 Durable lamps:- The LEDs are durable against impact and vibration.
 Dimmable LEDs:- the LEDs can be dimmed.
 Coloured lamps:- Coloured light can be produced effectively – over 16
million colours.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

5.8 SOLAR PANELS:-

Fig : Solar Panels

A solar panel is actually a collection of solar (or photovoltaic) cells, which


can be used to generate electricity through photovoltaic effect. These cells are
arranged in a grid-like pattern on the surface of solar panels. Thus, it may also be
described as a set of photovoltaic modules, mounted on a structure supporting it.
A photovoltaic (PV) module is a packaged and connected assembly of 6×10 solar
cells. When it comes to wear-and-tear, these panels are very hardy. Solar panels
wear out extremely slow. In a year, their effectiveness decreases only about one
to two per cent (at times, even lesser). Most solar panels are made up using
crystalline silicon solar cells. Installation of solar panels in homes helps in
combating the harmful emissions of greenhouse gases and thus helps reduce

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

global warming.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

Solar panels do not lead to any form of pollution and are clean. They also
decrease our reliance on fossil fuels (which are limited) and traditional power
sources. bThese days, solar panels are used in wide-ranging electronic
equipments like calculators, which work as long as sunlight is available.
However, the only major drawback of solar panels is that they are quite costly.
Also, solar panels are installed outdoors as they need sunlight to get charged.

WORKING OF SOLAR PANELS:

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

Solar panels collect clean renewable energy in the form of sunlight and
convert that light into electricity which can then be used to provide power for
electrical loads. Solar panels are comprised of several individual solar cells which
are themselves composed of layers of silicon, phosphorous (which provides the
negative charge), and boron (which provides the positive charge). Solar panels
absorb the photons and in doing so initiate an electric current. The resulting
energy generated from photons striking the surface of the solar panel allows
electrons to be knocked out of their atomic orbits and released into the electric
field generated by the solar cells which then pull these free electrons into a
directional current. This entire process is known as the Photovoltaic Effect. An
average home has more than enough roof area for the necessary number of solar
panels to produce enough solar electricrity to supply all of its power needs excess
electricity generated goes onto the main power grid, paying off in electricity use
at night.

In a well-balanced grid-connected configuration, a solar array generates power


during the day that is then used in the home at night. Net metering programs
allow solar generator owners to get paid if their system produces more power than
what is needed in the home. In off-grid solar applications, a battery bank, charge
controller, and in most cases, an inverter are necessary components. The solar
array sends direct current (DC) electricity through the charge controller to the
battery bank. The power is then drawn from the battery bank to the inverter,
which converts the DC current into alternating current (AC) that can be used for
non-DC appliances. Assisted by an inverter, solar panel arrays can be sized to
meet the most demanding electrical load requirements. The AC current can be
used to power loads in homes or commercial buildings, recreational vehicles and
boats, remote cabins, cottages, or homes, remote traffic controls,
telecommunications equipment, oil and gas flow monitoring, RTU, SCADA, and
much more.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

THE BENEFITS OF SOLAR PANELS :

Using solar panels is a very practical way to produce electricity for many
applications. The obvious would have to be off-grid living. Living off-grid means
living in a location that is not serviced by the main electric utility grid. Remote
homes and cabins benefit nicely from solar power systems. No longer is it
necessary to pay huge fees for the installation of electric utility poles and cabling
from the nearest main grid access point. A solar electric system is potentially less
expensive and can provide power for upwards of three decades if properly
maintained. Besides the fact that solar panels make it possible to live off-grid,
perhaps the greatest benefit that you would enjoy from the use of solar power is
that it is both a clean and a renewable source of energy. With the advent of global
climate change, it has become more important that we do whatever we can to
reduce the pressure on our atmosphere from the emission of greenhouse gases.
Solar panels have no moving parts and require little maintenance.
They are ruggedly built and last for decades when properly maintained.
Last, but not least, of the benefits of solar panels and solar power is that, once a
system has paid for its initial installation costs, the electricity it produces for the
remainder of the system's lifespan, which could be as much as 15-20 years
depending on the quality of the system, is absolutely free! For grid-tie solar power
system owners, the benefits begin from the moment the system comes online,
potentially eliminating monthly electric bills or, and this is the best part, actually
earning the system's owner additional income from the electric company. How? If
you use less power than your solar electric system produces, that excess power
can be sold, sometimes at a premium, to your electric utility company. There are
many other applications and benefits of using solar panels to generate your
electricity needs - too many to list here. But as you browse our website, you'll
gain a good general knowledge of just how versatile and convenient solar power
can be.
E&TC Dept., Government Polytechnic Awasari(Kh)
March 2020

CHAPTER 6 PROGRAMMING

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

6.1 ALGORITHM:

1. Start
2. Check for location request
3. Check whether the person near to dustbin
4. Turn ON Motor
5. Check whether the dustbin is filled?
6. Indicate the level of the dustbin
7. Check for GPS and GSM range
8. Delay for 5 second
9. Send message for authority.
10.Stop

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

6.2 FLOW CHART:

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

6.3 PROGRAM:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);
#include <TinyGPS.h>
String incomingData;
char phone_no[] = "XXXXXXXXXX"; //replace with phone no. to get sms
TinyGPS gps; //Creates a new instance of the TinyGPS object
int LED_G1 = A0;
int LED_G2 = A1;
int LED_Y = A2;
int LED_R = A3;

int trigPin = 4;
int echoPin = 8;
int trigPin_l = 9;
int echoPin_l = 10;
long duration, dist, average;
long aver[3]; //array for average

long duration_d, dist_d, average_d;


long aver_d[3]; //array for average

const int speedStep =200;


const int speedDelay = 1000;// delay between speed increment

#define P1A 5 // define pin 10as for P1A


#define P2A 6 // define pin 11 as for P2A
#define EN12 7 // define pin 9 as for 1,2EN enable

void setup() {

mySerial.begin(9600); // Setting the baud rate of GSM Module


Serial.begin(9600); // Setting the baud rate of Serial Monitor (Arduino)
delay(100);
Serial.begin(9600);

pinMode(P1A, OUTPUT);// define pin as OUTPUT for P1A


pinMode(P2A, OUTPUT);// define pin as OUTPUT for P2A
pinMode(EN12, OUTPUT);// define pin as OUTPUT for 1,2EN

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
//close cap on power on
delay(100);

pinMode(trigPin_l, OUTPUT);
pinMode(echoPin_l, INPUT);
pinMode(LED_G1, OUTPUT);
pinMode(LED_G2, OUTPUT);
pinMode(LED_Y, OUTPUT);
pinMode(LED_R, OUTPUT);
}

void measure_d() {
digitalWrite(10,HIGH);
digitalWrite(trigPin, LOW);
delayMicroseconds(5);
digitalWrite(trigPin, HIGH);
delayMicroseconds(15);
digitalWrite(trigPin, LOW);
pinMode(echoPin, INPUT);
duration_d = pulseIn(echoPin, HIGH);
dist_d = (duration_d/2) / 29.1; //obtain distance
}

void measure() {
digitalWrite(11,HIGH);
digitalWrite(trigPin_l, LOW);
delayMicroseconds(5);
digitalWrite(trigPin_l, HIGH);
delayMicroseconds(15);
digitalWrite

(trigPin_l, LOW);
pinMode(echoPin_l, INPUT);
duration = pulseIn(echoPin_l, HIGH);
dist = (duration/2) / 29.1; //obtain distance
}
void loop() {
loc();

for (int j=0;j<=2;j++) { //average distance

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

measure_d();
aver_d[j]=dist_d;
delay(10); //delay between measurements
}
dist_d=(aver_d[0]+aver_d[1]+aver_d[2])/3;

if(dist_d<=13) //Check the sensor output

L293D('L',speedStep, 1);
delay(600);
L293D('L',speedStep, 0);
delay(7000);
L293D('r',speedStep, 1);
delay(240);
L293D('r',speedStep, 0);
}
else{
for (int i=0;i<=2;i++) { //average distance
measure();
aver[i]=dist;
delay(10); //delay between measurements
}
dist=(aver[0]+aver[1]+aver[2])/3;
if(dist<=3) //as your choice
{
Serial.print("level is:");
Serial.println(dist);
location();
digitalWrite(LED_R, HIGH);
digitalWrite(LED_Y, LOW);
digitalWrite(LED_G1, LOW);
digitalWrite(LED_G2, LOW);
}

else if ( dist<=20) //as your choice


{
Serial.print("level is:");
Serial.println(dist);
digitalWrite(LED_R, LOW);
digitalWrite(LED_Y, HIGH);
digitalWrite(LED_G1, LOW);

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

digitalWrite(LED_G2, LOW);
}
else if ( dist<=30) //as your choice
{
Serial.print("level is:");
Serial.println(dist);
digitalWrite(LED_R, LOW);
digitalWrite(LED_Y, LOW);
digitalWrite(LED_G1, LOW);
digitalWrite(LED_G2, HIGH);
}

}
}
void location()
{
bool newData = false;
unsigned long chars;
unsigned short sentences, failed;

// For one second we parse GPS data and report some key values
for (unsigned long start = millis(); millis() - start < 1000;)
{
while (Serial.available())
{
char c = Serial.read();
Serial.print(c);
if (gps.encode(c))
newData = true;
}
}

if (newData) //If newData is true


{
float flat, flon;
unsigned long age;
gps.f_get_position(&flat, &flon, &age);
mySerial.print("AT+CMGF=1\r");
delay(400);
mySerial.print("AT+CMGS=\"");
mySerial.print(phone_no);
mySerial.println("\"");

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

delay(300);

mySerial.println("DUSTBIN IS FULLED");// The SMS text you want to send


delay(100);
mySerial.print("http://www.google.com/maps/?q=");
mySerial.print(flat, 6);
mySerial.print(",");
mySerial.print(flon, 6);
delay(200);
mySerial.println((char)26); // End AT command with a ^Z, ASCII code 26
delay(200);

}
}

void loc()

if (mySerial.available()>0)
Serial.write(mySerial.read());
String c = mySerial.readString();
c.trim();
if (c.indexOf("SEND LOCATION") >= 0)

{
bool newData = false;
unsigned long chars;
unsigned short sentences, failed;

// For one second we parse GPS data and report some key values
for (unsigned long start = millis(); millis() - start < 1000;)
{
while (Serial.available())
{
char c = Serial.read();
Serial.print(c);

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

if (gps.encode(c))
newData = true;
}
}

if (newData) //If newData is true


{
float flat, flon;
unsigned long age;
gps.f_get_position(&flat, &flon, &age);
mySerial.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode
delay(1000); // Delay of 1 second
mySerial.println("AT+CMGS=\"+ZZXXXXXXXXXX\"\r"); // enter mobile
number
delay(1000);

mySerial.println("LOCATION LINK -");// The SMS text you want to send


delay(100);
mySerial.print("http://www.google.com/maps/?q=");
mySerial.print(flat, 6);
mySerial.print(",");
mySerial.print(flon, 6);
delay(200);
mySerial.println((char)26); // End AT command with a ^Z, ASCII code 26
delay(200);

}
}
}

void L293D(char dir,int spd, int en)


{
if(dir =='L')
{
if(en ==0){
Serial.println(" CW Motor Stopped");
}else{
Serial.print(" Rotating CW: ");
Serial.println(spd);//print actual speed value
}
digitalWrite(EN12 ,en);// Enable 1A and 2A
analogWrite(P1A,spd);// send PWM with spd value to P1A

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

digitalWrite(P2A,LOW);// LOW singal to P2A

}else{ if(
en ==0){
Serial.println(" CCW Motor Stopped");
}else{
Serial.print(" Rotating CCW: ");
Serial.println(spd);//print actual speed value
}
digitalWrite(EN12 ,en);// Disable 1A and 2A
digitalWrite(P1A,LOW);// Keep thos LOW P1A
analogWrite(P2A,spd);// send PWM with spd value to P2A
}
}

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

CHAPTER 7 RESULT, CONCLUSION AND


FUTURE SCOPE

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

7.1 RESULT:

When ultrasonic sensor 1 will detect the human near the dustbin it will give
signal to the Arduino. When Arduino get signal from the ultrasonic sensor 1 the
Arduino send signal to the motor driver with respect to the signal the motor driver
will actuate the motor. When once complete the motor operation the ultrasonic
sensor 2 automatically actuate and detect the level of the dustbin. With respect to
the level the sensor will send the signal to the Arduino with respect to the signal
Arduino indicate by the led, if the dustbin is filled the it will indicate by red led
also it will send the signal to the GPS module and GSM module and when

modules
get signal from Arduino it will actuate its operation.

7.2 FEATURES:

1. Detection of the waste level.


2. Automatic lid open.
3. Request to send location.
4. Automatic send SMS.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

7.3 LIMITATIONS:
1. It reduces man power requirements which results into increase in
unemployment's for unskilled people.
2. The training has to be provided to the people involved in the smart waste
management system.
3. GSM and others sensors are costly.

7.4 APPLICATIONS:
1. It will use in public places
2. It will use in hotels
3. It will use in parks
4. It will use in hospitals
5. It will use in industry's
6. It will use in colleges

7.5 CONCLUSION:
This project work is the implementation of Smart dustbin using Arduino with
GSM, GPS module, ultrasonic sensor, solar panels, dc motor, motor driver. This
system assures the cleaning of dustbins soon when the garbage level reaches its
maximum. It will take power supply with the help of Piezoelectric Device .If the
dustbin is not cleaned in specific time, 37 then the record is sent to the Sweeper or
higher authority who can take appropriate action against the concerned contractor.
This system also helps to monitor the fake reports and hence can reduce the
corruption in the overall management system. This reduces the total number of
trips of garbage collection vehicle and hence reduces the overall expenditure
associated with the garbage collection. It ultimately helps to keep cleanliness in
the society. Therefore, the Smart dustbin using Arduino with GSM and GPS
module makes the garbage collection more efficient.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

7.6 FUTURE SCOPE:

Smart dustbin using Arduino with GSM and GPS module helps us to reduce
the pollution. Many times garbage dustbin is overflow and many animals like dog
or cow enters inside or near the dustbin. Also some birds are also trying to take
out garbage from dustbin. This project can avoid such situations. And the
message can be sent directly to the cleaning vehicle instead of the contractor’s
office. Apart from this, differentiation can be made between dry trash 39 bin and
wet trash bin collecting plastic dry waste and biodegradable waste respectively.
To implement this methane and smell sensors can be used. This helps in
distinguishing the waste at the source and hence reducing the requirement of
manpower. To enhance it further, an automated system can be developed which is
able to pick up waste in and around the bin, segregate them and put them in
respective bins.

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

CHAPTER 8
REFERENCES

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

8.1 BOOKS:

1. Arduino programming by ryan turner


2. Introduction to Arduino by Christina bagain

8.2 WEBSITES:
1. https://www.arduino.cc/
2. https://www.youtube.com/watch?v=9yrP1CZN3Ds
3. https://www.youtube.com/watch?v=9yrP1CZN3Ds
4. https://www.electronicshub.org/smart-dustbin-using-arduino/
5. https://www.arrow.com/en/research-and-events/articles/ultrasonic-
sensors-how-they-work-and-how-to-use-them-with-arduino
6. https://mechatrofice.com/arduino/send-gps-location-via-sms

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

CHAPTER 9 APPENDIX

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

LIST OF COMPONENT WITH PRICE:

SR. COMPONENT SPECIFICATION UNIT QUANTITY COST


NO. PRIZE

1 Arduino Uno ATMEGA328P 350 1 350

2 GPS Module SIM28ML 475 1 475

3 GSM Module SIM900A 850 1 850

4 Ultrasonic HC-SR04 135 2 270


Sensor
5 Battery Lead acid 100 3 300

6 Transformer Step down (12-0- 120 1 120


12)
7 DC Motor Voltage: DC 3V-6V 170 1 170
Current: 100mA-
120mA

8 Motor Driver L293D 45 1 45

9 Voltage 7812/7805 10 2 20
Regulator
10 Capacitor 1000uF/25v 3 1 3

11 Resistors 220Ω 1 5 5

12 Diode 1N4007 3 5 15

13 Switch - 10 1 10

14 LED 3.3V/20mA 3 5 15

E&TC Dept., Government Polytechnic Awasari(Kh)


March 2020

15 Connector - 10 3 30

16 Connecting Male To Male 3 25 225


Wires Female To Male 3 25
Female To Female 3 25
17 Header Strips Male/female 10 2 20

18 Solar Panels 6v /100mA 80 2 160

- TOTAL - - - 3083

E&TC Dept., Government Polytechnic Awasari(Kh)

You might also like