You are on page 1of 17

EE8691: EMBEDDED SYSTEMS

UNIT – V

EMBEDDED SYSTEM APPLICATION AND


DEVELOPMENT

 Case Study of Washing Machine

 Automotive Application

 Smart card System Application

 Digital camera

Easwari Engineering College / EIE / VII sem Page 1


EE8691: EMBEDDED SYSTEMS

UNIT –V

EMBEDDED SYSTEM APPLICATION DEVELOPMENT

CASE STUDIES OF SOME EMBEDDED APPLICATIONS:


1. Case study of washing machine design:
Automatic washing machine is a Multi-state Input/Timed system.
The characteristics of multi state system are:
The system will operate in two or more states.
Each state may be associated with one or more functional calls.
Transitions between states may be controlled by the passage of time,
by system Inputs or by a combination of time and inputs.
Transitions between states may also involve function calls.
Outline design of inputs and outputs:
Microcontroller based washing machine design:
PIC18F series microcontroller acts as a washing machine controller.
Single phase motor is considered for the design. Front panel consists
of a keypad and LCD display. Keypad provides automatic and manual
wash options to the user. LCD display is convenient to convey
machine information to user. Modern washing machines are designed
with BLDC motors owing to efficiency and energy conversation. But in
his case, single phase universal motor has been used to design
prototype.
Design Specifications:
This include both hardware and software specifications.
1. The system should provide fully automatic mode, semi
automatic mode and manual mode. Modes should be selected by a
keypad.
2. Under fully automatic mode, user intervention requirement
should be zero. 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 about the completion of work. This mode
instantaneously should sense cloth quality and requirement of water,
Easwari Engineering College / EIE / VII sem Page 2
EE8691: EMBEDDED SYSTEMS

water temperature, detergent, load, wash cycle time and perform


operation accordingly.
3. In semi – automatic mode also, user requirement should be nil.
But user has to choose any one of the semi automatic mode in which
washing conditions are predefined. Once the predefined mode is
started, the system should perform its job and after completion, it
should inform the user.
4. In manual mode, continuous intervention of user is required.
For example, a user needs to choose wash mode, wash time, amount
of water and the load. After these data are entered, the user should
start the machine.
5. When the lid is open, system should not work. If door is accidently
opened in between wash operation, then the system should stop
working in minimum possible time.
6. The system should provide all the basic features of a washing
machine like washing, rinsing, spinning, drying, cold wash, hot wash
etc.
7. The system should provide easy option for upgrading the new
features.
8. The system should work on single phase AC from 190V AC to
250V AC. The system should protect itself from power supply voltage
variations.
9. In the event of power failure, the washing machine should
automatically start its cycle from the point of interruption when power
is resumed.
Hardware Design:
PIC18F452 is a heart of the system. Most of the peripheral features
have been utilized to implement the design. Controlling the motor is
very crucial part of the design. The PWM feature of the microcontroller
controls motor speed. PWM output is feed to driver circuit and then to
motor.
To rotate the motor in two different directions forward and reverse
direction, control blocks are used. Motor speed sensor is interfaced to

Easwari Engineering College / EIE / VII sem Page 3


EE8691: EMBEDDED SYSTEMS

microcontroller. Microcontroller reads the speed of the motor and


approximately controls the speed of the motor in different phases of
washing using PWM output. Door sensor, pressure sensor, keypad are
also interfaced to microcontroller. EEPROM and RTC are interfaced to
MSSP module of controller. In-circuit serial programming facility is
provided for quick and easy programming and debugging.

Washing machine parameters are stored in external EEPROM and


internal EEPROM of the PIC.
RTC (Real Time Clock) is interfaced to SPI (Serial Peripheral Interface)
port of the microcontroller. It is used as a timing reference for all
timing calculation of machine.
Door sensor is connected to external interrupt 0. High priority is
assigned to this interrupt. Thus opening of the door causes triggering
of INT0 and INT0 ISR immediately to stop the machine and informs
the user.
All the sensor outputs are connected to the analog pins of PIC (AN0,
AN1, AN2 etc.) Keypad is connected to port D. when any of the keys is
pressed; output becomes high and INT1 triggers. Int1 ISR does a
keypad scan and approximately performs
the operation.

Easwari Engineering College / EIE / VII sem Page 4


EE8691: EMBEDDED SYSTEMS

Motor speed sensor is given to T1, CLK which is an external clock


input to timer 1 / timer 3. Timer is configured in counter mode for
calculating the speed. Speed is calculated by counting pulse
output from the sensor for one second.
Motor driver circuit determines the direction of the motor
corresponding to the output obtaining from the microcontroller.
Speed of the motor is controlled by the PWM generation from the
microcontroller. The duty cycle of PWM pulses are changed
according to the output obtained from the speed sensor to maintain
the desired response during wash cycles.
Dedicated LCD with 3 wire interface is used, which consist of data
line, clock and chip select. Backlight control is also provided.

case study of an embedded system for an automotive


application.
Present day automobiles have many embedded systems. A car
contains many control systems. One among them is
ACC(Adaptive Cruise Control) which automatically controls the
car speed.
Requirements
1. Purpose
2. Inputs
3. Signals, events and notifications
4. Outputs

Easwari Engineering College / EIE / VII sem Page 5


EE8691: EMBEDDED SYSTEMS

5. Control panel
6. Functions of the system
7. Design metrices
a. Power source and dissipation
b. Resolution
c. Performance
d. Process deadlines
e. User interfaces
f. Extendibility
g. Engineering cost
h. Manufacturing cost
8. Test and validation conditions
ACC (Adaptive Cruise Control)
This control method is used to maintain constant speed in cruise
mode and to decelerate when a vehicle comes in front at a distance
less than safe and to accelerate again to cruise mode by using
adaptive control algorithm.
Adaptive Control algorithm
An adaptive control algorithm refers to an algorithm parameters in
which adapt to the present status of the control inputs in place of a
constant set of mathematical parameters in the algorithmic
equations. Parameters adapt dynamically.
For an ACC system, an adjustable-system subunit generates
output control signal for throttle valve.
The desired preset cruise velocity vt,desired preset distance dset
and safe preset distance dsafe are the inputs to measuring
subunit.
The measured velocity v and distance d are inputs to computing
unit.
The comparison and decision subunit sends outputs which are
inputs to adjustable systems.

Easwari Engineering College / EIE / VII sem Page 6


EE8691: EMBEDDED SYSTEMS

1. Task_ACC is an abstract class from which extended classes like


Task_Align,Task_Signal,Task_ReadRange, Task_RangeRate and
Task_Algorithm are derived to measure range and errors.
2. Task_Control is an abstract class from which
extended classes like Task_Brake,Task_Throttle and
Task_Speed are derived to measure range and errors.
3. There are two ISR objects ISR_ThrottleControl and
ISR_BrakeControl
ACC Hardware Architecture
ACC embeds the following hardware units:
Microcontroller-Runs the service routines and tasks except
task_Algorithm.CAN port interfaces with the CAN bus at the car.
Processor with RAM/ROM- To execute task_Algorithm Speedometer
Stepper motor-based alignment unit. Stepper motor-based throttle
control unit.
Transceiver –For transmitting pulses through an antenna hidden
under the plastic plates.
Display panel
Port devices-Fiveport devices are
Port_Align,Port_Speed,Port_ReadRange,Port_Throttle and
Port_Brake

Easwari Engineering College / EIE / VII sem Page 7


EE8691: EMBEDDED SYSTEMS

Automatic Chocolate Vending Machine (ACVM):


Figure shows the diagrammatic representation of ACVM. Assume that
ACVM has following components:
1. It has keypad on the top of the machine. That enables a child to
interact with it when buying a chocolate. The owner can also
command and interact with the machine.
2. It has an LCD display unit on the top of the machine. It displays
menus, text entered into the ACVM and pictograms, welcome,
thank you and other messages. It enables the child as well as
the ACVM owner to graphically interact with the machine. It
also displays time and date.
3. It has a coin insertion slot and a mechanical coin sorter so that
child can insert coins to buy a chocolate.
4. It has a delivery slot so that child can collect the chocolate and
coins, if refunded.
5. It has an internet connection port using a USB based wireless
modem so that owner can know status of the ACVM sales from
a remote location.
ACVM functions:

1. It displays GUIs and if child wishes to enter contact


information, birthday information, it displays the appropriate
menu.
2. It displays the welcome message when in idle state, it also
continuously displays time and date at the right bottom
corner of the display screen.
3. When the first coin is inserted, a timer also starts. The child
is expected to insert all required coins in two minutes.

Easwari Engineering College / EIE / VII sem Page 8


EE8691: EMBEDDED SYSTEMS

4. After 2 minutes the ACVM will display a query to the child, if


the child does not insert sufficient coins, if the query is not
answered the coins are refunded.
5. Within 2 minutes if sufficient coins are collected, it displays
the message , thanks, wait for few moments please!’ delivers
the chocolate through the delivery slot and displays message,
‘ Collect the chocolate and visit again, Please !’

Hardware units: ACVM embeds the following hardware units.


1. Microcontroller or ASIP (Application Specific Instruction Set
Processor)
2. RAM for storing temporary variables and stack
3. ROM for application codes and RTOS codes for scheduling the
task
4. Flash memory for storing user preferences, contact data, user
address, user date of birth, user identification code, answers of
FAQ.
5. Timer and Interrupt controller
6. A TCP/IP port (Internet broad band connection) to the ACVM for
remote control and for the owner to get ACVM status reports.
7. ACVM specific hardware to sort coins of different
denominations. Each denomination coin generates a set of
status and input bits and port interrupts. Using an ISR for that
port, the ACVM processor reads the port status and input bits.
The bits give the information about which coin has been
inserted. After each read operation, the status bits are reset by
the routine.
8. Power supply
Software components:
1. Keypad input read task
2. Display task
3. Read coin task for finding coins sorted.
4. Deliver chocolate task

Easwari Engineering College / EIE / VII sem Page 9


EE8691: EMBEDDED SYSTEMS

5. TCP/IP stack processing task


6. TCP/IP stack communication task

2) SMART CARD:
Smart Card is one of the most used embedded system today. It
is used for credit – debit bank card, ATM card, e-purse, or e- Wallet
card, identification card, medical card and card for a number of new
innovatibe applications.
Embedded Hardware:
 Microcontroller or ASIP
 RAM for temporary variables and stack
 One time programmable ROM for application codes and RTOS
codes for scheduling the tasks.
 Flash for storing user data, user address, user identification
codes, card number and expiry date.
 Timer and interrupt controller.
 Carrier frequency 16 Mhz generating circuit and amplitude
shifted key modulator
 Interfacing circuit for the IOs.
 Charge pump for delivering power to the antenna for
transmission and for system circuits. The charge pump stores
charge from received RF (radio frequency) at the card antenna in
its vicinity. [The charge pump is a simple circuits that consists
of the diode and high value ferro electrics material based
capacitor]

The detail of the basic hardware units are as follows:

1. The Microcontroller used can be MC68HC11DO or


PIC16C84 or smart card processor Philips Smart XA or a
similar ASIP Processor. MC68HC11DO has 8 Kb internal
RAM and 32 Kb EPROM and 2/3 wire protected memory.

Easwari Engineering College / EIE / VII sem Page 10


EE8691: EMBEDDED SYSTEMS

Most cards use 8-bit CPUs. The recent introduction in the


cards is of a 32-bit RISC CPU.
2. ROM is used in the card. The usual size is 8 or 64Kb for
usual or advanced cryptographic features in the card,
respectively. Full or part of ROM bus activates only after a
security check. The processor protects a part of the memory
from access. The ROM stores the following.

i. Fabrication key, which is a unique secret key for each


card. It is inserted during fabrication.
ii. Personalization key, which is inserted after the chip is
tested on a printed circuit board. Physical addresses are
used in the testing phase. The key preserves the
fabrication key and this key insertion preserves the card
personalization. After insertion of this key, RTOS and
applications use only logical addresses.
iii. RTOS codes
iv. Application codes
v. A utilization lock to prevent modification of two PINs and
to prevent access to the OS and application instructions.
It stores after the card enters the utilization phase.

3. EEPROM or Flash is scalable. These means that only that


part of the memory required for a particular operation will
unlock for use. The authorizer will use the require part; the
application will use the other part. It is protected by the access
conditions stored therein. It stores the following;
i. PIN (Personal Identification Number), it is for identifying
the card user in future transactions. Card user is given
this key. Alternatively, a modifiable password is given to
the user and password opens the PIN key.

Easwari Engineering College / EIE / VII sem Page 11


EE8691: EMBEDDED SYSTEMS

ii. An unblocking PIN for use by the authorizer. Through


this key, the card circuit identifies the authorizer before
unblocking.
iii. Access conditions for various hierarchically arranged
data files.
iv. Card user data, for example, name, bank and branch
identification number and account number or health
insurance details.
v. Data post issue that the application generates. For
example, in case of e-purse, the details of the previous
transactions and current balance.
vi. It also stores the application’s non-volatile data.
vii. Invalidation lock sent by the host after the expiry period
or card misuse and user account closing request. It locks
the data files of the master or elementary individual file
or both.
4. RAM stores the temporary variables ans stack during card
operations by running the OS and the application.
5. Chip power supply voltage extracts by a charge pump circuit.
6. IO Sytem of chip and host interact through asynchronous
serial UART at 9.6k or 106k or 115.2 kbauds/s.
7. Wireless communication for IO interaction is by radiation
through the antenna coils for contact less interaction. The card
and host interact through a card modem and a host modem.

Easwari Engineering College / EIE / VII sem Page 12


EE8691: EMBEDDED SYSTEMS

Embedded Software: Smart card embeds the following software


components:
1. Boot-up, initialization and OS programs
2. Smart card secure file system
3. Connection establishment and termination
4. Communication with host
5. Cryptographic algorithm
6. Host authentication
7. Card authentication
8. saving addition parameters or recent new data sent
by the host(ex, present balance left)

3) DIGITAL CAMERA

Digital camera may have a 4 to 6 M pixels still images, clear


visual display (Clear Vid) CMOS sensor, 7 cm wide LCD photo display
screen, enhanced imaging processor, double anti blur solution and
high-speed processing engine, 10X optical and 20X digital zooms and
can also record high definition video-clips. It therefore has speaker
microphone(s) for high quality recorded sound. It has an audio/video
out part for connecting to a TV/DVD player or computer.
Let us assume that the camera is still just a camera. Figure shows
hardware and software components in a simple digital camera.
Assume that the camera has the following components:
1. It has keys on the camera. That enables a user to operate the
camera. It has navigation keys to navigate through the images
back and forth.
2. Shutter, lens and charge coupled device(CCD) array sensors for
images in sizes 2592 x 1944 pixels= 5038848 pixels, VGA (e
mail) 640 x 480= 307200 pixels, 2592 x 1728 = 3.2M pixels,
2048 x 1536= 3M pixels.

Easwari Engineering College / EIE / VII sem Page 13


EE8691: EMBEDDED SYSTEMS

3. It has a good resolution photo quality LCD display unit on the


back of camera to show photographs or recorded video clips. It
displays text such as image title, shooting data and time and
serial number.
4. It has a self timer lamp for flash.
5. Internal memory flashes to store OS and embedded software,
and limited number of image files.
6. Flash memory stick of 2 GB or more for large storage.
7. It has Universal Serial Bus (USB) port or Bluetooth interface,
which connects it to a computer and printer.

Camera Functions: Assume that the camera functions is as follows;


1. It displays the frame view on the LCD screen so that user can
adjust the camera inclination before shooting the frame.
2. It displays the saved images on the LCD using navigation keys.
3. When a key for opening the shutter is pressed, the flash lamp
glows and the self-timer circuit switches off the lamp
automatically.
4. The frame light falls on the CCD array, which transmits the bits
for each pixel in each row in the frame through an ADC. Bits from
dark area pixels in each row are used for offset corrections in the
CCD signal for light intensities in each row.
5. The CCD bits of each pixel in each row and column are offset
corrected using a CCD signal processor (CCDSP).
6. The processed signals are compressed using a JPEG CODEC and
saved in one jpg file for each frame. A DSP does compression
using the discrete cosine transformations (DCTs) and
decompression by inverse DCT. Thereafter, it also does Huffman
coding for JPEG compression.
7. A DAC sends the inputs for the display unit. The DAC gets the
inputs from the pixel processor, which gets the inputs from the
JPEG files for the saved images and gets input directly from the

Easwari Engineering College / EIE / VII sem Page 14


EE8691: EMBEDDED SYSTEMS

CCDSP through the pixel processor or the frame in the present


view.

Digital Hardware Units: The camera embeds the following


hardware units.
1. Microcontroller or ASIP
2. Multiple processors (CCDSP, DSP, pixel processor and others)
3. RAM for storing temporary variables and stack
4. ROM for application codes and RTOS codes for scheduling tasks
5. Timer, flash memory for storing user preferences, contact data,
user address, user date of birth, user identification code, ADC,
DAC and interrupt controller.
6. USB controller.
7. Direct memory access controller
8. LCD controller
9. Battery
Software components: The camera embeds the following software
units
1. CCD signal processing for offset correction
2. JPEG coding
3. JPEG decoding
4. Pixel processing before display
5. Memory and file systems
6. Light, flash and display device drivers
7. COM, USB port and Bluetooth device drivers for port operations
for printer and computer communication control.

4) MOBILE PHONE

Hardware Units:
A mobile phone embeds an SoC( Silicon on Chip) integrating the
following hardware units.
 Microcontroller or ASIP

Easwari Engineering College / EIE / VII sem Page 15


EE8691: EMBEDDED SYSTEMS

An ASIP is configured to process encoding and


deciphering. An another ASIP does the voice compression.
Third ASIC dials, modulates, demodulates, interfaces the
keyboard and touch screen or multiple line LCD graphic
displays and process the data input and recall of data from
memory.
 DSP core, CCDSP, Video, Voice and pixel processors.
 Flash, memory stick, EEPROMs and SRAMs.
 Peripheral circuits, ADC, DAC and interrupt controller.
 Direct Memory Access controller.
 LCD controller.
 Battery.

Software Tools:
The mobile phone software development tools are as follows:
1. OS( Windows, Mobile, Palm, Symbian) or BREW
2. Java 2 Micro Edition (J2ME) along with KVM as Java Virtual
Machine.
3. Java Wireless tool kit with JDK(Java Development Kit).

Software Components:
 Memory and File systems.
 Keypad, LCD, serial, USB, 3G or 2G port device drivers
for port operation for keypad, printer and communication
control.
 SMS(Short Message Service) message creation and
communicator, contact and PIM (Personal computer
communication control)
 Mobile imager for uploading pictures and
MMS(Multimedia messaging service)
 Mobile browser for access to the Web
 Downloader for Java games, ringtones and wall papers.

Easwari Engineering College / EIE / VII sem Page 16


EE8691: EMBEDDED SYSTEMS

 Bluetooth synchronization, IrDA and WAP connection


support.

Easwari Engineering College / EIE / VII sem Page 17

You might also like