SlideShare une entreprise Scribd logo
1  sur  34
1
ABSTRACT
This seminar project is a summer training based submitted in partial fulfilment of
requirements for the degree of Bachelor of Technology in electronics and communication
engineering as per norms of Rajasthan Technical University, Kota (RAJ.).
The main objective of this seminar project is present to “EMBEDDED SYSTEM” which
studied during the summer training. Meaning of Embedded system is something in-built or
fixes something. Embedded system is to dedicate to specific task. It is combination of
software, hardware and it uses for a specific task. Embedded devices are run continuously for
years without error. It starts quickly and people do not wait for output. 98% microprocessors
are used as component of embedded system.
My content is “Arduino”. It is provide the programme for circuit board. Arduino is an open-
source prototyping platform based on easy-to-use hardware and software. The Arduino is
really just an AVR 8-bit microcontroller with some extra hardware to make it faster to get up
and running. That extra hardware includes: A USB-to-serial board so that you can easily
program the microcontroller, as well as monitor the serial port from our computer. It can
drive motors, LEDs, sensors, and other components. The software, too, is open-source, and it
is growing through the contributions of users worldwide and language is used embedded C in
it. The Arduino gives artists and designers the ability to use and modify computational
hardware easily and inexpensively. The most influential to the Arduino are the processing
language and the wiring microcontroller. Several different versions of the board have been
created for art and design.
2
Chapter-1
INTRODUCTION TO EMBEDDED SYSTEM
1.1 Introduction
Embedded systems are inseparable part of our life. Whether we are at home or office or on
the move, we are always surrounding by embedded systems. Starting from home appliance
like TV, washing machine and system like printer and elevator in workplace to the
automobiles and automatic traffic control system are all example of embedded system. All
kind of magazines and journals regularly dish out detail about latest technologies, new
devices; fast applications which make us believe that our basic survival is controlled by these
embedded product.
1.2 Definition
Embedded system is a combination of Hardware and Software design to meet a specific need
with performance in given time frame.
Fig.1.1 Embedded System Hardware
3
Unlike a general purpose computer, such as a PC, an embedded system performs predefined
task. Usually, very specific tasks design engineers can optimize it by reducing the size and
cost of the product. The core of any embedded system is formed by one or several
microprocessor or micro controller programmed to perform a specific task. One of the most
critical needs of the embedded system is to decrease power consumptions and space. This can
be achieved by integrating more functions into the CPU chips.
1.3 Parts of an Embedded System
An embedded systems is an combination of hardware and software to perform a particular
task, so it have different component (as shown in below block diagram) which are as follow
Fig. 1.2 Parts of an Embedded System
a. Hardware:-Today there are so many devices which are use in daily life like TV,
Computer, washing machine etc, which can physical contact externally that’s
hardware i.e. hardware is a device or a part of embedded system which is externally
interface with user like controller, IC’S, sensor’s etc. Embedded system just like
human body in human body hands, legs, etc are similar to hardware.
b. Software:-As we discuss in hardware that the hands, legs etc are similar to hardware
whereas the brain is software which is responsible to any movement in the body part
similarly the software is a set of program that are followed by hardware. Generally
for software programming, we are using an HDL, ASSEMBLE language, and High
level language, like C, C++, JAVA etc.
c. Input:-As our body has five senses which work as input signal to the body and
according to input the body complete different work similarly in Embedded system
the input is given to system and then input are processed in the system.
d. Output:-The input is given to our body with the help of five senses and take an action
according to input similarly in Embedded system according to input we get the
output.
HARDWARE
+
SOFTWARE
INPUT OUTPUT
4
1.4 Embedded Systems in Today’s Industry
a. Telecom:-Mobile phone system, Modems, Routers.
b. Automotive Applications: - Braking system, Traction systems, Airbag Release
systems, Engine Management units, Steer-by-wire systems, Cruise control
applications.
c. Robotic:-Firefighting robots, Automatic floor cleaner, Robotic arm etc.
d. Aerospace applications:-Fight control systems, Engine controllers, Autopilots,
Passenger in fight entertainment system.
e. Medical equipment:-An aesthesia monitors systems, ECG machine, Pacemakers,
Drug delivery systems, MRI scanners.
f. Domestic appliance:-Dishwashers, Televisions, Washing machines, Microwave
ovens, VCRs, Video recorder, Security systems, Garage door controllers, Calculators,
Digital watches, Digital cameras, Remote controls, Treadmills.
g. Defense systems:-Radar systems, Fighter aircraft flight control systems, Radio
systems, Missile guidance systems.
h. Office automation:-Laser printers, Fax machines, Cash registers, Gas pumps,
Credit/Debit card readers, Thermostats, Grain analyzers.
1.5 Characteristics of Embedded Systems
a. They perform a single set of function.
b. Works in a time constrained environment.
c. Provide high performance and reliability.
d. Mostly Embedded systems have low cost because they are mass product in millions.
5
Chapter-2
ELECTRONIC COMPONENTS IN EMBEDDED SYSTEM
2.1 Introduction
An electronic component is any indivisible electronic building block packaged in a discrete
form with two or more connecting leads or metallic pads. Components are intended to be
connected together, usually by soldering to a printed circuit board, to create an electronic
circuit with a particular function (for example an amplifier, radio receiver, or oscillator).
Components may be packaged singly (resistor, capacitor, transistor, diode etc.) or in more or
less complex groups as integrated circuits (operational amplifier, resistor array, logic gate
etc.). Active components are sometimes called devices rather than components.
2.2 Resistor
Resistance is a measure of the degree to which an object opposes the passage of an electric
current. The SI unit of resistance is ‘Ohm’. The quantity of resistance in a circuit determines
the amount of current flowing in the circuit for any given voltage applied to the circuit. It is
given as-
R=V/I
Where,
R- The resistance of the object usually measured in ohms, equivalent to volt/amp.
V- The potential difference across the object, usually measured in volts.
I- the current passing through the object, usually measured in amperes.
2.2.1 Color Coding of Resistor
The color band at the other end of the resistor is band1. Use the table below to find the two
digit number associated with the colors of bands 1 and 2. The band nearest the tolerance band
is the multiplier (or exponent) band - the digits associated with the first two color bands are
multiplied by 10 raised to the power indicated by the color of the multiplier band.
6
2.3 Capacitor
A capacitor is an electrical device that can store energy in the electric field between a pair of
closely spaced conductors (called plates). When voltage is applied to the capacitor, electric
charges of equal magnitude, but opposite polarity, build up on each plate. A capacitor is a
two terminal device that can store electric energy in the form of charged particles. The
voltage across a capacitor is proportional to the amount of charge stored. since it is not
possible to instantaneously move charge to or from a capacitor, it is not possible to
instantaneously change the voltage across a capacitor.
Q=CV
Where, C=Capacitance
V=Voltage across the capacitor
Capacitance is measured in ‘Farads’. A one Farad capacitor can store one Coulomb of charge
at one volt.
2.3.1 Energy Storage
A capacitor can store electric energy when disconnected from its charging circuit, so it can be
used like a temporary battery. Capacitors are common used in electronic devices to maintain
power supply while batteries are being changed. (This prevents loss of information in volatile
memory.) The energy in the capacitor is -
E= CV2 /2
Capacitors are used in power supplies where they smooth the output of a full or half wave
rectifier. They can also be used in charge pump circuits as the energy storage element in the
generation of higher voltages than the input voltage.
2.4 LEDs
A light emitting diode (LED) is a semiconductor device that emits incoherent narrow
spectrum light when electrically biased in the forward direction. This effect is a form of
electro luminescence. The color of the emitted light depends on the composition and
7
condition of the semi conducting material used, and can be infrared, visible or near
ultraviolet.
Fig. 2.1 LED
LEDs are available in a wide variety of sizes and shapes. The 'standard' LED has a round
cross section of 5mm diameter and this is probably the best type for general use, but 3mm
round LEDs are also popular.
2.5 Photo Resistor
A photo resistor or light-dependent resistor (LDR) or photocell is a light-controlled variable
resistor. The resistance of a photo resistor decreases with increasing incident light intensity;
in other words, it exhibits photoconductivity. A photo resistor can be applied in light sensitive
Detector circuits, and light and dark activated switching circuits.
Fig. 2.2 LDR
A photo resistor is made of a high resistance semiconductor. In the dark, a photo resistor can
have a resistance as high as several mega ohms (MΩ), while in the light, a photo resistor can
have a resistance as low as a few hundred ohms.
2.6 Relay
Generally relay is an electromechanical switch which use switching purpose in embedded
system at a time when an interface is required between the high voltage (220-240V) and low
voltage (<15V). Commonly the relay have different pin package like 5-pin relay, 3-pin relay
etc. Mostly in embedded system we use only 5-pin relay configuration which is shown below.
8
a. NO (normally open): This pin normally open to the common pin.
b. NC (normally closed): This pin normally connected to common pin.
c. COM (common): This pin normally connected to NC after excitation it change
connectivity from NC to NO pin.
d. Pin-1, Pin-2: These to pin are connected to power for excitation relay for switching
from NC to NO.
Fig.2.3 Relay
At pin-1 the input from mc is feed as it‘s input for relay i.e. pin is either connected 5v or 0v.
If input at pin-1 is 1 then the COM pin connectivity is change from NC to NO and current
flow through the common to NO to led i.e. circuit complete and if the pin -1 is zero then
circuit is open and no current flow through it. Here 1, 0 represent high and low level.
2.7 Oscillator
Fig. 2.4 Quartz Crystal Oscillator
A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a
vibrating crystal of piezoelectric material to create an electrical signal with a very precise
frequency. This frequency is commonly used to keep track of time (as in quartz
wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize
frequencies for radio transmitters and receivers. The most common type of piezoelectric
resonator used is the quartz crystal, so oscillator circuits incorporating them became known
as crystal oscillators, but other piezoelectric materials including polycrystalline ceramics are
used in similar circuits.
9
2.8Transistors
1. NPN-BC546BC547,BC548,BC549,BC550
2. PNP-BC557
BC548 is an NPN bi-polar junction transistor. A transistor, stands for transfer of resistance, is
commonly used to amplify current.
Fig. 2.5 BC548 Transistor
2.9 7-Segments Display
A seven segment display is the most basic electronic display device that can display digits
from 0-9. They find wide application in devices that display numeric information like digital
clocks, radio, microwave ovens etc.
.
Fig. 2.6 7-Segment Display
10
Chapter-3
INTERFACING ICs
3.1 Introduction
Interfacing ICs (integrated circuit) are the devices which are used to make an interface
between microcontroller to the sensors or output device. Here sensor’s mean the input to the
microcontroller.
“An IC which is use to communicate with peripheral part to the microcontroller and
microcontroller to peripheral part of an circuit is called Interfacing IC.
Fig. 3.1 Microcontroller with Interfacing ICs
3.2 Voltage Regulating IC
The KA78XX/KA78XXA series of three-terminal positive regulator are available in the TO-
220/D-PAK package and with several fixed output voltages, making them useful in a wide
range of applications. If adequate heat sinking is provided, they can deliver over 1A output
current. Although designed primarily as fixed voltage regulators, these devices can be used
with external components to obtain adjustable voltages and currents.
3.2.1 Features
a. Output current up to 1Amp.
b. Output voltages of 5, 6, 8, 9, 10, 12, 18, 24.
c. Thermal overload protection.
d. Short circuit protection.
Microcontroller interfacing
ic
interfacing
ic OUTPUT DEVICESENSOR
11
3.2.2 7805 IC
7805 is three terminal device namely input, ground, output.Input signal reffer to an
unregulated dc voltage and output reffer to an 5v regulated dc voltage which is require to an
microcontroller. Ground is require for any circuit similarly in 7805 the third terminal is
ground.
Fig. 3.2. 7805 IC
Specifications
a. Input voltage (5V-18V)
b. Grounds (0V)
c. Regulated output; 5V (4.8V-5.2V)
3.3 The 555 Timer IC
The NE555 monolithic timing circuit is a highly stable controller capable of producing
accurate time delays or oscillation. In the time delay mode of operation, the time is precisely
controlled by one external resistor and capacitor. For a stable operation as an oscillator, the
free running frequency and the duty cycle are both accurately controlled with two external
resistors and one capacitor. The circuit may be triggered and reset on falling waveforms, and
the out- put structure can source or sink up to 200mA.
3.3.1 PIN Configuration
Fig. 3.3 Pin Configuration of 555 Timers IC
12
3.3.2 Mode of Operation of NE/SA/SE 555 Timer IC
Three mode of oscillations are used that are as follows-
a. Monostable Mode
b. Bistable Mode
c. Astable Mode
3.3.3 Application of 555 Timers IC
a. For generating wave form i.e. use 555 as an oscillator.
b. To triggering purpose we use 555 IC.
c. Sometime its use in synchronization between transmitter and receiver.
3.4 LM324 IC
LM324 is a 14pin IC consisting of four independent operational amplifiers (op-amps)
compensated in a single package. Op-amps are high gain electronic voltage amplifier with
differential input and, usually, a single-ended output. The output voltage is many times higher
than the voltage difference between input terminals of an op-amp. These op-amps are
operated by a single power supply and need for a dual supply is eliminated.
They can be used as amplifiers, comparators, oscillators, rectifiers etc. The conventional op-
amp applications can be more easily implemented with LM324.
Fig. 3.4 LM 324 IC
13
3.5 LCD [Liquid Crystal Display-JHD162A]
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in
various devices and circuits. These modules are preferred over seven segments and other
multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have
no limitation of displaying special & even custom characters (unlike in seven
segments), animations and so on.
Fig. 3.5 JHD16 2A
Table 3.1
Pin Configuration for LCD
PIN 1 VSS
PIN 2 VCC
PIN 3 VEE
PIN 4 RS
PIN 5 R/W
PIN 6 EN
PIN 7 D0
D1
PIN 8 D1
PIN 9 D2
PIN 10 D3
PIN 11 D4
PIN 12 D5
14
PIN 13 D6
PIN 14 D7
PIN 15 Backlight +
PIN 16 Backlight GND
3.6 Motor Driver IC-L293D
L293D is a dual H-Bridge motor driver integrated circuit (IC). Motor drivers act as current
amplifiers since they take a low-current control signal and provide a higher-current signal.
This higher current signal is used to drive the motors.
Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in
clockwise and anticlockwise directions, respectively.
Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start
operating. When an enable input is high, the associated driver gets enabled. The outputs
become active and work in phase with their inputs. Similarly, when the enable input is low,
that driver is disabled, and their outputs are off and in the high-impedance state.
3.6.1 PIN Diagram
Fig. 3.6 L293D
15
Table 3.2
Pin Description of L293d
Pin
No
Function Name
1 Enable pin for Motor 1; active high Enable 1,2
2 Input 1 for Motor 1 Input 1
3 Output 1 for Motor 1 Output 1
4 Ground (0V) Ground
5 Ground (0V) Ground
6 Output 2 for Motor 1 Output 2
7 Input 2 for Motor 1 Input 2
8 Supply voltage for Motors; 9-12V (up to 36V) Vcc 2
9 Enable pin for Motor 2; active high Enable 3,4
10 Input 1 for Motor 1 Input 3
11 Output 1 for Motor 1 Output 3
12 Ground (0V) Ground
13 Ground (0V) Ground
14 Output 2 for Motor 1 Output 4
15 Input2 for Motor 1 Input 4
16 Supply voltage; 5V (up to 36V) Vcc 1
16
Chapter-4
MICROCONTROLLER
4.1 Introduction
Circumstance that we find ourselves in today in the field of microcontrollers had their
beginning in the development of technology of integrated circuits. This development has
made it possible to store hundreds of thousands of transistor into one chip. That was a
prerequisite for production of microprocessors, and the first computers were made by adding
external peripherals such as memory, input-output lines, timers and other. Further increasing
of volume of the package resulted in creation of integrated circuits. These integrated circuits
contain both processor and peripherals. The first microcontroller 8051 was developed by
“Intel Corporation” in 1981. It was called as a “system on chip”. Intel refers to it as MCS-51.
4.2 Definition of a Microcontroller
Microcontroller has a CPU, in addition with a fixed amount of RAM, ROM and other
peripherals all embedded on a single chip. At times it is also termed as a mini computer or a
computer on a single chip. For example, the remote control you are using probably has
microcontrollers inside that do decoding and other controlling functions. They are used in
automobiles, washing machines, microwave ovens, toys…etc., where automation is needed.
Fig. 4.1 Microcontroller
The key feature of microcontrollers include
a. High integration of functionality
b. Field programmability, flexibility
c. Easy to use
17
4.3 Microprocessor
Microprocessor is an IC which has only the CPU inside them i.e. only the processing powers.
These microprocessors don’t have RAM, ROM, and other peripheral on the chip. A system
designer has to add them externally to make them functional. Application of microprocessor
includes Desktop PC’s, Laptops, notepads etc.
Table 4.1
Comparison Between Microcontroller And Microprocessor
Microprocessor Microcontroller
The functional blocks are ALU,
registers, timing & control units
It includes functional blocks of
microprocessors & in addition has
timer, parallel i/o, RAM, EPROM,
ADC & DAC
Bit handling instruction is less, One
or two type only
Many type of bit handling instruction
Rapid movements of code and
data between external memory & MP
Rapid movements of code and
data within MC
It is used for designing general
purpose digital computers system
They are used for designing
application specific dedicated
systemsThree criteria for choosing a microcontroller are as follow:
a. Meeting and computing needs of task hand efficiently and cost effectively.
b. Availability software and hardware development tool such as compiler, assembler,
debugger etc.
c. Wide availability and reliable source of microcontroller.
18
Chapter-5
ARDUINO
5.1 Introduction
Arduino is an open source prototyping platform on easy-to-use hardware and software.
Arduino boards are able input-light on a sensor, a figure on button, or twitter message and run
it into an output activating a motor, turning on a led, publishing something online etc. All this
is defined by a set of instruction programmed through Arduino software (IDE)..
5.2 Features of Arduino
The different features of an Arduino are as follow
a. Inexpensive
b. Cross-platform
c. Simple programming
d. Open source and extensible software
5.3 History of Arduino
Arduino, sold as Genuino, due to a trademark dispute, outside the U.S. and U.K., is a
hardware and software company, project, and user community that designs and manufactures
computer open-source hardware, open-source software, and microcontroller-based kits for
building digital devices and interactive objects that can sense and control physical devices.
The first Arduino was introduced in 2005, aiming to provide a low cost, easy way for novices
and professionals to create devices that interact with their environment using sensors and
actuators. Common examples of such devices intended for beginner hobbyists include simple
robots, thermostats, and motion detectors.
5.4 Arduino UNO Board
Arduino have different type of board or configuration in all configure the Arduino UNO is
the best board to get started with electronics and coding. It is microcontroller board based on
ATmega328P. It has 14 digital I/O pins (of 6 can be used PWM pin), 6 analog inputs, a
16MHz quartz crystal, a USB connection, a power jack, an ICSP header and reset button. It
19
contain everything needed to support the microcontroller, simply connect it to computer with
a USB cable or power from adapter(5v) or battery to get started.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version1.0 will be the reference versions of Arduino, moving forward. The Uno is
the latest in a series of USB.
Fig. 5.1 Arduino UNO Board.
Table 5.1
Specification of Arduino Uno Board
Microcontroller ATmega328
Operating voltage 5v
Input voltage(recommended) 7-12v
Input voltage(limit) 0-20v
Digital I/O pins 14 pin
PWM pin 6 pin
Analog input pin 6 pin
DC current for3.3v pin 50Ma
DC current per I/O pin 20Ma
Flash memory 32kb(ATmega238P)
of which 0.5kb used by boot loader
SRAM 2KB
EEPROM 1KB
Clock sped 16 MHz
Length 68.6 mm
20
Width 53.4 mm
Weight 25 M
5.4.1 Pin description of Arduino UNO Board
Power pin (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). 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.
3.3V A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
GND. Ground pins.
Input and Output pin
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, arising or falling edge, or a change in value. See the attach Interrupt () function for
details.
PWM 3, 5, 6, 9, 10, and 11Provide 8-bit PWM output with the analogWrite() function.
SPI 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK) These pins support SPI communication,
which, although provided by the underlying hardware, is not currently included in the
Arduino language.
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.
Reset Bring this line LOW to reset the microcontroller.
21
5.5 Pin Mapping of ATmega328 with Arduino
The device is manufactured using Atmel’s high density nonvolatile 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.
Fig. 5.2 ATmega328
I/O pin
a. Analog pin: Pin 23, pin 24, pin 25, pin 26, pin 27, pin 28 are the analog pin which
have an input and output in analog form.
b. Digital pin: Pin(1,2,3,4,5,6,11,12,13,14,19,18,17,16,15) are the digital which are
processed output and input in the form of digital.
Power pin Vcc (pin 7), GND(pin 22 and pin8), AREF(pin 21), Vcc(pin 20).
Communicative pin
a. RXD(pin 2): This pin receives the serially transmitted data.
b. TXD(pin 3): This pin transmits data serially to peripheral part.
22
Chapter-6
ARDUINO PROGRAMMING
6.1 Introduction
The Arduino runs a simplified version of the C programming language, with some extensions
for accessing the hardware. All Arduino instructions are one line. The board can hold a
program hundreds of lines long and has space for about 1,000 two-byte variables. The
Arduino executes programs at about 300,000 source code lines per sec.
6.2 Creating a Program
Programs are created in the Arduino development environment and then downloaded to the
Arduino board. Code must be entered in the proper syntax which means using valid
command names and a valid grammar for each code line. The compiler will catch and flag
syntax errors before download. Sometimes the error message can be cryptic and you have to
do a bit of hunting because the actual error occurred before what was flagged.
6.3 Structure
The basic structure of the Arduino programming language is fairly simple and runs in at least
two parts. These two required parts, or functions, enclose blocks of statements.
void setup()
{
statements;
}
void loop()
{
statements;
}
6.4 Programming Commands
23
setup()
The setup() function is called once when your program starts. Use it to initialize pin modes,
or begin serial. It must be included in a program even if there are no statements to run.
void setup()
{
pinMode(pin, OUTPUT); // sets the 'pin' as output }
loop()
After calling the setup() function, the loop() function does precisely what its name suggests,
and loops consecutively, allowing the program to change, respond, and control the Arduino
board.
void loop()
{
digitalWrite(pin, HIGH); // turns 'pin' on }
high/low
These constants define pin levels as HIGH or LOW and are used when reading or writing to
digital pins. HIGH is defined as logic level 1, ON, or 5 volts while LOW is logic level 0,
OFF, or 0 volts.
digitalWrite(13, HIGH);
input/output
Constants used with the pinMode() function to define the mode of a digital pin as either
INPUT or OUTPUT.
pinMode(13, OUTPUT);
if
24
if statements test whether a certain condition has been reached, such as an analog value being
above a certain number, and executes any statements inside the brackets if the statement is
true. If false the program skips over the statement. The format for an if test is:
if (someVariable ?? value)
{
doSomething;
}
if… else
if… else allows for ‘either-or’ decisions to be made. If the input was LOW, it is write that
this way:
if (inputPin == HIGH)
{
doThingA;
}
else
{
doThingB;
}
else can also precede another if test, so that multiple, mutually exclusive tests can be run at
the same time. It is even possible to have an unlimited number of these else branches.
for
The ‘for’ statement is used to repeat a block of statements enclosed in curly braces a specified
number of times. An increment counter is often used to increment and terminate the loop.
There are three parts, separated by semicolons (;), to the for loop header:
25
for (initialization; condition; expression)
{
doSomething;
}
pinMode(pin, mode)
Used in void setup() to configure a specified pin to behave either as an INPUT or an
OUTPUT.
pinMode(pin, OUTPUT); // sets ‘pin’ to output
Arduino digital pins default to inputs, so they don't need to be explicitly declared as inputs
with pinMode(). Pins configured as INPUT are said to be in a high-impedance state.
digitalRead(pin)
Reads the value from a specified digital pin with the result either HIGH or LOW. The pin can
be specified as either a variable or constant (0-13).
value = digitalRead(Pin); // sets 'value' equal to the input pin
digitalWrite(pin, value)
Outputs either logic level HIGH or LOW at (turns on or off) a specified digital pin. The pin
can be specified as either a variable or constant (0-13).
digitalWrite(pin, HIGH); // sets 'pin' to high
The following example reads a pushbutton connected to a digital input and turns on an LED
connected to a digital output when the button has been pressed:
digitalWrite(led, value); // sets 'led' to the
analogRead(pin)
Reads the value from a specified analog pin with a 10-bit resolution. This function only
works on the analog in pins (0-5). The resulting integer values range from 0 to 1023.
26
value = analogRead(pin); // sets 'value' equal to 'pin'
Note: Analog pins unlike digital ones, do not need to be first declared as INPUT nor
OUTPUT.
analogWrite(pin, value)
Writes a pseudo-analog value using hardware enabled pulse width modulation (PWM) to an
output pin marked PWM. On newer Arduinos with the ATmega168 chip, this function works
on pins 3, 5, 6, 9, 10, and 11. Older Arduinos with an ATmega8 only support pins 9, 10, and
11. The value can be specified as a variable or constant with a value from 0-255.
analogWrite(pin, value); // writes 'value' to analog 'pin'
delay(ms)
Pauses a program for the amount of time as specified in milliseconds, where 1000 equals 1
second.
delay(1000); // waits for one second
Serial.begin(rate)
Opens serial port and sets the baud rate for serial data transmission. The typical baud rate for
communicating with the computer is 9600 although other speeds are supported.
Serial.begin(9600); // opens serial port sets data rate to 9600 bps
Note: When using serial communication, digital pins 0 (RX) and 1 (TX) cannot be used at
the same time.
Serial.println(data)
Prints data to the serial port, followed by an automatic carriage return and line feed. This
command takes the same form as Serial.print(), but is easier for reading data on the Serial
Monitor.
Serial.println(analogValue); // sends the value of 'analogValue'
27
Chapter-7
SENSORS
7.1 Introduction
In the broadest definition, a sensor is an object whose purpose is to detect events or changes
in its environment, and then provide a corresponding output. A sensor is a type of transducer;
sensors may provide various types of output, but typically use electrical or optical signals.
Sensors are used in everyday objects such as touch-sensitive elevator buttons (tactile sensor)
and lamps which dim or brighten by touching the base, besides innumerable applications of
which most people are never aware. With advances in micromachinery and easy-to-use micro
controller platforms, the uses of sensors have expanded beyond the most traditional fields of
temperature, pressure or flow measurement, for example into MARG sensors. Sensors that
we will study in training duration are given below:
7.2 Passive infrared sensor
A passive infrared sensor (PIR sensor) is an electronic sensor that measures infrared (IR)
light radiating from objects in its field of view. They are most often used in PIR-based
motion detectors.
Fig 7.1: Passive Infrared Sensor
All objects with a temperature above absolute zero emit heat energy in the form of radiation.
Usually this radiation isn't visible to the human eye because it radiates at infrared
wavelengths, but it can be detected by electronic devices designed for such a purpose.
The term passive in this instance refers to the fact that PIR devices do not generate or radiate
any energy for detection purposes. They work entirely by detecting the energy given off by
other objects. PIR sensors don't detect or measure "heat"; instead they detect the infrared
radiation emitted or reflected from an object.
28
7.3 Ultrasound Sensor
Ultrasonic sensors are based on measuring the properties of sound waves with frequency
above the human audible range. They are based on three physical principles: time of flight,
the Doppler Effect, and the attenuation of sound waves. Ultrasonic sensors are non-intrusive
in that they do not require physical contact with their target, and can detect certain clear or
shiny targets otherwise obscured to some vision-based sensors. On the other hand, their
measurements are very sensitive to temperature and to the angle of the target.
Fig 7.2: Ultrasonic Sensor
Ultrasonic sensors “are based on the measurement of the properties of acoustic waves with
frequencies above the human audible range,” often at roughly 40 kHz. They typically operate
by generating a high-frequency pulse of sound, and then receiving and evaluating the
properties of the echo pulse.
7.4 Gas detector
A gas detector is a device that detects the presence of gases in an area, often as part of
a safety system. This type of equipment is used to detect a gas leak and interface with
a control system so a process can be automatically shut down. A gas detector can sound an
alarm to operators in the area where the leak is occurring, giving them the opportunity to
leave. This type of device is important because there are many gases that can be harmful to
organic life, such as humans or animals. They may be used in firefighting.
Fig 7.3: Gas Sensor
7.5 Soil moisture sensor
Soil moisture sensors measure the volumetric water content in soil. Since the
direct gravimetric measurement of free soil moisture requires removing, drying, and
29
weighting of a sample, soil moisture sensors measure the volumetric water content indirectly
by using some other property of the soil, such as electrical resistance, dielectric constant, or
interaction with neutrons, as a proxy for the moisture content. The relation between the
measured property and soil moisture must be calibrated and may vary depending on
environmental factors such as soil type, temperature, or electric conductivity.
Reflected microwave radiation is affected by the soil moisture and is used for remote
sensing in hydrology and agriculture. Portable probe instruments can be used by farmers or
gardeners.
Fig 7.4: Moisture Sensor
7.6 Bluetooth
The HC-05 Bluetooth Module has 6 pins- Vcc, GND, TX, RX, Key, and LED.
It comes pre-programmed as a slave, so there is no need to connect the Key pin, unless you
need it change it to Master Mode.
Fig 7.5 Bluetooth Module
The major difference between Master and Slave modes is that, in Slave mode the Bluetooth
module cannot initiate a connection; it can however accept incoming connections. After the
connection is established the Bluetooth module can transmit and receive data regardless of
the mode it is running in. If you are using a phone to connect to the Bluetooth module, you
can simply use it in the Slave mode. The default data transmission rate is 9600kbps.
The range for Bluetooth communication is usually 30m or less. The module has a factory set
pin of “1234” which is used while pairing the module to a phone.
30
CONCLUSION
Embedded systems have come a long way since their inception. Today, some toilets and
toasters can tweet about what they’re upto. From smart clothing to smart banking, embedded
systems have accentuated technology’s growth by manifold.
With growth and advancements in the field of electronics, wireless communications,
networking, cognitive and affective computing and robotics, devices around you
communicate in more ways than you ever imagined. Those times are not very distant when
every object around us will have a small processor/sensor embedded within itself, invisible to
us but still communicating with all other devices around, making our lives more connected
and accessible than ever before. The future of embedded systems lies in the advancement of
technologies that enable faster communications, heavy data storage capacities and highly
interwoven connections among the devices. Before diving into the enormous number of
applications of embedded systems. In many major countries also, Precision farming has
gained a lot of traction. In Holland, presently Driverless tractors are being developed using
Real Time Kinematic and GPS. It is proven to be quite effective and cost efficient for large
farmlands Researchers at MIT have setup a Distributed Robot Garden, which is a garden
consisting of Tomato plants that are nurtured by Robots.
The digital revolution now has reached to a stage where we cannot conduct our normal
modern daily lives without this technology. Indeed, it is reasonable to say that everyone
already owns at least one piece of equipment, which contains a processor or microcontroller
in it. If embedded systems are to become a serious discipline to contribute in progression of
the Indian economy and global demand in general, it is imperative that our proven expertise
in IT software should play a crucial role in developing talent with the required skills.
31
REFERENCES
[1] Mohammad Ali Mazidi and Janice Gillespie Mazidi, “The 8051 Microcontroller and
embedded system”
[2] Douglas H. Williams “Electronics Device”: McGraw-Hill, 2003,.
[3] Brian W. Evans, “Arduino Programming”, McGraw-Hill, 2007
[4] http://www.wikipedia.org/wiki/Embedded System
[5] http://en.m.wikipedia.org/wiki/product.
[6] http://www.Arduino.cc.
[7] http:// en.wikipedia.org/wiki/Simulation.
[8] http://www.engineersgarage.com/8051-microcontroller.
32
Appendix: A
LIST OF FIGURES
Fig. No. Fig. Name Page No.
Fig.1.1 Embedded System Hardware (2)
Fig.1.2 Parts of Embedded System (3)
Fig.2.1 LED (7)
Fig.2.2 LDR (7)
Fig.2.3 Relay (8)
Fig.2.4 Quartz Crystal Oscillator (8)
Fig.2.5 BC548 Transistor (9)
Fig.2.6 7-Segment Display (9)
Fig.3.1 Microcontroller with Interfacing ICs (10)
Fig.3.2 7805 IC (11)
Fig.3.3 555 Timer IC (11)
Fig.3.4 LM324 IC (12)
Fig.3.5 JHD16 2A (13)
Fig.3.6 L293D (14)
Fig.4.1 Microcontroller (15)
Fig.5.1 Arduino UNO board (18)
Fig.5.2 ATmega328 (20)
Fig.7.1 Passive Infrared Sensor (27)
Fig.7.2 Ultrasonic Sensor (28)
33
Fig.7.3 Gas Sensor (28)
Fig.7.4 Moisture Sensor (29)
Fig.7.5 Bluetooth Module (29)
34
Appendix: B
LIST OF TABLES
Table No. Table Name Page No.
Table 3.1 Pin description of LCD (13-14)
Table 3.2 Pin Description L293D IC (14)
Table 4.1 Comparison between Microcontroller and
Microprocessor (16)
Table 5.1 Specification of Arduino UNO Board (18-19)

Contenu connexe

Tendances

Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Mahmoud Sadat
 
Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Chintan Patel
 
Arduino : how to get started
Arduino : how to get startedArduino : how to get started
Arduino : how to get started동호 손
 
Ppt gsm based automatic energy meter
Ppt gsm based automatic energy meterPpt gsm based automatic energy meter
Ppt gsm based automatic energy meterKhiti Ranjan jena
 
Smart street lighting control system project PPT
Smart street lighting control system project PPT Smart street lighting control system project PPT
Smart street lighting control system project PPT PetchiMuthu26
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded systemram avtar
 
Project ideas ece students
Project ideas ece studentsProject ideas ece students
Project ideas ece studentsVatsal N Shah
 
Electronics Projects List for Engineering Students
Electronics Projects List for Engineering StudentsElectronics Projects List for Engineering Students
Electronics Projects List for Engineering StudentsElectronics Hub
 
automatic street light
automatic street lightautomatic street light
automatic street lightAnish Anand
 
project report on fire alarm
project report on fire alarmproject report on fire alarm
project report on fire alarmRattan Pal
 
Electrical and electronics engineering projects list
Electrical and electronics engineering projects listElectrical and electronics engineering projects list
Electrical and electronics engineering projects listGaurav Mishra
 
Arduino based electronic notice board and controlling of home appliances by u...
Arduino based electronic notice board and controlling of home appliances by u...Arduino based electronic notice board and controlling of home appliances by u...
Arduino based electronic notice board and controlling of home appliances by u...Nunna Swathi
 
Automatic Room Lights Controller Using Arduino & PIR Sensor
Automatic Room Lights Controller Using Arduino & PIR SensorAutomatic Room Lights Controller Using Arduino & PIR Sensor
Automatic Room Lights Controller Using Arduino & PIR SensorAnkit Chaudhary
 
Training Report on Embedded System
Training Report on Embedded SystemTraining Report on Embedded System
Training Report on Embedded SystemRoshan Mani
 
Electronics and communication
 Electronics and communication  Electronics and communication
Electronics and communication shashank jaiswal
 
MINI ELECTRICAL PROJECT
MINI ELECTRICAL PROJECTMINI ELECTRICAL PROJECT
MINI ELECTRICAL PROJECTananthavignesh
 
Electricity theft control
Electricity theft controlElectricity theft control
Electricity theft controlAffable Mee
 

Tendances (20)

Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller
 
Jumper wires
Jumper wiresJumper wires
Jumper wires
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 
Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)
 
Arduino : how to get started
Arduino : how to get startedArduino : how to get started
Arduino : how to get started
 
Ppt gsm based automatic energy meter
Ppt gsm based automatic energy meterPpt gsm based automatic energy meter
Ppt gsm based automatic energy meter
 
Smart street lighting control system project PPT
Smart street lighting control system project PPT Smart street lighting control system project PPT
Smart street lighting control system project PPT
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded system
 
Project ideas ece students
Project ideas ece studentsProject ideas ece students
Project ideas ece students
 
Electronics Projects List for Engineering Students
Electronics Projects List for Engineering StudentsElectronics Projects List for Engineering Students
Electronics Projects List for Engineering Students
 
automatic street light
automatic street lightautomatic street light
automatic street light
 
project report on fire alarm
project report on fire alarmproject report on fire alarm
project report on fire alarm
 
Electrical and electronics engineering projects list
Electrical and electronics engineering projects listElectrical and electronics engineering projects list
Electrical and electronics engineering projects list
 
Arduino based electronic notice board and controlling of home appliances by u...
Arduino based electronic notice board and controlling of home appliances by u...Arduino based electronic notice board and controlling of home appliances by u...
Arduino based electronic notice board and controlling of home appliances by u...
 
Automatic Room Lights Controller Using Arduino & PIR Sensor
Automatic Room Lights Controller Using Arduino & PIR SensorAutomatic Room Lights Controller Using Arduino & PIR Sensor
Automatic Room Lights Controller Using Arduino & PIR Sensor
 
Training Report on Embedded System
Training Report on Embedded SystemTraining Report on Embedded System
Training Report on Embedded System
 
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC InterfacingPIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
 
Electronics and communication
 Electronics and communication  Electronics and communication
Electronics and communication
 
MINI ELECTRICAL PROJECT
MINI ELECTRICAL PROJECTMINI ELECTRICAL PROJECT
MINI ELECTRICAL PROJECT
 
Electricity theft control
Electricity theft controlElectricity theft control
Electricity theft control
 

Similaire à report on embedded system

A Smart Handheld Measuring and Testing Electronic Device with Touch Screen
A Smart Handheld Measuring and Testing Electronic Device with Touch ScreenA Smart Handheld Measuring and Testing Electronic Device with Touch Screen
A Smart Handheld Measuring and Testing Electronic Device with Touch ScreenIJTET Journal
 
N414 Documentation Data.docx
N414 Documentation Data.docxN414 Documentation Data.docx
N414 Documentation Data.docxRAGU83
 
Home automation System
Home automation SystemHome automation System
Home automation SystemNaman Gautam
 
Industrial monitoring and control system using android application
Industrial monitoring and control system using android applicationIndustrial monitoring and control system using android application
Industrial monitoring and control system using android applicationAvinash Vemula
 
Embedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijayEmbedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijayVijay Kumar
 
Gsm based smart card information for lost atm cards
Gsm based smart card information for lost atm cardsGsm based smart card information for lost atm cards
Gsm based smart card information for lost atm cardsSomanchi Aditya
 
Report on automatic door
Report on automatic doorReport on automatic door
Report on automatic doorIndira Kundu
 
Embedded Patient Monitoring System
Embedded Patient Monitoring System Embedded Patient Monitoring System
Embedded Patient Monitoring System ijesajournal
 
Gesture control robot using accelerometer documentation
Gesture control robot using accelerometer documentationGesture control robot using accelerometer documentation
Gesture control robot using accelerometer documentationRajendra Prasad
 
Density based traffic light controlling (2)
Density based traffic light controlling (2)Density based traffic light controlling (2)
Density based traffic light controlling (2)hardik1240
 
Design of wireless sensor network for building management systems
Design of wireless sensor network for building management systemsDesign of wireless sensor network for building management systems
Design of wireless sensor network for building management systemsTSriyaSharma
 
Thesis on Solar Based Hecto Robotic Vehicle
Thesis on Solar Based Hecto Robotic VehicleThesis on Solar Based Hecto Robotic Vehicle
Thesis on Solar Based Hecto Robotic VehicleAkhil Reddy Rondla
 
smart home automation system
smart home automation systemsmart home automation system
smart home automation systemMdSaifuddinQuader
 
IRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control SystemIRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control SystemIRJET Journal
 

Similaire à report on embedded system (20)

A Smart Handheld Measuring and Testing Electronic Device with Touch Screen
A Smart Handheld Measuring and Testing Electronic Device with Touch ScreenA Smart Handheld Measuring and Testing Electronic Device with Touch Screen
A Smart Handheld Measuring and Testing Electronic Device with Touch Screen
 
N414 Documentation Data.docx
N414 Documentation Data.docxN414 Documentation Data.docx
N414 Documentation Data.docx
 
Home automation System
Home automation SystemHome automation System
Home automation System
 
Industrial monitoring and control system using android application
Industrial monitoring and control system using android applicationIndustrial monitoring and control system using android application
Industrial monitoring and control system using android application
 
Embedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijayEmbedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijay
 
Gsm based smart card information for lost atm cards
Gsm based smart card information for lost atm cardsGsm based smart card information for lost atm cards
Gsm based smart card information for lost atm cards
 
Report on automatic door
Report on automatic doorReport on automatic door
Report on automatic door
 
Embedded Patient Monitoring System
Embedded Patient Monitoring System Embedded Patient Monitoring System
Embedded Patient Monitoring System
 
Gesture control robot using accelerometer documentation
Gesture control robot using accelerometer documentationGesture control robot using accelerometer documentation
Gesture control robot using accelerometer documentation
 
Density based traffic light controlling (2)
Density based traffic light controlling (2)Density based traffic light controlling (2)
Density based traffic light controlling (2)
 
Design of wireless sensor network for building management systems
Design of wireless sensor network for building management systemsDesign of wireless sensor network for building management systems
Design of wireless sensor network for building management systems
 
Thesis on Solar Based Hecto Robotic Vehicle
Thesis on Solar Based Hecto Robotic VehicleThesis on Solar Based Hecto Robotic Vehicle
Thesis on Solar Based Hecto Robotic Vehicle
 
V01 i010403
V01 i010403V01 i010403
V01 i010403
 
Smart home automation system
Smart home automation systemSmart home automation system
Smart home automation system
 
proj (2)
proj (2)proj (2)
proj (2)
 
smart home automation system
smart home automation systemsmart home automation system
smart home automation system
 
IRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control SystemIRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control System
 
Embedded two mark question
Embedded two mark questionEmbedded two mark question
Embedded two mark question
 
E044081720
E044081720E044081720
E044081720
 
lcd
lcdlcd
lcd
 

Dernier

Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfrs7054576148
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 

Dernier (20)

Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 

report on embedded system

  • 1. 1 ABSTRACT This seminar project is a summer training based submitted in partial fulfilment of requirements for the degree of Bachelor of Technology in electronics and communication engineering as per norms of Rajasthan Technical University, Kota (RAJ.). The main objective of this seminar project is present to “EMBEDDED SYSTEM” which studied during the summer training. Meaning of Embedded system is something in-built or fixes something. Embedded system is to dedicate to specific task. It is combination of software, hardware and it uses for a specific task. Embedded devices are run continuously for years without error. It starts quickly and people do not wait for output. 98% microprocessors are used as component of embedded system. My content is “Arduino”. It is provide the programme for circuit board. Arduino is an open- source prototyping platform based on easy-to-use hardware and software. The Arduino is really just an AVR 8-bit microcontroller with some extra hardware to make it faster to get up and running. That extra hardware includes: A USB-to-serial board so that you can easily program the microcontroller, as well as monitor the serial port from our computer. It can drive motors, LEDs, sensors, and other components. The software, too, is open-source, and it is growing through the contributions of users worldwide and language is used embedded C in it. The Arduino gives artists and designers the ability to use and modify computational hardware easily and inexpensively. The most influential to the Arduino are the processing language and the wiring microcontroller. Several different versions of the board have been created for art and design.
  • 2. 2 Chapter-1 INTRODUCTION TO EMBEDDED SYSTEM 1.1 Introduction Embedded systems are inseparable part of our life. Whether we are at home or office or on the move, we are always surrounding by embedded systems. Starting from home appliance like TV, washing machine and system like printer and elevator in workplace to the automobiles and automatic traffic control system are all example of embedded system. All kind of magazines and journals regularly dish out detail about latest technologies, new devices; fast applications which make us believe that our basic survival is controlled by these embedded product. 1.2 Definition Embedded system is a combination of Hardware and Software design to meet a specific need with performance in given time frame. Fig.1.1 Embedded System Hardware
  • 3. 3 Unlike a general purpose computer, such as a PC, an embedded system performs predefined task. Usually, very specific tasks design engineers can optimize it by reducing the size and cost of the product. The core of any embedded system is formed by one or several microprocessor or micro controller programmed to perform a specific task. One of the most critical needs of the embedded system is to decrease power consumptions and space. This can be achieved by integrating more functions into the CPU chips. 1.3 Parts of an Embedded System An embedded systems is an combination of hardware and software to perform a particular task, so it have different component (as shown in below block diagram) which are as follow Fig. 1.2 Parts of an Embedded System a. Hardware:-Today there are so many devices which are use in daily life like TV, Computer, washing machine etc, which can physical contact externally that’s hardware i.e. hardware is a device or a part of embedded system which is externally interface with user like controller, IC’S, sensor’s etc. Embedded system just like human body in human body hands, legs, etc are similar to hardware. b. Software:-As we discuss in hardware that the hands, legs etc are similar to hardware whereas the brain is software which is responsible to any movement in the body part similarly the software is a set of program that are followed by hardware. Generally for software programming, we are using an HDL, ASSEMBLE language, and High level language, like C, C++, JAVA etc. c. Input:-As our body has five senses which work as input signal to the body and according to input the body complete different work similarly in Embedded system the input is given to system and then input are processed in the system. d. Output:-The input is given to our body with the help of five senses and take an action according to input similarly in Embedded system according to input we get the output. HARDWARE + SOFTWARE INPUT OUTPUT
  • 4. 4 1.4 Embedded Systems in Today’s Industry a. Telecom:-Mobile phone system, Modems, Routers. b. Automotive Applications: - Braking system, Traction systems, Airbag Release systems, Engine Management units, Steer-by-wire systems, Cruise control applications. c. Robotic:-Firefighting robots, Automatic floor cleaner, Robotic arm etc. d. Aerospace applications:-Fight control systems, Engine controllers, Autopilots, Passenger in fight entertainment system. e. Medical equipment:-An aesthesia monitors systems, ECG machine, Pacemakers, Drug delivery systems, MRI scanners. f. Domestic appliance:-Dishwashers, Televisions, Washing machines, Microwave ovens, VCRs, Video recorder, Security systems, Garage door controllers, Calculators, Digital watches, Digital cameras, Remote controls, Treadmills. g. Defense systems:-Radar systems, Fighter aircraft flight control systems, Radio systems, Missile guidance systems. h. Office automation:-Laser printers, Fax machines, Cash registers, Gas pumps, Credit/Debit card readers, Thermostats, Grain analyzers. 1.5 Characteristics of Embedded Systems a. They perform a single set of function. b. Works in a time constrained environment. c. Provide high performance and reliability. d. Mostly Embedded systems have low cost because they are mass product in millions.
  • 5. 5 Chapter-2 ELECTRONIC COMPONENTS IN EMBEDDED SYSTEM 2.1 Introduction An electronic component is any indivisible electronic building block packaged in a discrete form with two or more connecting leads or metallic pads. Components are intended to be connected together, usually by soldering to a printed circuit board, to create an electronic circuit with a particular function (for example an amplifier, radio receiver, or oscillator). Components may be packaged singly (resistor, capacitor, transistor, diode etc.) or in more or less complex groups as integrated circuits (operational amplifier, resistor array, logic gate etc.). Active components are sometimes called devices rather than components. 2.2 Resistor Resistance is a measure of the degree to which an object opposes the passage of an electric current. The SI unit of resistance is ‘Ohm’. The quantity of resistance in a circuit determines the amount of current flowing in the circuit for any given voltage applied to the circuit. It is given as- R=V/I Where, R- The resistance of the object usually measured in ohms, equivalent to volt/amp. V- The potential difference across the object, usually measured in volts. I- the current passing through the object, usually measured in amperes. 2.2.1 Color Coding of Resistor The color band at the other end of the resistor is band1. Use the table below to find the two digit number associated with the colors of bands 1 and 2. The band nearest the tolerance band is the multiplier (or exponent) band - the digits associated with the first two color bands are multiplied by 10 raised to the power indicated by the color of the multiplier band.
  • 6. 6 2.3 Capacitor A capacitor is an electrical device that can store energy in the electric field between a pair of closely spaced conductors (called plates). When voltage is applied to the capacitor, electric charges of equal magnitude, but opposite polarity, build up on each plate. A capacitor is a two terminal device that can store electric energy in the form of charged particles. The voltage across a capacitor is proportional to the amount of charge stored. since it is not possible to instantaneously move charge to or from a capacitor, it is not possible to instantaneously change the voltage across a capacitor. Q=CV Where, C=Capacitance V=Voltage across the capacitor Capacitance is measured in ‘Farads’. A one Farad capacitor can store one Coulomb of charge at one volt. 2.3.1 Energy Storage A capacitor can store electric energy when disconnected from its charging circuit, so it can be used like a temporary battery. Capacitors are common used in electronic devices to maintain power supply while batteries are being changed. (This prevents loss of information in volatile memory.) The energy in the capacitor is - E= CV2 /2 Capacitors are used in power supplies where they smooth the output of a full or half wave rectifier. They can also be used in charge pump circuits as the energy storage element in the generation of higher voltages than the input voltage. 2.4 LEDs A light emitting diode (LED) is a semiconductor device that emits incoherent narrow spectrum light when electrically biased in the forward direction. This effect is a form of electro luminescence. The color of the emitted light depends on the composition and
  • 7. 7 condition of the semi conducting material used, and can be infrared, visible or near ultraviolet. Fig. 2.1 LED LEDs are available in a wide variety of sizes and shapes. The 'standard' LED has a round cross section of 5mm diameter and this is probably the best type for general use, but 3mm round LEDs are also popular. 2.5 Photo Resistor A photo resistor or light-dependent resistor (LDR) or photocell is a light-controlled variable resistor. The resistance of a photo resistor decreases with increasing incident light intensity; in other words, it exhibits photoconductivity. A photo resistor can be applied in light sensitive Detector circuits, and light and dark activated switching circuits. Fig. 2.2 LDR A photo resistor is made of a high resistance semiconductor. In the dark, a photo resistor can have a resistance as high as several mega ohms (MΩ), while in the light, a photo resistor can have a resistance as low as a few hundred ohms. 2.6 Relay Generally relay is an electromechanical switch which use switching purpose in embedded system at a time when an interface is required between the high voltage (220-240V) and low voltage (<15V). Commonly the relay have different pin package like 5-pin relay, 3-pin relay etc. Mostly in embedded system we use only 5-pin relay configuration which is shown below.
  • 8. 8 a. NO (normally open): This pin normally open to the common pin. b. NC (normally closed): This pin normally connected to common pin. c. COM (common): This pin normally connected to NC after excitation it change connectivity from NC to NO pin. d. Pin-1, Pin-2: These to pin are connected to power for excitation relay for switching from NC to NO. Fig.2.3 Relay At pin-1 the input from mc is feed as it‘s input for relay i.e. pin is either connected 5v or 0v. If input at pin-1 is 1 then the COM pin connectivity is change from NC to NO and current flow through the common to NO to led i.e. circuit complete and if the pin -1 is zero then circuit is open and no current flow through it. Here 1, 0 represent high and low level. 2.7 Oscillator Fig. 2.4 Quartz Crystal Oscillator A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits incorporating them became known as crystal oscillators, but other piezoelectric materials including polycrystalline ceramics are used in similar circuits.
  • 9. 9 2.8Transistors 1. NPN-BC546BC547,BC548,BC549,BC550 2. PNP-BC557 BC548 is an NPN bi-polar junction transistor. A transistor, stands for transfer of resistance, is commonly used to amplify current. Fig. 2.5 BC548 Transistor 2.9 7-Segments Display A seven segment display is the most basic electronic display device that can display digits from 0-9. They find wide application in devices that display numeric information like digital clocks, radio, microwave ovens etc. . Fig. 2.6 7-Segment Display
  • 10. 10 Chapter-3 INTERFACING ICs 3.1 Introduction Interfacing ICs (integrated circuit) are the devices which are used to make an interface between microcontroller to the sensors or output device. Here sensor’s mean the input to the microcontroller. “An IC which is use to communicate with peripheral part to the microcontroller and microcontroller to peripheral part of an circuit is called Interfacing IC. Fig. 3.1 Microcontroller with Interfacing ICs 3.2 Voltage Regulating IC The KA78XX/KA78XXA series of three-terminal positive regulator are available in the TO- 220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents. 3.2.1 Features a. Output current up to 1Amp. b. Output voltages of 5, 6, 8, 9, 10, 12, 18, 24. c. Thermal overload protection. d. Short circuit protection. Microcontroller interfacing ic interfacing ic OUTPUT DEVICESENSOR
  • 11. 11 3.2.2 7805 IC 7805 is three terminal device namely input, ground, output.Input signal reffer to an unregulated dc voltage and output reffer to an 5v regulated dc voltage which is require to an microcontroller. Ground is require for any circuit similarly in 7805 the third terminal is ground. Fig. 3.2. 7805 IC Specifications a. Input voltage (5V-18V) b. Grounds (0V) c. Regulated output; 5V (4.8V-5.2V) 3.3 The 555 Timer IC The NE555 monolithic timing circuit is a highly stable controller capable of producing accurate time delays or oscillation. In the time delay mode of operation, the time is precisely controlled by one external resistor and capacitor. For a stable operation as an oscillator, the free running frequency and the duty cycle are both accurately controlled with two external resistors and one capacitor. The circuit may be triggered and reset on falling waveforms, and the out- put structure can source or sink up to 200mA. 3.3.1 PIN Configuration Fig. 3.3 Pin Configuration of 555 Timers IC
  • 12. 12 3.3.2 Mode of Operation of NE/SA/SE 555 Timer IC Three mode of oscillations are used that are as follows- a. Monostable Mode b. Bistable Mode c. Astable Mode 3.3.3 Application of 555 Timers IC a. For generating wave form i.e. use 555 as an oscillator. b. To triggering purpose we use 555 IC. c. Sometime its use in synchronization between transmitter and receiver. 3.4 LM324 IC LM324 is a 14pin IC consisting of four independent operational amplifiers (op-amps) compensated in a single package. Op-amps are high gain electronic voltage amplifier with differential input and, usually, a single-ended output. The output voltage is many times higher than the voltage difference between input terminals of an op-amp. These op-amps are operated by a single power supply and need for a dual supply is eliminated. They can be used as amplifiers, comparators, oscillators, rectifiers etc. The conventional op- amp applications can be more easily implemented with LM324. Fig. 3.4 LM 324 IC
  • 13. 13 3.5 LCD [Liquid Crystal Display-JHD162A] LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on. Fig. 3.5 JHD16 2A Table 3.1 Pin Configuration for LCD PIN 1 VSS PIN 2 VCC PIN 3 VEE PIN 4 RS PIN 5 R/W PIN 6 EN PIN 7 D0 D1 PIN 8 D1 PIN 9 D2 PIN 10 D3 PIN 11 D4 PIN 12 D5
  • 14. 14 PIN 13 D6 PIN 14 D7 PIN 15 Backlight + PIN 16 Backlight GND 3.6 Motor Driver IC-L293D L293D is a dual H-Bridge motor driver integrated circuit (IC). Motor drivers act as current amplifiers since they take a low-current control signal and provide a higher-current signal. This higher current signal is used to drive the motors. Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in clockwise and anticlockwise directions, respectively. Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start operating. When an enable input is high, the associated driver gets enabled. The outputs become active and work in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and their outputs are off and in the high-impedance state. 3.6.1 PIN Diagram Fig. 3.6 L293D
  • 15. 15 Table 3.2 Pin Description of L293d Pin No Function Name 1 Enable pin for Motor 1; active high Enable 1,2 2 Input 1 for Motor 1 Input 1 3 Output 1 for Motor 1 Output 1 4 Ground (0V) Ground 5 Ground (0V) Ground 6 Output 2 for Motor 1 Output 2 7 Input 2 for Motor 1 Input 2 8 Supply voltage for Motors; 9-12V (up to 36V) Vcc 2 9 Enable pin for Motor 2; active high Enable 3,4 10 Input 1 for Motor 1 Input 3 11 Output 1 for Motor 1 Output 3 12 Ground (0V) Ground 13 Ground (0V) Ground 14 Output 2 for Motor 1 Output 4 15 Input2 for Motor 1 Input 4 16 Supply voltage; 5V (up to 36V) Vcc 1
  • 16. 16 Chapter-4 MICROCONTROLLER 4.1 Introduction Circumstance that we find ourselves in today in the field of microcontrollers had their beginning in the development of technology of integrated circuits. This development has made it possible to store hundreds of thousands of transistor into one chip. That was a prerequisite for production of microprocessors, and the first computers were made by adding external peripherals such as memory, input-output lines, timers and other. Further increasing of volume of the package resulted in creation of integrated circuits. These integrated circuits contain both processor and peripherals. The first microcontroller 8051 was developed by “Intel Corporation” in 1981. It was called as a “system on chip”. Intel refers to it as MCS-51. 4.2 Definition of a Microcontroller Microcontroller has a CPU, in addition with a fixed amount of RAM, ROM and other peripherals all embedded on a single chip. At times it is also termed as a mini computer or a computer on a single chip. For example, the remote control you are using probably has microcontrollers inside that do decoding and other controlling functions. They are used in automobiles, washing machines, microwave ovens, toys…etc., where automation is needed. Fig. 4.1 Microcontroller The key feature of microcontrollers include a. High integration of functionality b. Field programmability, flexibility c. Easy to use
  • 17. 17 4.3 Microprocessor Microprocessor is an IC which has only the CPU inside them i.e. only the processing powers. These microprocessors don’t have RAM, ROM, and other peripheral on the chip. A system designer has to add them externally to make them functional. Application of microprocessor includes Desktop PC’s, Laptops, notepads etc. Table 4.1 Comparison Between Microcontroller And Microprocessor Microprocessor Microcontroller The functional blocks are ALU, registers, timing & control units It includes functional blocks of microprocessors & in addition has timer, parallel i/o, RAM, EPROM, ADC & DAC Bit handling instruction is less, One or two type only Many type of bit handling instruction Rapid movements of code and data between external memory & MP Rapid movements of code and data within MC It is used for designing general purpose digital computers system They are used for designing application specific dedicated systemsThree criteria for choosing a microcontroller are as follow: a. Meeting and computing needs of task hand efficiently and cost effectively. b. Availability software and hardware development tool such as compiler, assembler, debugger etc. c. Wide availability and reliable source of microcontroller.
  • 18. 18 Chapter-5 ARDUINO 5.1 Introduction Arduino is an open source prototyping platform on easy-to-use hardware and software. Arduino boards are able input-light on a sensor, a figure on button, or twitter message and run it into an output activating a motor, turning on a led, publishing something online etc. All this is defined by a set of instruction programmed through Arduino software (IDE).. 5.2 Features of Arduino The different features of an Arduino are as follow a. Inexpensive b. Cross-platform c. Simple programming d. Open source and extensible software 5.3 History of Arduino Arduino, sold as Genuino, due to a trademark dispute, outside the U.S. and U.K., is a hardware and software company, project, and user community that designs and manufactures computer open-source hardware, open-source software, and microcontroller-based kits for building digital devices and interactive objects that can sense and control physical devices. The first Arduino was introduced in 2005, aiming to provide a low cost, easy way for novices and professionals to create devices that interact with their environment using sensors and actuators. Common examples of such devices intended for beginner hobbyists include simple robots, thermostats, and motion detectors. 5.4 Arduino UNO Board Arduino have different type of board or configuration in all configure the Arduino UNO is the best board to get started with electronics and coding. It is microcontroller board based on ATmega328P. It has 14 digital I/O pins (of 6 can be used PWM pin), 6 analog inputs, a 16MHz quartz crystal, a USB connection, a power jack, an ICSP header and reset button. It
  • 19. 19 contain everything needed to support the microcontroller, simply connect it to computer with a USB cable or power from adapter(5v) or battery to get started. "Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and version1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB. Fig. 5.1 Arduino UNO Board. Table 5.1 Specification of Arduino Uno Board Microcontroller ATmega328 Operating voltage 5v Input voltage(recommended) 7-12v Input voltage(limit) 0-20v Digital I/O pins 14 pin PWM pin 6 pin Analog input pin 6 pin DC current for3.3v pin 50Ma DC current per I/O pin 20Ma Flash memory 32kb(ATmega238P) of which 0.5kb used by boot loader SRAM 2KB EEPROM 1KB Clock sped 16 MHz Length 68.6 mm
  • 20. 20 Width 53.4 mm Weight 25 M 5.4.1 Pin description of Arduino UNO Board Power pin (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). 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. 3.3V A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA. GND. Ground pins. Input and Output pin 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, arising or falling edge, or a change in value. See the attach Interrupt () function for details. PWM 3, 5, 6, 9, 10, and 11Provide 8-bit PWM output with the analogWrite() function. SPI 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK) These pins support SPI communication, which, although provided by the underlying hardware, is not currently included in the Arduino language. 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. Reset Bring this line LOW to reset the microcontroller.
  • 21. 21 5.5 Pin Mapping of ATmega328 with Arduino The device is manufactured using Atmel’s high density nonvolatile 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. Fig. 5.2 ATmega328 I/O pin a. Analog pin: Pin 23, pin 24, pin 25, pin 26, pin 27, pin 28 are the analog pin which have an input and output in analog form. b. Digital pin: Pin(1,2,3,4,5,6,11,12,13,14,19,18,17,16,15) are the digital which are processed output and input in the form of digital. Power pin Vcc (pin 7), GND(pin 22 and pin8), AREF(pin 21), Vcc(pin 20). Communicative pin a. RXD(pin 2): This pin receives the serially transmitted data. b. TXD(pin 3): This pin transmits data serially to peripheral part.
  • 22. 22 Chapter-6 ARDUINO PROGRAMMING 6.1 Introduction The Arduino runs a simplified version of the C programming language, with some extensions for accessing the hardware. All Arduino instructions are one line. The board can hold a program hundreds of lines long and has space for about 1,000 two-byte variables. The Arduino executes programs at about 300,000 source code lines per sec. 6.2 Creating a Program Programs are created in the Arduino development environment and then downloaded to the Arduino board. Code must be entered in the proper syntax which means using valid command names and a valid grammar for each code line. The compiler will catch and flag syntax errors before download. Sometimes the error message can be cryptic and you have to do a bit of hunting because the actual error occurred before what was flagged. 6.3 Structure The basic structure of the Arduino programming language is fairly simple and runs in at least two parts. These two required parts, or functions, enclose blocks of statements. void setup() { statements; } void loop() { statements; } 6.4 Programming Commands
  • 23. 23 setup() The setup() function is called once when your program starts. Use it to initialize pin modes, or begin serial. It must be included in a program even if there are no statements to run. void setup() { pinMode(pin, OUTPUT); // sets the 'pin' as output } loop() After calling the setup() function, the loop() function does precisely what its name suggests, and loops consecutively, allowing the program to change, respond, and control the Arduino board. void loop() { digitalWrite(pin, HIGH); // turns 'pin' on } high/low These constants define pin levels as HIGH or LOW and are used when reading or writing to digital pins. HIGH is defined as logic level 1, ON, or 5 volts while LOW is logic level 0, OFF, or 0 volts. digitalWrite(13, HIGH); input/output Constants used with the pinMode() function to define the mode of a digital pin as either INPUT or OUTPUT. pinMode(13, OUTPUT); if
  • 24. 24 if statements test whether a certain condition has been reached, such as an analog value being above a certain number, and executes any statements inside the brackets if the statement is true. If false the program skips over the statement. The format for an if test is: if (someVariable ?? value) { doSomething; } if… else if… else allows for ‘either-or’ decisions to be made. If the input was LOW, it is write that this way: if (inputPin == HIGH) { doThingA; } else { doThingB; } else can also precede another if test, so that multiple, mutually exclusive tests can be run at the same time. It is even possible to have an unlimited number of these else branches. for The ‘for’ statement is used to repeat a block of statements enclosed in curly braces a specified number of times. An increment counter is often used to increment and terminate the loop. There are three parts, separated by semicolons (;), to the for loop header:
  • 25. 25 for (initialization; condition; expression) { doSomething; } pinMode(pin, mode) Used in void setup() to configure a specified pin to behave either as an INPUT or an OUTPUT. pinMode(pin, OUTPUT); // sets ‘pin’ to output Arduino digital pins default to inputs, so they don't need to be explicitly declared as inputs with pinMode(). Pins configured as INPUT are said to be in a high-impedance state. digitalRead(pin) Reads the value from a specified digital pin with the result either HIGH or LOW. The pin can be specified as either a variable or constant (0-13). value = digitalRead(Pin); // sets 'value' equal to the input pin digitalWrite(pin, value) Outputs either logic level HIGH or LOW at (turns on or off) a specified digital pin. The pin can be specified as either a variable or constant (0-13). digitalWrite(pin, HIGH); // sets 'pin' to high The following example reads a pushbutton connected to a digital input and turns on an LED connected to a digital output when the button has been pressed: digitalWrite(led, value); // sets 'led' to the analogRead(pin) Reads the value from a specified analog pin with a 10-bit resolution. This function only works on the analog in pins (0-5). The resulting integer values range from 0 to 1023.
  • 26. 26 value = analogRead(pin); // sets 'value' equal to 'pin' Note: Analog pins unlike digital ones, do not need to be first declared as INPUT nor OUTPUT. analogWrite(pin, value) Writes a pseudo-analog value using hardware enabled pulse width modulation (PWM) to an output pin marked PWM. On newer Arduinos with the ATmega168 chip, this function works on pins 3, 5, 6, 9, 10, and 11. Older Arduinos with an ATmega8 only support pins 9, 10, and 11. The value can be specified as a variable or constant with a value from 0-255. analogWrite(pin, value); // writes 'value' to analog 'pin' delay(ms) Pauses a program for the amount of time as specified in milliseconds, where 1000 equals 1 second. delay(1000); // waits for one second Serial.begin(rate) Opens serial port and sets the baud rate for serial data transmission. The typical baud rate for communicating with the computer is 9600 although other speeds are supported. Serial.begin(9600); // opens serial port sets data rate to 9600 bps Note: When using serial communication, digital pins 0 (RX) and 1 (TX) cannot be used at the same time. Serial.println(data) Prints data to the serial port, followed by an automatic carriage return and line feed. This command takes the same form as Serial.print(), but is easier for reading data on the Serial Monitor. Serial.println(analogValue); // sends the value of 'analogValue'
  • 27. 27 Chapter-7 SENSORS 7.1 Introduction In the broadest definition, a sensor is an object whose purpose is to detect events or changes in its environment, and then provide a corresponding output. A sensor is a type of transducer; sensors may provide various types of output, but typically use electrical or optical signals. Sensors are used in everyday objects such as touch-sensitive elevator buttons (tactile sensor) and lamps which dim or brighten by touching the base, besides innumerable applications of which most people are never aware. With advances in micromachinery and easy-to-use micro controller platforms, the uses of sensors have expanded beyond the most traditional fields of temperature, pressure or flow measurement, for example into MARG sensors. Sensors that we will study in training duration are given below: 7.2 Passive infrared sensor A passive infrared sensor (PIR sensor) is an electronic sensor that measures infrared (IR) light radiating from objects in its field of view. They are most often used in PIR-based motion detectors. Fig 7.1: Passive Infrared Sensor All objects with a temperature above absolute zero emit heat energy in the form of radiation. Usually this radiation isn't visible to the human eye because it radiates at infrared wavelengths, but it can be detected by electronic devices designed for such a purpose. The term passive in this instance refers to the fact that PIR devices do not generate or radiate any energy for detection purposes. They work entirely by detecting the energy given off by other objects. PIR sensors don't detect or measure "heat"; instead they detect the infrared radiation emitted or reflected from an object.
  • 28. 28 7.3 Ultrasound Sensor Ultrasonic sensors are based on measuring the properties of sound waves with frequency above the human audible range. They are based on three physical principles: time of flight, the Doppler Effect, and the attenuation of sound waves. Ultrasonic sensors are non-intrusive in that they do not require physical contact with their target, and can detect certain clear or shiny targets otherwise obscured to some vision-based sensors. On the other hand, their measurements are very sensitive to temperature and to the angle of the target. Fig 7.2: Ultrasonic Sensor Ultrasonic sensors “are based on the measurement of the properties of acoustic waves with frequencies above the human audible range,” often at roughly 40 kHz. They typically operate by generating a high-frequency pulse of sound, and then receiving and evaluating the properties of the echo pulse. 7.4 Gas detector A gas detector is a device that detects the presence of gases in an area, often as part of a safety system. This type of equipment is used to detect a gas leak and interface with a control system so a process can be automatically shut down. A gas detector can sound an alarm to operators in the area where the leak is occurring, giving them the opportunity to leave. This type of device is important because there are many gases that can be harmful to organic life, such as humans or animals. They may be used in firefighting. Fig 7.3: Gas Sensor 7.5 Soil moisture sensor Soil moisture sensors measure the volumetric water content in soil. Since the direct gravimetric measurement of free soil moisture requires removing, drying, and
  • 29. 29 weighting of a sample, soil moisture sensors measure the volumetric water content indirectly by using some other property of the soil, such as electrical resistance, dielectric constant, or interaction with neutrons, as a proxy for the moisture content. The relation between the measured property and soil moisture must be calibrated and may vary depending on environmental factors such as soil type, temperature, or electric conductivity. Reflected microwave radiation is affected by the soil moisture and is used for remote sensing in hydrology and agriculture. Portable probe instruments can be used by farmers or gardeners. Fig 7.4: Moisture Sensor 7.6 Bluetooth The HC-05 Bluetooth Module has 6 pins- Vcc, GND, TX, RX, Key, and LED. It comes pre-programmed as a slave, so there is no need to connect the Key pin, unless you need it change it to Master Mode. Fig 7.5 Bluetooth Module The major difference between Master and Slave modes is that, in Slave mode the Bluetooth module cannot initiate a connection; it can however accept incoming connections. After the connection is established the Bluetooth module can transmit and receive data regardless of the mode it is running in. If you are using a phone to connect to the Bluetooth module, you can simply use it in the Slave mode. The default data transmission rate is 9600kbps. The range for Bluetooth communication is usually 30m or less. The module has a factory set pin of “1234” which is used while pairing the module to a phone.
  • 30. 30 CONCLUSION Embedded systems have come a long way since their inception. Today, some toilets and toasters can tweet about what they’re upto. From smart clothing to smart banking, embedded systems have accentuated technology’s growth by manifold. With growth and advancements in the field of electronics, wireless communications, networking, cognitive and affective computing and robotics, devices around you communicate in more ways than you ever imagined. Those times are not very distant when every object around us will have a small processor/sensor embedded within itself, invisible to us but still communicating with all other devices around, making our lives more connected and accessible than ever before. The future of embedded systems lies in the advancement of technologies that enable faster communications, heavy data storage capacities and highly interwoven connections among the devices. Before diving into the enormous number of applications of embedded systems. In many major countries also, Precision farming has gained a lot of traction. In Holland, presently Driverless tractors are being developed using Real Time Kinematic and GPS. It is proven to be quite effective and cost efficient for large farmlands Researchers at MIT have setup a Distributed Robot Garden, which is a garden consisting of Tomato plants that are nurtured by Robots. The digital revolution now has reached to a stage where we cannot conduct our normal modern daily lives without this technology. Indeed, it is reasonable to say that everyone already owns at least one piece of equipment, which contains a processor or microcontroller in it. If embedded systems are to become a serious discipline to contribute in progression of the Indian economy and global demand in general, it is imperative that our proven expertise in IT software should play a crucial role in developing talent with the required skills.
  • 31. 31 REFERENCES [1] Mohammad Ali Mazidi and Janice Gillespie Mazidi, “The 8051 Microcontroller and embedded system” [2] Douglas H. Williams “Electronics Device”: McGraw-Hill, 2003,. [3] Brian W. Evans, “Arduino Programming”, McGraw-Hill, 2007 [4] http://www.wikipedia.org/wiki/Embedded System [5] http://en.m.wikipedia.org/wiki/product. [6] http://www.Arduino.cc. [7] http:// en.wikipedia.org/wiki/Simulation. [8] http://www.engineersgarage.com/8051-microcontroller.
  • 32. 32 Appendix: A LIST OF FIGURES Fig. No. Fig. Name Page No. Fig.1.1 Embedded System Hardware (2) Fig.1.2 Parts of Embedded System (3) Fig.2.1 LED (7) Fig.2.2 LDR (7) Fig.2.3 Relay (8) Fig.2.4 Quartz Crystal Oscillator (8) Fig.2.5 BC548 Transistor (9) Fig.2.6 7-Segment Display (9) Fig.3.1 Microcontroller with Interfacing ICs (10) Fig.3.2 7805 IC (11) Fig.3.3 555 Timer IC (11) Fig.3.4 LM324 IC (12) Fig.3.5 JHD16 2A (13) Fig.3.6 L293D (14) Fig.4.1 Microcontroller (15) Fig.5.1 Arduino UNO board (18) Fig.5.2 ATmega328 (20) Fig.7.1 Passive Infrared Sensor (27) Fig.7.2 Ultrasonic Sensor (28)
  • 33. 33 Fig.7.3 Gas Sensor (28) Fig.7.4 Moisture Sensor (29) Fig.7.5 Bluetooth Module (29)
  • 34. 34 Appendix: B LIST OF TABLES Table No. Table Name Page No. Table 3.1 Pin description of LCD (13-14) Table 3.2 Pin Description L293D IC (14) Table 4.1 Comparison between Microcontroller and Microprocessor (16) Table 5.1 Specification of Arduino UNO Board (18-19)