Unit 5-EE8691 Embedded Systems
Unit 5-EE8691 Embedded Systems
EMBEDDEDSYSTEM
APPLICATIONAND
DEVELOPMENT
Case Study of Washing Machine- Automotive Application- Smart card System
Application-ATM machine –Digital camera
WASHING MACHINE
FILL:
AGITATE:
The wash basket will rotate in the clockwise direction for 10 revolutions, after that
basket will stop for 2 seconds then rotate 10 revolutions in anticlockwise direction.
The process will be continued for specified minutes in cycle table.
DRAIN:
after agitation, the water and detergent are drained. spin: during spin agitator
will be stationary only the basket will rotate at high speed then the moisture of
clothes are removed through holes in the inner metallic basket.
INDICATOR :
Machine ON LED ON. After completion of washing cycle buzzer sound will be
generated.
A slow motor turns a shaft with many disks with bumps on them.
The bumps activate micro switches which control water on and off, heater on and
off, the main motor at different speeds (wash and spin) and the pump for
emptying.
It controls the programming of the machine i.e. temp control, spin cycles.
Washing machine control program
Due to the role of embedded systems in car, the facilities and security also
increased.
The figure shows the different embedded systems applications in a high end car
Here we have taken the case study of an Adaptive Cruise Control (ACC) to
understand a control system design and also to understand the use of RTOS for
code implementation.
This system has a number of ports for data input and output.
It may also maintain string stability in case of multiple cars streaming through
highway and in case of VIP convoy.
Using an adaptive algorithm, ACC system maintains constant speed and can be
added string stability feature in case of multiple cars streaming on highway.
Cruise control relieves the driver from that duty and the driver hands over the
charge to the ACC
When
(3) Car is cruising at high speed and when there is no heavy traffic.
An adaptive algorithm calculates and sends the control signals to the stepper
motor at the vacuum valve actuator.
The orifice opening of the vacuum valve controls the throttle valve.
Switch cum Display for 'ON', for 'OFF', 'COAST', RESUME', SET/ACCELERATE.
For an ACC system, an adjustable system subunit generates output control signal
for throttle value.
The adaptive mechanism subunit sends outputs, which are inputs to adjustable
system.
Inputs
Brake status for brake activities from brake switch and pedal
ACC System Ports and tasks
Port_Align─ for a motor control for steps up clockwise or anticlockwise on a signal
from task_Align, aligns radar or UVHF transmitting device in the lane of the front-
end car
Port_Speed ─to send speed to port control function routine on receiving a signal
from task_Speed
User commands given as signals from switches/buttons. User control inputs for
ACC ON, OFF, Coast, resume, set/accelerate buttons
Brake event (Brake taping to disable the ACC system, as alternative to "cancel"
button at front panel)
Outputs
Alarms
Flashed Messages
Range and speed messages for other cars (in case of string stability mode)
Output to pedal system for applying emergency brakes and driver non-
intervention for taking charge of cruising from the ACC system
Switch with display─ 'ON', for 'OFF', 'COAST', RESUME', and SET/ACCELERATE.
COAST or RESUME switch to enable driver handover or resumes the ACC system
charge
Switch with display glows to show green or red as per the status when the ACC
activation
Alarms and message flashing unit issues appropriate alarms and message flashing
pictograms
An alignment circuit aligns the radar emitter. When driving in a hilly area, the
emitter alignment is must. A stepper motor aligns the attachment so that
transmitter beam of radar emits with the required beam alignment for the given
driving lane and divergence so maintain the in-lane line of sight of the front-end
car. task_Align does this function.
Transmit modulated pulses emit at periodic intervals and the delay period in
receiving its reflection from front-end vehicle
deltaT multiplied by 1.5 × 108 m/s (half of light velocity) gives the computed
distance d (= RangeNow) of front end car at that instance.
The differences of d with respect to safe dsafe and preset distances dset (in case of
maintaining string stability) are cyclically estimated.
The speedometer measures the speed and task_Speed compute error in preset
speed and measured speed.
The car decelerates and accelerates as per setting of throttle valve orifice at
an instance.
The brake control when the safe distance is not maintained and warning message
is flashed on the screen.
When battery power becomes low, the ACC system deactivates after issuing alarm
and flashing messages (notifications).
Functioning of ACC System
Transmit modulated pulses emit at periodic intervals and the delay period in
receiving its reflection from front-end vehicle
Retrieve the front end-car distance information from a radar or UVHF attachment
at the front string wheel.
A stepper motor aligns the attachment so that transmitter of radar maintains the
line of sight to front-end car. The radar system maintains string stability and
warns of emergency situations.
Run adaptive algorithm– to calculate and send control signals to stepper motor
actuator at vacuum-valve
(d) IEE (Institute of Electrical Engineers) guidance standard exists for EMC
(Electromagnetic Magnetic Control) and functional safety guidance
Internal RAM/ROM, ROM/Flash for RTOS codes for scheduling the tasks.
A separate processor with RAM and ROM for the task_Algorithm executes the
adaptive control algorithm
Speedometer
Stepper motor based alignment unit
Transceiver for transmitting pulses through an antenna hidden under the plastic
plates.
Purpose:
Enabling GUI at host machine to interact with the card holder/user for the
required transactions, for example, financial transactions with a bank or credit
card transactions.
Inputs:
Received header and messages at IO port Port_IO from host through the
antenna.
Outputs:
No control panel is at the card. The control panel and GUIs activate at the host
machine (for example, at ATM or credit card reader)
RST: Either used itself (reset signal supplied from the interface device) or in
combination with an internal reset control circuit (optional use by the card) .
Vcc is the supply voltage, Vss is the ground reference voltage against which the
Vcc potential is measured, Vpp connector is used for the high voltage signal, chip
receives commands & interchanges data.
The radiations from the host activate a charge pump at the card.
The charge pump powers the SoC circuit consisting of card processor, memory,
timer, interrupt handler and IO port, Port_IO.
The resetTask sends the messages requestHeader and requestStart for waiting
task task_ReadPort.
task_ReadPort sends requests for host identification and reads through the
Port_IO the host-identification message and request for card identification.
task_PW sends through Port_IO the requested card identification after system
receives the host identity through Port_IO.
task_Appl then runs required API. The requestApplClose message closes the
application.
The card can now be withdrawn All transactions between cardholder/user now
takes place through GUIs using at the host control panel (screen or touch screen
or LCD display panel).
Design metrics:
Code size:
multidimensional arrays, long 64-bit integer and floating points and very
limited use of the error handlers, exceptions, signals, serialization, debugging and
profiling.
Microcontroller hardware:
Generates distinct coded physical addresses for the program and data
logical addresses. Protected once writable memory space.
Validity:
System is embedded with expiry date, after which the card authorization
through the hosts disables.
Extendibility:
Performance:
Less than 1s for transferring control from the card to host machine.
User Interfaces:
Dedicated terminals
Usually with a small screen, keypad, printer, often also have biometric devices
such as thumb print scanner.
The terminal/ PC sends commands to the card (through the serial line).
The card executes the command and sends back the reply.
The terminal/ PC cannot directly access memory of the card so data in the card is
protected from unauthorized access. This is what makes the card smart.
The tasks (objects) are the instances of the classes Task_Appl, Task_Reset,
Task_ReadPort and Task_PW.
Hardware Architecture
CPU special features, for example, a security lock. CPU locks certain section of
memory - protect 1 kB or more data from modification and access by any external
source or instruction outside that memory.
Other way of protecting - CPU access through the physical addresses, which are
different from logical address used in the program.
Standard ROM 8 kB for usual or 64 kB when using advanced cryptographic
features.
Full or part of ROM bus activates take place after a security check only.
Software Architecture
Needs cryptographic software, needs special features in its operating system over
and above the MS DOS or UNIX system features.
OS, every method, class and run time library should be scalable.
Optimum Code-size.
Limited use of data types; multidimensional arrays, long 64-bit integer and
floating points and very limited use of the error handlers, exceptions, signals,
serialization, debugging and profiling.
Master file to store all file headers (file status, access conditions and the file lock).
A header means file status, access conditions and the file lock.
Dedicated file ─second file to hold a file grouping and headers of the immediate
successor
Elementary file ─third file to hold the file header and its file data.
Either a fixed length file management or a variable file length management with
each file with a predefined offset.
TYPICAL CONFIGURATIONS
1 KB to 32KB EEPROM.
Response from the card include 1..Le bytes followed by Response Code
SECURITY MECHANISMS
Password
Entity authentication
Biometric information
Person's identification
PASSWORD VERIFICATION
Dedicated file to hold a file grouping and headers of the immediate successor
elementary files of the group.
Elementary file to hold the file header and its file data.
Electronic Cash
Information Security
HOW DOES IT WORKS?
The basic one allows the customer to only draw cash and receive a report of the
account balance.
Another one is a more complex machine that accepts the deposit, provides credit
card payment facilities and reports account information.
The users access their accounts through a special type of plastic card that is
encoded with user information on a magnetic strip.
The strip contains an identification code that is transmitted to the bank’s central
computer by modem.
The users insert the card into ATMs to access the account and process their
account transactions.
The automated teller machine was invented by john Shepherd-Barron in the year
of 1960.
ATM Block Diagram
The automated teller machine consists of mainly two input devices and four
output devices that are;
Input Devices:
Card reader
Keypad
Output Devices:
Speaker
Display Screen
Receipt Printer
Cash Depositor
Card Reader:
The card reader is an input device that reads data from a card.
The card reader is part of the identification of your particular account number and
the magnetic strip on the backside of the ATM card is used for connection with the
card reader.
The card is swiped or pressed on the card reader which captures your account
information i.e. the data from the card is passed on the host processor (server).
The host processor thus uses this data to get the information from the
cardholders.
Keypad:
The card is recognized after the machine asks further details like your
identification number, withdrawal, and your balance inquiry Each card has a unique
PIN so that there is little chance for some else to withdraw money from your
account.
There are separate laws to protect the PIN code while sending it to the host
processor.
Speaker:
Display Screen:
The display screen displays the transaction information. Each step of withdrawal is
shown by the display screen. A CRT screen or LCD screen is used by most of the
ATMs.
Receipt Printer:
The receipt printer prints all the details recording your withdrawal, date and time,
and the amount of withdrawal and also shows the balance of your account in the
receipt.
Cash Dispenser:
This is a central system of the ATM from where the required money is obtained.
From this portion, the user can collect the money.
The cash dispenser must count each bill and give the required amount.
If in some cases the money is folded, it will be moved to another section and
becomes the reject bit.
A complete record of each transaction is kept by the ATM with the help of an RTC
device.
ATM Networking:
The internet service provider (ISP) also plays an important role in the ATMs.
When the transaction is made, the details are input by the cardholder.
This information is passed on to the host processor by the ATM. The host
processor checks these details with an authorized bank.
If the details are matched, the host processor sends the approval code to the
machine so that the cash can be transferred.
Most of the host processors can support either leased-line or dial-up machines
The leased line machines connect directly to the host processor through a four-
wire point to point dedicated telephone line.
These types of machines are preferred in place. The operating cost of these
machines is very high.
The dial-up ATMs connect to the host processor through a normal phone line
using a modem. These require a normal connection their and their initial
installation cost is very less. The operating cost of these machines is low
compared with leased line machines.
ATM Security:
The automated teller machine is simply a data terminal with two inputs and four
output devices.
The processor is the heart of the ATM. All the ATMs working around the world are
based on a centralized database system.
The ATM has to connect and communicate with the host processor (server).
The host processor is communicating with the internet service provider (ISP). It is
the gateway through all the ATM networks available to the cardholder.
When a cardholder wants does an ATM transaction, the user provides necessary
information through card reader and keypad.
The host processor enters the transaction request to the cardholder bank.
If the cardholder requests the cash, the host processor takes the cash from the
cardholder account.
Once the funds are transferred from the customer account to the host processor
bank account, the processor sends the approval code to the ATM and the
authorized machine to dispense the cash.
This is the way to get the amount on ATMs. The ATM network is fully based on a
centralized database environment.
Bill payments
Cash withdrawal
10x optical and 20x digital zooms and can also record high definition video-files.
The following figure represents the hardware and software components in Digital
camera.
The digital camera have the following Hardware components
Keys on the camera. It will enable a user to operate the camera. It has navigation
keys to navigate through the images back and forth.
Shutter, lens and charge coupled device (CCD) sensors for images and its ziaes
Good resolution photo quality LCD display in the back of camera to show
photographs or recorded video clips. It displays the GUI menus when the user
interacts with the camera. Displays text such as image-title, shooting data and
time and serial number. It displays messages. It displays the GUI menu when user
Internal memory flash to store OS and embedded software and limited number of
image files.
Camera Functions
It displays the frame view on the LCS Screen so that user can adjust the camera
inclination before shooting the frame.
When a key for opening the shutter ins pressed, the flash lamp glows and the
self-timer circuit switches off the lamp automatically.
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.
The CCD bits of each pixel in each row and column are offset corrected using a
CCD signal processor.
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 and decompression by inverse DCT. Thereafter it also does
Huffman coding for JPEG compression.
A DAC sends the inputs for the display unit. The DAC gets th input from the pixel
processor, which gets the inputs from the JPEG files for the saved images and gets
input directly from the CCDSP through the pixel processor out the frame in the
present view.
Universal Serial Bus (USB), Bluetooth and serial COM port for connecting it to
computer, mobile and printer.
Hardware Units
Microcontroller or ASIP (Application Specific Instruction Set Processor)
ROM for application codes and RTOS codes for scheduling the tasks
Timer, Flash memory for storing user preferences, contact data, user address,
user date of birth, user identification code, ADC, DAC and Interrupt controller
The DAC gets the input from pixel processor, which gets the inputs from JPEG file
for the saved images and also gets input directly from the CCDSP through pixel
processor or the frame in present view
LCD controller
JPEG decoding
LCD, USB and Bluetooth Port device- drivers for port operations for display, printer
and computer communication control.
Working
The chip consists arrays of sensors, which can convert the light into electrical
charges.
Though both CMOS and CCD are very common, CMOS chips are known to be
more cheaper.
But for higher pixel range and costly cameras mostly CCD technology is used.
A digital camera has lens/lenses which are used to focus the light that is to be
projected and created.
This light is made to focus on an image sensor which converts the light signals
into electric signals.
The light hits the image sensor as soon as the photographer hits the shutter
button.
As soon as the shutter opens the pixels are illuminated by the light in different
intensities.
Thus an electric signal is generated. This electric signal is then further broke down
to digital data and stored in a computer.
Software Units
CCD signal processing for off-set correction JPEG coding
JPEG decoding
LCD, USB and Bluetooth Port device- drivers for port operations for display, printer
and computer communication control.
Working
The chip consists arrays of sensors, which can convert the light into electrical
charges.
Though both CMOS and CCD are very common, CMOS chips are known to be
more cheaper.
But for higher pixel range and costly cameras mostly CCD technology is used.
A digital camera has lens/lenses which are used to focus the light that is to be
projected and created.
This light is made to focus on an image sensor which converts the light signals
into electric signals.
The light hits the image sensor as soon as the photographer hits the shutter
button.
As soon as the shutter opens the pixels are illuminated by the light in different
intensities.
Thus an electric signal is generated. This electric signal is then further broke down
to digital data and stored in a computer.
Digital camera hardware architecture
Camera tasks are modeled by four class diagrams are divided Picture_FileCreation,
Picture_FileDisplay, Picture_FileTransfer and Controller_tasks.
Microcontroller and the several ASIPs are required for expected camera
performance.
Single purpose ASIP does the DCT compression, Huffman encoding, DCT
decompression, Huffman decoding and file save,
S.No
Question and Answers CO K
.
What is meant by smart card?
A smart card, chip card, or integrated circuit card (ICC
or IC card) is a physical electronic authorization
1. CO6 K1
device, used to control access to a resource. It is
typically a plastic credit card-sized card with an
embedded integrated circuit (IC) chip.
What are the basic requirements while
designing an embedded system
• Performance. A real-time system must satisfy the
timing needs and constraints of the operating
environment.
• Efficiency. Efficiency is the internal quality
2. counterpart to the externally observable attribute of CO6 K1
performance.
• Reliability
• Robustness
• Safety
• Security
• Usability
List some evident examples of Real time
embedded application.
• Videoconference applications.
• VoIP (voice over Internet Protocol)
3. • Online gaming. CO6 K1
• Community storage solutions.
• Some e-commerce transactions.
• Chatting.
• IM (instant messaging)
Show the architectural hardware units needed
in an automotive applications.
4. CO6 K1
S.No. Question and Answers CO K
What is the hardware units needed to design
smartcard?
Microcontroller or ASIP, RAM for storing temporary
variables and Stack; OTP ROM for application codes
5. and RTOS codes for scheduling the tasks; Flash for CO6 K1
storing user data, user address, user identification
codes, card number and expiry date; Timer and
interrupt controller.
Integrate the various types of memory units
that must be present in smartcard, adaptive
cruise control and washing machine.
1. RAM. 1K. This is needed for fast computation and
response. Only a tiny amount is available.
2. EEPROM (Electrically Erasable PROM). Between 1
6. to 24K. Unlike RAM, its contents are not lost CO6 K1
when power is. Applications can run off and write
to it, but it is very slow and one can only
read/write to it so many (100 000) times.
3. ROM. Between 8 to 24K. The Operating System
and other basic software like encryption
algorithms are stored here.
What are the components present in Washing
machines?
All washing machines have the same basic parts: a
watertight container called the tub; a drum, which
fits inside the tub, to hold the washing; electrically
7. operated valves to allow water into the tub; a CO6 K1
heating element to raise the water temperature; an
electric motor to turn the drum; a pump to drain the
water; and a programmer to control the switching of
the various components.
What are the operations in Washing machine?
Fill
8. Agitate CO6 K1
Drain
Indicator
When ACC can be used?
1. Road conditions are suitable (not wet or icy, or
9. 2. There are no strong winds or fog), or CO6 K1
3. Car is cruising at high speed and when there is
no heavy traffic.
14. REAL TIME APPLICATIONS IN DAY TO DAY LIFE AND TO
INDUSTRY
This project monitors the water level of the tank and automatically switches on the pump
motor when ever tank is empty. The motor is switched off automatically when container
or overhead tank is full. The main principle used in this project is “water conducts
electricity”. In this project water level of the overhead tank is indicated on a 16*2 LCD. In
this system a set of 4 wires which are placed at different water levels can be used to
sense the water levels. Based on the outputs of these wires controller displays the water
level as well as controls the pump motor. For more information about this project, click
here.
“Uno” means one in Italian and was chosen to mark the release of Arduino
Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE)
were the reference versions of Arduino, now evolved to newer releases. The Uno
board is the first in a series of USB Arduino boards, and the reference model for
the Arduino platform. (IDE = integrated development environment)
The basic working of CPU of ATmega328:-
1.The data is uploaded in serial via the port (being uploaded from the computer’s
Arduino IDE). The data is decoded and then the instructions are sent to instruction
2.On the next clock pulse the next set of instructions are loaded in instruction
register.
3. In general purpose registers the registers are of 8-bit but there are 3 16-bit
registers also.
a. 8-bit registers are used to store data for normal calculations and results.
b. 16-bit registers are used to store data of timer counter in 2 different register. Eg.
X-low & X-high. They are fast, and are used to store specific hardware functions.
4.EEPROM stores data permanently even if the power is cut out. Programming
5. Interrupt Unit checks whether there is an interrupt for the execution of instruction
6.Serial Peripheral Interface (SPI) is an interface bus commonly used to send data
etc. It uses separate clock and data lines, along with a select line to choose the
8.Analog comparator compares the input values on the positive and negative pin,