Report

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 86

PROJECT REPORT ON

SMART DUSTBIN MANAGEMENT

CONTENTS

1. ABSTRACT

2. INTRODUCTION

3. FUNCTIONAL DESCRIPTION OF THE PROJECT

4. DIAGRAMS
 BLOCK DIAGRAM
 CIRCUIT DIAGRAM

5. POWER SOURCE DESCRIPTION

6. DESCRIPTION ABOUT GSM TECHNOLOGY

7. BRIEF DESCRIPTION ABOUT SERIAL COMMUNICATION

8. DESCRIPTION ABOUT ATMEGA 328 CONTROLLER

9. DESCRIPTION ABOUT H – BRIDGE

10. DC MOTOR – AN OVERVIEW

11. HARDWARE DETAILS

12. SOFTWARE DETAILS

13. CONCLUSIONS AND REFERENCES


SMART DUSTBIN MANAGEMENT
ABSTRACT

Swachh Bharat Abhiyan (English: Clean India Mission and abbreviated as


SBA or SBM for "Swachh Bharat Mission") is a national campaign by the
Government of India covering 4,041 statutory cities and towns, to clean the
streets, roads and infrastructure of the country. The aim of the mission is to cover
all the rural and urban areas of the country to present this country as an ideal
country before the world. With the proliferation of GSM technology, mobile
phones, sensors, cameras it is possible to collect massive amount of garbage
and separate the dry and wet dust automatically.

The littering of garbage bins makes serious unhygienic conditions in any


type of surroundings. It leads to several health issues. To overcome this problem
and make the waste management system more efficient and reliable, we need
smart solution like smart waste management and hence that is designed in this
project work. In this project, the type of waste (dry or wet) is monitored with the
help of sensors (electrodes) and dumps it in appropriate chamber of the dust bin
automatically. Microcontroller is interfaced with the GSM modem to transmit
message to the concern municipality authorities when any of the dust bin i.e., dry
and wet dust bins are completely filled. This will improve the segregation
process.

Here a project is proposed to separate the dry waste and wet waste
through the electrodes on the dumping plate that dumps the dust bin on either of
the directions i.e., left or right where the dry and wet dust bins are placed to
collect the dust. This can be useful to categorize the type of waste which is
present in the dust bin. The proposed method of categorization is based on
sensitivity of the dust material. The copper electrodes operated that are present
over the top of the dust bin will identify weather it is dry or wet dust. Depending
on this, the dust will separated by dumping it on to either of the side
automatically. This information of the wet dust and dry dust full in their respective
bins is sensed through the IR sensors that are connected to the arduino
controller will be transmitted to the monitoring unit i.e., concern authorities via
GSM modem. The project aim is to design an autonomous device that can
separate dry and wet waste and alert the concern department automatically
when any of the bins is full.

The microcontroller through DC motor will either rotate clockwise or anti-


clockwise judging whether the dust is dry or wet. These electrodes provide the
signal to the controller whether the dust is dry or wet. Depending on this, if the
dust is dry it will be dumped to one side and if dust is found to be wet, it will be
dumped to the other side automatically. A total of two sets of IR sensors for the
dry and wet bins and a DC motor to dump the dust in the chamber are used in
the project work. The controller allows dynamic and faster control along with the
electro mechanical devices for the movement. This project uses regulated 5V,
500mA power supply. 7805 and 7812 three terminal voltage regulators are used
for voltage regulation. Full wave rectifier is used to rectify the ac output of
secondary of 230/12V step down transformer.
CHAPTER – 2

INTRODUCTION

Waste management is one of the primary problem that the world faces
irrespective of the case of developed or developing country. The key issue in the
waste management is that the garbage bins at public places are dumped with
wet and dry wastes in the same bin. It in turn leads to various hazards such as
bad odor & ugliness to that place which may be the root cause for spread of
various diseases. To avoid all such hazardous scenario and maintain public
cleanliness and health this work is mounted on a smart garbage system. The
main theme of the work is to develop a smart intelligent garbage management.
This concept proposes a smart alert system for garbage by separating the dry
and wet garbage automatically. This process is aided by the IR sensors which
are interfaced with arduino microcontroller to check the garbage/dust is dry or
wet and dump it in any of the direction for separation of dry or wet dust. After
separation, if the individual dry or wet dust bins are full, the information will be
transmitted in the form of SMS to the monitoring station or concern department
through GSM modem interfaced to the controller.

One of the main concerns with our environment has been solid waste
management which impacts the health and environment of our society. The
detection, monitoring and management of wastes is one of the primary problems
of the present era. The traditional way of manually monitoring the wastes in
waste bins is a cumbersome process and utilizes more human effort, time and
cost which can easily be avoided with our present technologies. This is a method
in which waste management is automated. This is a GSM based Garbage
Monitoring system, an innovative way that will help to keep the cities clean and
healthy. The whole process is upheld by an embedded module integrated with
GSM module. In the project work, the garbage bins are sensed through the
optical (IR) sensors.

The ultimate need of the hour for a developing nation is the key for “Smart
City”. The influential ecological factors that pose to be a threat to this may
include: hazardous pollution and its subsequent effects on health of humanity,
alarming global warming and depletion of ozone layer etc. Mostly Environmental
pollution may be owing to the Municipal Solid Leftovers. A Proper maintenance
becomes mandatory for an efficient and effective removal of the generated
Municipal Solid Leftover. It is perceived that often the waste space gets too much
occupied due to irregular removal of garbage occupancy in the dustbin. This
exposition proposes an e-monitoring system that put forths an embedded system
and sensors based software assimilated with GSM technology. Using the
anticipated system, monitoring of the dry and wet waste could be monitored
effectively. This design designates a technique in which the garbage type could
be checked and separated automatically.

The system is designed with ATMEGA 328 microcontroller, which senses


the garbage type (dry/wet) and separates them automatically. Today
microcontrollers are playing major role, almost in all activities. These mini chips
acts as mini computers can perform many tasks like, data acquisition, data
display, data storage, etc, in addition to these; it can control any mechanical
transmission, drives through motors efficiently. These chips are increasingly
being used to implement control systems. It is therefore important to understand
microcontroller architecture well.

The entire system is designed with microcontroller and it is playing major


role in this project work. The microcontroller chips are widely used in embedded
systems because of its internal facilities. With the advancement of technology in
the field of micro-controllers, all the activities in our day-to-day living have
become part of information technology and we find micro-controllers in each and
every application. Thus, the trend is directing towards controller based project
works. The controller is a low power; higher performance CMOS microcomputer
with RAM can be used for multiple functions with this single chip. Its high-density
non-volatile memory compatible with standard instruction set makes it a powerful
controller that provides highly flexible and cost effective solution to control
applications.

Micro-controller works according to the program written in it. The program


is written in such a way, so that the Microcontroller can read and transmit the
information. Micro-controllers are "embedded" inside some other device so that
they can control the features or actions of the product. Another name for a micro-
controller, therefore, is "embedded controller". Micro-controllers are dedicated to
one task and run one specific program. The program is stored in ROM (read-only
memory) and generally does not change. Micro-controllers are often low-power
devices. A battery-operated Microcontroller might consume 50 milli watts. A
micro-controller has a dedicated input device and often (but not always) has a
small LED or LCD display for output. A micro-controller also takes input from the
device it is controlling and controls the device by sending signals to different
components in the device. The detailed description about microcontrollers is
provided in the next chapters.

Microcontrollers these days are silent workers in many apparatus, ranging


from the washing machine to the video recorder. Nearly all of these controllers
are mask programmed and therefore are of very little use for applications that
require the programs to be changed during the course of execution. Even if the
programs could be altered, the information necessary to do so an instruction set,
an assembler language and description for the basic hardware is either very
difficult to obtain or are in adequate when it came to the issue of accessibility.
This microcontroller has features that seem to make it more accessible than any
other single chip microcontroller with a reasonable price tag.

The purpose of this project work is to present control theory that is relevant
to the analysis and design of Micro-controller system with an emphasis on basic
concept and ideas. It is assumed that a Microcontroller with reasonable software
is available for computations and simulations so that many tedious details can be
left to the Microcontroller. The control system design is also carried out up to the
stage of implementation in the form of controller programs in assembly language.
Micro-controllers are "embedded" inside some other device so that they can
control the features or actions of the product. Another name for a micro-
controller, therefore, is "embedded controller". Micro-controllers are dedicated to
one task and run one specific program. The program is stored in ROM (read-only
memory) and generally does not change. Micro-controllers are often low-power
devices. A battery-operated Microcontroller might consume 50 milli watts. A
micro-controller has a dedicated input.
CHAPTER – 3

FUNCTIONAL DESCRIPTION OF THE PROJECT

The functional description of the project work is explained in this chapter.


For better understanding, the total module is divided into various blocks and each
block explanation is provided here. The diagrams (block diagram, circuit
diagram) of this project work are provided in the next chapter. The following is
the description of the overall function or operation of the project work.

The Project work is divided into three main Parts. The first part is to identify
the type of garbage (dry/wet). To do so copper electrodes are used that are
placed on the lid of the dust bin and is operated through a DC motor which will
indicate the arduino whether the garbage is dry or wet. The second part is the
sorting of the garbage depending on their type that dumps the garbage either to
left or right. And the last part is to sense the dry and wet garbage bins and send
message to the mobile number defined in the controller when any of the bin is
completely filled with garbage.

To drive the electrodes plate clockwise or anti-clockwise directions, a high


torque, high precise movement DC motor is used such that the clock wise
rotation of the DC motor dumps the garbage in one dust bin and anti clockwise
rotation of DC motor will dump the garbage in the other bin. The DC motor
driving is done with a drive circuit whose control signals are fed with the help of
microcontroller.

DRY/WET GARBAGE SENSING


To find the wet/dryness of the garbage an electronic circuit is designed,
which takes care of the monitoring the garbage continuously. For this, two
electrodes are used. One electrode is fed with +5V DC and the other electrode is
used for indicating the sensitivity of the garbage to the microcontroller. When the
garbage is completely dry, the electrode will be in open circuit condition. Since
water is a conductor of electricity, whenever the garbage is wet, conduction
makes continuity between the conductors (electrodes) and a logic high signal will
be received by the controller if wet garbage is detected. The output of sensing
electrode is fed to microcontroller and according to the high/low signals from the
electrode; the microcontroller controls the plate rotation in sorting the wet and dry
garbage.

IR SENSING CIRCUIT
The dry or wet garbage bins full or not is sensed through the sensing
circuit designed with IR Sensors. The sensing block is designed using IR sensors
along with LM567 IC, this is a tone decoder IC, and also it generates tone
frequency. For identifying the garbage level, a set of sensors are used with a 567
IC. The obstacle sensing block is designed with infrared sensors; a set of IR
sensors are used as IR signal transmitting LED and IR signal receiving LED.
These sensors are arranged face to face and are mounted on the conveyor belt.
Both the sensors are wired with IC 567, this is a tone frequency generator cum
decoder IC, means this IC can produce a tone frequency of up to 20 KHz, and
the same IC also can decode the frequency. Since this IC can perform two
different functions, the IR signal transmitting LED is connected at the output of
tone signal generating part of IC, similarly the IR signal receiving LED is
connected at the output of tone signal decoding part of IC. The tone signal
generating part is configured as free running oscillator, with the help of a resistor
and capacitor connected externally to this oscillator frequency can be adjusted.
When the circuit is energized it starts producing a continuous chain of square
pulses. The output of this oscillator is amplified and fed to IR LED. This LED
radiates the signal in to air and depending up on the signal strength or radiating
power, the range can be increased. The IR signal delivered from the IR LED
transmitted in a line like a laser beam, this beam is invisible and harmless. When
the transmitted laser beam interrupted by garbage, this beam will be disturbed by
the garbage waste and the signal will be reflected, by which the IR receiver will
not receive the IR signal and if the garbage is not present, the IR receiver will
receive the transmitted signal. The output of IR-Receiver is (proportional to
reflected wave) found for matching (comparing) with that of transmitted wave,
and then the output of the IC will becomes low automatically (If both are equal
then output of this IC becomes low). The output of this tone decoder IC is fed to
microcontroller.

The basic function of the detector circuit is by radiating energy into space
through IR LED and detecting the echo signal reflected from an object. The
reflected energy that is returned to the IR sensor indicates the presence of a
object which is within the range. A portion of the transmitted energy is intercepted
by the target and re-radiated in many directions. The radiation directed back
towards the system is collected by the receiving LED causes to produce a high
signal at Pin No.8 of LM567 IC. The output of the receiver is fed to the
Microcontroller. Whenever the controller receives a high signal from the
reference point, the microcontroller energizes the voice chip to announce the
information. The following is the diagram of sensing circuit.
The range of Infra Red frequency region is in the range of Terra Hertz (10
^12 Hz) and the wavelength is in the range of 300 nm.

FUNCTION OF LM 567 (TONE DECODER) CHIP


The LM567 IC is a general-purpose tone decoder designed to provide a
saturated transistor switch to ground when an input signal is present within the
pass band. The circuit consists of two-phase detectors i.e., Q and I detector that
are driven by a voltage-controlled oscillator, which determines the center
frequency of the decoder. External components are used to independently set
center frequency, bandwidth and output delay.

As the IC is configured with a VCO internally, it will be generating the


frequency depending on the R and C values that are connected to the 5 and 6
pins of the 567-tone decoder IC. 5th pin is called as the timing resistor (RT) and
6th pin is called as the timing capacitor (CT). As the frequency is inversely
proportional to R and C values, by defining the RC network at the IC; the VCO
(Voltage Controlled Oscillator) along with the Q-phase detector will be generating
a particular frequency which will be coming out from the 5th pin of the tone
decoder IC. The I-phase detector is used to decode or compare the received
frequency with the generated frequency.
The frequency generated by the tone decoder IC can be calculated using
the formula:
F = [1 / (2  R C) ]

Looking at the pin configuration in the circuit diagram of the 567-tone


decoder, 3rd pin of the IC is connected to the IR receiver (detector) and 5 th pin to
the IR transmitter by using a transistor. The PNP transistor SK 100 is used to
drive the high efficiency IR transmitting LED with the modulating frequency
generated by the IC. In simple words it can be explained like, as the signal
(frequency) generated by the IC will not be having great strength, the transistor is
used for amplifying the signal and the amplified signal is fed to IR transmitting
LED and in order to limit the current a 470 ohms resistor is connected.

The IR is having the characteristics of a laser i.e., it almost travels in a


straight line with minimum expansion and like laser light it is also a
monochromatic light. Another important feature of IR is that while the
transmission is being done the IR transmitter and the IR receiver (detector) both
should be in line of sight.

The IR receiver is connected to the 3 rd pin, which is the input pin of the IC.
As the IR signal is transmitted into the free space and the IR receiver detects the
signal. In the free space as lot of noise signals are present; the IR signal will be
received with some noise signals. So in order to eliminate the noise signals a
capacitor is connected in between the IR receiver and the 3 rd pin of the 567-tone
decoder IC. And thus the IR received signal is fed to the IC, which will compare
the received frequency signal with that of the generated frequency. The I-phase
detector does this comparison and the output will be enabled when both the
frequencies matches i.e., transmitted frequency is equal to the received
frequency. And if the frequencies do not match the output will not be enabled.
When both the transmitted and the received frequencies are matched, the
I-phase detector enables the output pin of the 567-tone decoder i.e., the 8 th pin.
So when the output is enabled the output from the IC is a logic low signal. And if
the frequencies do not match, the output will not be enabled and the 8 th pin will
logic high signal. This is due to the fact that at the 8 th pin, internally a transistor is
present whose emitter is grounded and the collector pin is the output 8 th pin. And
if the circuit of the 567-tone decoder is observed, we can see the supply i.e., Vcc
is connected to the output pin of the IC through a resistor.

When the frequencies match, the output will be enabled by which the
transistor will be conducting (ON) and the Vcc supply will grounded through the
transistor internally in the IC itself. So a logic low signal will be received. And the
same way if frequencies do not match output will not enabled by which the
transistor will not be conducting (OFF) and the supply will be coming from the
output pin, which is the logic high signal.

When the IR sensors are connected facing each other, every time the
output of the tone decoder IC will be a logic low signal until no obstacle comes in
between the IR transmitter and the IR receiver. Unless any obstacle is present
the transmitted frequency will be continuously received by the receiver and
frequency will be matched with that of the generated ones and the output will be
enabled. So a logic low will be the output. And if obstacle comes in between the
sensors the IR receiver will not receive the signal and the tone decoder IC
checks the received frequency. As there is no received frequency the output will
not be enabled, thus a logic high signal is received.

If the sensors are placed side by side, the IR transmitter will be


transmitting the IR signal continuously and the receiver will receive the reflected
signal when there is any obstacle. So until there is no obstacle, the receiver will
not receive the IR signal, so the frequencies do not match and the output will not
be enabled. So the output of the 567-tone decoder will be a logic high signal. If
obstacle comes in front of the sensors, the IR signal will be reflected back which
will be observed by the IR receiver and feeds the signal to the tone decoder,
which checks the frequency with the generated ones and as both of them match
the output will be enabled by which the internal will be in ON state and the supply
will be grounded internally in the IC. So a logic low signal will be received from
the output of the 567-tone decoder IC.

And to indicate whether the output of the sensing circuit is a logic low
signal or a logic high signal, a LED is connected at the output pin of the 567-tone
decoder IC. If the output is high LED will be in ON state and LED will be in OFF
state if the output is low.

ARDUINO UNO CONTROLLER


Overview
The Arduino Uno is a microcontroller board based on the ATmega328
(datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM
outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a
power jack, an ICSP header, and a reset button. It contains everything needed to
support the microcontroller; simply connect it to a computer with a USB cable or
power it with a AC-to-DC adapter or battery to get started.

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

Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground,
making it easier to put into DFU mode.
Revision 3 of the board has the following new features:
 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and
two other new pins placed near to the RESET pin, the IOREF that allow
the shields to adapt to the voltage provided from the board. In future,
shields will be compatible both with the board that use the AVR, which
operate with 5V and with the Arduino Due that operate with 3.3V. The
second one is a not connected pin, that is reserved for future purposes.
 Stronger RESET circuit.
 Atmega 16U2 replace the 8U2.

"Uno" means one in Italian and is named to mark the upcoming release of
Arduino 1.0. The Uno and version 1.0 will be the reference versions of Arduino,
moving forward. The Uno is the latest in a series of USB Arduino boards, and the
reference model for the Arduino platform; for a comparison with previous
versions, see the index of Arduino boards.

Summary
 Microcontroller ATmega328
 Operating Voltage 5V
 Input Voltage (recommended) 7-12V
 Input Voltage (limits) 6-20V
 Digital I/O Pins 14 (of which 6 provide PWM output)
 Analog Input Pins 6
 DC Current per I/O Pin 40 mA
 DC Current for 3.3V Pin 50 mA
 Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
 SRAM 2 KB (ATmega328)
 EEPROM 1 KB (ATmega328)
 Clock Speed 16 MHz

Schematic & Reference Design


EAGLE files: arduino-uno-Rev3-reference-design.zip (NOTE: works with
Eagle 6.0 and newer) Schematic: arduino-uno-Rev3-schematic.pdf

Note: The Arduino reference design can use an Atmega8, 168, or 328, Current
models use an ATmega328, but an Atmega8 is shown in the schematic for
reference. The pin configuration is identical on all three processors.

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

The power pins are as follows:

 VIN. The input voltage to the Arduino board when it's using an external
power source (as opposed to 5 volts from the USB connection or other
regulated power source). You can supply voltage through this pin, or, if
supplying voltage via the power jack, access it through this pin.
 5V.This pin outputs a regulated 5V from the regulator on the board. The
board can be supplied with power either from the DC power jack (7 - 12V),
the USB connector (5V), or the VIN pin of the board (7-12V). Supplying
voltage via the 5V or 3.3V pins bypasses the regulator, and can damage
your board. We don't advise it.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum
current draw is 50 mA.
 GND. Ground pins.

Memory
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also
has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with
the EEPROM library).

Input and Output


Each of the 14 digital pins on the Uno can be used as an input or output,
using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5
volts. Each pin can provide or receive a maximum of 40 mA and has an internal
pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins
have specialized functions:

 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL
serial data. These pins are connected to the corresponding pins of the
ATmega8U2 USB-to-TTL Serial chip.
 External Interrupts: 2 and 3. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value. See
the attachInterrupt() function for details.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the
analogWrite() function.
 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication using the SPI library.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin
is HIGH value, the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labeled A0 through A5, each of which
provide 10 bits of resolution (i.e.1024 different values). By default they measure
from ground to 5 volts, though is it possible to change the upper end of their
range using the AREF pin and the analogReference() function. Additionally,
some pins have specialized functionality:
 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication
using the Wire library.

There are a couple of other pins on the board:


 AREF. Reference voltage for the analog inputs. Used with
analogReference().
 Reset. Bring this line LOW to reset the microcontroller. Typically used to
add a reset button to shields which block the one on the board. See also
the mapping between Arduino pins and ATmega328 ports. The mapping
for the Atmega8, 168, and 328 is identical.

Communication
The Arduino Uno has a number of facilities for communicating with a
computer, another Arduino, or other microcontrollers. The ATmega328 provides
UART TTL (5V) serial communication, which is available on digital pins 0 (RX)
and 1 (TX). An ATmega16U2 on the board channels this serial communication
over USB and appears as a virtual com port to software on the computer. The
'16U2 firmware uses the standard USB COM drivers, and no external driver is
needed. However, on Windows, a .inf file is required. The Arduino software
includes a serial monitor which allows simple textual data to be sent to and from
the Arduino board. The RX and TX LEDs on the board will flash when data is
being transmitted via the USB-to-serial chip and USB connection to the computer
(but not for serial communication on pins 0 and 1). A Software Serial library
allows for serial communication on any of the Uno's digital pins. The ATmega328
also supports I2C (TWI) and SPI communication. The Arduino software includes
a Wire library to simplify use of the I2C bus; see the documentation for details.
For SPI communication, use the SPI library.

Programming
The Arduino Uno can be programmed with the Arduino software
(download). Select "Arduino Uno from the Tools > Board menu (according to the
microcontroller on your board). For details, see the reference and tutorials. The
ATmega328 on the Arduino Uno comes preburned with a bootloader that allows
you to upload new code to it without the use of an external hardware
programmer. It communicates using the original STK500 protocol (reference, C
header files). You can also bypass the bootloader and program the
microcontroller through the ICSP (In-Circuit Serial Programming) header; see
these instructions for details.

The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source
code is available. The ATmega16U2/8U2 is loaded with a DFU bootloader, which
can be activated by:
 On Rev1 boards: connecting the solder jumper on the back of the board
(near the map of Italy) and then resetting the 8U2.
 On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB
line to ground, making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU
programmer (Mac OS X and Linux) to load a new firmware. Or you can use the
ISP header with an external programmer (overwriting the DFU bootloader). See
this user-contributed tutorial for more information.

Automatic (Software) Reset


Rather than requiring a physical press of the reset button before an
upload, the Arduino Uno is designed in a way that allows it to be reset by
software running on a connected computer. One of the hardware flow control
lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the
ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken
low), the reset line drops long enough to reset the chip. The Arduino software
uses this capability to allow you to upload code by simply pressing the upload
button in the Arduino environment. This means that the bootloader can have a
shorter timeout, as the lowering of DTR can be well-coordinated with the start of
the upload. This setup has other implications. When the Uno is connected to
either a computer running Mac OS X or Linux, it resets each time a connection is
made to it from software (via USB). For the following halfsecond or so, the
bootloader is running on the Uno. While it is programmed to ignore malformed
data (i.e. anything besides an upload of new code), it will intercept the first few
bytes of data sent to the board after a connection is opened. If a sketch running
on the board receives one-time configuration or other data when it first starts,
make sure that the software with which it communicates waits a second after
opening the connection and before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The
pads on either side of the trace can be soldered together to re-enable it. It's
labeled "RESET-EN". You may also be able to disable the auto-reset by
connecting a 110 ohm resistor from 5V to the reset line; see this forum thread for
details.

USB Overcurrent Protection


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

Physical Characteristics
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches
respectively, with the USB connector and power jack extending beyond the
former dimension. Four screw holes allow the board to be attached to a surface
or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not
an even multiple of the 100 mil spacing of the other pins.

DC MOTOR

In the project, one DC motor is used for sensing the garbage using
electrodes to dump the garbage aside depending on the type of garbage
(dry/wet). An electric motor is a machine, which converts electrical energy into
mechanical energy. It is based on the principle that when a current-carrying
conductor is placed in a magnetic field, it experiences a mechanical force whose
direction is given by Fleming’s Left-hand rule and whose magnitude is given by
Force, F = B i L Newton
Where ‘B’ is the magnetic field in weber/m2.
‘i’ is the current in amperes and
‘L’ is the length of the coil in meter.
The force, current and the magnetic field are all in different directions.

If an Electric current flows through two copper wires that are between the
poles of a magnet, an upward force will move one wire up and a downward force
will move the other wire down.

A direct current (DC) motor is a fairly simple electric motor that uses
electricity and a magnetic field to produce torque, which turns the motor. At its
most simple, a DC motor requires two magnets of opposite polarity and an
electric coil, which acts as an electromagnet. The repellent and attractive
electromagnetic forces of the magnets provide the torque that causes the DC
motor to turn.

In a magnet attraction between opposite poles and the repulsion of similar


poles can easily be felt, even with relatively weak magnets. A DC motor uses
these properties to convert electricity into motion. As the magnets within the DC
motor attract and repel one another, the motor turns.

A DC motor requires at least one electromagnet. This electromagnet


switches the current flow as the motor turns, changing its polarity to keep the
motor running. The other magnet or magnets can either be permanent magnets
or other electromagnets. Often, the electromagnet is located in the center of the
motor and turns within the permanent magnets, but this arrangement is not
necessary.

To imagine a simple DC motor, think of a wheel divided into two halves


between two magnets. The wheel of the DC motor in this example is the
electromagnet. The two outer magnets are permanent, one positive and one
negative. For this example, let us assume that the left magnet is negatively
charged and the right magnet is positively charged.

Electrical current is supplied to the coils of wire on the wheel within the DC
motor. This electrical current causes a magnetic force. To make the DC motor
turn, the wheel must have be negatively charged on the side with the negative
permanent magnet and positively charged on the side with the permanent
positive magnet. Because like charges repel and opposite charges attract, the
wheel will turn so that its negative side rolls around to the right, where the
positive permanent magnet is, and the wheel's positive side will roll to the left,
where the negative permanent magnet is. The magnetic force causes the wheel
to turn, and this motion can be used to do work.

When the sides of the wheel reach the place of strongest attraction, the
electric current is switched, making the wheel change polarity. The side that was
positive becomes negative, and the side that was negative becomes positive.
The magnetic forces are out of alignment again, and the wheel keeps rotating. As
the DC motor spins, it continually changes the flow of electricity to the inner
wheel, so the magnetic forces continue to cause the wheel to rotate.

DC motors are used for a variety of purposes, including electric razors,


electric car windows, and remote control cars. The simple design and reliability of
a DC motor makes it a good choice for many different uses, as well as a
fascinating way to study the effects of magnetic fields.

DC motors are widely used, inexpensive, small and poweful for their size.
They are most easy to control. One DC motor requires only two singals for its
operation. They are non-polarized, means you can reverse the voltage without
any damage to motor. DC motors have +ve and –ve leads. Connecting them to a
DC voltage source moves motor in one direction (clockwise) and by reversing the
polarity, the DC motor will move in opposite direction (counter clockwise). The
maximum speed of DC motor is specified in rpm (rotation per minute). It has two
rpms: no load and loaded. The rpm is reduces when moving a load or decreases
when load increases. Other specifications of DC motors are voltage and current
ratings. Below table shows the specifications of the motor used in the project.

Specifications Value
Operating Voltage 12V DC
Operating Current 150milliAmps
Speed 30 RPM
DC Motor Specifications

DC motors don’t have enough torque to drive the mechanism directly by


connecting mechanism with it. The motors driving circuit is designed with relay
and L293D chip; this is popularly known as ‘H’ bridge device generally used to
drive the low power DC motors. To drive the motor in both directions, drive
sequence is programmed depending up on the information gathered from the
sensors.

H-Bridge (General description)

H-Bridge is an electronic circuit which enables a voltage to be applied on


either side of the load and the H-bridge DC motors allow the car to run
backwards or forwards. H-Bridge is a configuration of 4 switches, which switch in
a specific manner to control the direction of the current through the motor. Below
figure shows simplified H-bridge as switches. The states of these four switches
can be changed in order to change the voltage across the motor, of the current
flow and the rotation of motor.
Basic Structure of an H-Bridge
In above figure, all switches are open and the motor terminals are
disconnected from the circuit. This state allows the motor to spin freely. If we
open switches S1 & S4 and close S2 & S3 as in first part of below figure there
will be current flow across the circuit and motor will run. But if S1, S4 are close
and S2, S3 are open, the voltage across the motor will switch around and that
will cause the motor to rotate in the opposite direction. Below table summarizes
the basic operation of the H-bridge depending upon the voltage applied across
the switches.

S1 S2 S3 S4 Result
1 0 0 1 Motor moves right
0 1 1 0 Motor moves left
0 0 0 0 Motor free runs
0 1 0 1 Motor brakes
1 0 1 0 Motor brakes

H-Bridge Operation Summary


Two Basic States of an H-Bridge

To control the speed and direction of the DC motor from the


microcontroller, this simple H-bridge will be of no use. H-bridge which makes use
of transistors works best for robotics projects. These transistors work as switch
and they can control the current flow in the motor easily. Below figure shows
transistor as a switch.

Transistors as a Switch

The difference between the mechanical switch and the transistor switch is
that mechanical switch can be turned on or off mechanically but a transistors
switch can be turned on or off by applying small current at the base. For an NPN
transistor, when a small current of 20mA is applied to the base of the transistor,
current will flow from collector to emitter. In case of, for PNP transistor, the
current will flow from emitter to collector. For transistor to work as switch, the
applied voltage at base needs to be higher than collector voltage for NPN
transistor and lower than collector voltage for PNP transistor.

In this project, the dual H-bridge motor driver IC used is L293D. “The
L293D is a monolithic integrated, high voltage, high current, 4-channel driver”.
The L293D supports two DC motors. Pin 8 is voltage for the motors and pin 16 is
the +5 voltage for the chip. So with one IC we can interface two DC motors which
can be controlled in both clockwise and counter clockwise direction and if you
have motor with fix direction of motion then we can make use of all the four I/Os
to connect up to four DC motors. First motor is connected between pin 3 and 6.
The motor is turned on by sending a high signal to both the enable (pin 1) pin
and one of the two direction pins, i.e. pin 2 or pin 7. To stop motor, the enable pin
is high and both pin 2 and pin 7 are low. L293D has output current of 600mA and
peak output current of 1.2A per channel. Moreover for protection of circuit from
back EMF output diodes are included within the IC. The output supply (VCC2)
has a wide range from 4.5V to 36V, which had made L293D a best choice for DC
motor driver.

DC Motor Control with H-Bridge


The same goes for the other side of the chip. When using two motors, the
best practice is to connect pins 2 and 15 togather and pin 7 and 10. above figure
shows the control of the DC motors with L293D and microcontroller signal.

L293D H Bridge (Motor Driver)

Motor drivers are the simplest modules that provide power amplification for
low-level control singals like PWM and direction supplied by the user.

LIMIT SWITCH
Limit switch is one kind of force sensor. In this project, it is used to detect
the extreme position of the robotic arm and at the home condition till where the
DC motor is to be rotated. These switches are interfaced with microcontroller as
input signal. This limit switch is having long lever & when little pressure is applied
to the lever, switch will be activated automatically. Two limit switches are used in
the project and when the robotic arm with electrodes touches it, it will be
automatically pressed. Limit switch is one of the most basic of all sensors
available which is reliable, exhibit the lowest noise and most easily interpreted
signal. Limit switches are small and normally used as bumper detection in robot
application. A thin aluminum plate and a spring are placed together with the limit
switch, which act like a long push button. There are two types of limit switch
which are normally open and normally closed. Commonly used is the normally
open, when the accident is occurred, logic low, ‘0’ will be sent to micro controller.
In contrast, when the vehicle did not detect any obstacles (no collision or
contact), micro controller will detect logic ‘high’ 1 but it more depends on how the
connection of limit switches. There are difference types and design of limit
switches available in the market. However all limit switches have the same
operating concept. Below figure shows the wiring diagram of limit switch.

Wiring Diagram of limit switch

GSM MODEM
The GSM system is a circuit which is used to provide communication
between a computing device and a GSMA. The computing device could be a
mobile device and GSMA could be a GPRS (General Packet Radio Service)
system. The GSM module may be like a chip as well. MCU Telecommunications
Standards Institute (ETSI) developed GSM (Global System for Mobile
communications) as a well known standard module.

Second Generation wireless cellular networks (2G networks) with GSM


became the standards for mobile communications in global and is widely been
working over various regions of 219 countries and has a market share of about
90%. To report about the various protocols used by the mobile phones, GSM
was developed.
The mobile data service that has faster response to CDPD (Cellular Digital
Packet Data) and works with packet oriented cellular technologies is GPRS. It is
been made standard by the ETSI (European Telecommunications Standards
Institute) and is used on the GSM of 2G/3G cellular communication networks.

GSM is a Global system for mobile communication in this project acts as a


SMS Receiver and SMS transmitter with a baud rate 9600 bits/sec. The GSM
architecture is nothing but a network of computers. The system has to partition
available frequency and assign only that part of the frequency spectrum to any
base transreceiver station and also has to reuse the scarce frequency as often
as possible. GSM was originally defined for the 900 MHz range but after some
time even the 1800 MHz range was used for cellular technology. The 1800 MHz
range has its architecture and specifications almost same to that of the 900 MHz
GSM technology but building the Mobile exchanges is easier and the high
frequency Synergy effects add to the advantages of the 1800 MHz range.

GSM is global system for mobile communication and used to send


message to pre-programmed number. The modulation technique used is GSMK.
The protocol used by GSM modem for setup and control is based on the Hayes
AT- Command set. AT is the abbreviation of Attention. GSM AT commands are
extension commands. For example, +CMGS (Send SMS message), +CMGL (List
SMS messages), and +CMGR (Read SMS messages) are extended commands.
GSM Air Interface specifications:
Global System for Mobile communications is the most popular standard for
mobile phones in the world. It is available on every continent and in almost any
country in the world. GSM is a cellular network, meaning that a mobile phone
connects to it by searching for cells in immediate vicinity. It operates in four
different frequency ranges: most common is 900MHz/1800MHz and mostly used
in Americas 850MHz/1900MHz. GSM Modem is a multi-functional, ready to use,
rugged unit that can be embedded or plugged into any application. The Modem
can be controlled and customized to various levels by using the standard AT
commands. The modem is fully type-approved; it can speed up the operational
time with full range of Voice, Data, Fax and Short Messages (Point to Point and
Cell Broadcast), for spontaneous data transfer. Vital role of GSM MODEM in this
project is used for sending or receiving the message.
The GSM modem is connected to the programmed microcontroller, which
would receive the SMS from a reference cell phone using RS-232 interface. GSM
operator mini SIM card is inserted in it as well. The control signal part of the
received SMS is extracted and is changed to microcontroller-preferred format.

GSM is one of the latest mobile technologies using smart MODEM, which
can be easily interfaced to embedded Microcontrollers. Now everything is going
to be automated using this technology, using this technology we can monitor the
particular machine parameters. Using GSM and GPS now we can identify the
people, vehicles etc at anywhere of the world.

History of GSM
During the early 1980s, analog cellular telephone systems were
experiencing rapid growth in Europe, particularly in Scandinavia and the United
Kingdom, but also in France and Germany. Each country developed its own
system, which was incompatible with everyone else's in equipment and
operation. This was an undesirable situation, because not only was the mobile
equipment limited to operation within national boundaries, which in a unified
Europe were increasingly unimportant, but there was also a very limited market
for each type of equipment, so economies of scale and the subsequent savings
could not be realized.

The Europeans realized this early on, and in 1982 the Conference of
European Posts and Telegraphs (CEPT) formed a study group called the Groupe
Spécial Mobile (GSM) to study and develop a pan-European public land mobile
system. The proposed system had to meet certain criteria:

 Good subjective speech quality


 Low terminal and service cost
 Support for international roaming
 Ability to support handheld terminals
 Support for range of new services and facilities
 Spectral efficiency
 ISDN compatibility

In 1989, GSM responsibility was transferred to the European


Telecommunication Standards Institute (ETSI), and phase I of the GSM
specifications was published in 1990. Commercial service was started in mid-
1991, and by 1993 there were 36 GSM networks in 22 countries. Although
standardized in Europe, GSM is not only a European standard. Over 200 GSM
networks (including DCS1800 and PCS1900) are operational in 110 countries
around the world. In the beginning of 1994, there were 1.3 million subscribers
worldwide, which had grown to more than 55 million by October 1997. With North
America making a delayed entry into the GSM field with a derivative of GSM
called PCS1900, GSM systems exist on every continent, and the acronym GSM
now aptly stands for Global System for Mobile communications.

The developers of GSM chose an unproven (at the time) digital system, as
opposed to the then-standard analog cellular systems like AMPS in the United
States and TACS in the United Kingdom. They had faith that advancements in
compression algorithms and digital signal processors would allow the fulfillment
of the original criteria and the continual improvement of the system in terms of
quality and cost. The over 8000 pages of GSM recommendations try to allow
flexibility and competitive innovation among suppliers, but provide enough
standardization to guarantee proper inter working between the components of
the system. This is done by providing functional and interface descriptions for
each of the functional entities defined in the system.
Services provided by GSM
From the beginning, the planners of GSM wanted ISDN compatibility in
terms of the services offered and the control signaling used. However, radio
transmission limitations, in terms of bandwidth and cost, do not allow the
standard ISDN B-channel bit rate of 64 kbps to be practically achieved.

Using the ITU-T definitions, telecommunication services can be divided


into bearer services, tele-services, and supplementary services. The most basic
tele-service supported by GSM is telephony. As with all other communications,
speech is digitally encoded and transmitted through the GSM network as a digital
stream. There is also an emergency service, where the nearest emergency-
service provider is notified by dialing three digits (similar to 911).

A variety of data services is offered. GSM users can send and receive
data, at rates up to 9600 bps, to users on POTS (Plain Old Telephone Service),
ISDN, Packet Switched Public Data Networks, and Circuit Switched Public Data
Networks using a variety of access methods and protocols, such as X.25 or X.32.
Since GSM is a digital network, a modem is not required between the user and
GSM network, although an audio modem is required inside the GSM network to
inter work with POTS.

Other data services include Group 3 facsimile, as described in ITU-T


recommendation T.30, which is supported by use of an appropriate fax adaptor.
A unique feature of GSM, not found in older analog systems, is the Short
Message Service (SMS). SMS is a bi-directional service for short alphanumeric
(up to 160 bytes) messages. Messages are transported in a store-and-forward
fashion. For point-to-point SMS, a message can be sent to another subscriber to
the service, and an acknowledgement of receipt is provided to the sender. SMS
can also be used in a cell-broadcast mode, for sending messages such as traffic
updates or news updates. Messages can also be stored in the SIM card for later
retrieval.

Supplementary services are provided on top of tele-services or bearer


services. In the current (Phase I) specifications, they include several forms of call
forward (such as call forwarding when the mobile subscriber is unreachable by
the network), and call barring of outgoing or incoming calls, for example when
roaming in another country. Many additional supplementary services will be
provided in the Phase 2 specifications, such as caller identification, call waiting,
multi-party conversations.

AT COMMANDS USED:

SIM Insertion, SIM Removal


SIM card Insertion and Removal procedures are supported. There are
software functions relying on positive reading of the hardware SIM detect pin.
This pin state (open/closed) is permanently monitored. When the SIM detect pin
indicates that a card is present in the SIM connector, the product tries to set up a
logical SIM session. The logical SIM session will be set up or not depending on
whether the detected card is a SIM Card or not. The AT+CPIN? Command
delivers the following responses:
If the SIM detect pin indicates “absent”, the response to AT+CPIN? is
“+CME ERROR 10” (SIM not inserted).
If the SIM detect pin indicates “present”, and the inserted Card is a SIM
Card, the response to AT+CPIN? is “+CPIN: xxx” depending on SIM PIN state.
If the SIM detect pin indicates “present”, and the inserted Card is not a SIM
Card, the response to AT+CPIN? is CME ERROR 10.
These last two states are not given immediately due to background
initialization. Between the hardware SIM detect pin indicating, “present” and the
previous results the AT+CPIN? Sends “+CME ERROR: 515” (Please wait, init in
progress).
When the SIM detect pin indicates card absence, and if a SIM Card was
previously inserted, an IMSI detach procedure is performed, all user data is
removed from the product (Phonebooks, SMS etc.). The product then switches to
emergency mode.
CHAPTER – 5

POWER SOURCE DESCRIPTION

INTRODUCTION

The power supplies are designed to convert high voltage AC mains


electricity to a suitable low voltage supply for electronics circuits and other
devices. A RPS (Regulated Power Supply) is the Power Supply with
Rectification, Filtering and Regulation being done on the AC mains to get a
Regulated power supply for Microcontroller and for the other devices being
interfaced to it.

For example a 5V regulated power supply system as shown below:

Fig: Block Diagram of the Power Supply


A power supply unit can by broken down into a series of blocks, each of
which performs a particular function. A d.c power supply which maintains the
output voltage constant irrespective of a.c mains fluctuations or load variations is
known as “Regulated D.C Power Supply”.

TRANSFORMER

A transformer is an electrical device which is used to convert electrical


power from one Electrical circuit to another without change in frequency.
Transformers convert AC electricity from one voltage to another with little loss of
power. Transformers work only with AC and this is one of the reasons why mains
electricity is AC. Step-up transformers increase in output voltage, step-down
transformers decrease in output voltage. Most power supplies use a step-down
transformer to reduce the dangerously high mains voltage to a safer low voltage.
The input coil is called the primary and the output coil is called the secondary.
There is no electrical connection between the two coils; instead they are linked
by an alternating magnetic field created in the soft-iron core of the transformer.
The two lines in the middle of the circuit symbol represent the core.
Transformers waste very little power so the power out is (almost) equal to the
power in. Note that as voltage is stepped down current is stepped up. The ratio
of the number of turns on each coil, called the turn’s ratio, determines the ratio of
the voltages. A step-down transformer has a large number of turns on its primary
(input) coil which is connected to the high voltage mains supply, and a small
number of turns on its secondary (output) coil to give a low output voltage.
Fig: An Electrical Transformer

Turns ratio = Vp/ VS = Np/NS


Power Out= Power In
VS x IS=VP x IP
Vp = primary (input) voltage
Np = number of turns on primary coil
Ip = primary (input) current

RECTIFIER

A circuit which is used to convert a.c to dc is known as RECTIFIER. The


process of conversion a.c to d.c is called “rectification”.

Types of Rectifiers

1. Half wave Rectifier


2. Full wave Rectifier
(i). Centre tap full wave rectifier.
(ii). Bridge type full bridge rectifier.
Type of Rectifier
Parameter Half wave Full wave Bridge
Number of diodes 1 2 4
PIV of diodes Vm 2Vm Vm
D.C output voltage Vm/ 2Vm/ 2Vm/
Vdc,at no-load 0.318Vm 0.636Vm 0.636Vm
Ripple factor 1.21 0.482 0.482
Ripple frequency f 2f 2f
Rectification 0.406 0.812 0.812
efficiency
Transformer
Utilization 0.287 0.693 0.812
Factor(TUF)
RMS voltage Vrms Vm/2 Vm/√2 Vm/√2
Table: Comparison of Rectifier Circuits

Full-wave Rectifier

From the above comparison we came to know that full wave bridge rectifier
as more advantages than the other two rectifiers. So, in our project we are using
full wave rectifier circuit.

FILTER

A Filter is a device which removes the a.c component of rectifier output but
allows the d.c component to reach the load

Capacitor Filter
We have seen that the ripple content in the rectified output of half wave
rectifier is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48%
such high percentages of ripples is not acceptable for most of the applications.

Ripples can be removed by one of the following methods of filtering.

(a) A capacitor, in parallel to the load, provides an easier by –pass for the
ripples voltage though it due to low impedance. At ripple frequency and
leave the D.C. to appear at the load.

(b) An inductor, in series with the load, prevents the passage of the ripple
current (due to high impedance at ripple frequency) while allowing the d.c
(due to low resistance to d.c)

(c) Various combinations of capacitor and inductor, such as L-section


filter section filter, multiple section filter etc. which make use of both the
properties mentioned in (a) and (b) above. Two cases of capacitor filter,
one applied on half wave rectifier and another with full wave rectifier.

Filtering 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 capacitor charges quickly
near the peak of the varying DC, and then discharges as it supplies current to the
output. Filtering significantly increases the average DC voltage to almost the
peak value (1.4 × RMS value).

To calculate the value of capacitor(C),

C = ¼*√3*f*r*Rl
Where,

f = supply frequency,

r = ripple factor,

Rl = load resistance

Note: In our circuit we are using 1000µF hence large value of capacitor is
placed to reduce ripples and to improve the DC component.

REGULATOR

Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or


variable output voltages. The maximum current they can pass also rates them.
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'). Many of the fixed
voltage regulators ICs have 3 leads and look like power transistors, such as the
7805 +5V 1A regulator shown on the right. The LM7805 is simple to use. You
simply connect the positive lead of your unregulated DC power supply (anything
from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common
pin and then when you turn on the power, you get a 5 volt supply from the output
pin.
Fig: A Three Terminal Voltage Regulator

Circuit Diagram of Power Supply is shown below:


CHAPTER – 6

DETAILED DESCRIPTION OF GSM TECHNOLOGY


Introduction:

GSM (Global System for Mobile Communications) is a digital cellular


communications system. It was developed in order to create a common
European mobile telephone standard but it has been rapidly accepted worldwide.
GSM is designed to provide a comprehensive range of services and features to
the users not available on analogue cellular networks and in many cases very
much in advance of the old public switched telephone network (PSTN). In
addition to digital transmission, GSM incorporates many advanced services and
features like worldwide roaming in other GSM networks.

History of GSM and cellular mobile Radio:

The idea of cell-based mobile radio systems appeared at Bell Laboratories


(in USA) in the early 1970s. However, mobile cellular systems were not
introduced for commercial use until the 1980s. During the early 1980s, analog
cellular telephone systems experienced a very rapid growth in Europe,
particularly in Scandinavia and the United Kingdom, but also in France and
Germany. Each country developed its own system, which was incompatible with
everyone else's in equipment and operation. But in the beginnings of cellular
systems, each country developed its own system, which was an undesirable
situation for the following reasons:

 The equipment was limited to operate only within the boundaries of each
country, which in a unified Europe were increasingly unimportant.

 The market for mobile equipment was limited, so economies of scale, and
the subsequent savings, could not be realized.
In order to overcome these problems, the Conference of European Posts
and Telecommunications (CEPT) formed, in 1982, the Group Special Mobile
(GSM) in order to develop a pan-European mobile cellular radio system (the GSM
acronym became later the acronym for Global System for Mobile communications).
The standardized system had to meet certain criteria’s:

 Good subjective speech quality

 Support for international roaming

 Ability to support handheld terminals

 Support for range of new services and facilities

 Spectral efficiency

 Low mobile and base stations costs

 Compatibility with other systems such as Integrated Services Digital


Network (ISDN)

In 1989 the responsibility for the GSM specifications passed from the
CEPT to the European Telecommunications Standards Institute (ETSI). The
commercial use of GSM started around mid-1991. By the beginning of 1994,
there were 1.3 million subscribers worldwide. By the beginning of 1995, there
were 60 countries with operational or planned GSM networks in Europe, the
Middle East, the Far East, Australia, Africa, and South America, with a total of
over 5.4 million subscribers. As of the end of 1997, GSM service was available in
more than 100 countries and has become the de facto standard in Europe and
Asia. Presently, GSM networks are operational or planned in over 80 countries
around the world.
Technical details

GSM is a cellular network, which means that mobile phones connect to it


by searching for cells in the immediate vicinity. GSM networks operate in a
number of different frequency ranges (separated into GSM frequency ranges for
2G and UMTS frequency bands for 3G). Most 2G GSM networks operate in the
900 MHz or 1800 MHz bands. Some countries in the Americas (including
Canada and the United States) use the 850 MHz and 1900 MHz bands because
the 900 and 1800 MHz frequency bands were already allocated. Most 3G GSM
networks in Europe operate in the 2100 MHz frequency band

The rarer 400 and 450 MHz frequency bands are assigned in some
countries where these frequencies were previously used for first-generation
systems.

GSM-900 uses 890–915 MHz to send information from the mobile station
to the base station (uplink) and 935–960 MHz for the other direction (downlink),
providing 124 RF channels (channel numbers 1 to 124) spaced at 200 kHz.
Duplex spacing of 45 MHz is used. In some countries the GSM-900 band has
been extended to cover a larger frequency range. This 'extended GSM', E-GSM,
uses 880–915 MHz (uplink) and 925–960 MHz (downlink), adding 50 channels
(channel numbers 975 to 1023 and 0) to the original GSM-900 band. Time
division multiplexing is used to allow eight full-rate or sixteen half-rate speech
channels per radio frequency channel. There are eight radio timeslots (giving
eight burst periods) grouped into what is called a TDMA frame. Half rate
channels use alternate frames in the same timeslot. The channel data rate for all
8 channels is 270.833 kbit/s, and the frame duration is 4.615 ms.

The transmission power in the handset is limited to a maximum of 2 watts


in GSM850/900 and 1 watt in GSM1800/1900.
GSM has used a variety of voice codecs to squeeze 3.1 kHz audio into
between 5.6 and 13 kbit/s. Originally, two codecs, named after the types of data
channel they were allocated, were used, called Half Rate (5.6 kbit/s) and Full
Rate (13 kbit/s). These used a system based upon linear predictive coding
(LPC). In addition to being efficient with bitrates, these codecs also made it
easier to identify more important parts of the audio, allowing the air interface
layer to prioritize and better protect these parts of the signal.

GSM was further enhanced in 1997 with the Enhanced Full Rate (EFR)
codec, a 12.2 kbit/s codec that uses a full rate channel. Finally, with the
development of UMTS, EFR was refactored into a variable-rate codec called
AMR-Narrowband, which is high quality and robust against interference when
used on full rate channels, and less robust but still relatively high quality when
used in good radio conditions on half-rate channels.

There are five different cell sizes in a GSM network—macro, micro, pico,
femto and umbrella cells. The coverage area of each cell varies according to the
implementation environment. Macro cells can be regarded as cells where the
base station antenna is installed on a mast or a building above average roof top
level. Micro cells are cells whose antenna height is under average roof top level;
they are typically used in urban areas. Picocells are small cells whose coverage
diameter is a few dozen meters; they are mainly used indoors. Femtocells are
cells designed for use in residential or small business environments and connect
to the service provider’s network via a broadband internet connection. Umbrella
cells are used to cover shadowed regions of smaller cells and fill in gaps in
coverage between those cells.

Cell horizontal radius varies depending on antenna height, antenna gain


and propagation conditions from a couple of hundred meters to several tens of
kilometres. The longest distance the GSM specification supports in practical use
is 35 kilometres (22 mi). There are also several implementations of the concept
of an extended cell, where the cell radius could be double or even more,
depending on the antenna system, the type of terrain and the timing advance.

Indoor coverage is also supported by GSM and may be achieved by using


an indoor picocell base station, or an indoor repeater with distributed indoor
antennas fed through power splitters, to deliver the radio signals from an antenna
outdoors to the separate indoor distributed antenna system. These are typically
deployed when a lot of call capacity is needed indoors, for example in shopping
centers or airports. However, this is not a prerequisite, since indoor coverage is
also provided by in-building penetration of the radio signals from nearby cells.

The modulation used in GSM is Gaussian minimum-shift keying (GMSK), a


kind of continuous-phase frequency shift keying. In GMSK, the signal to be
modulated onto the carrier is first smoothed with a Gaussian low-pass filter prior
to being fed to a frequency modulator, which greatly reduces the interference to
neighboring channels (adjacent channel interference).

Architecture of the GSM Network:

The GSM mobile telephony service is based on a series of contiguous


radio cells which provide complete coverage of the service area and allow the
subscriber operation anywhere within it. Prior to this cellular concept,
radiophones were limited to just the one transmitter covering the whole service
area. Cellular telephony differs from the radiophone service because instead of
one large transmitter, many small ones are used to cover the same area. The
basic problem is to handle the situation where a person using the phone in one
cell moves out of range of that cell. In the radiophone service there was no
solution and the call was lost, which is why the service area was so large. In
cellular telephony, handing the call over to the next cell solves the problem. This
process is totally automatic and requires no special intervention by the user, but
it is a complex technical function requiring significant processing power to
achieve a quick reaction.

The functional architecture of a GSM system can be broadly divided into


the Mobile Station, the Base Station Subsystem, and the Network Subsystem.
Each subsystem is comprised of functional entities that communicate through the
various interfaces using specified protocols. The subscriber carries the mobile
station; the base station subsystem controls the radio link with the Mobile Station.
The network subsystem, which is the main part of which is the Mobile services
Switching Center, performs the switching of calls between the mobile and other
fixed or mobile network users, as well as management of mobile services, such
as authentication.

 Mobile Station:

The Mobile Station (MS) represents the only equipment the GSM user ever
sees from the whole system. It actually consists of two distinct entities. The
actual hardware is the Mobile Equipment (ME), which is anonymous and consists
of the physical equipment, such as the radio transceiver, display and digital
signal processors. The subscriber information is stored in the Subscriber Identity
Module (SIM), implemented as a Smart Card. The mobile equipment is uniquely
identified by the International Mobile Equipment Identity (IMEI). The SIM card
contains the International Mobile Subscriber Identity (IMSI), identifying the
subscriber, a secret key for authentication, and other user information. The IMEI
and the IMSI are independent, thereby providing personal mobility.

Thus the SIM provides personal mobility, so that the user can have access
to all subscribed services irrespective of both the location of the terminal and the
use of a specific terminal. By inserting the SIM card into another GSM cellular
phone, the user is able to receive calls at that phone, make calls from that phone,
or receive other subscribed services. The SIM card may be protected against
unauthorized use by a password or personal identity number.

 The ME provides generic radio and processing functions to access the


network through the radio interface as well as an interface to the user
(microphone loudspeaker, display and keyboard) together with an interface to
some other terminal equipment (fax machine, PC).

 The SIM contain all the subscriber-related information stored on the user's
side of the radio interface.

 The MS is operational only when a valid SIM is placed in a ME.

Base Station Subsystem:

The Base Station Subsystem is composed of two parts, the Base


Transceiver Station (BTS) and the Base Station Controller (BSC). The BTS
houses the radio transceivers that define a cell and transmits and receives
signals on the cells' allocated frequencies with the mobile station.

A BSC operates with a group of BTSs and manages the radio resources
for one or more of them. The BSC is the connection between the MS and the
Network Subsystem. It manages the radio channel (setup, tear down, frequency
hopping, etc.) as well as handovers and the transmission power levels and
frequency translations of the voice channel used over the radio link to the
standard channel used by the Public Switched Telephone Network or ISDN.

Network Subsystem:

The central component of the Network Subsystem is the Mobile services


Switching Center (MSC). It acts like a normal switching node of the normal
telephones of the land lines and in addition provides all the functionality needed
to handle a mobile subscriber, including registration, authentication, location
updating and inter-MSC handovers. These services are provided in conjunction
with several functional entities, which together form the Network Subsystem. The
MSC provides the connection to the public fixed network (PSTN or ISDN) and is
the interface between the GSM and the PSTN networks for both telephony and
data.

Thus the MSC is primarily responsible for:

 Traffic management

 Call set-up

 Call Routing to a roaming subscriber

 Termination

 Charging and accounting information


Applications of GSM Modem

GSM is world’s most famous Mobile platform. Mobile phones with SIM
cards use GSM technology to help you communicate with your family, friends
and business associates. GSM systems have following advantages over basic
landline telephony systems:

1. Mobility
2. Easy availability
3. High uptime

GSM technology is being mostly used for talking to family, friends and
business colleagues. We use communication feature of Telephone landlines for
Internet, e-mail, data connectivity, remote monitoring, computer-to-computer
communication, and security systems. In the same way we can use GSM
technology and benefit from its advantages.

A GSM modem is a wireless modem that works with a GSM wireless


network. A wireless modem behaves like a dial-up modem. The main difference
between them is that a dial-up modem sends and receives data through a fixed
telephone line while a wireless modem sends and receives data through radio
waves.

A GSM modem can be an external device or a PC Card / PCMCIA Card.


Typically, an external GSM modem is connected to a computer through a serial
cable or a USB cable. A GSM modem in the form of a PC Card / PCMCIA Card
is designed for use with a laptop computer. It should be inserted into one of the
PC Card / PCMCIA Card slots of a laptop computer.

Like a GSM mobile phone, a GSM modem requires a SIM card from a
wireless carrier in order to operate.

As mentioned in earlier sections of this SMS tutorial, computers use AT


commands to control modems. Both GSM modems and dial-up modems support
a common set of standard AT commands. We can use a GSM modem just like a
dial-up modem. In addition to the standard AT commands, GSM modems
support an extended set of AT commands. These extended AT commands are
defined in the GSM standards. With the extended AT commands, we can do
things like:

 Reading, writing and deleting SMS messages.

 Sending SMS messages.


 Monitoring the signal strength.

 Monitoring the charging status and charge level of the battery.

 Reading, writing and searching phone book entries.

The number of SMS messages that can be processed by a GSM modem per
minute is very low -- only about six to ten SMS messages per minute.

GSM FEATURES

One of the remarkable features is the Subscriber Identity Module (SIM). SIM
being memory device stores information such as the subscriber’s identification
number, list of countries and networks where the subscriber is entitled to service,
privacy keys etc. A SIM consists of four-digit personal identification number to
activate service from any GSM phone. SIM’s is available as smart cards that may
be inserted into GSM phone or plug-in modules, which are portable and
removable.

The second feature is on-the-air privacy that the GSM system provides.
The privacy is maintained by encryption of the digital data according to a specific
secret cryptographic key that is known only to the cellular carrier and the key is
changed with time.

GSM INTERFACES

The different interfaces used in GSM listed as follows:

1. GSM radio air interface: This is the interface between MS and BTSs.
2. Abis interface: The one connecting the BTS to a BSC is known as Abis
interface. This is responsible for carrying traffic and maintenance data.
3. A interface: This is the interface between a BSC and a MSC.

GSM CHANNELS:
There are two types of GSM logical channels:
 Traffic Channels: These channels carry digitally encoded user speech or
data.
 Control Channels: Signaling and synchronizing commands between BS
and MS are transmitted through these channels.

GSM SERVICES:
The GSM services in different spheres are listed as follows:
1. Data services include computer to computer communication and packet
switched traffic.
2. Telephone services which include fax services. Videotex and teletex are also
supported by GSM.
3. Mobile originated traffic and standard mobile telephony are included in tele-
services supported by GSM.
4. Different other services include:
 call diversion
 caller line identification
 call wait
 SMS services
CHAPTER – 7

BRIEF DESCRIPTION ABOUT SERIAL


COMMUNICATION

When a microprocessor communicates with the outside world, it provides


data in byte-sized chunks. In some cases, such as printers, the information is
simply grabbed from the 8-bit data bus and presented to the 8-bit data bus of the
printer. This can work only if the cable is not too long, since long cables diminish
and ever distort signals. Furthermore, and 8-bit data path is expensive. For
these reasons, serial communication is used for transferring data between two
systems located at distances of hundreds of feet to millions of miles apart.

The fact that in serial communication a single data line is used instead of
the 8-bit data line of parallel communication makes it not only much cheaper but
also makes it possible for two computers located in two different cities to
communicate over the telephone.

Serial data communication uses two methods, a synchronous and


asynchronous. The synchronous method transfers a block of data at a time while
the synchronous transfers a single byte at a time. It is mean possible to write
software to use either of these methods, but the programs can be tedious and
long. For this reason, there are special IC chips made by many manufacturers
for serial data communications. These chips are commonly referred to as UART
(universal asynchronous receiver-transmitter) and USART (universal
synchronous -asynchronous receiver-transmitter). The8051 chips has built-in
UART, which is discussed
Asynchronous Serial Communication and Data framing:

Transmitter and receiver do not explicitly coordinate each data


transmission. Transmitter can wait arbitrarily long between transmissions. Used,
for example, when transmitter such as a keyboard may not always have data
ready to send Asynchronous may also mean no explicit information about where
data bits begin and end.

The data coming in at the receiving end of the data line in a serial data
transfer is all 0's and 1's; it is difficult to make sense of the data unless the
sender and receiver agree on a set of rules, a protocol, on how the data is
packed, how many bits constitute the character, and when the data begins and
ends.

Start and stop bits:

A synchronous serial data communication is widely used for character


orientation transmissions. In the asynchronous method, each character is placed
in between start and stop bits. This is the called framing. In data framing for
asynchronous communications, the data, such as ASCII characters, are packed
in between a start bit and a stop bits. The start bit is always one-bit but the stop
bit can be one or two bits. If the transmitter and receiver are using different
speeds, stop bit will not be received at the expected time problem is called
framing error. The start bit is always a 0 and the stop bit is 1.

Parity bit:

In some systems in order to maintain data integrity, the parity bit of the
character byte is included in the data frame. This means that for each character
we have a single parity bit in addition to start and stop bits. The parity bit is odd
or even. In case of an odd parity bit the number of data bits of a book of
including the parity bit, is even.

Data transfer rate:

The rate of data transfer in serial data communication is stated in bps (bits
per second). Another widely used terminology for bps is baud rate. Baud rate is
defined as the number of signal changes per second. As far as the conductor
wire is concerned, the baud rates as bps are the same. If each signal change
represents more than one bit, bits per second may be greater than baud rate.

RS232 standards:

Two allow compatibility among the data communication equipment made


by various manufacturers; an interfacing standard called RS232, was set by the
electronics industries association (EIA) in 1960. RS 232 is the standard defined
for the connection of "Data Terminal Equipment" (DTE) to "Data Communications
Equipment" (DCE).

DTE (Data Terminal Equipment) is a generic term for an item which forms
part of the "information processing" portions of a system. Examples are:
computer, printer, and terminal.

DCE (Data Communications Equipment) is a device, which provides an


interface between a DTE and a communications link.

Interface for DTE/DCE Connection:


Fig: Interfacing between Data Terminal Equipment (DTE) and Data
Communication Equipment (DCE)

All Signals Are “Ground Referenced” to in Pin 7


TXD, RXD---- Transmit and Receive Signal
RTS---- Request to Send, from DTE
CTS---- Clear to send, from DCE together with RTS
DTE---- Data Terminal Ready, indicates to the modem that a DTE is Connected
and enabled.
DSR--- Data Set Ready, indicates to the DTE that the modem is present and
turned on
CD-- Carrier Detect, indicates that this modem is receiving a signal from the
remote modem.

In RS 232, a 1 is represented by -3 to -25V which is called Mark, while a 0


bit is + 3 to + 25V which is called Space. To connect any RS 232 to a µc system,
voltage converters such as Max 232are used. Max 232 IC chips are commonly
referred to as line drivers.8.3. MAX 232. The RS 232 is not compatible with micro
controllers, so a line driver converts the RS 232's signals to TTL voltage levels.

RS 232 Wiring and Connectors:

Fig: Pins of RS232 Serial Port

RS-232 Defines Serial, Asynchronous communication, Serial bits are


encoded and transmitted one at a time. Asynchronous characters can be sent at
any time and bits are not individually synchronized. This is standard for transfer
of characters across copper wire.
CHAPTER – 8

BRIEF DESCRIPTION ABOUT ATMEGA328


CONTROLLER

Introduction
The Atmel picoPower ATmega328/P is a low-power CMOS 8-bit
microcontroller based on the AVR enhanced RISC architecture. By executing
powerful instructions in a single clock cycle, the ATmega328/P achieves
throughputs close to 1MIPS per MHz. This empowers system designer to
optimize the device for power consumption versus processing speed.

Features
High Performance, Low Power Atmel AVR 8-Bit Microcontroller Family
 Advanced RISC Architecture
– 131 Powerful Instructions
– Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 20 MIPS Throughput at 20MHz
– On-chip 2-cycle Multiplier
 High Endurance Non-volatile Memory Segments
– 32KBytes of In-System Self-Programmable Flash program
Memory
– 1KBytes EEPROM
– 2KBytes Internal SRAM
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
– Data Retention: 20 years at 85°C/100 years at 25°C
– Optional Boot Code Section with Independent Lock Bits
 In-System Programming by On-chip Boot Program
 True Read-While-Write Operation
– Programming Lock for Software Security
 Atmel QTouch Library Support
– Capacitive Touch Buttons, Sliders and Wheels
– QTouch and QMatrix Acquisition
– Up to 64 sense channels Peripheral Features
 Peripheral Features
– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and
Capture Mode
– Real Time Counter with Separate Oscillator
– Six PWM Channels
– 8-channel 10-bit ADC in TQFP and QFN/MLF package
 Temperature Measurement
– 6-channel 10-bit ADC in PDIP Package
 Temperature Measurement
– Two Master/Slave SPI Serial Interface
– One Programmable Serial USART
– One Byte-oriented 2-wire Serial Interface (Philips I2C compatible)
– Programmable Watchdog Timer with Separate On-chip Oscillator
– One On-chip Analog Comparator
– Interrupt and Wake-up on Pin Change
 Special Microcontroller Features
– Power-on Reset and Programmable Brown-out Detection
– Internal Calibrated Oscillator
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down,
Standby, and Extended Standby
 I/O and Packages
– 23 Programmable I/O Lines
– 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF
 Operating Voltage:
– 1.8 - 5.5V
 Temperature Range:
– -40°C to 105°C
 Speed Grade:
– 0 - 4MHz @ 1.8 - 5.5V
– 0 - 10MHz @ 2.7 - 5.5V
– 0 - 20MHz @ 4.5 - 5.5V
 Power Consumption at 1MHz, 1.8V, 25°C
– Active Mode: 0.2mA
– Power-down Mode: 0.1μA
– Power-save Mode: 0.75μA (Including 32 kHz RTC)

DESCRIPTION
The Atmel AVR core combines a rich instruction set with 32 general
purpose working registers. All the 32 registers are directly connected to the
Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed
in a single instruction executed in one clock cycle. The resulting architecture is
more code efficient while achieving throughputs up to ten times faster than
conventional CISC microcontrollers.
The ATmega328/P provides the following features: 32Kbytes of In-System
Programmable Flash with Read-While-Write capabilities, 1Kbytes EEPROM,
2Kbytes SRAM, 23 general purpose I/O lines, 32 general purpose working
registers, Real Time Counter (RTC), three flexible Timer/Counters with compare
modes and PWM, 1 serial programmable USARTs , 1 byte-oriented 2-wire Serial
Interface (I2C), a 6-channel 10-bit ADC (8 channels in TQFP and QFN/MLF
packages) , a programmable Watchdog Timer with internal Oscillator, an SPI
serial port, and six software selectable power saving modes. The Idle mode
stops the CPU while allowing the SRAM, Timer/Counters, SPI port, and interrupt
system to continue functioning.

The Power-down mode saves the register contents but freezes the
Oscillator, disabling all other chip functions until the next interrupt or hardware
reset. In Power-save mode, the asynchronous timer continues to run, allowing
the user to maintain a timer base while the rest of the device is sleeping. The
ADC Noise Reduction mode stops the CPU and all I/O modules except
asynchronous timer and ADC to minimize switching noise during ADC
conversions. In Standby mode, the crystal/resonator oscillator is running while
the rest of the device is sleeping. This allows very fast start-up combined with low
power consumption. In Extended Standby mode, both the main oscillator and the
asynchronous timer continue to run.

Atmel offers the QTouch library for embedding capacitive touch buttons,
sliders and wheels functionality into AVR microcontrollers. The patented charge-
transfer signal acquisition offers robust sensing and includes fully debounced
reporting of touch keys and includes Adjacent Key Suppression (AKS)
technology for unambiguous detection of key events. The easy-to-use QTouch
Suite toolchain allows you to explore, develop and debug your own touch
applications.
The device is manufactured using Atmel’s high density non-volatile
memory technology. The On-chip ISP Flash allows the program memory to be
reprogrammed In-System through an SPI serial interface, by a conventional
nonvolatile memory programmer, or by an On-chip Boot program running on the
AVR core. The Boot program can use any interface to download the application
program in the Application Flash memory. Software in the Boot Flash section will
continue to run while the Application Flash section is updated, providing true
Read-While-Write operation. By combining an 8-bit RISC CPU with In-System
Self-Programmable Flash on a monolithic chip, the Atmel ATmega328/P is a
powerful microcontroller that provides a highly flexible and cost effective solution
to many embedded control applications.

The ATmega328/P is supported with a full suite of program and system


development tools including: C Compilers, Macro Assemblers, Program
Debugger/Simulators, In-Circuit Emulators, and Evaluation kits.
Configuration Summary
Block Diagram

Pin Configuration
Description about the pins and their configurations are provided in the data sheets
of the controller.
CHAPTER – 9

DESCRIPTION ABOUT ‘H’ - BRIDGE

Introduction

Whenever a robotics hobbyist talk about making a robot, the first thing
comes to his mind is making the robot move on the ground. And there are always
two options in front of the designer whether to use a DC motor or a stepper motor.
When it comes to speed, weight, size, and cost... DC motors are always
preferred over stepper motors. There are many things, which we can do with DC
motor when interfaced with a micro controller. For example we can control the
speed of motor, we can control the direction of rotation, we can also do encoding
of the rotation made by DC motor i.e. keeping track of how many turns are made
by the motors etc. So we can see DC motors are better than stepper motors.

In this part of tutorial we will learn to interface a DC motor with a micro


controller. Usually H-bridge is preferred way of interfacing a DC motor. These
days many IC manufacturers have H-bridge motor drivers available in the market
like L293D is most used H-Bridge driver IC. H-bridge can also be made with the
help of transistors and MOSFET’s etc. rather of being cheap, they only increase
the size of the design board, which is sometimes not required so using a small 16
pin IC is preferred for this purpose. L293D is having two ‘H’ Bridges inside, so
that we can drive two DC motors simultaneously. Before discussing about this
device, first we must learn basic theory of ‘H’ Bridges. The following is the
description.

Basic Theory
Let's start with the name, H-bridge. Sometimes called a "full bridge" the H-
bridge is so named because it has four switching elements at the "corners" of the
H and the motor forms the cross bar. The basic bridge is shown in the figure
above. The key fact to note is that there are, in theory, four switching elements
within the bridge. These four elements are often called, high side left, high side
right, low side right, and low side left (when traversing in clockwise order).
The switches are turned on in pairs, either high left and lower right, or
lower left and high right, but never both switches on the same "side" of the
bridge. If both switches on one side of a bridge are turned on it creates a short
circuit between the battery plus and battery minus terminals. If the bridge is
sufficiently powerful it will absorb that load and your batteries will simply drain
quickly. Usually however the switches in question melt.

To power the motor, turn on two switches that are diagonally opposed. The
current flows and the motor begin to turn in a "positive" direction. Switch off these
two switches and switch on other two switches diagonally in other direction then
the motor starts rotating in opposite direction. Actually it is quite simple, the tricky
part comes in when we decide what to use for switches. Anything that can carry
a current will work, from four SPST switches, one DPDT switch, relays,
transistors, to enhancement mode power MOSFET’s.
One more topic in the basic theory section is quadrants. If each switch can be controlled
independently then we can do some interesting things with the bridge, some folks call such a
bridge a "four quadrant device" (4QD). If we built it out of a single DPDT relay, we can really
only control forward or reverse. We can build a small truth table that tells us for each of the
switch's states, what the bridge will do. As each switch has one of two states, and there are four
switches, there are 16 possible states. However, since any state that turns both switches on one
side on is "bad", there are in fact only four useful states (the four quadrants) where the transistors
are turned on.

High Side High Side Low Side Low Side Quadrant


Left Right Left Right Description

On Off Off On Forward Running

Off On On Off Backward Running

On On Off Off Braking

Off Off On On Braking

In the above table the last two rows describes condition about short circuit
the motor that causes the motors generator effect to work against it. The turning
motor generates a voltage, which tries to force the motor to turn the opposite
direction. This causes the motor to rapidly stop spinning and is called "braking"
on a lot of H-bridge designs. Of course there is also the state where all the
transistors are turned off. In this case the motor coasts freely if it was spinning
and does nothing if it was doing nothing.

1. Using Relays:

A simple implementation of a H Bridge using four SPST relays is shown.


Terminal A is High Side Left, Terminal B is High Side Right, Terminal C is Low
Side Left and Terminal D is Low Side Right. The logic followed is according to
the table above.

Warning: Never turn on A and C or B and D at the same time. This will lead to a
short circuit of the battery and will lead to failure of the relays due to the large
current.

2. Using Transistors:

We can better control our motor by using transistors or Field Effect


Transistors (FET’s). Most of what we have discussed about the relays H-Bridge
is true of these circuits. See the diagram showing how they are connected. We
should add diodes across the transistors to catch the back voltage that is
generated by the motor's coil when the power is switched on and off. This fly
back voltage can be many times higher than the supply voltage.

Don't turn on A and C or B and D at the same time.


Transistors, being a semiconductor device, will have some resistance,
which causes them to get hot when conducting much current. This is called not
being able to sink or source very much power, i.e.: Not able to provide much
current from ground or from plus voltage.

MOSFET’s are much more efficient, they can provide much more current
and not get as hot. They usually have the fly back diodes built in so we don't
need the diodes anymore. This helps guard against fly back voltage frying our
ICs.

To use MOSFET’s in an H-Bridge, we need P-Channel MOSFET’s on top


because they can "source" power and N-Channel MOSFET’s on the bottom
because they can "sink" power. It is important that the four quadrants of the H-
Bridge circuits be turned on and off properly. When there is a path between the
positive and groundside of the H-Bridge, other than through the motor, a
condition exists called "shoot through". This is basically a direct short of the
power supply and can cause semiconductors to become ballistic, in circuits with
large currents flowing. There are H-bridge chips available that are much easier,
and safer, to use than designing our own H-Bridge circuit.

L293D Dual H-Bridge Motor Driver

L293D is a dual H-Bridge motor driver, so with one IC we can interface two
DC motors, which can be controlled in both clockwise and counter clockwise
directions. Since the device is having four half ‘H’ Bridges, thereby if required
four motors can be driven through this single device, moreover the task is to run
all four motors in one direction only. L293D has output current of 600mA and
peak output current of 1.2A per channel. Moreover for protection of circuit from
back EMF output diodes are included within the IC. The output supply (VCC2)
has a wide range from 4.5V to 36V, which has made L293D a best choice for DC
motor driver.

In this IC there are two different power supplies (Vcc1 and Vcc2). Vcc1 is
for logic input circuit while Vcc2 is supply for the output circuit. This means that
we should apply about 5V to Vcc1 and whatever voltage required by the motor
(up to 36V max for this IC) to Vcc2. Each Half H-Bridge has an individual
Ground. So we must ground the terminal corresponding to the Half H-Bridge,
depending up on the circuit design, if required all four terminals of bridges can be
connected to the ground.

Each Half H-Bridge has an Input (A) and output (Y). Also there are enable pins to turn on
the Half H-Bridges. Once a Half H-bridge is enabled, then the truth table is as follows:

INPUT OUTPUT
A Y
L L
H H

So we just give a High level when we want to turn the Half H-Bridge on
and Low level when we want to turn it off. When the Half H-Bridge is on, the
voltage at the output is equal to Vcc2.

If we want to make a Full H-Bridge, we must connect the motor (or the
load) between the outputs of two Half H-Bridges and the inputs will be the two
inputs of the Half H-Bridges.
Suppose we have connected Half H-Bridges 1 and 2 to form a Full H-Bridge. Now the
truth table is as follows:

INPUT INPUT OUTPUT OUTPUT


Description
1A 2A 1Y 2Y

Braking (both terminals of motor


L L L L
are Gnd)

L H L H Forward Running

H L H L Backward Running

Braking (both terminals of motor


H H H H
at Vcc2)
CHAPTER – 10
DC MOTORS – AN OVERVIEW
At the most basic level, electric motors exist to convert electrical energy
into mechanical energy. This is done by way of two interacting magnetic fields --
one stationary, and another attached to a part that can move. A number of types
of electric motors exist, but most BEAM bots use DC motors in some form or
another. DC motors have the potential for very high torque capabilities (although
this is generally a function of the physical size of the motor), are easy to
miniaturize, and can be "throttled" via adjusting their supply voltage. DC motors
are also not only the simplest, but the oldest electric motors.

The basic principles of electromagnetic induction were discovered in the


early 1800's by Oersted, Gauss, and Faraday. By 1820, Hans Christian Oersted
and Andre Marie Ampere had discovered that an electric current produces a
magnetic field. The next 15 years saw a flurry of cross-Atlantic experimentation
and innovation, leading finally to a simple DC rotary motor. A number of men
were involved in the work, so proper credit for the first DC motor is really a
function of just how broadly you choose to define the word "motor."

DC motors are configured in many types and sizes, including brushless,


servo, and gear motor types. A motor consists of a rotor and a permanent
magnetic field stator. The magnetic field is maintained using either permanent
magnets or electromagnetic windings. DC motors are most commonly used in
variable speed and torque applications.

Brushed DC motors have built-in commutation, meaning that as the motor


rotates, mechanical brushes automatically commutate coils on the rotor.
Brushless DC motors use an external power drive to allow commutation of the
coils on the stator. Brush-type motors are used when cost is a priority, while
brushless motors are selected fulfill specific requirements, such as maintenance-
free operation, high speeds, and hazardous environments where sparking could
be dangerous.

DC gear motors are configured in many types and sizes, including


brushless and servo. A DC gear motor consists of a rotor and a permanent
magnetic field stator and an integral gearbox or gear head. The magnetic field is
maintained using either permanent magnets or electromagnetic windings. DC
motors are most commonly used in variable speed and torque applications.

Motion and controls covers a wide range of components that in some way
are used to generate and/or control motion. Areas within this category include
bearings and bushings, clutches and brakes, controls and drives, drive
components, encoders and resolvers, Integrated motion control, limit switches,
linear actuators, linear and rotary motion components, linear position sensing,
motors (both AC and DC motors), orientation position sensing, pneumatics and
pneumatic components, positioning stages, slides and guides, power
transmission (mechanical), seals, slip rings, solenoids, springs.

Motors are the devices that provide the actual speed and torque in a drive
system. This family includes AC motor types (single and multiphase motors,
universal, servo motors, induction, synchronous, and gear motor) and DC motors
(brushless, servo motor, and gear motor) as well as linear, stepper and air
motors, and motor contactors and starters.

Permanent magnet DC motor responds to both voltage and current. The


steady state voltage across a motor determines the motor’s running speed, and
the current through its armature windings determines the torque. Apply a voltage
and the motor will start running in one direction; reverse the polarity and the
direction will be reversed. If you apply a load to the motor shaft, it will draw more
current, if the power supply does not able to provide enough current, the voltage
will drop and the speed of the motor will be reduced. However, if the power
supply can maintain voltage while supplying the current, the motor will run at the
same speed. In general, you can control the speed by applying the appropriate
voltage, while current controls torque. In most cases, DC motors are powered up
by using fixed DC power supply, therefore; it is more efficient to use a chopping
circuit.

Consider what happens when a voltage applied to a motor’s windings is


rapidly turned ON and OFF in such a way that the frequency of the pulses
produced remains constant, but the width of the ON pulse is varied. This is
known as Pulse Width Modulation (PWM). Current only flows through the motor
during the ON portion of the PWM waveform. If the frequency of the PWM input
is high enough, the mechanical inertia of the motor cannot react to the ripple
wave; instead, the motor behaves as if the current were the DC average of the
ripple wave. Therefore, by changing the width of pulse, we can control the motor
speed.

At the most basic level, electric motors exist to convert electrical energy
into mechanical energy. This is done by way of two interacting magnetic fields --
one stationary, and another attached to a part that can move. A number of types
of electric motors exist, but most BEAM bots use DC motors in some form or
another. DC motors have the potential for very high torque capabilities (although
this is generally a function of the physical size of the motor), are easy to
miniaturize, and can be "throttled" via adjusting their supply voltage. DC motors
are also not only the simplest, but the oldest electric motors.
Principles of operation

In any electric motor, operation is based on simple electromagnetism. A


current carrying conductor generates a magnetic field; when this is then placed in
an external magnetic field, it will experience a force proportional to the current in
the conductor, and to the strength of the external magnetic field. As you are well
aware of from playing with magnets as a kid, opposite (North and South)
polarities attract, while like polarities (North and North, South and South) repel.
The internal configuration of a DC motor is designed to harness the magnetic
interaction between a current -carrying conductor and an external magnetic field
to generate rotational motion. Let's start by looking at a simple 2-pole DC electric
motor (here dark black represents a magnet or winding with a "North"
polarization, while light colour represents a magnet or winding with a "South"
polarization).

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator,
commutator, field magnet’s, and brushes. In most common DC motors, the
external magnetic field is produced by high-strength permanent magnets. The
stator is the stationary part of the motor -- this includes the motor casing, as well
as two or more permanent magnet pole pieces. The rotor (together with the axle
and attached commutator) rotates with respect to the stator. The rotor consists of
windings (generally on a core), the windings being electrically connected to the
commutator. The above diagram shows a common motor layout -- with the rotor
inside the stator (field) magnets.
The geometry of the brushes, commutator contacts, and rotor windings are
such that when power is applied, the polarities of the energized winding and the
stator magnet(s) are misaligned, and the rotor will rotate until it is almost aligned
with the stator's field magnets. As the rotor reaches alignment, the brushes move
to the next commutator contacts, and energize the next winding. Given our
example two-pole motor, the rotation reverses the direction of current through the
rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to continue
rotating.

In real life, though, DC motors will always have more than two poles (three
is a very common number). In particular, this avoids "dead spots" in the
commutator. You can imagine how with our example two-pole motor, if the rotor
is exactly at the middle of its rotation (perfectly aligned with the field magnets), it
will get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where
the commutator shorts out the power supply (i.e., both brushes touch both
commutator contacts simultaneously). This would be bad for the power supply,
waste energy, and damage motor components as well. Yet another disadvantage
of such a simple motor is that it would exhibit a high amount of torque "ripple"
(the amount of torque it could produce is cyclic with the position of the rotor).

D.C. Motors with field coils are classified as series. Shunt, compound and
separately excited according to how the field windings and armature windings are
connected. With the series wound motor the armature and fields coils are in
series. Such a motor exerts the highest starting torque and has the greatest no-
load speed. With light loads there is a danger that a series wound motor might
run at too high a speed. Reversing the polarity of the supply to the coils has no
effect on the direction of rotation of the motor, it will continue rotating in the same
direction since both the field and armature currents have been reversed.

With the shunt wound motor the armature and field coils are in parallel. It
provides the lowest starting torque, a much lower no- load speed and has good
speed regulation. Because of this almost constant speed regardless of load,
shunt wound motors are very widely used to reverse the direction of rotation,
either the armature or field supplied must be reversed. For this reason, the
separately excited windings are preferable for such a situation.

The compound motor has two field windings, one in series with the
armature and one in parallel. Compound wound motors aim to got the best
features of the series and shunt wound motors, namely a high starting torque and
good speed regulation. The separately excited motor has separate control of the
armature and field currents and can be considered to be a special case of the
shunt wound motor.

The torque-speed characteristics of the above motors and the speed of


such D.C. Motors can be changed by either changing the armature current or the
field current. Generally it is the armature current that is varied. The choice of
motor will depend on its application. For example, with a robot, manipulator, and
the robot wrist might use a series wound motor because the speed decreases as
the load increases. a shunt wound motor would be used where a constant speed
was required, regardless of the load.

The speed of a permanent magnet motor depends on the current through


the armature coil. With a field coil motor either varying the armature current or
the field current can change the speed; generally it is the armature current that is
varied. Thus speed control can be obtained by controlling the voltage applied to
the armature. However, because fixed voltage supplies are often used, an
electronic circuit obtains a variable voltage.

With an alternating current supply, the thyristor circuit can be used to


control the average voltage applied to the armature. However, we are often
concerned with the control of D.C. Motors by means of control signals emanating
from microprocessors. In such cases the technique known as pulse width
modulation (PWM) is generally used. This basically involves taking a constant
D.C. supply voltage and chopping it so that the average value is varied.
Types of DC Motors with Advantages and Disadvantages

Type Advantages Disadvantages


Very precise speed Expensive and hard
Stepper Motor and position control. to find. Require a
High Torque at low switching control
speed. circuit
Require more current
than permanent
magnet motors, since
Wide range of field coil must be
DC Motor w/field coil speeds and torques. energized. Generally
More powerful than heavier than
permanent magnet permanent magnet
motors motors. More difficult
to obtain.
Small, compact, and Generally small.
DC permanent easy to find. Very Cannot vary
magnet motor inexpensive magnetic field
strength.
Very high
Gasoline (small two power/weight ratio. Expensive, loud,
stroke) Provide Extremely difficult to mount,
high torque. No very high vibration.
batteries required.
CHAPTER - 11

HARDWARE DETAILS

The IC’s and other important components used in this project work,
procured from the Hyderabad Electronics Market. The details or data sheets of
the IC’s are down loaded from the Internet. The following are the web sites that
can be browsed for collecting the data sheets.

1. www. Texas Instruments.com


2. www. National semiconductors.com
3. www. Fairchild semiconductors.com

The following are the components used in the project work:

1. Arduino uno ATMEGA 328 Controller board


2. LM 567 Tone decoder
3. GSM module
4. H- Bridge L293D
5. Limit Switch
6. Voltage Regulators (7805 & 7812)
7. BC 547 NPN Transistor

The required PCB’S (Printed Circuit boards) for the project work fabricated
by SUN RISE CIRCUITS, Kushaiguda Industrial Estate, Hyderabad. Kushaiguda
Industrial Estate is very famous for fabricating the Industrial grade PCB’s.
CHAPTER – 13

CONCLUSIONS AND REFERENCES


CONCLUSION:
The project work Titled “Smart Dustbin Management” is successfully
designed & developed, and a demo unit is fabricated and the results are found to
be satisfactory. While designing and developing this proto type module, we have
consulted few experts those who are having knowledge in appropriate fields,
these professionals working at different organizations belong to Hyderabad
helped us while designing the project work.

In this project, an integrated system of GSM modem, IR Sensors is


introduced for efficient and economic garbage collection. The developed system
provides improved database for garbage collection and waste amount at each
location. We analyzed the solutions currently available for the implementation of
current technologies. By implementing this project we will effectively be able to
separate the dry and wet garbage for clean environment. The technologies which
are used in the proposed system are good enough to ensure the practical and
perfect for solid garbage collection process monitoring and management for
green environment.
REFERENCES:

The following are the references made during the development of this
project work.

Text Books:

1. Linear Integrated Circuits – By: D. Roy Choudhury, Shail Jain


2. Digital Electronics. By JOSEPH J.CARR
3. Fundamental of Radio Communication: By A.SHEINGOLD
4. Digital and Analog Communication System By: K. sam Shanmugam
5. The concepts and Features of Micro-controllers - By: Raj Kamal
6. The 8051 Micro-controller Architecture, programming & Applications - By:
Kenneth J. Ayala
7. Programming and Customizing the 8051 Micro-controller - By: Myke
Predko
8. Electronic Circuit guide book – Sensors – By JOSEPH J.CARR

Catalogs:

(1) TEXAS - LINEAR IC’s manual

(2) SIGNETICS - DIGITAL IC’s manual

Journals:

(1) Electronic Design

(2) Electronics for you

(3) Electronics Text.

(4) Practical Electronics

You might also like