You are on page 1of 48

WHAT IS AN EMBEDDED SYSTEM

An embedded system is one that has computer hardware with software embedded in it as one of
its components

Or

We can define an embedded system as “a microprocessor based system that does not look like
a computer

Embedded systems are used for real time applications with high reliability, accuracy and
precision, embedded systems are operated with real time operating systems like wince, rt linux,
vxworks, psos, etc..,

embedded systems are very popular these days most of the electrical, electronics,
mechanical;, chemical, industrial, medical, space and many more areas have the embedded
systems in their applications

EMBEDDED SYSTEM DESIGN


ROLE OF EMBEDDED SYSTEMS

Embedded Systems Are Compact, Smart, Efficient, And Economical And User Friendly,
They Are Closed Systems And Respond To The Real World Situation Very Fast, Closed System
Means, Everything Required For A Specific Application Is Embedded On The Chip And Hence,
They Do Not Call For External Requirement For Their Functioning.

FEATURES OF AN EMBEDDED SYSTEM

Embedded systems do a very specific task, they cannot be programmed to do different things.

 Embedded systems have very limited resources, particularly the memory. Generally, they
do not have secondary storage devices such as the cdrom or the floppy disk.

 Embedded systems have to work against some deadlines. A specific job has to be
completed within a specific time. In some embedded systems, called real-time systems,
the deadlines are stringent. Missing a dead line may cause a catastrophe – loss of life or
damage to property.

 Embedded systems are constrained for power, as many embedded systems operate
through a battery, the power consumption has to be very low.

 Embedded systems need to be highly reliable. Once in a while, pressing alt-ctrl-del is ok


on your desktop, but you cannot afford to reset your embedded system.

 Some embedded systems have to operate in extreme environmental conditions such as


very high temperatures and humidity.

 Embedded systems that address the consumer market (for example electronic toys) are
very cost-effective. Even a reduction of rs.10 is lot of cost saving, because thousands or
millions systems may be sold.

 Unlike desktop computers in which the hardware platform is dominated by intel and the
operating system is dominated by microsoft, there is a wide variety of processors and
operating systems for the embedded systems. So, choosing the right platform is the most
complex task .
CLASSIFICATION OF EMBEDDED SYSTEMS

Based on functionality and performance requirements, embedded systems are classified as :

 Stand-alone embedded systems

 Real-time embedded systems

 Networked information appliances

 Mobile devices

APPLICATION OF EMBEDDED SYSTEM

 Embedded systems are used in the following areas;


 Robotics
 Aviation
 Telecommunication and broadcasting
 Mobile phones and mobiles networking
 Wires application
 Satellite communication
 Military application
 Medical instruments
 Toy industries
 Blue tooth
 Electronic sensors
 Home appliances etc

SEGMENTS OF EMBEDDED SYSTEMS

Embedded systems basically consists of the following four segments


 Embedded controllers (8-bit,16-bit,32-bit,64-bit,128-bit,..)
 Embedded software’s (rtos)
 Embedded memories (dram, sram, eprom, flashetc)
 Embedded boards

BLOCK DIAGRAM OF AN EMBEDDED SYSTEM:

An embedded system usually contains an embedded processor. Many appliances that


have a digital interface -- microwaves, vcrs, cars -- utilize embedded systems. Some embedded
systems include an operating system. Others are very specialized resulting in the entire logic
being implemented as a single program. These systems are embedded into some device for some
specific purpose other than to provide general purpose computing . A typical embedded system is
shown in fig 1.1

BLOCK DIAGRAM OF A TYPICAL EMBEDDED SYSTEM

OVERVIEW OF EMBEDDED SYSTEMS:


An embedded system is a special-purpose computer system designed to perform one or a
few dedicated functions, often with real-time computing constraints. It is usually embedded as
part of a complete device including hardware and mechanical parts. In contrast, a general-
purpose computer, such as a personal computer, can do many different tasks depending on
programming. Embedded systems have become very important today as they control many of the
common devices we use.
Since the embedded system is dedicated to specific tasks, design engineers can optimize
it, reducing the size and cost of the product, or increasing the reliability and performance. Some
embedded systems are mass-produced, benefiting from economies of scale.

in general, "embedded system" is not an exactly defined term, as many systems have
some element of programmability. For example, handheld computers share some elements with
embedded systems — such as the operating systems and microprocessors which power them —
but are not truly embedded systems, because they allow different applications to be loaded and
peripherals to be connected.
Embedded systems provide several functions

 Monitor the environment; embedded systems read data from input sensors. This data is then
processed and the results displayed in some format to a user or users
 Control the environment; embedded systems generate and transmit commands for actuators.
 Transform the information; embedded systems transform the data collected in some
meaningful way, such as data compression/decompression

Although interaction with the external world via sensors and actuators is an important aspect
of embedded systems, these systems also provide functionality specific to their applications.
Embedded systems typically execute applications such as control laws, finite state machines, and
signal processing algorithms. These systems must also detect and react to faults in both the
internal computing environment as well as the surrounding electromechanical systems.

EMBEDDED C:

The embedded c programming language is used in the microcontrollers. The embedded c


language is a general-purpose programming language that provides code efficiency,
elements of structured programming and a rich set of operators. Embedded c is not a big
language and is not designed for any one particular area of application. It’s generally
combined with its absence of restriction, makes embedded c a convenient and effective
programming solution for a wide variety of software tasks. Many applications can be
solved more easily and efficiently with embedded c than with other more specialized
languages.the embedded c language on its own is not capable of performing operations
(such as input and output) that would normally require intervention from the operating
system. Instead, these capabilities are provided as a part of standard library. Because these
functions are separated from the language itself, embedded c is especially suited for
producing code that is portable across wide platforms.

ADVANTAGES OF EMBEDDED C

 High code efficiency


 applicable in any platforms
 easy to compile

INTERNET OF THINGS

Iot (internet of things) is an advanced automation and analytics system which exploits
networking, sensing, big data, and artificial intelligence technology to deliver complete systems
for a product or service. These systems allow greater transparency, control, and performance
when applied to any industry or system.

Iot systems have applications across industries through their unique flexibility and ability to be
suitable in any environment. They enhance data collection, automation, operations, and much
more through smart devices and powerful enabling technology.

Iot systems allow users to achieve deeper automation, analysis, and integration within a system.
They improve the reach of these areas and their accuracy. Iot utilizes existing and emerging
technology for sensing, networking, and robotics.
Iot exploits recent advances in software, falling hardware prices, and modern attitudes towards
technology. Its new and advanced elements bring major changes in the delivery of products,
goods, and services; and the social, economic, and political impact of those changes.

IOT FEATURES

The most important features of iot include artificial intelligence, connectivity, sensors, active
engagement, and small device use. A brief review of these features is given below −

 AI − iot essentially makes virtually anything “smart”, meaning it enhances every aspect of
life with the power of data collection, artificial intelligence algorithms, and networks. This
can mean something as simple as enhancing your refrigerator and cabinets to detect when
milk and your favorite cereal run low, and to then place an order with your preferred grocer.

 CONNECTIVITY − new enabling technologies for networking, and specifically iot


networking, mean networks are no longer exclusively tied to major providers. Networks can
exist on a much smaller and cheaper scale while still being practical. Iot creates these small
networks between its system devices.

 SENSORS − iot loses its distinction without sensors. They act as defining instruments which
transform iot from a standard passive network of devices into an active system capable of
real-world integration.

 ACTIVE ENGAGEMENT − much of today's interaction with connected technology


happens through passive engagement. Iot introduces a new paradigm for active content,
product, or service engagement.

 SMALL DEVICES − devices, as predicted, have become smaller, cheaper, and more
powerful over time. Iot exploits purpose-built small devices to deliver its precision,
scalability, and versatility.

IOT ADVANTAGES
The advantages of iot span across every area of lifestyle and business. Here is a list of some of
the advantages that iot has to offer −

 IMPROVED CUSTOMER ENGAGEMENT − current analytics suffer from blind-spots


and significant flaws in accuracy; and as noted, engagement remains passive. Iot completely
transforms this to achieve richer and more effective engagement with audiences.

 TECHNOLOGY OPTIMIZATION − the same technologies and data which improve the
customer experience also improve device use, and aid in more potent improvements to
technology. Iot unlocks a world of critical functional and field data.

 REDUCED WASTE − iot makes areas of improvement clear. Current analytics give us
superficial insight, but iot provides real-world information leading to more effective
management of resources.

 ENHANCED DATA COLLECTION − modern data collection suffers from its limitations
and its design for passive use. Iot breaks it out of those spaces, and places it exactly where
humans really want to go to analyze our world. It allows an accurate picture of everything

BLOCK DIAGRAM

Power supply

L293D MOTOR

Mq135 Arduino

LCD
accelerometer

Buzzer/LED

Lm35

GPS/GSM
Speed detector
Rfid reader

1. Arduino
2. Mq135
3. Accelerometer
4. Lm35 or ds18b20
5. Speed detector
6. L293d motor
7. Lcd
8. Buzzer/ led
9. Gps /gsm
10. Rfid reader
11. Power supply

ARDUINO

The arduino mega 2560 is a microcontroller board based on the atmega2560 (datasheet). It has
54 digital input/output pins (of which 14 can be used as pwm outputs), 16 analog inputs, 4 uarts
(hardware serial ports), a 16 mhz crystal oscillator, a usb connection, a power jack, an icsp
header, and a reset button. It contains everything needed to support the microcontroller; simply
connect it to a computer with a usb cable or power it with a ac-to-dc adapter or battery to get
started. The mega is compatible with most shields designed for the arduino duemilanove or
diecimila.

POWER :

The arduino mega 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 mega2560 differs from all preceding boards in that it does not use the ftdi usb-
to-serial driver chip. Instead, it features the atmega8u2 programmed as a usb-to-serial converter.

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: the regulated power supply used to power the microcontroller and other components on the
board. This can come either from vin via an on-board regulator, or be supplied by usb or another
regulated 5v supply.
3v3: a 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 ma.

Gnd: ground pins.

Memory :

The atmega2560 has 256 kb of flash memory for storing code (of which 8 kb is used for the
bootloader), 8 kb of sram and 4 kb of eeprom (which can be read and written with the eeprom
library).

Input and output :

Each of the 54 digital pins on the mega 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); serial 1: 19 (rx) and 18 (tx); serial 2: 17 (rx) and 16 (tx); serial 3: 15
(rx) and 14 (tx). Used to receive (rx) and transmit (tx) ttl serial data. Pins 0 and 1 are also
connected to the corresponding pins of the atmega8u2 usb-to-ttl serial chip.

External interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20
(interrupt 3), and 21 (interrupt 2). These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value.

Pwm: 0 to 13. Provide 8-bit pwm output with the analogwrite() function.

Spi: 50 (miso), 51 (mosi), 52 (sck), 53 (ss). These pins support spi communication using the spi
library. The spi pins are also broken out on the icsp header, which is physically compatible with
the uno, duemilanove and diecimila.

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.

I2c: 20 (sda) and 21 (scl). Support i2c (twi) communication.

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.

COMMUNICATION:

The arduino mega2560 has a number of facilities for communicating with a computer, another
arduino, or other microcontrollers. The atmega2560 provides four hardware uarts for ttl (5v)
serial communication. An atmega8u2 on the board channels one of these over usb and provides a
virtual com port to software on the computer (windows machines will need a .inf file, but osx
and linux machines will recognize the board as a com port automatically. The arduino software
includes a serial monitor which allows simple textual data to be sent to and from the board. The
rx and tx leds on the board will flash when data is being transmitted via the atmega8u2 chip and
usb connection to the computer (but not for serial communication on pins 0 and 1). A
softwareserial library allows for serial communication on any of the mega2560's digital pins. The
atmega2560 also supports i2c (twi) and spi communication. The arduino software includes a wire
library to simplify use of the i2c bus; see the documentation on the wiring website for details.
For spi communication, use the spi library.

PROGRAMMING :

The arduino mega can be programmed with the arduino software (download). For details, see the
reference and tutorials. The atmega2560 on the arduino mega 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 atmega8u2 firmware source code is available in the
arduino repository. The atmega8u2 is loaded with a dfu bootloader, which can be activated by
connecting the solder jumper on the back of the board (near the map of italy) and then resetting
the 8u2. 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.

ADVANTAGES

1. Open source
2. Portable
3. Low power consumption
4. Simplified and user friendly programming language
5. No additional programmmer /burner hardware required for programming board.

APPLICATIONS OF AURDINO
1. Home automations
2. Robotics
3. Isp programming
4. Sensor proto typing
5. Easy wifi, gsm , bluetooth, ethernet, zigbee connectivity

MQ135
The mq series of gas sensors utilizes a small heater inside with an electro chemical
sensor these sensors are sensitive to a range of gasses are used at room
temperature. Mq135 alcohol sensor is a sno2 with a lower conductivity of clean air.

The mq-135 gas sensor senses the gases like ammonia nitrogen, oxygen, alcohols,
aromatic compounds, sulfide and smoke. The boost converter of the chip mq-3 gas
sensor is pt1301. The operating voltage of this gas sensor is from 2.5v to 5.0v. The
mq-3 gas sensor has a lower conductivity to clean the air as a gas sensing material. In
the atmosphere we can find polluting gases, but the conductivity of gas sensor
increases as the concentration of polluting gas increases. Mq-135 gas sensor can be
implementation to detect the smoke, benzene, steam and other harmful gases. It has
potential to detect different harmful gases. The mq-135 gas sensor is low cost to
purchase.
FEATURES
 Wide detecting scope
 Fast response and high sensitivity
 Stable and long life
 Simple drive circuit

APPLICATION

They are used in air quality control equipments for buildings/offices, are suitable for detecting of
nh3,nox, alcohol, benzene, smoke,co2 ,etc.

OVERVIEW

 Sensitive for benzene, alcohol, smoke

 Output voltage boosts along with the concentration of the measured gases increases

 Fast response and recovery

 Adjustable sensitivity

 Signal output indicator


SPECIFICATIONS

 Power: 2.5v ~ 5.0v

 Dimension: 40.0mm * 21.0mm

 Mounting holes size: 2.0mm

CHARACTERISTICS OF MQ 135

 Good sensitivity to harmful gases in wide range.


 It has long life and low cost.
 Possesses high sensitivity to ammonia, benzene, sulfide gases.
 It is a simple drive circuit

HOW IT WORKS

As detectors measure a specified gas concentration, the sensor response serves as the reference
point or scale. ... Electrochemical sensors or cells are most commonly used in the detection of
toxic gases like carbon monoxide, chlorine and nitrogen oxides. They function via electrodes
signals when a gas is detected.

ACCELEROMETER
An accelerometer is a sensor which measures the tilting motion and orientation of a mobile
phone. The apple iphone was the first popular mobile phone to make the accelerometer a key
feature of its user interface.

Accelerometers are devices that measure acceleration, which is the rate of change of
the velocityof an object. They measure in meters per second squared (m/s 2) or in g-forces (g). A
single g-force for us here on planet earth is equivalent to 9.8 m/s 2, but this does vary slightly with
elevation (and will be a different value on different planets due to variations in gravitational
pull). Accelerometers are useful for sensing vibrations in systems or for orientation applications.

HOW AN ACCELEROMETER WORKS

Accelerometers are electromechanical devices that sense either static or dynamic forces of
acceleration. Static forces include gravity, while dynamic forces can include vibrations and
movement.

Accelerometers can measure acceleration on one, two, or three axes. 3-axis units are becoming
more common as the cost of development for them decreases.

Generally, accelerometers contain capacitive plates internally. Some of these are fixed, while
others are attached to minuscule springs that move internally as acceleration forces act upon the
sensor. As these plates move in relation to each other, the capacitance between them changes.
From these changes in capacitance, the acceleration can be determined.

Other accelerometers can be centered around piezoelectric materials. These tiny crystal
structures output electrical charge when placed under mechanical stress ( e.g. Acceleration).
ADVANTAGES

Following are the benefits or advantages of accelerometer sensor:


➨it is simple to interface and rugged in design.
➨it has high impedance.
➨it offers higher sensitivity.
➨it has high frequency response.
➨it is available at lower cost due to advancement in mems technology
➨it uses built-in signal conditioning circuit to measure capacitance.

DISADVANTAGES

➨an accelerometer measures chance in velocity only. It does not measure a constant velocity.
➨an accelerometer can not measure rotation around its own axis of movement. Due to this, it is
used in conjunction with gyroscope to measure angular velocity.
➨it is sensitive to temperature and operates over limited temperature range.
➨its efficiency degrades over time.
➨it requires external power for its operation.
➨the other disadvantages are less longevity and hysteresis error.

TYPES OF ACCELEROMETER

 Bulk micro machined capacitive.

 Bulk micro machined piezoelectric resistive.

 Capacitive spring mass system base.

 Dc response.

 Electromechanical servo (servo force balance)

 High gravity.

 High temperature.

 Laser accelerometer.
APPLICATIONS OF ACCELEROMETER

1. Transport
2. Medical application and navigation
3. In industries for monitoring machines
4. Building and structural monitoring
5. Acceleration and vibration calculation in vehicles

LM35

LM35 is an integrated analog temperature sensor whose electrical output is proportional to


degree centigrade. Lm35 sensor does not require any external calibration or trimming to provide
typical accuracies.
The lm35 is one kind of commonly used temperature sensor that can be used to measure
temperature with an electrical o/p comparative to the temperature (in °c). It can measure
temperature more correctly compare with a thermistor. This sensor generates a high output
voltage than thermocouples and may not need that the output voltage is amplified. The lm35 has
an output voltage that is proportional to the celsius temperature. The scale factor is .01v/°c.

LM35 TEMPERATURE SENSOR

The lm35 does not need any exterior calibration and maintains an exactness of +/-0.4°c at room
temperature and +/-0.8°c over a range of 0°c to +100°c.one more significant characteristic of this
sensor is that it draws just 60 microamps from its supply and acquires a low self-heating
capacity. The lm35 temperature sensor available in many different packages like t0-46 metal can
transistor-like package, to-92 plastic transistor-like package, 8-lead surface mount so-8 small
outline package.

FEATURES
 Calibrated directly in ° celsius (centigrade)
 linear + 10.0 mv/°c scale factor
 0.5°c accuracy guaranteeable (at +25°c)
 Rated for full −55° to +150°c range
 Suitable for remote applications
 Low cost due to wafer-level trimming
 Operates from 4 to 30 volts
 less than 60 μa current drain
 low self-heating, 0.08°c in still air
 Nonlinearity only ±1⁄4°c typical
 Low impedance output, 0.1 for 1 ma load

APPLICATIONS

 Measuring temperature of a particular environment and hvac applications


 Providing thermal shutdown for a component/ circuit
 Checking battery temperature

The lm35 temperature sensor is used to detect precise centigrade temperature. The output of this
sensor changes describes the linearity. The o/p voltage of this ic sensor is linearly comparative to
the celsius temperature. The operating voltage range of this lm35 ranges from-55˚ to +150˚c and
it has low-self heating. This is operated under 4 to 30 volts. The most extensively used electronic
devices are operational amplifiers, which are certain kind of differential amplifiers. Temperature
sensor circuit has terminals such as two inputs like non-inverting (+) and inverting (-) and only
one output pin. Operational amplifier ic741 is used as a non-inverting amplifier. The variation
between the i/p terminals amplifies the circuit.
CIRCUIT DIAGRAM

L293D MOTOR

L293d Is A Motor Driver Integrated Circuit Which Is Used To Drive Dc Motors Roating In
Either Direction

L293D DESCRIPTION

L293d is a typical motor driver or motor driver ic which allows dc motor to drive on either
direction. L293d is a 16-pin ic which can control a set of two dc motors simultaneously in any
direction. It means that you can control two dc motor with a single l293d ic. Dual h-bridge motor
driver integrated circuit (ic).

The l293d can drive small and quiet big motors as well, check the voltage specification at the end
of this page for more info.

Concept

It works on the concept of h-bridge. H-bridge is a circuit which allows the voltage to be flown in
either direction. As you know voltage need to change its direction for being able to rotate the
motor in clockwise or anticlockwise direction, hence h-bridge ic are ideal for driving a dc motor.

In a single l293d chip there are two h-bridge circuit inside the ic which can rotate two dc motor
independently. Due its size it is very much used in robotic application for controlling dc motors.
Given below is the pin diagram of a l293d motor controller.

There are two enable pins on l293d. Pin 1 and pin 9, for being able to drive the motor, the pin 1
and 9 need to be high. For driving the motor with left h-bridge you need to enable pin 1 to high.
And for right h-bridge you need to make the pin 9 to high. If anyone of the either pin1 or pin9
goes low then the motor in the corresponding section will suspend working. It’s like a switch.

WORKING OF L293D

There are 4 input pins for l293d, pin 2,7 on the left and pin 15 ,10 on the right as shown on the
pin diagram. Left input pins will regulate the rotation of motor connected across left side and
right input for motor on the right hand side. The motors are rotated on the basis of the inputs
provided across the input pins as logic 0 or logic 1.

In simple you need to provide logic 0 or 1 across the input pins for rotating the motor.

L293D LOGIC TABLE.

Lets consider a motor connected on left side output pins (pin 3,6). For rotating the motor in
clockwise direction the input pins has to be provided with logic 1 and logic 0.
• pin 2 = logic 1 and pin 7 = logic 0 | clockwise direction
• pin 2 = logic 0 and pin 7 = logic 1 | anticlockwise direction
• pin 2 = logic 0 and pin 7 = logic 0 | idle [no rotation] [hi-impedance state]
• pin 2 = logic 1 and pin 7 = logic 1 | idle [no rotation]

In a very similar way the motor can also operate across input pin 15,10 for motor on the right
hand side.

VOLTAGE SPECIFICATION

Vcc is the voltage that it needs for its own internal operation 5v; l293d will not use this voltage
for driving the motor. For driving the motors it has a separate provision to provide motor supply
vss (v supply). L293d will use this to drive the motor. It means if you want to operate a motor at
9v then you need to provide a supply of 9v across vss motor supply.

The maximum voltage for vss motor supply is 36v. It can supply a max current of 600ma per
channel.since it can drive motors up to 36v hence you can drive pretty big motors with this
l293d.

Vcc pin 16 is the voltage for its own internal operation. The maximum voltage ranges from 5v
and upto 36v.

Tip: don’t exceed the vmax voltage of 36 volts or it will cause damage.

Even the simplest robot requires a motor to rotate a wheel or performs particular action. Since
motors require more current then the microcontroller pin can typically generate, you need some
type of a switch which can accept a small current, amplify it and generate a larger current, which
further drives a motor. This entire process is done by what is known as a motor driver. With
l293d motor driver ic, that task is made simple and has helped in a number of applications with
relative ease.
L293d h-bridge driver is the most commonly used driver for bidirectional motor driving
applications. This l293d ic allows dc motor to drive on either direction. L293d is a 16-pin ic
which can control a set of two dc motors simultaneously in any direction. It means that you can
control two dc motor with a single l293d ic. Because it has two h-bridge circuit inside. The l293d
can drive small and quiet big motors as well. There are various ways of making h-bridge motor
control circuit such as using transistor, relays and using l293d/l298. Before going into detail, first
we will see what is h-bridge circuit.

H-BRIDGE CIRCUIT WORKING (L293D MOTOR DRIVER WORKING)

Motor driver is basically a current amplifier which takes a low-current signal from the
microcontroller and gives out a proportionally higher current signal which can control and drive
a motor. In most cases, a transistor can act as a switch and perform this task which drives the
motor in a single direction.

Turning a motor on and off requires only one switch to control a single motor in a single
direction. What if you want your motor to reverse its direction? The simple answer is to reverse
its polarity. This can be achieved by using four switches that are arranged in an intelligent
manner such that the circuit not only drives the motor, but also controls its direction. Out of
many, one of the most common and clever design is a h-bridge circuit where transistors are
arranged in a shape that resembles the english alphabet “h”.
A h bridge is an electronic circuit that allows a voltage to be applied across a load in any
direction. H-bridge circuits are frequently used in robotics and many other applications to allow
dc motors to run forward & backward. These motor control circuits are mostly used in different
converters like dc-dc, dc-ac, ac-ac converters and many other types of power electronic
converters. In specific, a bipolar stepper motor is always driven by a motor controller having two
h-bridges.

A h-bridge is fabricated with four switches like s1, s2, s3 and s4. When the s1 and s4 switches
are closed, then a +ve voltage will be applied across the motor. By opening the switches s1 and
s4 and closing the switches s2 and s3, this voltage is inverted, allowing invert operation of the
motor.

Generally, the h-bridge motor driver circuit is used to reverse the direction of the motor and also
to brake the motor. When the motor comes to a sudden stop, as the terminals of the motor’s are
shorted. Or let the motor run free to a stop, when the motor is detached from the circuit. The
table below gives the different operations with the four switches corresponding to the above
circuit.
L293D IC

L293d ic generally comes as a standard 16-pin dip (dual-in line package). This motor driver ic
can simultaneously control two small motors in either direction; forward and reverse with just 4
microcontroller pins (if you do not use enable pins)

PIN DIAGRAM
LCD
LCD DISPLAYS
There are many display devices used by the hobbyists. Lcd displays are one of the most
sophisticated display devices used by them. Once you learn how to interface it, it will be the
easiest and very reliable output device used by you! More, for micro controller based project, not
every time any debugger can be used. So lcd displays can be used to test the outputs. Obviously,
for last possibility, you need to know how to use this stuff pretty well.

Hitachi has set up a mile stone by its lcd controller ic. All the lcd displays use the same,
or any one of the ic s based upon the architecture introduced by hitachi.
Ok, one minute, all i’m talking about is the character lcd display and not graphical lcd display.
most of the lcd displays available in the market are 16x2 (that means, the lcd displays are
capable of displaying 2 lines each having 16 characters a), 20x4 lcd displays (4 lines, 20
characters). It has 14 pins. It uses 8lines for parallel data plus 3 control signals, 2 connections to
power, one more for contrast adjustment and two connections for led back light. Let us have a
look to typical pin configurations:

PIN DESCRIPTION:

PIN SYMBOL FUNCTION


NUMBER
1 VSS GROUND TERMINAL
2 VCC POSITIVE SUPPLY
3 VDD CONTRAST ADJUSTMENT
4 RS REGISTER SELECT; 0→INSTRUCTION REGISTER, 1→DATA
REGISTER
5 R/W READ/WRITE SIGNAL; 1→READ, 0→ WRITE
6 E ENABLE; FALLING EDGE
7 DB0 BI-DIRECTIONAL DATA BUS, DATA TRANSFER IS
8 DB1 PERFORMED ONCE, THRU DB0 TO DB7, IN THE CASE OF
9 DB2
10 DB3 INTERFACE DATA LENGTH IS 8-BITS; AND TWICE,
11 DB4 THROUGH DB4 TO DB7 IN THE CASE OF INTERFACE DATA
12 DB5
13 DB6
14 DB7 LENGTH IS 4-BITS. UPPER FOUR BITS FIRST THEN LOWER
15 LED-(K) BACK BITS.
FOUR LIGHT LED CATHODE TERMINAL
16 LED+(A) BACK LIGHT LED ANODE TERMINAL

BLOCK DIAGRAM OF LCD

DATA/SIGNALS/EXECUTION OF LCD

Now that was all about the signals and the hardware. Let us come to data, signals and
execution.

Lcd accepts two types of signals, one is data, and another is control. These signals are
recognized by the lcd module from status of the rs pin. Now data can be read also from the lcd
display, by pulling the r/w pin high. As soon as the e pin is pulsed, lcd display reads data at the
falling edge of the pulse and executes it, same for the case of transmission.

LCD DISPLAY TAKES A TIME OF 39-43µS TO PLACE A CHARACTER OR


EXECUTE A COMMAND. EXCEPT FOR CLEARING DISPLAY AND TO SEEK CURSOR
TO HOME POSITION IT TAKES 1.53MS TO 1.64MS. ANY ATTEMPT TO SEND ANY
DATA BEFORE THIS INTERVAL MAY LEAD TO FAILURE TO READ DATA OR
EXECUTION OF THE CURRENT DATA IN SOME DEVICES. SOME DEVICES
COMPENSATE THE SPEED BY STORING THE INCOMING DATA TO SOME
TEMPORARY REGISTERS.

Lcd displays have two rams, naming ddram and cgram. Ddram registers in which
position which character in the ascii chart would be displayed. Each byte of ddram represents
each unique position on the lcd display. The lcd controller reads the information from the ddram
and displays it on the lcd screen. Cgram allows user to define their custom characters. For that
purpose, address space for first 16 ascii characters are reserved for users. After cgram has been
setup to display characters, user can easily display their custom characters on the lcd screen.
CONTROL AND DISPLAY COMMANDS

8-BIT AND 4-BIT INTERFACING OF LCD

Now the question is how to display data in the lcd or give command to it. There is two
modes of data transfer are supported by lcd displays. One is 4bit mode, another is 8 bit mode. To
transfer data in 8 bit mode, first put your data in the 8bit bus, then put command in the command
bus and then pulse the enable signal.
To send data in 4bit mode; first put upper 4bit in the 4 bit data bus connected to 4msb
pins of lcd display, then put control signals in the control bus, then pulse the e pin once. Next put
the lower 4 bit in the data bus and pulse the e pin again. Here is a flowchart simply describing it.

RFID READER

A radio frequency identification reader (rfid reader) is a device used to gather information from
an rfid tag, which is used to track individual objects. Radio waves are used to transfer data from
the tag to a reader. Rfid is a technology similar in theory to bar codes.

So,this radio frequency identification or rfid is a technology which is working on radio


frequency of radio waves. ... So whenever this object is in the range of thereader then
this rfid tag used to transmit its feedback signal to the reader. So it is very similar to the
technology which is used in a barcode.

RFID TAGS

Rfid tags can be either passive, active or battery-assisted passive. An active tag has an on-board
battery and periodically transmits its id signal. A battery-assisted passive (bap) has a small
battery on board and is activated when in the presence of an rfid reader. A passive tag is cheaper
and smaller because it has no battery; instead, the tag uses the radio energy transmitted by the
reader. However, to operate a passive tag, it must be illuminated with a power level roughly a
thousand times stronger than for signal transmission. That makes a difference in interference and
in exposure to radiation.

THERE ARE 2 TYPES OF RFID TAG


1. ACTIVE RFID TAG
 Their own power source
 Limited life spans
 Reader cane be much farther away and still get the signal

2. PASSIVE RFID TAG

 Smaller size
 Do not require power source
 Unlimited life spans

RFID FEATURES
1. Do not require a direct line of sight
2. Rfid tags are typically more expensive
3. Rfid tags can be read/write information can be added
4. Rfid tags can be read at much greater distances upto 300fet.

APPLICATIONS
1. Identification
2. Libraries
3. Manufacturing
4. Security access control
5. Access control
6. Airport baggage

ADVANTAGES
1. An rfid system is the non contact, non-line of nature of the technology.
2. Hundred of tags can be read i seconds
3. Reliability
4. Has the ability topin point location
5. They can be combined with sensors.
6. It not only saves time
7. It providesreal time information and data access to theany body
8. Rfid tages can be store lot of information and follow instructions.

DISADVANTAGES
1. Active rfid can be can be expensive because of batteries
2. Any body can access information about anything
3. Rfid may be easily intercepted, even if it is encrypted
4. There still nedd to be regulations about rfid guidelines
5. It takes lengthy time to program rfid devices

LIGHT EMITTING DIODES (LEDS)


A light emitting diode (led) is essentially a p-n junction diode. When carriers are injected across
a forward-biased junction, it emits incoherent light. Most of the commercial leds are realized
using a highly doped n and a p junction.
 Light-emitting diode
 Semiconductor
 Has polarity

INSIDE OF LED DIODE

1. Transparent plastic case


2. Terminal pins
3. Diode

APPLICATIONS OF LED
1. Lighting
2. Indicators and signals
3. Data communication and other signalling
4. Mobile applications
5. Automotive uses
6. Sign applications
7. Sensor applications

GLOBAL POSITIONING SYSTEM (GPS)


The global positioning system (gps) is a space-based satellite navigation system that provides
location and time information in all weather conditions, anywhere on or near the earth where
there is an unobstructed line of sight to four or more gps satellites. The system provides critical
capabilities to military, civil and commercial users around the world. It is maintained by the
united states government and is freely accessible to anyone with a gps receiver.

GSM/GPRS MODULE

Gsm (global system for mobile communications, originally groupe special mobile), is
a standard set developed by the european telecommunications standards institute (etsi) to
describe protocols for second generation (2g) digital cellular networks used by mobile phones. It
became the de facto global standard for mobile communications with over 80% market share.
The gsm standard was developed as a replacement for first generation (1g) analog
cellular networks, and originally described a digital, circuit switched network optimized for full
duplex voice telephony. This was expanded over time to include data communications, first by
circuit switched transport, then packet data transport via gprs (general packet radio services)
and edge (enhanced data rates for gsm evolution or egprs).
Further improvements were made when the 3gpp developed third generation
(3g) umts standards followed by fourth generation (4g)lte advanced standards.

Gsm/gprs module is used to establish communication between a computer and a gsm-


gprs system. Global system for mobile communication (gsm) is an architecture used for
mobile communication in most of the countries. Global packet radio service (gprs) is an
extension of gsm that enables higher data transmission rate. Gsm/gprs module consists of a
gsm/gprs modem assembled together with power supply circuit and communication
interfaces (like rs-232, usb, etc) for computer. The modem is the soul of such modules.

WIRELESS MODEMS
Wireless modems are the modem devices that generate, transmit or decode data from a
cellular network, for establishing communication between the cellular network and the computer.
These are manufactured for specific cellular network (gsm/umts/cdma) or specific cellular data
standard (gsm/umts/gprs/edge/hsdpa) or technology (gps/sim). Wireless modems like other
modem devices use serial communication to interface with and need hayes compatible at
commands for communication with the computer (any microprocessor or microcontroller
system).

GSM/GPRS MODEM
Gsm/gprs modem is a class of wireless modem devices that are designed for
communication of a computer with the gsm and gprs network. It requires a sim (subscriber
identity module) card just like mobile phones to activate communication with the network. Also
they have imei (international mobile equipment identity) number similar to mobile phones for
their identification. A gsm/gprs modem can perform the following operations:

1. Receive, send or delete sms messages in a sim.


2. Read, add, search phonebook entries of the sim.
3. Make, receive, or reject a voice call.

The modem needs at commands, for interacting with processor or controller, which are
communicated through serial communication. These commands are sent by the
controller/processor. The modem sends back a result after it receives a command. Different at
commands supported by the modem can be sent by the processor/controller/computer to interact
with the gsm and gprs cellular network.

GSM/GPRS MODULE
A gsm/gprs module assembles a gsm/gprs modem with standard communication
interfaces like rs-232 (serial port), usb etc., so that it can be easily interfaced with a computer or
a microprocessor / microcontroller based system. The power supply circuit is also built in the
module that can be activated by using a suitable adaptor.

MOBILE STATION (CELL PHONES AND SIM)


A mobile phone and subscriber identity module (sim) together form a mobile station. It is
the user equipment that communicates with the mobile network. A mobile phone comprises of
mobile termination, terminal equipment and terminal adapter.

Mobile termination is interfaced with the gsm mobile network and is controlled by a
baseband processor. It handles access to sim, speech encoding and decoding, signaling and other
network related tasks. The terminal equipment is an application processor that deals with
handling operations related to keypad, screen, phone memory and other hardware and software
services embedded into the handset. The terminal adapter establishes communication between
the terminal equipment and the mobile termination using at commands. The communication with
the network in a gsm/gprs mobile is carried out by the baseband processor.

DIFFERENCE BETWEEN GSM MOBILE AND GSM/GPRS MODULE


A gsm mobile is a complete system in itself with embedded processors that are dedicated
to provide an interface between the user and the mobile network. The at commands are served
between the processors of the mobile termination and the terminal equipment. The mobile
handset can also be equipped with a usb interface to connect with a computer, but it may or may
not support at commands from the computer or an external processor/controller.
The gsm/gprs module, on the other hand, always needs a computer or external
processor/controller to receive at commands from. Gsm/gprs module itself does not provide any
interface between the user and the network, but the computer to which module is connected is
the interface between user and network.

An advantage that gsm/gprs modules offer is that they support concatenated sms which
may not be supported in some gsm mobile handsets. Also some mobile handsets can’t receive
mms when connected to a computer.

APPLICATIONS OF GSM/GPRS MODULE


The gsm/gprs module demonstrates the use of at commands. They can feature all the
functionalities of a mobile phone through computer like making and receiving calls, sms, mms
etc. These are mainly employed for computer based sms and mms services.

AT COMMANDS
At commands are used to control modems. At is the abbreviation for attention. These
commands come from hayes commands that were used by the hayes smart modems. The hayes
commands started with at to indicate the attention from the modem. The dial up and wireless
modems (devices that involve machine to machine communication) need at commands to
interact with a computer. These include the hayes command set as a subset, along with other
extended at commands.

At commands with a gsm/gprs modem or mobile phone can be used to access following
information and services:
1. Information and configuration pertaining to mobile device or modem and sim card.
2. Sms services.
3. Mms services.
4. Fax services.
5. Data and voice link over mobile network.
The hayes subset commands are called the basic commands and the commands specific to a gsm
network are called extended at commands.

COMMAND, INFORMATION RESPONSE AND RESULT CODES:


The at commands are sent by the computer to the modem/ mobile phone. The modem
sends back an information response i.e. The information requested by or pertaining to the action
initiated by the at command. This is followed by a result code. The result code tells about the
successful execution of that command.

There are also unsolicited result codes that are returned automatically by the modem to notify the
occurrence of an event. For example the reception of a sms will force modem to return an
unsolicited result code.

During the period of evolution of mobile communication technologies various systems


were introduced and deployed to achieve standardization in mobile industry but all the efforts
were failed. Multiple issues were sustained like incompatibility of systems, development of
digital radio frequency. That is when GSM (GLOBAL SYSTEM FOR MOBILE
COMMUNICATION) technology was introduced and problems like standardization,
incompatibility etc were overcame. Tdma solution was chosen in 1987, it is narrowband system
and tdma standards for time division multiple access.

Gsm systems were in market for testing purposes in 1980’s but first commercial lunch of
gsm technology was made in 1991 in finland. Gsm based mobile phones are operated on tdma
systems, in tdma single radio frequency is offered to users with any interference. After all these
years, gsm is now the largest mobile communication technology worldwide, all manufacturers of
mobile phones develop their products based on gsm, and all mobile companies provide their
subscribers gsm networks. Gsm standards for global system for mobile communication, it is
widely used mobile technology worldwide and it adopted by more then 214 countries around the
world.
FEATURES OF GSM TECHNOLOGY. There are many features associated with gsm
technology due to which it is bar far the most leading mobile communication technology in the
world today. Gsm technology facilitates with high speed integrated data, voice data, fax, mail,
voice male and mostly used sms feature. Gsm also make sure that all the communication made
between networks are secured and protected from intruders and frauds
.
One of the major advantages of gsm technology which changed the way we looked mobile
phones at the beginning. Gsm actually brought the concept of being mobile way beyond the
limits. It enabled us to communicate across the continents.

gsm supports multiple frequency levels like 900 mhz, 1800 mhz, 1900 mhz. 1900mhz frequency
is used in north america where as 1800mhz is used in other parts of the world. Different
frequency bands are used by different mobile phone operators. If you are using mobile phone
which supports 1800mgz and operators are available on this band, phone can be used the
network, where as if phone is out of the range of the frequency band on mobile operator
frequency than you need to have phone that supports the frequency. To avoid such cases one
should always adopt to have mobile phones that support multiple frequency bands.

DIFFERENT FREQUENCY BANDS


there are three different frequency bands on which mobile phones are usually operates
and these are dual band, tri-band and quad band.

DUAL BAND : dual frequency band operates on 900mhz and 1800 mhz, that means mobile
phone that supports dual band can be operated any where in the world where 900 mhz and 1800
mhz frequencies are used. Dual band gsm networks usually found in all continents europe, asia,
africa, australia and south america.

TRI-BAND: as name is obvious three frequencies are supported in tri band, these frequencies
are 900 mhz, 1800mhz and 1900 mhz. Tri band is also supported all around the world these days.

QUAD-BAND: quad band supports four frequencies which are 850 mhz, 900 mhz, 1800 mhz ,
1900 mhz. quad band also enables gsm phones to road almost anywhere in the world. all
countries support gsm networks hence make communication possible.

there are over 700 gms networks available in the world operating in their respective countries
and providing international roaming services courtesy gsm technology. there are over 2 billion
gsm subscribers in the world. countries which are using gsm networks on larger scales are russia,
china pakistan, united states, india. Gsm phone deliver very good voice quality, support useful
services and standards, it is very likely that gsm will remain the only mobile communication
network technology to be adopted by each and every country of the world.

ARCHITECHTURE AND WORKING OF GSM NETWORKS


THE SWITCHING SYSTEM
The switching system is very operative system in which many crucial operations are
conducted, ss systems holds five databases with in it which performs different functions. If we
talk about major tasks of ss system it performs call processing and subscriber related functions.
These five databases from ss systems are hlr, msc, vlr, auc and eir. Let’s study each database in
detail and learn what functions this little systems performs.

HLR- HOME LOCATION REGISTER:


Hlr is database, which holds very important information of subscribers. It is mostly
known for storing and managing information of subscribers. It contains subscriber service
profile, status of activities, information about locations and permanent data of all sorts. When
new connections are purchased, these subscribers are registered in hlr of mobile phone
companies.

MSC- MOBILE SERVICES SWITCHING CENTER:


Msc is also important part of ss, it handles technical end of telephony.it is build to
perform switching functionality of the entire system. It’s most important task is to control the
calls to and from other telephones, which means it controls calls from same networks and calls
from other networks. Toll ticketing, common channel signaling, network interfacing etc are other
tasks which msc is responsible for.

VLR- VISITOR LOCATION REGISTER:


Vlr performs very dynamic tasks; it is database which stores temporary data regarding
subscribers which is needed by mobile services switching center-msc vlr is directly connected to
msc, when subscribe moves to different msc location, visitor location register – vlr integrates to
msc of current location and requests the data about subscriber or mobile station ( ms ) from the
home location register –hlr. When subscriber makes a call the visitor location register-vlr will
have required information for making call already and it will not required to connect to home
register location - hrl again.

AUC- AUTHENTICATION CENTER:


Auc is small unit which handles the security end of the system. Its major task is to
authenticate and encrypt those parameters which verify user’s identification and hence enables
the confidentiality of each call made by subscriber. Authentication center – auc makes sure
mobile operators are safe from different Frauds Most Likely To Happen When Hackers Are
Looking For Even Smallest Loop Wholes In Systems.

EIR – EQUIPMENT IDENTITY REGISTER:


Eir is another important database which holds crucial information regarding mobile
equipments. Eir helps in restricting for calls been stolen, mal functioning of any ms, or
unauthorized access. Auc – authentication center and eir- equipment identity registers are either
stand-alone nodes or some times work together as combined auc/eir nodes for optimum
performance.

THE BASE STATION SYSTEM (BSS)


The base station system have very important role in mobile communication. Bss are basically out
door units which consist of iron rods and are usually of high length. Bss are responsible for
connecting subscribers (ms) to mobile networks.all the communication is made in radio
transmission.the base station system is further divided in two systems. These two systems, they
are bsc, and bts. Let’s study these two systems in detail.

BTS – THE BASE TRANSCEIVER STATION:


Subscriber, ms (mobile station) or mobile phone connects to mobile network through bts;
it handles communication using radio transmission with mobile station. As name suggests,
base transceiver station is the radio equipment which receive and transmit voice data at the
same time. Bsc control group of btss.

BSC – THE BASE STATION CONTROLLER:


The base station normally controls many cells, it registers subscribers, responsible for ms
handovers etc. It creates physical link between subscriber (ms) and bts , then manage and
controls functions of it. It performs the function of high quality switch by handover over the ms
to next bsc when ms goes out of the current range of bts, it helps in connecting to next in range
bts to keep the connection alive within the network. It also performs functions like cell
configuration data, control radio frequency in bts. Data moves to msc-mobile switching center
after bsc done processing it. Msc is switching center which acts as bridge between different
mobile networks.

THE OPERATION AND SUPPORT SYSTEM (OSS)


Omc- operations and maintenance center is designed to connect to equipment of msc-
mobile switching center and bsc-base station controller. The implementation of omc is called
oss-the operations and support system.oss helps in mobile networks to monitor and control the
complex systems.the basic reason for developing operation and support system is to provide
customers a cost effective support and solutions. It helps in managing, centralizing, local and
regional operational activities required for gms networks.

BUZZER
A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical,
or piezoelectric. Typical uses of buzzers and beepers include alarm devices, timers, and
confirmation of user input such as a mouse click or keystroke.

FIG.8. BUZZER

PURPOSE : a buzzer or beeper is an audio signalling device, which may be mechanical,


electromechanical, or piezoelectric (piezo for short). Typical uses of buzzers and beepers include
alarm devices, timers, and confirmation of user input such as a mouse click or keystroke.

ADVANTAGES
 Electrically operated device that is good for drawing attention to a condition that
requires attention.

DISADVANTAGES

 Annoying sound to those that don't know its significance.

 Requires training to know what the buzzer means, and how to repair the condition
without just shutting off the buzzer.

 Could trigger a fire in an explosive atmosphere.

 Most likely device to receive "emotional outbursts" like misguided forklift strikes,
stray bullets, and attacks by roving wire cutters.

FEATURES
• black in colour
• with internal drive circuit
• sealed structure
• wave solderable and washable
• housing material: noryl

APPLICATIONS
• computer and peripherals
• communications equipment
• portable equipment
• automobile electronics
• pos system
• electronic cash register

1. POWER SUPPLY

In most of our electronic products or projects we need a power supply for converting
mains ac voltage to a regulated dc voltage. For making a power supply designing of each
and every component is essential. Here i’m going to discuss the designing of regulated 5v
power supply.

POWER SUPPLY CIRCUIT

You might also like