We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 17
5.1 APPLICATION OF EMBEDDED SYSTEMS
Embedded systems can be classified in number ways some of the
embedded systems application are,
> Consumer Electronics
Control Systems and Industrial Automation
Bio-medical Systems
Field Instrumentation
Handheld Computers
Data Communication
‘Network liformation Appliances
‘Telecommunications
vvvwvvv vv v
Wireless Communications5.2 CASE STUDY OF WASHING MACHINE
*) Washing machines use electronics for Teliable, energy-efficient automatic
cane The design uses the PIC18F452 series microcontroller. All the
control functionalities of the system are built around this. Upgradeability is
the uniqué feature of this systerh. Control card “hardware_ and software
allows the manufacturer to add or remove the features as | as per customerEZ LEE
requirement and model. Thus once_the whole system.is designed it is very
economic in large quanitity production. Single-phase motor is considered for
—— [aaa eee
the design, Front panel consists of @ keypad and LCD “display. Keypad
provides automatic and manual awash options to the user. LCD display is
convenient to convey machine it ommation to user. One more design possibility
is to use brushless DC motors or three phase induction motor, BLDC types
of motors are very efficient but requires complex control algorithm. To
er
implement such a complex and real time algorithm dedicated controller and
software is required which'a master controller controls: Evert ‘though’ ‘cost is
important ctiteria‘ moder washing machines are designéd with BLDC motors
owing to efficiency and energy. conservation. The;block diagram: illustrates :
the washing machine systems.
(
ine
Preach Ry cmpplice
or Interface:
T=]
Sporifiz erbedded Sit ear
dupie) exthodd ad
if
bows Ombowatinc oul an
m Bria
ha 4
[> Water Outial
~ 5.2.1 Design Specifications
This include both hardware and software specifications.
> Thesystemcontrol should provide fully automatic mode, semi-automatic
mode and manual mode. Modes can be selectable by a keypad.
> During filly automatic mode user intervention requirement shouldbe zero.
Eye pe anal rc
Once the system is started in this mode it should perform its work
. independently and after the completion of work it should notify the user
i
about the completion of work.
This mode instantaneously should sease cloth quality andrequirement of
Water, water temperature, detergent, load, wash cycle time and perform
operation accordingly. Se a
Insemi-automatic mode also > user requirement should be nil. Butuser has
to choose any oné of the semi~ Gutomatic mode in which Wistiing conditions
are predefined. Once the predefined mode is started the system should
perform its job and after completion it should: inform the user.
Inmanual mode contis
specify which operation he wants to do and has to provide related
information to the > control system. Or example, ifuser wants to wash
specified operation is completed sy:
> When the lid is open system should not work. If door i ‘is accidentally
opened in between wash operation, then the system should st stop working -
inminimum possible time (<10s
The system should provide all basic features of a washing machine like
washing, rinsing, spinning, drying, cold ld wash, b hot wash etc.
ic
LMM
« BASSSASS
5.2.2 Hardware Design —
peripheral features have been utili:
the motor is very crucial part of the design. The PWM feature of the.
microcontroller controls jnotor speed. PWM output is fed to driver circuit -
and then to motor. To rotate the motor in two different directions ‘forward’ i
and ‘reverse’ direction control blocks are used. Motor speed sensor is
interfaced to microcontroller. Microcon!
and appropriately controls the speed“of the motor in different phases of
washing using PWM output. Door sensor, pressure sensor, keypad are also
interfaced to microcontroller. Serial port in connected to GSM module.
5.2.3 Schematic Design Washing Machine Control
provided in the Figure (1). |
» Thesystem should provide easy options forupgradeability ofnew features,
The hardware and the software should be compatible to both machines,
which have fewer featares, or more features. Removal of any feature
should not affect the werking of any other features or overall working of
the system. :
> Thesystem should work on single phase AC from 190VAC to 250VAC.
ee
> Inthe event of power failure, the washing machine should automatically
stat its cycle rom the politof interuption when power sresumed._.
this system | is PIC18F452. Most of the’
zed to implement the.design. Controlling *
The processor is heart
ae eae ae
troller reads the speed of the motor
‘A detailed schematic with pin connection of PIC microcontroller is
Washing machine default parameters and user settable parameters are
stored in external EEPROM. Internal EEPROM of the PIC is used to store {
status of the washing machine. The status is regularly logged to the internal
EEPROM. In the event of power failure of whenever program resets, status
flags are read from the internal EEPROM and thus status of the machine isRCORWVep ’ RA7PGD
RAO/ANO 2 RegPGC
RAT/ANA 3 {BS/PG!
: . PIC18F452 Deni
RAUAN2Vger. 4 Re4
RAQIANSIV,.. 45 RB3ACCP2
RAGMTOCK) 8 RBZINTZ
RASYANAISSILYDIN 7 RB{ANT1
REOMBIANS 8 RBOINTO
-REVANRIANG 3 Nien
REZCSIANT Ves
Von RDZ/PSP7
Vigg RDSIPSPA
OSC1CLKI ROSIPSRS
OSCI/ICLKO/RAG ROdPSPS
RCOMOSOMCKI RC7RX/DT
RCUTOSUCCP2 RCBTXICK
RCEUCCPI RCSSOO
RCVSCHISCL ————J RCASDWSDA
RDOPorO _ ROIPSPS
RDUPSPI RD2PSP2read_hour(): input : none; return: hour data; reads the hour data from
the RIC and retums to called function.
read_minute(): input : none; return: minute data; reads the minute
data from the RTC and retutns to called function.
read_second(): input : none; return: second value; reads the second
Gata from the RTC and retums to called function. oowrite_to_GSM(: input: starting address of the message, size of
message; return: none; writes the message to GSM module using standard
AT+CMGS command.
read_from_GSMQ: reads the message from GSM using AT+CMGR
command.
delete_messageGSM(): input: location from which message has to
be deleted; return: none; deletes the message from GSM using AT+CMGD
command.
check. water_temp(): input: none; return: temperature; checks water
temperature by reading the temperature sensor; calibrates and returns to
called function.
ter(): input: temperature; return: none; checks the water
temperature; if(calculated temperature
calculate_motor_speed(): input: none; return: speed; reads RTC
seconds; enable couiter1/3; if one second is over stop counter, read and
returns counter value else check again.
enable_SPJ(): MSSP port is configured as SPI port by initializing
corresponding registers.
disable_SPIQ:MSSP port is configured so as to disable SPI.
enable_I2C(): MSSP port is configured as I2C- port by initializing
corresponding registers,
disable_I2C():MSSP port is configured so as to disable I2C.
scan_keypad():input: none; return: pressed key value; scans ‘the
keypad and returns the pressed key value.
monitor_keypad(): uses scan_keypad() function to scan the keypad.
After receiving key value determines the respective function and transfers
————
YAWread_ADC(): input: channel number; return: read ADC data ;
configures ADC for the specified channel
write_LCD(): input: address, data; return: none; writes the data to
specified address.
init LCDQ: initializes the LCD according ‘to the initialization
commands.
send command_LCD(): input: command; return: none; writes the
command to LCD using write LCD() function.
as per motor speed.
set PWMO); input: motor speed; return: none; sets PWM frequency5.4 SMART CARD SYSTEM APPLICATION Grek Gud}
¢
he smart card is a plastic card equal.in size and shape to a credit
'
card, that contains an integrated microprocessor and memory. These two
components allow the storing and processing of-information in sthe card,”
C The smart catd interchanges data with the outside world in two ways: -
eee
re
1. Through gold plated contacts, They are called contact cards.
— eo a ——
2. Through radio frequency, using an antenna embedded in the card: This
ao esncy, ust ea
type of card is called contactless. ))
In order to interchange informatio,
in_a reader (in the case of contact «
contactless reader.
the card has to either be inserted
‘ds)-or placed in the proximity ofa
There are no batteries ina smart card, the power is provided from
outside by the reader, ce it contact or contactless. The CPU clocking also
nee reel onc
comes from the sett memory is Electrical Erasable Programmable
oCicat Erasable Programmable
Read Only Memory (BEPROM), which will retain the contents even if there
is no_voltage applied, Some cards have only memory; an application can
nee applied. cnn
increase or decrease counters in the card, These cards referred to as
memory cards. re rane
Only those cards with chips that contain certain microprocessor logic
are called smart cards. The two main characteristics of a smart card are itsis obvious, we will
security and mobility. Since its mobility charac!
concentrate on its security features. Almost all the applications that use a
smart ¢ card are based on the fact that it is very difficult to 0 forge the card
peeks eae
or to access protected ‘data on the card. If for some reason or other the
security of the smart card could be compromised, it would be almost
—-
impossible to justify its use.
Boose te
Single sign on, ckers and
‘digitalsignature , AES sss
ne nenat ay in shops Pay at vending ] safes
canteen machines
Figure 5.7 Smart card applications
art cards are used in a wide variety of applications:
'" >! “Accounting
Access to parking area
——.
Timerecording
vwvvwyv
‘entification i.
BIQusgClothing machine
es
Pay in the canteen
Pay inshop
vvvvv wv
Single sign on digital signature oe
The ssmart| card is18) pldstic card ISO standard dimension,
85.60x53.98x0.80mm. it is embedded system on a card called SoC (
system on chip). ISO recommended standards are ISO7! 1816 (1 to 4) for
host-machine contact-based and ISO14443 for the contact less cards. The
silicon chip is just a few millimetres in size and is concealed in between the
layers. .yers. Yis very small size protects the card from bending. The figure 5.7
shows embedded sys ystem hardware components | for ‘a contact less smart
ate
\
An Embedded Syston
Contechless Smart Card Componenis
() (ee
i fa
t t eee
Daa, Address, Control Internal Buses
{ Astount Numbar, Expiry Date, arg on Number
Ce es
mr oe ee vO
i }
Interrupt Controller ‘Shiod Clout j
su ‘Trenscaiver Antenna
‘Systom Power Supply ea
Figure 5.8 Embedded hardware components in a contact
less smart card
a
\sEI SLLLLLBL
5.4.1 Embedded hardware:
~ The embedded hardware components are as follows:
> Microcontroller or ASIP.
az ry variables and stack !
> 2 ammableR mable ROM 30M for application codes and rtos codes for
scheduling the tasks
» Flash for storing user data, user seraddress, user identification codes, card
— a
number and expiry data .
~ Timer and internupt controller
> Acarrier frequency 16MHz generating circuit and amplitude shifted key
(ASK) modulator
Interfacing circuit for the IOs
Vv
v
Charge pump for delivering power to the antenna for transmission and
for system circuits
J: The details of the basic hardware units are as follows,
a controller or ASIP.
L The Microcontroller used can be MC68HCI I DO or PIC16C84 or
| @ smart, card processor Philips | Smiart ee or a similar ASIP. Processor.
the memory.
A protection bit at the microcontroller may protect 1 kB or more data
from modification and access by any external source or instructions outside
that memory, Once the protection bit is placed at the maskable ROM in the
troller, the instructions or data within that part of the memory are
cece ; ?
le from instructions in that part only (internally) and not accessible
eeMM ETE)
from the external instructions or instructions outside that part. The CPU tay
disable access by blocking the write cycle placement of the data bits on the
tor instructions and data protection at the physical memory after
tion.and before issuing the card to the user.
Another way of protecting is as follows: The CPU may access by using the
. Which are different from the logical address used in the
bu
certain phases of card initializ
physical addre
5.4,3-Read only memory : :
vo
CROM is used in the card. The usual size is ‘8 or 64 kB for usual ot
advanced cryptographic features in the card, respectively) Full or part of
ROM bus activates only after a ter a security che check. The processor protects @
part of the 1 nory Wom access. Goss. The RC ROM stores the following.
> Fabrication key, which is a unique secret key for each card. It is inserted
ie during fabrication.
» Personalization key which is inserted after the chip is tested ona printed
circuit board. Physical addresses are used in the testing phase. The key io
proserves the fabrication key and this key insertion pieserves the card
personalization. A fier insertion of ae RTOS and applications us use
only logical addresses.
&, RTOS codes
_>Rpplication codes
>A
access to the OS: and application instructions. It stores afer the card
enters the utilizationph hase.
5.4.4 Electrical erasable programmable read only memory
EEPROM or Flash is PIN @ersonal Identification Number), the allotmentand writing of which
is by the authorizer (for example, a bank) and its use is possible by the
latter only by using the personalization and fabrication keys. It is for
identifying the carduserin future ee key.
opens the PI PIN ke:
> Anunblocking PIN. foruse by the authorizer, through this key the card
. citcuitidentifies the authorizer before unblocking. Data ofthe userunblocks
for the authorizer and storing of information onthecardispossibleby the ~
authorizer through the host.
> Access conditions for various hierarchically arranged data files.
> Carduser data, for example, name bank and branch identification number
and account number or health insuzance details.
> ratipests issue et ‘the: gpolicaion generates. For example, in case of eae
insurance claims record in case Bch ‘a medical card.
atiled d ta.
> Italso stores the application’:
anes
> Invalidation lock sent by the host efter the expiry period or card misuse
and user account closing request. It locks the data files of the master or
eae Oe CaN Leu
elementary individual file or both.
5.4.5. Random access memory s
ns
RAM stores the temporary variables and stack during card operation
by running the OS and the application.wo N
5.4.6 Integrated chip
Chip power supply voltage extracts by a charge pump circuit.’The |
pump extracts the charge from the signals from the host analogous T.what
a mouse does in a computer and delivers the regulated voltage to the card
chip, memory and 10 systems. Signals can be from antenna or from clock
pin. In atypical card operation using 0,18 pm technology, 1.6 to 5.5 Vis
the threshold limit and for a 0.35im technology, cio
5.4.7 Input / Output
V/O System of chip and host interact through asynchronous serial
UART at 9.6 k or 296 k or 115.2 k baud/s(The chip interconnects to a
card hosting system (reader and writer) either ‘ough the gold contacts or
through a centimeter sized antenna on each side> The latter provides
_, contactless interconnection between the 10 pins, which arc meant for contact-
based interaction, RST (Reset Signal from host) and Clock (from host).
5.4.8 Wireless communications
; Wireless Communication for 10 interactions is by radiations through
4 san * bate ro
the dtéana coils for contactless interaction. The card and host interact
1, Aa a ener ee eee eee s .
through a card modem and a host modem. The application protocol data
unit (APDU) is a standard for communication between the card and host
computer. Modulation is with 16% index amplitude modulating carrier of
13.66-13.56 Mbps ASK (amplitude shifted keying) is used for contactless
communication at data rates of 1 Mbps. One-sixteenth frequency subcarrier
modulates through BPSK (Binary Phase Shifted Keying).
ee ea)
5.41.9 Embedded Software
Smart card embeds the following software components:
> Boot-up. initialization and QS progranis
> ‘Smartcard secure file system
> Connection establishment and termination
> Communication with hostELEY i
|
|
Cryptography algorithm
Host authentication
Cardauthentication _
Vvvwyv
Saving addition parameters or recent new data sent by the host (for
example, present balance left) ~
ame a card is an exemplary secure embedded system with security
p = ie a needs cryptographic software. Embedded software in
e card needs spetial features in its operating system over and above the
MS DOS or UNIX:system features.
5.4.10 Special features
_Or Protected environment. It means software should. be stored in the
protected part of the ROM.
‘ at Restricted run-time environment.
T's OS, every method, class and run time library should be scalable.
exceed 64 kB memory.
> A three-layered file system for the data. One file fo: the master files to
store all file headers, A header means file status, access CondHTOHS ard
ore
the file lock. The second file is a dedicated file to holda file grouping and
eaders of the iinediate successor elementary files ofthe group. The
third fileis the elementary file to hold the file header and its file data.
‘There is either a fixed length file management or a variable length file
predefined offset.
Vv
management with each file ‘having a
‘ . ter-
nections, data grams, character
> Classes for the network, sockets, col scatter,
nd streams, security management, rgital hee 5 i
suindghs desma eer - sal signatures.
symmetric and asymmetric keys besedcoromaphy ant Ge in
Ce ees eee
VK