View
224
Download
0
Category
Preview:
Citation preview
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 1/56
EMBEDDED BASED HUMAN DATA SECURITY SYSTEM
Buzzer
E O G
SensorRelay
Drive
Micro
Controller
Powersupply
L C D
Display
Temp.
Sensor
Mech.
model
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 2/56
Electrooculography (EOG) :
Electro-oculography (EOG) is a technology that consists of placing electrodes
on the person¶s forehead around the eyes to record eye movements. The voltage that
exists between the eyes is a very small electrical potential that can be detected using
electrodes. People with certain disabilities may use these systems in order to have
certain communication.
The voltage difference is measured between the cornea and the retina. The
resting potential ranges from 0.4mV to 1mV. However, the voltage difference when
here's an eye movement can be as small as just some microvolts. One electrode is
more positive or negative with respect the ground electrode, therefore, the recorded
signal is either negative or positive.
The Electrooculogram
The human eye is polarized, with the front of the eye being positive and the back of
the eye being negative. This is caused by a concentration of negatively charged nerves
in the retina on the back of the eye. As the eye moves the negative pole moves relative
to the face and this change in the dipole potential can be measured on the skin in
micro volts. To translate this voltage into a position, two sets of electrodes are used to
measure the differential voltage in the vertical and horizontal direction, on this project,
however, just horizontal movements are recorded. The figure below indicates how the
electrodes are placed on the face. The red and black leads measure movement in the
horizontal direction and the white and brown leads measure movement in the vertical
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 3/56
direction. The green sensor is placed behind the ear or on the ear lobe to provide a
ground reference.
Using these leads we can translate each change in voltage into a change in the
eye¶s position. If the eye looks to the right for instance, the positive pole of the eyewill be nearest the right side sensor causing it to read a positive voltage while the back
of the eye will be nearest the left side sensor causing it to read a negative voltage.
From the voltage potential between these two sensors the left/right position of the eye
can be determined. The same technique is used to determine the vertical position. The
eye has a standing electrical potential between front and back, sometimes called the
corneo-fundal potential. The potential is mainly derived from the retinal pigment
epithelium (RPE), and it changes in response to retinal illumination.
The potential decreases for 8±10 min in darkness. Subsequent retinal
illumination causes an initial fall in the standing potential over 60±75 s (the fast
oscillation (FO)), followed by a slow rise for 7±14 min (the light response). These
phenomena arise from ion permeability changes across the basal RPE membrane.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 4/56
The clinical electro-oculogram (EOG) makes an indirect measurement of the
minimum amplitude of the standing potential in the dark and then again at its peak
after the light rise. This is usually expressed as a ratio of 'light peak to dark through'
and reffered to as the Arden ratio.
The EOG on this project is used as a way to interact with the computer. However,
there are some other uses as well.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 5/56
Other Applications
� Sleep and dream research
� Eye tracking for marketing purposes
� Reading ability and visual fatigue
� Retinal dysfunction
± Some disorders of the retina exhibit abnormal or absent changes in the
corneal-retinal potential during dark and light adaptation processes.
� Vestibular and balance dysfunction
± Nystagmus: characteristic slow-phase/fast-phase eye movement measurable
by EOG
± prevent drunk drivers from taking to the road.
Thermistors:
Thermistors are thermally sensitive resistors produced with semiconducting materials.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 6/56
Although RTDs and thermistors are both resistive devices, they differ substantially in
operation and usage, as thermistors are passive semiconductor devices.
Two types of thermistors are available:
1. Negative temperature coefficient (NTC), which decreases its resistance as its
temperature increases, and
2. Positive temperature coefficient (PTC), which increases its resistance as its
temperature decreases.
From the point of view of temperature measurement applications, NTC types are used
far more than PTC ones. Due to its characteristics, PTC types are more frequently
used as thermostats to sense and regulate temperatures (inside ovens, for instance).
Main advantages of (NTC) thermistors are:
y Large change in resistance versus temperature
y Fast time response
y High resistance eliminates the need for four wire measurement
y Small size
y Inexpensive
y High stability
Main disadvantages of thermistors are:
y Non-linear
y Operating temperature limited to approximately -60 to +300 ºCelsius
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 7/56
y Current source required
Operating principle of thermistors
Thermistors can be encapsulated in glass or epoxy considering a big variety of
mechanical models. Most (NTC) thermistors have high resistivities and high negative
coefficients, allowing the NTC thermistors to detect changes in temperature that could
not be observable with RTDs or thermocouples.
For example, it is common to have NTC thermistors exhibiting a negative temperature
coefficient with a change in resistance of about 4.5%/ºC at 30ºC, and about 1.6%/ºC at
155ºC. Common base values can be in the range of a few ohms to mega-ohms.Normally, high-R thermistors are used for ³high´ temperatures (lower than 300ºC),
and low-R thermistors for ³low´ temperatures (higher than -60ºC).
Considering the range of some kilo-ohms to mega-ohms, we can conclude that the
resistance of the wires connecting the instrumentation to the thermistors is
insignificant (in this sense, the three- or four-wire measurement configuration referred
for RTDs are not necessary for NTC thermistors with high-R base values).
Figure 2.6 and Figure 2.7 present typical configurations for two- and four-wire
thermistors circuits (R L stands for the lead resistances); in cases where the series
resistance of the lead configuration is significant, the four-wire circuit can be used. As
far as one current source is used, the calculation of the thermistors resistance is a
straightforward task according to Ohm¶s Law.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 8/56
Fi ¡ r ¢
£
.¤
¥
¦ § - ¦ ir ¢ t
̈
¢ r © ist§ rs § fi ¡ r ti§ (© § st § © © § ).
Fi ¡ r ¢
£
.
F§ ¡ r- ¦ ir ¢ t
̈
¢ r © ist§ rs § fi ¡ r ti§ .
s ¡ s¡ ll , f § r ¢
̈
¢ ¢ fit, ¦ ¢ s
̈
§ ¡ l
¢ r ¢
t§ ri ¢ ; i t
̈
is s¢ , t ̈
¢ ri ¢
f § r i r ¢ si s¢ siti it is l§ ss § f li ¢ rit .
I t ̈
is s¢ s¢ , t ̈
¢ r ¢ sist ¢ ¢ rs¡ s t¢ © ¢ r t¡ r ¢
̈
r t¢ risti § f ¥
!
t ̈
¢ r © ist§ rs is § -li ¢ r.
¥
̈
¢ f § ll§ ¦ i ¢
" r ¢ ssi§
¢ s ri
¢ s t ̈
¢ r ¢ sist ¢ ¢ rs ¡ s t¢ © ¢ r t¡ r ¢
̈
r t¢ risti § f t ̈
¢ r © ist§ rs
(
£
.
#
)¦
̈
¢ r ¢ :
$ . RT is t
%
& ' & r ( -) (
0 & r R 1 t T(K),
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 9/56
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 10/56
controller). Operational amplifiers (op-amps) are commonly employed to carry out the
amplification of the signal in the signal conditioning stage.
Inputs
Signal inputs accepted by signal conditioners include DC voltage and current,
AC voltage and current, frequency and electric charge. Sensor inputs can be
accelerometer, thermocouple, thermistor, resistance thermometer, strain gauge or
bridge, and LVDT or RVDT. Specialized inputs include encoder, counter or
tachometer, timer or clock, relay or switch, and other specialized inputs. Outputs for
signal conditioning equipment can be voltage, current, frequency, timer or counter,
relay, resistance or potentiometer, and other specialized outputs.
Signal conditioning processes
Signal conditioning can include amplification, filtering, converting, range
matching, isolation and any other processes required to make sensor output suitable
for processing after conditioning.
Filtering
Filtering is the most common signal conditioning function, as usually not all
the signal frequency spectrum contains valid data. The common example are 60Hz
AC power lines, present in most environments, which will produce noise if amplified.
Amplifying
Signal amplification performs two important functions: increases the resolution
of the inputed signal, and increases its signal-to-noise ratio. For example, the output of
an electronic temperature sensor, which is probably in the millivolts range is probably
too low for an Analog-to-digital converter (ADC) to process directly. In this case it isnecessary to bring the voltage level up to that required by the ADC.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 11/56
Commonly used amplifiers on signal conditioning include Sample and hold
amplifiers, Peak Detectors, Log amplifiers, Antilog amplifiers, Instrumentation
amplifiers or programmable gain amplifiers.
Isolation
Signal isolation must be used in order to pass the signal from the source to the
measurement device without a physical connection: it is often used to isolate possible
sources of signal perturbations. Also notable is that's it is important to isolate the
potentially expensive equipment used to process the signal after conditioning from the
sensor.
Magnetic or optic isolation can be used. Magnetic isolation transforms the signal from
voltage to a magnetic field, allowing the signal to be transmitted without a physical
connection (for example, using a transformer). Optic isolation takes an electronic
signal and modulates it to a signal coded by light transmission (optical encoding),
which is then used for input for the next stage of processing.
Applications
It is primarily utilized for data acquisition, in which sensor signals must be normalized
and filtered to levels suitable for analog-to-digital conversion so they can be read by
computerized devices. Other uses include preprocessing signals in order to reduce
computing time, converting ranged data to boolean values, for example when knowing
when a sensor has reached certain value.
Types of devices that use signal conditioning include signal filters, instrument
amplifiers, sample-and-hold amplifiers, isolation amplifiers, signal isolators,
multiplexers, bridge conditioners, analog-to-digital converters, digital-to-analog
converters, frequency converters or translators, voltage converters or inverters,
frequency-to-voltage converters, voltage-to-frequency converters, current-to-voltage
converters, current loop converters, and charge converters.
\
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 12/56
POWER SUPPLY UNIT
As we all know any invention of latest technology cannot be activated without the
source of power. So it this fast moving world we deliberately need a proper power
source which will be apt for a particular requirement. All the electronic components
starting from diode to Intel IC¶s only work with a DC supply ranging from +5v to
+12. We are utilizing for the same, the most cheapest and commonly available energy
source of 230v-50Hz and stepping down , rectifying, filtering and regulating the
voltage. This will be dealt briefly in the forth-coming sections.
3.1. STEP DOWN TRANSFORMER:When AC is applied to the primary winding of the power transformer it can
either be stepped down or up depending on the value of DC needed. In our circuit the
transformer of 230v/15-0-15v is used to perform the step down operation where a
230V AC appears as 15V AC across the secondary winding . One alteration of input
causes the top of the transformer to be positive and the bottom negative. The next
alteration will temporarily cause the reverse. The current rating of the transformer
used in our project is 2A. Apart from stepping down AC voltages, it gives isolation
between the power source and power supply circuitries.
3.2. RECTIFIER UNIT:
Formatted: Font: (Default) Times New Roma
13 pt
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 13/56
In the power supply unit, rectification is normally achieved using a solid state
diode. Diode has the property that will let the electron flow easily in one direction at
proper biasing condition . As AC is applied to the diode, electrons only flow when the
anode and cathode is negative. Reversing the polarity of voltage will not permit
electron flow.
A commonly used circuit for supplying large amounts of DC power is the
bridge rectifier. A bridge rectifier of four diodes (4*IN4007) are used to achieve full
wave rectification. Two diodes will conduct during the negative cycle and the other
two will conduct during the positive half cycle. The DC voltage appearing across the
output terminals of the bridge rectifier will be somewhat lass than 90% of the applied
rms value. Normally one alteration of the input voltage will reverse the polarities.Opposite ends of the transformer will therefore always be 180 deg out of phase with
each other.
For a positive cycle, two diodes are connected to the posi tive voltage at the top
winding and only one diode conducts . At the same time one of the other two diodes
conducts for the negative voltage that is applied from the bottom winding due to the
forward bias for that diode. In this circuit due to positive half cycleD1 & D2 will
conduct to give 10.8v pulsating DC. The DC output has a ripple frequency of 100Hz.
Since each altercation produces a resulting output pulse, frequency = 2*50 Hz. The
output obtained is not a pure DC and therefore filtration has to be done.
3.3. FILTERING UNIT:
Filter circuits which is usually a capacitor acting as a surge arrester always
follow the rectifier unit. This capacitor is also called as a decoupling capacitor or a
bypassing capacitor, is used not only to µshort¶ the ripple with frequency of 120Hz to
ground but also to leave the frequency of the DC to appear at the output. A load
resistor R1 is connected so that a reference to the ground is maintained . C1R1 is for bypassing ripples. C2R2 is used as a low pass filter, i.e. it passes only low frequency
signals and bypasses high frequency signals. The load resistor should be 1% to 2.5%
of the load.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 14/56
1000w
f/25v : for the reduction of ripples from the pulsating.
10wf/25v : for maintaining the stability of the voltage at the load side.
O,1wf : for bypassing the high frequency disturbances.
3.4. VOLTAGE REGULATORS:
The voltage regulators play an important role in any power supply unit. The
primary purpose of a regulator is to aid the rectifier and filter circuit in providing a
constant DC voltage to the device. Power supplies without regulators have an inherent
problem of changing DC voltage values due to variations in the load or due to
fluctuations in the AC liner voltage. With a regulator connected to the DC output, the
voltage can be maintained within a close tolerant region of the desired output. IC7812
and 7912 is used in this project for providing +12v and ±12v DC supply.
3.5. SPECIFICATIONS :
Resistors R1 and R2 maintain line load regulation.
At the secondary side of the transformer,
Applied voltage = 15v
Conducting drop across the diodes = 2*0.6 = 1.2v
Without capacitor:
Vavg = (15-1.2)v = 13.8c pulsating DC Frequency = 100Hz
With capacitor:
V=Vavg *1.414(formfactor)
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 15/56
= 19.51v
frequency = oHz
With 7812 voltage regulator :
V0= +12v
With 7912 voltage regulator :
V0= -12v
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 16/56
PI
Micrcontroller:
PI
16f877 Pin Diagram:
The Microcontroller has many more reasons to be used than the
microprocessors. The difference between the Microprocessors and Microcontrollers
are given below.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 17/56
Difference between Microprocessors and Microcontrollers
MICROPROCEESOR MICROCONTROLLER
1. No memory Got Separate ROM and RAM
2. No I/O Ports In built Ports Available
3. No Timers Internal Timers Available
4. No Serial Port In built Serial Communication
5. Von Neumann Architecture Harvard Architecture
Other than the normal Microcontrollers PIC Family supports more features, so
we have chosen PIC 16F877 as the main controller. The Main Features and
Peripherals are discussed below.
5.1.
ore Features:
� High performance RISC CPU
� Only 35 single word instructions to learn
� All single cycle instructions except for program Branches which are two cycle
� Operating speed: DC - 20 MHz clock input
DC - 200 ns instruction cycle
� Up to 8�
x 14 words of FLASH Program Memory,
Up to 368 x 8 bytes of Data Memory (RAM)
� Interrupt capability (up to 14 sources)
� Direct, indirect and relative addressing modes
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 18/56
� Power-on Reset (POR)
� Power-up Timer (PWRT) and
Oscillator Start-up Timer (OST)
� Processor read/write access to program memory
� Wide operating voltage range: 2.0V to 5.5V
� Low-power consumption:
- < 0.6 mA typical @ 3V, 4 MHz
- < 1 � A typical standby current
5.2. Peripheral Features:
� Timer0: 8-bit timer/counter with 8-bit prescaler
� Timer1: 16-bit timer/counter with prescaler, can be incremented during SLEEP
� Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler
� 10-bit multi-channel Analog-to-Digital converter
� Synchronous Serial Port (SSP) with SPI (Master mode) and 12C(Master/Slave)
� Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-
bit address detection
� Parallel Slave Port (PSP) 8-bits wide, with external RD, WR and CS controls (40/44-
pin only)
5.3. DEVI�
E OVERVIEW
This document contains device specific information. Additional information
may be found in the PICmicro� Mid-Range Reference Manual (DS33023). There
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 19/56
are four devices (PIC16F873, PIC16F874, PIC16F876 and PIC16F877) covered by
this data
sheet. The PIC16F877/874 devices come in 40-pin packages. The Parallel Slave Port
is not implemented on the 28-pin devices. The PIC16F877 Block diagram is shown
below:
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 20/56
PINOUT DES�
RIPTION:
INTERNAL ARCHITECTURE
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 21/56
5.4. I/O PORTS:
Some pins for these I/O ports are multiplexed with an alternate function for the
Peripheral features on the device. In general, when a peripheral is enabled, that pin
may not be used as a general purpose I/O pin.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 22/56
PORTA and the TRISA Register:
PORTA is a 6-bit wide, bi-directional port. The corresponding data
direction register is TRISA. Setting a TRISA bit (= 1) will make the corresponding
PORTA pin an input (i.e., put the corresponding output driver in a Hi-Impedance
mode). Clearing a TRISA bit (= 0) will make the corresponding PORTA pin an output
(i.e., put the contents of the output latch on the selected pin). Reading the PORTA
register reads the status of the pins, where as writing to it will write to the port latch.
All write operations are read-modify-write operations.Therefore, a write to a port
implies that the port pins are read, the value is modified and then written to the port
data latch. Pin RA4 is multiplexed with the Timer0 module clock input to become the
RA4/T0C�
I pin. All other PORTA pins have TTL input levels and full CMOS output
drivers. Other PORTA pins are multiplexed with analog inputs and analog VREF
input. The operation of each pin is selected by clearing/setting the control bits in the
ADCON1 register (A/D Control Register1).
PORTB and the TRISB Register
PORTB is an 8-bit wide, bi-directional port. The corresponding
data direction register is TRISB. Setting a TRISB bit (= 1) will make the
corresponding PORTB pin an input (i.e., put the corresponding output driver in a Hi-Impedance mode). Clearing a TRISB bit (= 0) will make the corresponding PORTB
pin an output (i.e., put the contents of the output latch on the selected pin). Three pins
of PORTB are multiplexed with the Low Voltage Programming function: RB3/PGM,
RB6/PGC and RB7/PGD. PORTB pins has a weak internal pull-up.
A single control bit can turn on all the pull-ups. This is performed
by clearing bit RBPU (OPTION_REG<7>). The weak pull-up is automatically turned
off when the port pin is configured as an output. The pull-ups are disabled on a
Power-on Reset. This interrupt can wake the device from SLEEP. The user, in the
Interrupt Service Routine, can clear the interrupt in the following manner: a) Any read
or write of PORTB. This will end the mismatch condition. b) Clear flag bit RBIF.A
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 23/56
mismatch condition will continue to set flag bit RBIF. Reading PORTB will end the
mismatch condition and allow flag bit RBIF to be cleared.
The interrupt-on-change feature is recommended for wake-up on
key depression operation and operations where PORTB is only used for the interrupt-
on-change feature. Polling of PORTB is not recommended while using the interrupt-
on-change feature. This interrupt-on-mismatch feature, together with software
onfigureable pull-ups on these four pins, allow easy interface to a keypad and make it
possible for wake-up on key depression. Refer to the Embedded Control Handbook,
³Implementing W � k e-up on K ey S tr ok es´ (AN552). RB0/INT is an external interrupt
input pin and is configured using the INTEDG bit (OPTION_REG<6>).
PORT
and the TRIS
Register:
PORTC is an 8-bit wide, bi-directional port. The corresponding data
direction register is TRISC. Setting a TRISC bit (= 1) will make the corresponding
PORTC pin an input (i.e., put the corresponding output driver in a Hi-Impedance
mode). Clearing a TRISC bit (= 0) will make the corresponding PORTC pin an output
(i.e., put the contents of the output latch on the selected pin). PORTC is multiplexed
with several peripheral functions.
When enabling peripheral functions, care should be taken in defining
TRIS bits for each PORTC pin. Some peripherals override the TRIS bit to make a pin
an output,while other peripherals override the TRIS bit to make a pin an input. Since
the TRIS bit override is in effect while the peripheral is enabled, read-modify write
instructions (BSF, BCF, XORWF) with TRISC as destination, should be avoided. The
user should refer to the corresponding peripheral section for the correct TRIS bit
settings.
PORTD and TRISD Registers:
PORTD is an 8-bit port with Schmitt Trigger input buffers.Each pin
is individually configureable as an input or output.PORTD can be configured as an 8-
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 24/56
bit wide microprocessor port (parallel slave port) by setting control bit PSPMODE
(TRISE<4>). In this mode, the input buffers are TT L.
PORTE and TRISE Register:
PORTE has three pins (RE0/RD/AN5, RE1/WR/AN6,and
RE2/CS/AN7) which are individually configureable as inputs or outputs. These pins
have Schmitt Trigger input buffers.The PORTE pins become the I/O control inputs for
the microprocessor port when bit PSPMODE (TRISE<4>) is set. In this mode, the
user must make certain that the TRISE<2:0> bits are set, and that the pins are
configured as digital inputs. Also ensure that ADCON1 is configured for digital I/O.
In this mode, the input buffers are TTL.
5.5. ADDRESSABLE UNIVERSAL SYN
HRONOUS ASYN
HRONOUS
RE
EIVER
TRANSMITTER (USART):
The Universal Synchronous Asynchronous Receiver Transmitter
(USART) module is one of the two serial I/O modules. (USART is also known as a
Serial Communications Interface or SCI.) The USART can be configured as a full
duplex asynchronous system that can communicate with peripheral devices such as
CRT terminals and personal computers, or it can be configured as a half duplex
synchronous system that can communicate with peripheral devices such as A/D or
D/A integrated circuits, serial EEPROMs etc. The USART can be configured in the
following modes:
� Asynchronous (full duplex)
� Synchronous - Master (half duplex)
� Synchronous - Slave (half duplex)
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 25/56
Bit SPEN (RCSTA<7>) and bits TRISC<7:6> have to be set in order
to configure pins RC6/TX/C
and RC7/RX/DT as the Universal Synchronous
Asynchronous Receiver Transmitter.The USART module also has a multi-processor
communication capability using 9-bit address detection.
TXSTA: TRANSMIT STATUS AND CONTROL REGISTER (ADDRESS 98h)
bit 7 CSR C: Clock Source Select bit
Asynchronous mode: Don¶t care
Synchronous mode:
1 = Master mode (clock generated internally from BRG)
0 = Slave mode (clock from external source)
bit 6 TX9: 9-bit Transmit Enable bit
1 = Selects 9-bit transmission
0 = Selects 8-bit transmission
bit 5 TXEN: Transmit Enable bit
1 = Transmit enabled
0 = Transmit disabled
bit 4 SYNC: USART Mode Select bit
1 = Synchronous mode
0 = Asynchronous mode
bit 2 BRGH: High Baud Rate Select bit
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 26/56
Asynchronous mode:
1 = High speed
0 = Low speed
Synchronous mode: Unused in this mode
bit 1 TRMT: Transmit Shift Register Status bit
1 = TSR empty
0 = TSR full
bit 0 TX9D: 9th bit of Transmit Data, can be parity bit
RCSTA: RECEIVE STATUS AND CONTROL REGISTER (ADDRESS 18h)
bit 7 SPEN: Serial Port Enable bit
1 = Serial port enabled (configures RC7/RX/DT and RC6/TX/C
pins as serial port
pins)
0 = Serial port disabled
bit 6 RX9: 9-bit Receive Enable bit
1 = Selects 9-bit reception
0 = Selects 8-bit reception
bit 5 SREN: Single Receive Enable bit
Asynchronous mode: Don¶t care
Synchronous mode - master:
1 = Enables single receive
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 27/56
0 = Disables single receive
This bit is cleared after reception is complete.
Synchronous mode - slave: Don¶t care
bit 4 CREN: Continuous Receive Enable bit
Asynchronous mode:
1 = Enables continuous receive
0 = Disables continuous receive
Synchronous mode:
1 = Enables continuous receive until enable bit CREN is cleared (CREN overrides
SREN)
0 = Disables continuous receive
bit 2 FERR : Framing Error bit
1 = Framing error (can be updated by reading RCREG register and receive next valid
byte)
0 = No framing error
bit 1 OERR : Overrun Error bit
1 = Overrun error (can be cleared by clearing bit CREN)
0 = No overrun error
bit 0 RX9D: 9th bit of Received Data (can be parity bit, but must be calculated by
user firmware)
USART Baud Rate Generator(BRG):
The BRG supports both the Asynchronous and Synchronous modes
of the USART. It is a dedicated 8-bit baud rate generator. The SPBRG register
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 28/56
controls the period of a free running 8-bit timer. In Asynchronous mode, bit BRGH
(TXSTA<2>) also controls the baud rate.Table shows the formula for computation of
the baud rate for different USART modes which only apply in Master mode (internal
clock). Given the desired baud rate and FOSC, the nearest integer value for the
SPBRG register can be calculated using the formula in Table. From this, the error in
baud rate can be determined. It may be advantageous to use the high baud rate (BRGH
= 1), even for slower baud clocks. This is because the FOSC/(16(X + 1)) equation can
reduce the baud rate error in some cases.Writing a new value to the SPBRG register
causes the BRG timer to be reset (or cleared). This ensures the BRG does not wait for
a timer overflow before outputting the new baud rate.
BAUD RATES FOR ASYNCHRONOUS MODE (BRGH = 0)
BAUD RATES FOR ASYNCHRONOUS MODE (BRGH = 1)
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 29/56
USART Asynchronous Mode:
In this mode, the USART uses standard non-return-to zero (NRZ) format
(one START bit, eight or nine data bits, and one STOP bit). The most common data
format is 8-bits. An on-chip, dedicated, 8-bit baud rate generator can be used to derive
standard baud rate frequencies from the oscillator. The USART transmits and receives
the LSb first. The transmitter and receiver are functionally independent, but use the
same data format and baud rate. The baud rate generator produces a clock, either x16
or x64 of the bit shift rate, depending on bit BRGH (TXSTA<2>). Parity is not
supported by the hardware, but can be implemented in software (and stored as the
ninth data bit).
Asynchronous mode is stopped during SLEEP. Asynchronous mode
is selected by clearing bit SYNC (TXSTA<4>). The USART Asynchronous module
consists of the following important elements:
� Baud Rate Generator
� Sampling Circuit
� Asynchronous Transmitter
� Asynchronous Receiver
USART ASYNCHRONOUS TRANSMITTER:
The heart of the transmitter is the transmit (serial) shift register (TSR). The
shift register obtains its data from the read/write transmit buffer, TXREG. The
TXREG register is loaded with data in software. The TSR register is not loaded until
the STOP bit has been transmitted from the previous load. As soon as the STOP bit is
transmitted, the TSR is loaded with new data from the TXREG register (if available).
Once the TXREG register transfers the data to the TSR register (occurs in one TCY),
the TXREG register is empty and flag bit TXIF (PIR1<4>) is set. This interrupt can be
enabled/disabled by setting/clearing enable bit TXIE ( PIE1<4>). Flag bit TXIF will
be set, regardless of the state of enable bit TXIE and cannot be cleared in software. It
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 30/56
will reset only when new data is loaded into the TXREG register. While flag bit TXIF
indicates the status of the TXREG register, another bit TRMT (TXSTA<1>) shows
the status of the TSR register.
Status bit TRMT is a read only bit, which is set when the TSR
register is empty. No interrupt logic is tied to this bit, so the user has to poll this bit in
order to determine if the TSR register is empty.Transmission is enabled by setting
enable bit TXEN (TXSTA<5>). The actual transmission will not occur until the
TXREG register has been loaded with data and the baud rate generator (BRG) has
produced a shift clock. The transmission can also be started by first loading the
TXREG register and then setting enable bit TXEN. Normally, when transmission is
first started, the TSR register is empty. At that point, transfer to the TXREG register
will result in an immediate transfer to TSR, resulting in an empty TXREG. A back-
to-back transfer is thus possible Clearing enable bit TXEN during a transmission will
cause the transmission to be aborted and will reset the transmitter.
As a result, the RC6/TX/C
pin will revert to hi-impedance.In order
to select 9-bit transmission, transmit bit TX9 (TXSTA<6>) should be set and the ninth
bit should be written to TX9D (TXSTA<0>). The ninth bit must be written before
writing the 8-bit data to the TXREG register. This is because a data write to the
TXREG register can result in an immediate transfer of the data to the TSR register (if
the TSR is empty). In such a case, an incorrect ninth data bit may be loaded in the
TSR register.
When setting up an Asynchronous Transmission, follow these steps:
1. Initialize the SPBRG register for the appropriate baud rate. If a high speed
baud rate is desired, set bit BRGH.
2. Enable the asynchronous serial port by clearing bit SYNC and setting bit
SPEN.
3. If interrupts are desired, then set enable bit TXIE.
4. If 9-bit transmission is desired, then set transmit bit TX9.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 31/56
5. Enable the transmission by setting bit TXEN, which will also set bit TXIF.
6. If 9-bit transmission is selected, the ninth bit should be loaded in bit TX9D.
7. Load data to the TXREG register (starts transmission).
8. If using interrupts, ensure that GIE and PEIE (bits 7 and 6) of the INTCON
register are set.
USART ASYNCHRONOUS RECEIVER:
The data is received on the RC7/RX/DT pin and drives the data
recovery block. The data recovery block is actually a high speed shifter, operating atx16 times the baud rate; whereas, the main receive serial shifter operates at the bit rate
or at FOSC. Once Asynchronous mode is selected, reception is enabled by setting bit
CREN (RCSTA<4>). The heart of the receiver is the receive (serial) shift register
(RSR). After sampling the STOP bit, the received data in the RSR is transferred to the
RCREG register (if it is empty). If the transfer is complete, flag bit RCIF (PIR1<5>) is
set. The actual interrupt can be enabled/disabled by setting/clearing enable bit RCIE
(PIE1<5>). Flag bit RCIF is a read only bit, which is cleared by the hardware. It is
cleared when the RCREG register has been read and is empty.
If the RCREG register is still full, the overrun error bit OERR
(RCSTA<1>) will be set. The word in the RSR will be lost. The RCREG register can
be read twice to retrieve the two bytes in the FIFO. Overrun bit OERR has to be
cleared in software.This is done by resetting the receive logic (CREN is cleared and
then set). If bit OERR is set, transfers from the RSR register to the RCREG register
are inhibited, and no further data will be received. It is therefore,essential to clear
error bit OERR if it is set. Framing error bit FERR (RCSTA<2>) is set if a STOP bit
is detected as clear. Bit FERR and the 9th receive bit are buffered the same way as the
receive data. Reading the RCREG will load bits RX9D and FERR with new values,therefore, it is essential for the user to read the RCSTA register before reading the
RCREG register in order not to lose the old FERR and RX9D information.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 32/56
ANALOG-TO-DIGITAL CONVERTER (A/D) MODULE:
The Analog-to-Digital (A/D) Converter module has five inputs for
the 28-pin devices and eight for the other devices. The A/D conversion of the analog
input signal results in a corresponding 10-bit digital number. The A/D converter has a
unique feature of being able to operate while the device is in SLEEP mode. To operate
in SLEEP, the A/D clock must be derived from the A/D¶s internal RC oscillator.The
A/D module has four registers. These registers are:
� A/D Result High Register (ADRESH)
� A/D Result Low Register (ADRESL)
� A/D Control Register0 (ADCON0)
� A/D Control Register1 (ADCON1)
The ADCON0 register, shown in Register 11-1, controls the operation of
the A/D module. The ADCON1 register, shown in Register 11-2, configures the
functions
of the port pins. The port pins can be configured as analog inputs (RA3 can also be the
voltage reference), or as digital I/O.Additional information on using the A/D module
can be found in the PICmicro� Mid-Range MCU Family Reference Manual
(DS33023).
REGISTER 11-1: ADCON0 REGISTER (ADDRESS: 1Fh)
bit 7-6 ADCS1:ADCS0: A/D Conversion Clock Select bits
00 = FOSC/2
01 = FOSC/8
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 33/56
10 = FOSC/32
11 = FRC (clock derived from the internal A/D module RC oscillator)
bit 5-3 CHS2:CHS0: Analog Channel Select bits
000 = channel 0, (RA0/AN0)
001 = channel 1, (RA1/AN1)
010 = channel 2, (RA2/AN2)
011 = channel 3, (RA3/AN3)
100 = channel 4, (RA5/AN4)
101 = channel 5, (RE0/AN5)(1)
110 = channel 6, (RE1/AN6)(1)
111 = channel 7, (RE2/AN7)(1)
bit 2 GO/DONE: A/D Conversion Status bit
If ADON = 1:
1 = A/D conversion in progress (setting this bit starts the A/D conversion)
0 = A/D conversion not in progress (this bit is automatically cleared by hardware
when the A/D conversion is complete)
bit 1 Unimplemented: Read as '0'
bit 0 ADON: A/D On bit
1 = A/D converter module is operating
0 = A/D converter module is shut-off and consumes no operating current
REGISTER 11-2: ADCON1 REGISTER (ADDRESS 9Fh)
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 34/56
bit 7 ADFM: A/D Result Format Select bit
1 = Right justified. 6 Most Significant bits of ADRESH are read as µ0¶.
0 = Left justified. 6 Least Significant bits of ADRESL are read as µ0¶.
bit 6-4 Unimplemented: Read as '0'
bit 3-0 PCFG3:PCFG0: A/D Port Configuration Control bits:
These steps should be followed for doing an A/D Conversion:
1. Configure the A/D module:
� Configure analog pins/voltage reference and digital I/O (ADCON1)
� Select A/D input channel (ADCON0)
� Select A/D conversion clock (ADCON0)
� Turn on A/D module (ADCON0)
2. Configure A/D interrupt (if desired):
� Clear ADIF bit
� Set ADIE bit
� Set PEIE bit
� Set GIE bit
3. Wait the required acquisition time.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 35/56
4. Start conversion:
� Set GO/DONE bit (ADCON0)
5. Wait for A/D conversion to complete, by either:
� Polling for the GO/DONE bit to be cleared (with interrupts enabled); OR
� Waiting for the A/D interrupt
6. Read A/D result register pair (ADRESH:ADRESL), clear bit ADIF if required.
7. For the next conversion, go to step 1 or step 2, as required. The A/D conversion
time per bit is defined as TAD. A minimum wait of 2TAD is required before the nextacquisition starts.
RESET:
The PIC16F87X differentiates between various kinds of
RESET:
� Power-on Reset (POR)
� MCLR Reset during normal operation
� MCLR Reset during SLEEP
� WDT Reset (during normal operation)
� WDT Wake-up (during SLEEP)
� Brown-out Reset (BOR)
Some registers are not affected in any RESET condition. Their status is unknown on
POR and unchanged in any other RESET. Most other registers are reset to a ³RESET
state´ on Power-on Reset (POR), during SLEEP,
INTERRUPTS:
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 36/56
The PIC16F87X family has up to 14 sources of interrupt.The
interrupt control register (INTCON) records individual interrupt requests in flag bits.
It also has individual and global interrupt enable bits.A global interrupt enable bit,
GIE (INTCON<7>) enables (if set) all unmasked interrupts, or disables (if cleared) all
interrupts. When bit GIE is enabled, and an interrupt¶s flag bit and mask bit are set,
the interrupt will vector immediately. Individual interrupts can be disabled through
their corresponding enable bits in various registers. Individual interrupt bits are
set,regardless of the status of the GIE bit.
The GIE bit is cleared on RESET.The ³return from interrupt´
instruction, RETFIE, exits the interrupt routine, as well as sets the GIE bit, which re-
enables interrupts.The RB0/INT pin interrupt, the RB port change interrupt,and the
TMR0 overflow interrupt flags are contained in the INTCON register.The peripheral
interrupt flags are contained in the special function registers, PIR1 and PIR2. The
corresponding
interrupt enable bits are contained in special function registers, PIE1 and PIE2, and
the peripheral interrupt enable bit is contained in special function register INTCON.
When an interrupt is responded to, the GIE bit is cleared to disable any further
interrupt, the return address is pushed onto the stack and the PC is loaded with 0004h.
Once in the Interrupt Service Routine, the source(s) of the interrupt
can be determined by polling the interrupt flag bits. The interrupt flag bit(s) must be
cleared in software before re-enabling interrupts to avoid recursive interrupts. For
external interrupt events, such as the INT pin or PORTB change interrupt, the
interrupt latency will be three or four instruction cycles. The exact latency depends
when the interrupt event occurs. The latency is the same for one or two-cycle
instructions. Individual interrupt flag bits are set, regardless of the status of their
corresponding mask bit, PEIE bit, or GIE bit.
Note: Individual interrupt flag bits are set, regardless of the status of their
corresponding
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 37/56
mask bit, or the GIE bit.
5.7. INSTRUCTION SET SUMMAR Y:
Each PIC16F87X instruction is a 14-bit word, divided into an OPCODE
which specifies the instruction type and one or more operands which further specify
the operation of the instruction. The PIC16F87X instruction set summary in byte-
oriented, bit-oriented,and literal and control operations. The below Table shows the
opcode field descriptions.
For byte-oriented instructions, ¶f¶ represents a file register designator and
¶d¶ represents a destination designator.The file register designator specifies which file
register is to be used by the instruction.The destination designator specifies where the
result of the operation is to be placed. If ¶d¶ is zero, the result is placed in the W
register. If ¶d¶ is one, the result is placed in the file register specified in the instruction.
For bit-oriented instructions, ¶b¶ represents a bit field designator which
selects the number of the bit affected by the operation, while ¶f¶ represents the address
of the file in which the bit is located.
For literal and control operations, ¶k¶ represents an eight or eleven bit
constant or literal value. All instructions are executed within one single instruction
cycle, unless a conditional test is true or the program counter is changed as a result of
an instruction.In this case, the execution takes two instruction cycles with the second
cycle executed as a NOP. One instruction cycle consists of four oscillator periods.
Thus, for an oscillator frequency of 4 MHz, the normal instruction execution time is 1
s. If a conditional test is true, or the program counter is changed as a result of an
instruction, the instruction execution time is 2
s.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 38/56
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 39/56
Rel
ive:
A r � l� � is � � � l� � tr � - � � � ti� s it�
i�
is s� f l if � � � � t t � s� � l� � lt� � � ir � it t� s it�
� � � �
� ff � li
t
l
(� r � � � t
i� � ls� ) � � � � � � t�
t� t
� 220v � i� s
s
l�
.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 40/56
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 41/56
The diagram below shows how the relay is used in circuits such as the sound operated
switch.
Circuit:
Basic design and operation
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 42/56
Simple electromechanical relay
Small relay as used in electronics
A simple electromagnetic relay consists of a coil of wire surrounding a soft
iron core, an iron yoke which provides a low reluctance path for magnetic flux, a
movable iron armature, and one or more sets of contacts (there are two in the relay
pictured). The armature is hinged to the yoke and mechanically linked to one or more
sets of moving contacts. It is held in place by a spring so that when the relay is de-
energized there is an air gap in the magnetic circuit. In this condition, one of the two
sets of contacts in the relay pictured is closed, and the other set is open. Other relays
may have more or fewer sets of contacts depending on their function. The relay in the
picture also has a wire connecting the armature to the yoke. This ensures continuity of
the circuit between the moving contacts on the armature, and the circuit track on the
printed circuit board (PCB) via the yoke, which is soldered to the PCB.
When an electric current is passed through the coil it generates a magnetic field that
attracts the armature, and the consequent movement of the movable contact(s) either
makes or breaks (depending upon construction) a connection with a fixed contact. If
the set of contacts was closed when the relay was de-energized, then the movement
opens the contacts and breaks the connection, and vice versa if the contacts were open.
When the current to the coil is switched off, the armature is returned by a force,
approximately half as strong as the magnetic force, to its relaxed position. Usually this
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 43/56
force is provided by a spring, but gravity is also used commonly in industrial motor
starters. Most relays are manufactured to operate quickly. In a low-voltage application
this reduces noise; in a high voltage or current application it reduces arcing.
When the coil is energized with direct current, a diode is often placed across the coil
to dissipate the energy from the collapsing magnetic field at deactivation, which
would otherwise generate a voltage spike dangerous to semiconductor circuit
components. Some automotive relays include a diode inside the relay case.
Alternatively, a contact protection network consisting of a capacitor and resistor in
series (snubber circuit) may absorb the surge. If the coil is designed to be energized
with alternating current (AC), a small copper "shading ring" can be crimped to the end
of the solenoid, creating a small out-of-phase current which increases the minimum
pull on the armature during the AC cycle.[1]
A solid-state relay uses a thyristor or other solid-state switching device, activated by
the control signal, to switch the controlled load, instead of a solenoid. An optocoupler
(a light-emitting diode (LED) coupled with a photo transistor) can be used to isolate
control and controlled circuits.
Types
Latching relay
Latching relay with permanent magnet
A latching relay has two relaxed states (bistable). These are also called
"impulse", "keep", or "stay" relays. When the current is switched off, the relay
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 44/56
r ª « ¬ i s i its l¬ st st¬ tª .®
̄
is is ¬ °
̄
iª ved ± it ̄
¬ s² lenoid oper ¬ ting ¬ r ¬ t°
̄
et ¬ nd ° ¬ « « echanis« , or
³
́ having t± o opposing coils ± ith an over -center spring or per « anent«
agnet to hold the ar « atµ r e and contacts in position ± hile the coil is r elaxed, or ± ith
a r emanent cor e. In the r atchet and cam example, the first pulse to the coil tur ns the
r elay on and the second pulse tur ns it off. In the t± o coil exa mple, a pulse to one coil
tur ns the r elay on and a pulse to the opposite coil tur ns the r elay off.®
his type of r elay
has the advantage that one coil consumes power only f or an instant, while it is³
eing
switched, and the r elay contacts r etain this setting acr oss a power outage. A r emanent
cor e latching r elay r equir es a curr ent pulse of opposite polarity to make it change
state.
¶
eed r elay
A r eed r elay is a r eed switch enclosed in a solenoid.®
he switch has a set of contacts
inside an evacuated or inert gas-filled glass tube which pr otects the contacts against
atmospheric corr osion; the contacts ar e made of magnetic material that makes them
move under the influence of the field of the enclosin g solenoid.¶
eed r elays can
switch f aster than lar ger r elays, r equir e only little power fr om the contr ol cir cuit, but
have low switching curr ent and voltage r atings.
®
op, middle: r eed switches, bottom: r eed r elay
·
er cur y-wetted r elay
A mer cur y-wetted r eed r elay is a f or m of r eed r elay in which the contacts ar e wetted
with mer cur y. Such r elays ar e used to switch low -voltage signals (one volt or less)
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 45/56
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 46/56
often used for motor starters. A motor starter is a contactor with overload protection
devices attached. The overload sensing devices are a form of heat operated relay
where a coil heats a bi-metal strip, or where a solder pot melts, releasing a spring to
operate auxiliary contacts. These auxiliary contacts are in series with the coil. If the
overload senses excess current in the load, the coil is de-energized. Contactor relays
can be extremely loud to operate, making them unfit for use where noise is a chief
concern.
Solid-state relay
Solid state relay, which has no moving parts
25 A or 40 A solid state contactors
A solid state relay (SSR) is a solid state electronic component that provides a
similar function to an electromechanical relay but does not have any moving
components, increasing long-term reliability. With early SSR's, the tradeoff came
from the fact that every transistor has a small voltage drop across it. This voltage drop
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 47/56
limited the amount of current a given SSR could handle. As transistors improved,
higher current SSR's, able to handle 100 to 1,200 Amperes, have become
commercially available. Compared to electromagnetic relays, they may be falsely
triggered by transients.
Solid state contactor relay
A solid state contactor is a heavy-duty solid state relay, including the necessary heat
sink, used for switching electric heaters, small electric motors and lighting loads;
where frequent on/off cycles are required. There are no moving parts to wear out and
there is no contact bounce due to vibration. They are activated by AC control signals
or DC control signals from Programmable logic controller (PLCs), PCs, Transistor-
transistor logic (TTL) sources, or other microprocessor and microcontroller controls.
Buchholz relay
A Buchholz relay is a safety device sensing the accumulation of gas in large oil-filled
transformers, which will alarm on slow accumulation of gas or shut down the
transformer if gas is produced rapidly in the transformer oil.
Forced-guided contacts relay
A forced-guided contacts relay has relay contacts that are mechanically linked
together, so that when the relay coil is energized or de-energized, all of the linked
contacts move together. If one set of contacts in the relay becomes immobilized, no
other contact of the same relay will be able to move. The function of forced-guided
contacts is to enable the safety circuit to check the status of the relay. Forced-guided
contacts are also known as "positive-guided contacts", "captive contacts", "locked
contacts", or "safety relays".
Overload protection relay
Electric motors need overcurrent protection to prevent damage from over-loading the
motor, or to protect against short circuits in connecting cables or internal faults in the
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 48/56
motor windings. [̧ ]
¹
ne type of electric motor overload pr otection r elay is oper ated by
a heating element in series with the electric motor.º
he heat gener ated by the motor
curr ent heats a bimetallic strip or melts solder, r eleasing a spring to oper ate contacts.
Wher e the overload r elay is exposed to the same envir onment as the motor, a usef ul
though cr ude compensation f or motor ambient temper atur e is pr ovided.
Pole and thr ow
»
ir cuit symbols of r elays. (
»
denotes the common ter minal in SP
¼ º
and
¼
P
¼ º
types.)
Since r elays ar e switches, the ter minology applied to switches is also applied to r elays.
A r elay will switch one or mor e poles, each of whose contacts can be thr own by
ener gi½ ing the coil in one of thr ee ways:
y Nor mally-open (NO) contacts connect the cir cuit when the r elay is activated;
the cir cuit is disconnected when the r elay is inactive. It is also called a For m A
contact or "make" contact. NO contacts can also be distinguished as "early -
make" or NOEM, which means that the contacts will close bef or e the button or
switch is f ully engaged.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 49/56
y Normally-closed (NC) contacts disconnect the circuit when the relay is
activated; the circuit is connected when the relay is inactive. It is also called a
Form B contact or "break" contact. NC contacts can also be distinguished as
"late-break" or NCLB, which means that the contacts will stay closed until the
button or switch is fully disengaged.
y Change-over (CO), or double-throw (DT), contacts control two circuits: one
normally-open contact and one normally-closed contact with a common
terminal. It is also called a Form C contact or "transfer" contact ("break before
make"). If this type of contact utilizes a "make before break" functionality, then
it is called a Form D contact.
The following designations are commonly encountered:
y SPST ± Single Pole Single Throw. These have two terminals which can be
connected or disconnected. Including two for the coil, such a relay has four
terminals in total. It is ambiguous whether the pole is normally open or
normally closed. The terminology "SPNO" and "SPNC" is sometimes used to
resolve the ambiguity.
y SPDT ± Single Pole Double Throw. A common terminal connects to either of
two others. Including two for the coil, such a relay has five terminals in total.
y DPST ± Double Pole Single Throw. These have two pairs of terminals.
Equivalent to two SPST switches or relays actuated by a single coil. Including
two for the coil, such a relay has six terminals in total. The poles may be Form
A or Form B (or one of each).
y DPDT ± Double Pole Double Throw. These have two rows of change-over
terminals. Equivalent to two SPDT switches or relays actuated by a single coil.
Such a relay has eight terminals, including the coil.
The "S" or "D" may be replaced with a number, indicating multiple switches
connected to a single actuator. For example 4PDT indicates a four pole double throw
relay (with 14 terminals).
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 50/56
EN 50005 are among applicable standards for relay terminal numbering; a typical EN
50005-compliant SPDT relay's terminals would be numbered 11, 12, 14, A1 and A2
for the C, NC, NO, and coil connections, respectively.
Applications
Relays are used to and for:
y Control a high-voltage circuit with a low-voltage signal, as in some types of
modems or audio amplifiers,
y Control a high-current circuit with a low-current signal, as in the starter
solenoid of an automobile,y Detect and isolate faults on transmission and distribution lines by opening and
closing circuit breakers (protection relays),
A DPDT AC coil relay with "ice cube" packaging
y Isolate the controlling circuit from the controlled circuit when the two are at
different potentials, for example when controlling a mains-powered device
from a low-voltage switch. The latter is often applied to control office lighting
as the low voltage wires are easily installed in partitions, which may be often
moved as needs change. They may also be controlled by room occupancy
detectors in an effort to conserve energy,y Logic functions. For example, the boolean AND function is realised by
connecting normally open relay contacts in series, the OR function by
connecting normally open contacts in parallel. The change-over or Form C
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 51/56
contacts perform the XOR (exclusive or) function. Similar functions for NAND
and NOR are accomplished using normally closed contacts. The Ladder
programming language is often used for designing relay logic networks.
o Early computing. Before vacuum tubes and transistors, relays were used
as logical elements in digital computers. See ARRA (computer),
Harvard Mark II, Zuse Z2, and Zuse Z3.
o Safety-critical logic. Because relays are much more resistant than
semiconductors to nuclear radiation, they are widely used in safety-
critical logic, such as the control panels of radioactive waste-handling
machinery.
y Time delay functions. Relays can be modified to delay opening or delayclosing a set of contacts. A very short (a fraction of a second) delay would use
a copper disk between the armature and moving blade assembly. Current
flowing in the disk maintains magnetic field for a short time, lengthening
release time. For a slightly longer (up to a minute) delay, a dashpot is used. A
dashpot is a piston filled with fluid that is allowed to escape slowly. The time
period can be varied by increasing or decreasing the flow rate. For longer time
periods, a mechanical clockwork timer is installed.
Buzzers
This buzzer is an electromagnetic type audio signaling device, which has a coil
inside which oscillates a metal plate against another, which when given voltage
difference produces sound of a predefined frequency. You must be aware of such
sounds of buzzer like BEEP sound in many appliances.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 52/56
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 53/56
Frequency Characteristics
Dimensions
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 54/56
Precautions
Do not make sound on the buzzer when it is close to ears.
Listening to the buzzer when it is close to ears, or continuant listening to it for
an extended period, may result in hearing disorders.
Thoroughly warn consumers not to turn on the sound when the buzzer is close
to ears.
Do not exceed the rated operation voltage range when using the buzzer. If it is
exceeded
beyond the rated operation voltage, a built-in coil may generate heat, resulting
in deterioration of the coil, which may cause a drop in sound pressure or a
change in the terminal resistance value. If a rare short circuit occurs due to heatgenerated in the built-in coil, a large electrical current flows to the equipment
used, possibly causing it to emit smoke or fire.
The buzzer is a magnetic type sounder.
Do not use it for any other purpose than a sound generation.
Do not use the buzzer in other than atmospheric air.
Do not use the buzzer in the following environments (excluding cases in which
counter measures are taken).
Corrosive gases (Cl2, NH3, SOx, NOx, etc.)
Places to be exposed to dust. Places where rain, fog, salt water, and the like will get on the buzzer.
After installing the buzzer when designing an apparatus, confirm that there are
no
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 55/56
abnormalities by performing a reliability evaluation test.
Do not exceed the rated operating temperature range when using the buzzer.
Do not use for an extended period at relative humidity in excess of 90%
(maximum wet-bulb temperature of 38°C).
When using the buzzer for a safety device or warning device, take all surest
measures such as providing a safety circuit or the joint use of another sounder
with equivalent characteristics in order to prevent accidents.
The buzzer may be influenced by electromagnetic waves, voltage changes, and
ripple voltage.
Check the buzzer in the mounted condition, and take measures such as safety
circuits, shielding, etc. If the buzzer is molded or secured by adhesives, thermal expansion stresses from
the mold or adhesive agent may cause deterioration in a soldered terminal part.
Before molding or securing an adhesive, consider the type, amount, hardening
conditions, adhesive properties, etc., of the sealing material, and confirm the
reliability.
Do not apply vibrations or shocks (such as dropping) larger than the specified.
Do not bend the terminal pin when soldering to install on a circuit board.
Do not apply larger than the specified force to the terminal pin.
Do not apply force to the terminal pin at high temperatures (when soldering).
When soldering a terminal pin, perform the soldering in clean conditions without
contamination or rust in order to avoid poor connections. When performing dip
soldering directly for installing on a printed circuit board, be careful so that smoke
from the flux, or other foreign materials, will not get into the sound emission hole.
Do not clean(excluding products that can be cleaned).With regards to devices in
which the consumers can touch the buzzer, thoroughly warn consumers not to put
foreign materials (such as needles, hairpins, garbage, etc.) into the sound emission
hole.
As the buzzer uses a coil, it has an inductive load. Protect the drive circuit by
putting the diodes in parallel into the buzzer.
Do not reconfigure the buzzer.
8/7/2019 embeded based human security
http://slidepdf.com/reader/full/embeded-based-human-security 56/56
Sound pressure changes depending on the shape of the part to be installed in a
device, or the installation location.
Check the buzzer in the mounted condition. The buzzer has polarities.
When installing, be careful not to make a mistake with the polarities.
As the buzzer uses a magnet, it generates a surrounding magnetic field.
When designing a device, etc., confirm that there are no irregularities due to the
magnetic field.
The characteristics of the buzzer may change because of the influence of an
outside magnetic field.
Check the buzzer in the mounted condition, and take measures such as shielding,
etc. Because of deterioration or damage, maintain in rated storage temperature range,
avoid environments where there are sudden temperature changes, direct sunlight,
corrosive gases and dust, and store wrapped in order to avoid applying stresses.
Recommended