25.ACCESSIBLE DISPLAY DESIGN TO CONTROL HOME AREA NETWORKSDocument
25.ACCESSIBLE DISPLAY DESIGN TO CONTROL HOME AREA NETWORKSDocument
25.ACCESSIBLE DISPLAY DESIGN TO CONTROL HOME AREA NETWORKSDocument
INDEX
1. Abbreviations
2. Figures locations
3. Introduction
4. Block Diagram
5. Block Diagram Description
6. Schematic
7. Schematic Description
8. Hardware Components
9. Circuit Description
10. Software components
a. About Kiel
b. Embedded ‘C’
11. KEIL procedure description
12. Conclusion (or) Synopsis
13. Future Aspects
14. Bibliography
ABBREVATIONS
Symbol Name
RI Ring indicator
INTRODUCTION
An embedded system is a special-purpose system in which the computer is completely
encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose
computer, such as a personal computer, an embedded system performs one or a few predefined
tasks, usually with very specific requirements. Since the system is dedicated to specific tasks,
design engineers can optimize it, reducing the size and cost of the product. Embedded systems
are often mass-produced, benefiting from economies of scale.
Personal digital assistants (PDAs) or handheld computers
are generally considered embedded devices because of the nature of
their hardware design, even though they are more expandable in
software terms. This line of definition continues to blur as devices
expand. With the introduction of the OQO Model 2 with the
Windows XP operating system and ports such as a USB port —
both features usually belong to "general purpose computers", — the
line of nomenclature blurs even more.
Embedded systems plays major role in electronics varies from portable devices to large
stationary installations like digital watches and MP3 players, traffic lights, factory controllers, or
the systems controlling nuclear power plants.
In terms of complexity embedded systems can range from very simple with a single
microcontroller chip, to very complex with multiple units, peripherals and networks mounted
inside a large chassis or enclosure.
BLOCKDIAGRAM:
Power Supply: This section is meant for supplying Power to all the sections mentioned above. It
basically consists of a Transformer to step down the 230V ac to 9V ac followed by diodes. Here
diodes are used to rectify the ac to dc. After rectification the obtained rippled dc is filtered using
a capacitor Filter. A positive voltage regulator is used to regulate the obtained dc voltage.
Microcontroller: This section forms the control unit of the whole project. This section basically
consists of a Microcontroller with its associated circuitry like Crystal with capacitors, Reset
circuitry, Pull up resistors (if needed) and so on. The Microcontroller forms the heart of the
project because it controls the devices being interfaced and communicates with the devices
according to the program being written.
MAX 232: The microcontroller can communicate with the serial devices using its single Serial
Port. The logic levels at which this serial port operates is TTL logics. But some of the serial
devices operate at RS 232 Logic levels. For example PC and GSM etc. So in order to
communicate the Microcontroller with either GSM modem or PC, a mismatch between the Logic
levels occurs. In order to avoid this mismatch, in other words to match the Logic levels, a Serial
driver is used. And MAX 232 is a Serial Line Driver used to establish communication between
microcontroller and PC (or GSM)
LCD Display: This section is basically meant to show up the status of the project. This project
makes use of Liquid Crystal Display to display / prompt for necessary information.
Temperature sensor: Thermistors are a temperature sensing devise. It is used to sense the
temperature. In this project by depends on the value of temperature the exhaust fan will run
Smoke sensor: Smoke sensor is used to detect any leakage of smoke and any hazardous gases
such that an alarm can be initiated to avoid any damages in the industries. These sensors are also
used in many applications like corporate and in any office work areas these are linked to fire
alarms
DC Fan: Dc fan is the output section. Dc fan needs dc supply. So we can directly add the dc motor
to micro controller with transistor logic.
Relay Section: This section consists of an interfacing circuitry to switch ON / OFF the system
whenever any unhealthy conditions i.e. overload is detected. This circuitry basically consists of a
Relay, transistor and a protection diode. A relay is used to drive the 230V devices.
Bluetooth: AUBTM-22 is a Bluetooth v1.2 module with SPP profiles. The module is intended to
be integrated into another host system which requires Bluetooth functions. The HOST system
could send commands to AUBTM-22 through a UART. AUBTM-22 will parse the commands
and execute proper functions, e.g. set the maximum transmit power, change the name of the
module. And next the module can transmit the data receive from the UART with SPP profiles.
Humidity sensor: Humidity sensor is a device that measures the relative humidity of in a given
area. A humidity sensor can be used in both indoors and outdoors. Humidity sensors are
available in both analog and digital forms.
HARDWARE COMPONENTS
ARM stands for Advanced RISC Machines. It is a 32 bit processor core, used for high
end application. It is widely used in Advanced Robotic Applications.
ARM was developed at Acron Computers ltd of Cambridge, England between 1983 and
1985.
RISC concept was introduced in 1980 at Stanford and Berkley.
ARM ltd was found in 1990.
ARM cores are licensed to partners so as to develop and fabricate new microcontrollers
around same processor cores.
Key features:
16-bit/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.
8 kB to 40 kB of on-chip static RAM and 32 kB to 512 kB of on-chip flash memory.
128-bit wide interface/accelerator enables high-speed 60 MHz operation.
In-System Programming/In-Application Programming (ISP/IAP) via on-chip boot loader
software. Single flash sector or full chip erase in 400 ms and programming of 256 bytes
in 1 ms.
Embedded ICE RT and Embedded Trace interfaces offer real-time debugging with the
on-chip Real Monitor software and high-speed tracing of instruction execution.
USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM.
In addition, the LPC2146/48 provides 8 kB of on-chip RAM accessible to USB by DMA.
One or two (LPC2141/42 vs. LPC2144/46/48) 10-bit ADCs provide a total of 6/14 analog
inputs, with conversion times as low as 2.44 μs per channel.
Single 10-bit DAC provides variable analog output (LPC2142/44/46/48 only).
Two 32-bit timers/external event counters (with four capture and four compare channels
each), PWM unit (six outputs) and watchdog.
Low power Real-Time Clock (RTC) with independent power and 32 kHz clock input.
Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus (400 kbit/s),
SPI and SSP with buffering and variable data length capabilities.
Vectored Interrupt Controller (VIC) with configurable priorities and vector addresses.
Up to 45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package.
Up to 21 external interrupt pins available.
60 MHz maximum CPU clock available from programmable on-chip PLL with settling
time of 100 μs.
On-chip integrated oscillator operates with an external crystal from 1 MHz to 25 MHz.
Power saving modes include Idle and Power-down.
Block diagram:
Pin description
Core Data path:
Architecture is characterized by Data path and control path.
Data path is organized in such a way that, operands are not fetched directly from memory
locations. Data items are placed in register files. No data processing takes place in
memory locations.
Instructions typically use 3 registers. 2 source registers and 1 destination register.
Barrel Shifter preprocesses data, before it enters ALU.
- Barrel Shifter is basically a combinational logic circuit, which can shift data to
left or right by arbitrary number of position in same cycle.
Increment or Decrement logic can update register content for sequential access.
Pipeline:
In ARM 7, a 3 stage pipeline is used. A 3 stage pipeline is the simplest form of pipeline
that does not suffer from the problems such as read before write.
In a pipeline, when one instruction is executed, second instruction is decoded and third
instruction will be fetched.
This is executed in a single cycle.
Register Bank:
ARM 7 uses load and store Architecture.
Data has to be moved from memory location to a central set of registers.
Data processing is done and is stored back into memory.
Register bank contains, general purpose registers to hold either data or address.
It is a bank of 16 user registers R0-R15 and 2 status registers.
Each of these registers is 32 bit wide.
CPSR contains a number of flags which report and control the operation of ARM7 CPU.
Conditional Code Flags
N - Negative Result from ALU
Z - Zero result from ALU
C - ALU operation carried out
V - ALU operation overflowed
T- Bit
If
T=0, Processor in ARM Mode.
T=1, Processor in THUMB Mode
Mode Bits
Specifies the processor Modes. Processor Modes will be discussed in the next part of this
tutorial.
DESCRIPTION:
The Vectored Interrupt Controller (VIC) takes 32 interrupt request inputs and
programmably assigns them into 3 categories, FIQ, vectored IRQ, and non-vectored IRQ.
The programmable assignment scheme means that priorities of interrupts from the
various peripherals can be dynamically assigned and adjusted.
Fast Interrupt reQuest (FIQ) requests have the highest priority. If more than one request
is assigned to FIQ, the VIC ORs the requests to produce the FIQ signal to the ARM
processor.
The fastest possible FIQ latency is achieved when only one request is classified as FIQ,
because then the FIQ service routine can simply start dealing with that device.
But if more than one request is assigned to the FIQ class, the FIQ service routine can read
a word from the VIC that identifies which FIQ source(s) is (are) requesting an interrupt.
Vectored IRQs have the middle priority, but only 16 of the 32 requests can be assigned to
this category.
Any of the 32 requests can be assigned to any of the 16 vectored IRQ slots, among which
slot 0 has the highest priority and slot 15 has the lowest.
Non-vectored IRQs have the lowest priority.
The VIC ORs the requests from all the vectored and non-vectored IRQs to produce the
IRQ signal to the ARM processor. The IRQ service routine can start by reading a register
from the VIC and jumping there. If any of the vectored IRQs are requesting, the VIC
provides the address of the highest-priority requesting IRQs service routine, otherwise it
provides the address of a default routine that is shared by all the non-vectored IRQs.
The default routine can read another VIC register to see what IRQs are active.
All registers in the VIC are word registers. Byte and halfword reads and write are not
supported.
Additional information on the Vectored Interrupt Controller is available in the ARM
Register description:
UNIVERSAL ASYNCHRONOUS RECEIVER/TRANSMITTER 0:
Features:
16 byte Receive and Transmit FIFOs
Register locations conform to ‘550 industry standard
Receiver FIFO trigger points at 1, 4, 8, and 14 bytes
Built-in fractional baud rate generator with autobauding capabilities.
Mechanism that enables software and hardware flow control implementation
Pin description:
Register description:
Architecture:
The VPB interface provides a communications link between the CPU or host and the
UART0.
The UART0 receiver block, U0RX, monitors the serial input line, RXD0, for valid input.
The
UART0 RX Shift Register (U0RSR) accepts valid characters via RXD0. After a valid
character
is assembled in the U0RSR, it is passed to the UART0 RX Buffer Register FIFO to await
access by the CPU or host via the generic host interface.
The UART0 transmitter block, U0TX, accepts data written by the CPU or host and buffers the
data in the UART0 TX Holding Register FIFO (U0THR). The UART0 TX Shift Register
(U0TSR) reads the data stored in the U0THR and assembles the data to transmit via the serial
output pin, TXD0
The UART0 Baud Rate Generator block, U0BRG, generates the timing enables used by the
UART0 TX block. The U0BRG clock input source is the VPB clock (PCLK). The main clock is
divided down per the divisor specified in the U0DLL and U0DLM registers. This divided down
clock is a 16x oversample clock, NBAUDOUT. The interrupt interface contains registers U0IER
and U0IIR. The interrupt interface receives several one clock wide enables from the U0TX and
U0RX blocks. Status information from the U0TX and U0RX is stored in the U0LSR. Control
information for the U0TX and U0RX is stored in the U0LCR
Pin description:
Register description:
Architecture:
The VPB interface provides a communications link between the CPU or host and the UART1.
The UART1 receiver block, U1RX, monitors the serial input line, RXD1, for valid input. The
UART1 RX Shift Register (U1RSR) accepts valid characters via RXD1. After a valid character
is assembled in the U1RSR, it is passed to the UART1 RX Buffer Register FIFO to await access
by the CPU or host via the generic host interface The UART1 transmitter block, U1TX, accepts
data written by the CPU or host and buffers the data in the UART1 TX Holding Register FIFO
(U1THR). The UART1 TX Shift Register
U1TSR) reads the data stored in the U1THR and assembles the data to transmit via the serial
output pin, TXD1. The UART1 Baud Rate Generator block, U1BRG, generates the timing
enables used by the UART1 TX block. The U1BRG clock input source is the VPB clock
(PCLK). The main clock is divided down per the divisor specified in the U1DLL and U1DLM
registers. This divided down clock is a 16x oversample clock, NBAUDOUT The modem
interface contains registers U1MCR and U1MSR. This interface is responsible for handshaking
between a modem peripheral and the UART1
The interrupt interface contains registers U1IER and U1IIR. The interrupt interface receives
several one clock wide enables from the U1TX and U1RX blocks.Status information from the
U1TX and U1RX is stored in the U1LSR. Control information for the U1TX and U1RX is stored
in the U1LCR.
ANALOG-TO-DIGITAL CONVERTER (ADC):
Features:
10 bit successive approximation analog to digital converter (one in LPC2141/2 and two
in LPC2144/6/8).
Input multiplexing among 6 or 8 pins (ADC0 and ADC1).
Power-down mode.
Burst conversion mode for single or multiple inputs.
Optional conversion on transition on input pin or Timer Match signal.
Global Start command for both converters (LPC2144/6/8 only).
Description:
Basic clocking for the A/D converters is provided by the VPB clock. A programmable
divider is included in each converter, to scale this clock to the 4.5 MHz (max) clock
needed by the successive approximation process. A fully accurate conversion requires 11
of these clocks.
Pin description:
Register description:
Operation:
Hardware-triggered conversion:
If the BURST bit in the ADCR is 0 and the START field contains 010-111, the ADC will start a
conversion when a transition occurs on a selected pin or Timer Match signal. Th choices include
conversion on a specified edge of any of 4 Match signals, or conversion on a specified edge of
either of 2 Capture/Match pins. The pin state from the selected pad or the selected Match signal,
XORed with ADCR bit 27, is used in the edge detection logic
Interrupts:
An interrupt request is asserted to the Vectored Interrupt Controller (VIC) when the DONE bit is
1. Software can use the Interrupt Enable bit for the A/D Converter in the VIC to control whether
this assertion results in an interrupt. DONE is negated when the ADDR is read.
Register description:
The RTC includes a number of registers. The address space is split into four sections by
functionality.The first eight addresses are the Miscellaneous Register Group(Section 19.4.2). The
second set of eight locations are the Time Counter Group(Section 19.4.12). The third set of eight
locations contain the Alarm Register Group(Section 19.4.14). The remaining registers control the
Reference Clock Divider. The Real Time Clock includes the register shown in Table 263.
Detailed descriptions of the registers follow.
RTC interrupts:
Interrupt generation is controlled through the Interrupt Location Register (ILR), Counter
Increment Interrupt Register (CIIR), the alarm registers, and the Alarm Mask Register (AMR).
Interrupts are generated only by the transition into the interrupt state. The ILR separately enables
CIIR and AMR interrupts. Each bit in CIIR corresponds to one of the time counters. If CIIR is
enabled for a particular counter, then every time the counter is Incremented an interrupt is
generated. The alarm registers allow the user to specify a date and time for an interrupt to be
generated. The AMR provides a mechanism to mask alarm Compares. If all nonmasked alarm
registers match the value in their corresponding time counter, then an interrupt is generated. The
RTC interrupt can bring the microcontroller out of power-down mode if the RTC is operating
from its own oscillator on the RTCX1-2 pins. When the RTC interrupt is enabled for wakeup and
its selected event occurs, XTAL1/2 pins associated oscillator wakeup cycle is started
Miscellaneous register group:
The Clock Tick Counter is read only. It can be reset to zero through the Clock Control
Register (CCR). The CTC consists of the bits of the clock divider counter
Power Supply:
The power supply is designed to convert high voltage AC mains electricity to a suitable
low voltage supply for electronic circuits and other devices. A power supply can by broken down
into a series of blocks, each of which performs a particular function. A D.C. power supply which
maintains the output voltage constant irrespective of a.c mains fluctuations or load variations is
known as “Regulated D.C Power Supply”
For example a 5V regulated power supply system as shown below:
Rectifier:
A circuit, which is used to convert a.c to dc, is known as RECTIFIER. The process of
conversion a.c to d.c is called “rectification”
Types of Rectifiers:
Half wave Rectifier
Full wave rectifier
1. Center tap full wave rectifier.
2. Bridge type full bridge rectifier.
Full-wave Rectifier:
From the above comparisons we came to know that full wave bridge rectifier as more
advantages than the other two rectifiers. So, in our project we are using full wave bridge rectifier
circuit.
Bridge Rectifier:
A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave
rectification. This is a widely used configuration, both with individual diodes wired as shown
and with single component bridges where the diode bridge is wired internally.
A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig(a) to
achieve full-wave rectification. This is a widely used configuration, both with individual diodes
wired as shown and with single component bridges where the diode bridge is wired internally.
Fig(24.A):
Operation:
During positive half cycle of secondary, the diodes D2 and D3 are in forward biased
while D1 and D4 are in reverse biased as shown in the fig(b). The current flow direction is
shown in the fig (b) with dotted arrows.
Fig(24.B)
During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward
biased while D2 and D3 are in reverse biased as shown in the fig(c). The current flow direction
is shown in the fig (c) with dotted arrows.
Fig(24.C)
Filter:
A Filter is a device, which removes the a.c component of rectifier output but allows the d.c
component to reach the load.
Capacitor Filter:
We have seen that the ripple content in the rectified output of half wave rectifier is 121%
or that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages of ripples
is not acceptable for most of the applications. Ripples can be removed by one of the following
methods of filtering:
(a) A capacitor, in parallel to the load, provides an easier by –pass for the ripples voltage though
it due to low impedance. At ripple frequency and leave the d.c.to appears the load.
(b) An inductor, in series with the load, prevents the passage of the ripple current (due to high
impedance at ripple frequency) while allowing the d.c (due to low resistance to d.c)
(c) various combinations of capacitor and inductor, such as L-section filter section filter,
multiple section filter etc. which make use of both the properties mentioned in (a) and (b) above.
Two cases of capacitor filter, one applied on half wave rectifier and another with full wave
rectifier.
Filtering is performed by a large value electrolytic capacitor connected across the DC
supply to act as a reservoir, supplying current to the output when the varying DC voltage from
the rectifier is falling. The capacitor charges quickly near the peak of the varying DC, and then
discharges as it supplies current to the output. Filtering significantly increases the average DC
voltage to almost the peak value (1.4 × RMS value).
To calculate the value of capacitor(C),
C = ¼*√3*f*r*Rl
Where,
f = supply frequency,
r = ripple factor,
Rl = load resistance
Note: In our circuit we are using 1000microfarads.
Type of Rectifier
Parameter Half wave Full wave Bridge
Number of diodes
1 2 3
PIV of diodes
Vm 2Vm Vm
D.C output voltage Vm/ 2Vm/ 2Vm/
Regulator:
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output
voltages. The maximum current they can pass also rates them. Negative voltage regulators are
available, mainly for use in dual supplies. Most regulators include some automatic protection
from excessive current ('overload protection') and overheating ('thermal protection'). Many of
the fixed voltage regulator ICs have 3 leads and look like power transistors, such as the 7805
+5V 1A regulator shown on the right. The LM7805 is simple to use. You simply connect the
positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the
Input pin, connect the negative lead to the Common pin and then when you turn on the power,
you get a 5 volt supply from the output pin.
Fig 25: A Three Terminal Voltage Regulator
78XX:
The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The
LM78XX offer several fixed output voltages making them useful in wide range of applications.
When used as a zener diode/resistor combination replacement, the LM78XX usually results in an
effective output impedance improvement of two orders of magnitude, lower quiescent current.
The LM78XX is available in the TO-252, TO-220 & TO-263packages,
Features:
• Output Current of 1.5A
• Output Voltage Tolerance of 5%
• Internal thermal overload protection
• Internal Short-Circuit Limited
• No External Component
• Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V
• Offer in plastic TO-252, TO-220 & TO-263
• Direct Replacement for LM78XX
Liquid crystal displays (LCDs) have materials, which combine the properties of both
liquids and crystals. Rather than having a melting point, they have a temperature range within
which the molecules are almost as mobile as they would be in a liquid, but are grouped together
in an ordered form similar to a crystal.
An LCD consists of two glass panels, with the liquid crystal material sand witched in
between them. The inner surface of the glass plates are coated with transparent electrodes which
define the character, symbols or patterns to be displayed polymeric layers are present in between
the electrodes and the liquid crystal, which makes the liquid crystal molecules to maintain a
defined orientation angle.
One each polarisers are pasted outside the two glass panels. These polarisers would rotate
the light rays passing through them to a definite angle, in a particular direction.
When the LCD is in the off state, light rays are rotated by the two polarisers and the
liquid crystal, such that the light rays come out of the LCD without any orientation, and hence
the LCD appears transparent.
When sufficient voltage is applied to the electrodes, the liquid crystal molecules would be
aligned in a specific direction. The light rays passing through the LCD would be rotated by the
polarisers, which would result in activating/ highlighting the desired characters.
The LCD’s are lightweight with only a few millimeters thickness. Since the LCD’s
consume less power, they are compatible with low power electronic circuits, and can be powered
for long durations.
The LCD’s don’t generate light and so light is needed to read the display. By using
backlighting, reading is possible in the dark. The LCD’s have long life and a wide operating
temperature range.
Changing the display size or the layout size is relatively simple which makes the LCD’s
more customers friendly.
The LCDs used exclusively in watches, calculators and measuring instruments are the
simple seven-segment displays, having a limited amount of numeric data. The recent advances in
technology have resulted in better legibility, more information displaying capability and a wider
temperature range. These have resulted in the LCDs being extensively used in
telecommunications and entertainment electronics. The LCDs have even started replacing the
cathode ray tubes (CRTs) used for the display of text and graphics, and also in small TV
applications.
This section describes the operation modes of LCD’s then describe how to program and
interface an LCD to 8051 using Assembly and C.
LCD operation
In recent years the LCD is finding widespread use replacing LEDs(seven-segment LEDs
or other multisegment LEDs).This is due to the following reasons:
1. The declining prices of LCDs.
2. The ability to display numbers, characters and graphics. This is in
contract to LEDs, which are limited to numbers and a few characters.
3. Incorporation of a refreshing controller into the LCD, there by
relieving the CPU of the task of refreshing the LCD. In the contrast,
the LED must be refreshed by the CPU to keep displaying the data.
4. Ease of programming for characters and graphics.
LCD pin description
The LCD discussed in this section has 14 pins. The function of each pins is given in
table.
The TMP103 is a digital output temperature sensor in a four-ball wafer chip-scale package
(WCSP). The TMP103 is capable of reading temperatures to a resolution of 1°C. The TMP103
features a two-wire interface that is compatible with both I2C and SMBus interfaces. In addition,
the interface supports multiple device access (MDA) commands that allow the master to
communicate with multiple devices on the bus simultaneously, eliminating the need to send
individual commands to each TMP103 on the bus. Up to eight TMP103s can be tied together in
parallel and easily read by the host. The TMP103 is especially ideal for space-constrained,
power-sensitive applications with multiple temperature measurement zones that must be
monitored. The TMP103 is specified for operation over a temperature range of –40°C to +125°C.
Features:
Applications:
Handsets
Notebooks
Fig: TMP103
HUMIDITY:
Humidity is the amount of water vapor in the air. In daily language the term "humidity" is
normally taken to mean relative humidity. Relative humidity is defined as the ratio of the partial
pressure of water vapor in a parcel of air to the saturated vapor pressure of water vapor at a
prescribed temperature. Humidity may also be expressed as absolute humidity and specific
humidity. Relative humidity is an important metric used in forecasting weather. Humidity
indicates the likelihood of precipitation, dew, or fog. High humidity makes people feel hotter
outside in the summer because it reduces the effectiveness of sweating to cool the body by
preventing the evaporation of perspiration from the skin.
Absolute humidity
Absolute humidity is the quantity of water in a particular volume of air. The most common units
are grams per cubic meter, although any mass unit and any volume unit could be used.
Relative humidity
Relative humidity is defined as the ratio of the partial pressure of water vapor in a gaseous
mixture of air and water vapor to the saturated vapor pressure of water at a given temperature.
Relative humidity is expressed as a percentage.
Specific humidity
Specific humidity is the ratio of water vapor to air (including water vapor and dry air) in a
particular volume. Measuring and regulating humidity
There are various devices used to measure and regulate humidity. A device used to measure
humidity is called a psychrometer or hygrometer. A humidistat is used to regulate the humidity
of a building with a de-humidifier. These can be analogous to a thermometer and thermostat for
temperature control.
Humidity is also measured on a global scale using remotely placed satellites. These satellites are
able to detect the concentration of water in the troposphere at altitudes between 4 and 12
kilometers. Satellites that can measure water vapor have sensors that are sensitive to infrared
radiation. Water vapor specifically absorbs and re-radiates radiation in this spectral band.
Satellite water vapor imagery plays an important role in monitoring climate conditions (like the
formation of thunderstorms) and in the development of future weather forecasts.
Hygrometers are instruments used for measuring humidity. A simple form of a hygrometer is
specifically known as a "psychrometer" and consists of two thermometers, one of which includes
a dry bulb and the other of which includes a bulb that is kept wet to measure wet-bulb
temperature. Evaporation from the wet bulb lowers the temperature, so that the wet-bulb
thermometer usually shows a lower temperature than that of the dry-bulb thermometer, which
measures dry-bulb temperature. When the air temperature is below freezing, however, the wet
bulb is covered with a thin coating of ice and yet may be warmer than the dry bulb. Relative
humidity is computed from the ambient temperature as shown by the dry-bulb thermometer and
the difference in temperatures as shown by the wet-bulb and dry-bulb thermometers. Relative
humidity can also be determined by locating the intersection of the wet- and dry-bulb
temperatures on a psychrometric chart. One device that uses the wet/dry bulb method is the sling
psychrometer, where the thermometers are attached to a handle or length of rope and spun
around in the air for a few minutes.
Calibration
One solution sometimes used for accurate humidity measurement when the air temperature is
below freezing is to use a thermostatically-controlled electric heater to raise the temperature of
outside air to above freezing. In this arrangement, a fan draws outside air past (1) a thermometer
to measure the ambient dry-bulb temperature, (2) the heating element, (3) a second thermometer
to measure the dry-bulb temperature of the heated air, then finally (4) a wet-bulb thermometer.
According to the WMO Guide, "The principle of the heated psychrometer is that the water
vapour content of an air mass does not change if it is heated. This property may be exploited to
the advantage of the psychrometer by avoiding the need to maintain an ice bulb under freezing
[4]
conditions." . Since the humidity of the ambient air is calculated indirectly from three
temperature measurements, in such a device accurate thermometer calibration is even more
important than for a two-bulb configuration.
Other types of hygrometers are also commonly used to determine the ambient humidity. Such devices
frequently use a human or animal hair under tension. The traditional folk art device known as a
"weather house" works on this principle. In order to see changes that occur over time, several
hygrometers record the value of humidity on a piece of graduated paper so that the values can be read
off the chart.
Works
A digital humidity sensor works via two micro sensors that are calibrated to the relative humidity of the
given area. These are then converted into the digital format via an analog to digital conversion process
which is done by a chip located in the same circuit. A machine made electrode based system made out
of polymer is what makes up the capacitance for the sensor. This protects the sensor from user front
panel (interface).
LDRs or Light Dependent Resistors are very useful especially in light/dark sensor circuits.
Normally the resistance of an LDR is very high, sometimes as high as 1000 000 ohms, but when
they are illuminated with light resistance drops dramatically.
The animation opposite shows that when the torch is turned on, the resistance of the LDR
falls, allowing current to pass through it.
Circuit Wizard software has been used to display, the range of values of a ORP12, LDR.
When a light level of 1000 lux (bright light) is directed towards it, the resistance is 400R
(ohms).
When a light level of 10 lux (very low light level) is directed towards it, the resistance has
risen dramatically to 10.43M (10430000 ohms).
The general purpose photoconductive cell is also known as LDR – light dependent resistor. It is a
type of semiconductor and its conductivity changes with proportional change in the intensity of
light. The complete principle of an LDR is as follows. In a semiconductor an energy gap exists
between conduction electrons and valence electrons. As an LDR is also known as semiconductor
photo-conductive transducer, when light is incident on it, a photon is absorbed and thereby it
excites an electron from valence band into conduction band. Due to such new electrons coming
up in conduction band area, the electrical resistance of the device decreases. Thus the LDR or
photo-conductive transducer has the resistance which is the inverse function of radiation
intensity.
Where,
λ0 = threshold wavelength, in meters
e = charge on one electron, in Coulombs
Ew = work function of the metal used, in eV
Here we must note that any radiation with wavelength greater than the value obtained in above
equation CANNOT PRODUCE any change in the resistance of this device.
Construction of a Light Dependent Resistor: there two common types of materials used to
manufacture the photoconductive cells. They are Cadmium Sulphide (CdS) and Cadmium
Selenide (CdSe).
The band gap energy of Cadmium Sulphide is 2.42eV and for Cadmium Selenide it is 1.74eV.
Due to such large energy gaps, both the materials have extremely high resistivity at room
temperature. Hence, these materials are widely used in LDR for practical purpose.
A long, thin and narrow strip of CdS is fixed on the surface of ceramic substrate in the form of
zigzag wire as shown in following figure. This construction gives minimum area and maximum
length. Then the structure is enclosed in round metallic or plastic case and two terminals (made
up of either tin or indium) are taken out for external connections. The structure is covered with
glass sheet to protect it from moisture and dust and allows only light to fall on it.
Characteristics of photoconductive cells
Photoconductor Time Constant Spectral Band
Cadmium Sulphide CdS 100 milli sec 0.47 to 0.72 um
Cadmium Selenide CdSe 10 milli sec 0.6 to 0.77 um
Lead Sulphide PbS 410 micro sec 1 to 3.2 um
Lead Selenide PbSe 10.2 micro sec 1.52 to 4.2 um
Now when the device is dark, its resistance is called as dark resistance. This resistance is
typically of the order of 1013 ohms. When light falls on it, its resistance decreases up to several
kilo ohms or even hundreds of ohms, depending on the intensity of light, falling on it. The
spectral response characteristics of two commercial cells were compared in our laboratory. And
we found that there is almost no response to the radiation of a wavelength which was shorter
than 300nm. It was very interesting to note that the Cadmium Sulphide cell has a peak response
nearer or within the green color of the spectrum within a range of 520nm. Thus it can be used
nearer to the infra-red region up to 750nm. It was found that the maximum response of
Cadmium Sulphoselenide is in the yellow-orange range at 615nm and also it can be used in the
infra-red region up to about 970nm.
Mathematical analysis of photoconductive cell
The sensitivity of photoconductive transducer is defined as the ratio of change in resistance to
the proportional change in the irradiation level. Thus, the spectral response of the sensor must
match with the appropriate response from light source.
Mathematically –
Since the photoconductive cell has relatively large sensitive area, a small change in light
intensity will cause a large change in its resistance. Generally, all photoconductive cells show the
property of change in resistance in the ratio of 1000:1 for dark to light irradiance change of
0.005W/m2 to 50W/m2.
But it is also interesting to note that the the relation between irradiance and its resistance is NOT
LINEAR. It is actually exponential relationship, as follows –
Fig: characteristics
Applications
It is used in burglar alarm to give alarming sound when a burglar invades sensitive
premises.
It is used in street light control to switch on the lights during dusk and switch off during dawn
automatically.
It is used in Lux meter to measure intensity of light in Lux.
It is used in photo sensitive relay circuit.
Two cadmium sulphide (cds) photoconductive cells with spectral responses similar to
that of the human eye. The cell resistance falls with increasing light intensity.
Applications include smoke detection, automatic lighting control, and batch counting and
burglar alarm systems.
Fig: LDR
SMOKE SENSOR (MQ2):
Smoke sensor is used to detect any leakage of smoke and any hazardous gases such that an alarm
can be initiated to avoid any damages in the industries. These sensors are also used in many
applications like corporate and in any office work areas these are linked to fire alarms And
buzzers through the micro-controller.
There are two main types of smoke detectors: Ionization detectors and photoelectric detectors. A
smoke alarm uses one or both methods, sometimes plus a heat detector, to warn of a fire.
Ionization Detectors:
Ionization detectors have an ionization chamber and a source of ionizing radiation. The source of
ionizing radiation is a minute quantity of americium-241 (perhaps 1/5000th of a gram), which is
a source of alpha particles (helium nuclei). The ionization chamber consists of two plates
separated by about a centimeter. The battery applies a voltage to the plates, charging one plate
positive and the other plate negative. Alpha particles constantly released by the americium knock
electrons off of the atoms in the air, ionizing the oxygen and nitrogen atoms in the chamber. The
positively-charged oxygen and nitrogen atoms are attracted to the negative plate and the
electrons are attracted to the positive plate, generating a small, continuous electric current. When
smoke enters the ionization chamber, the smoke particles attach to the ions and neutralize them,
so they do not reach the plate. The drop in current between the plates triggers the alarm.
Photoelectric Detectors
In one type of photoelectric device, smoke can block a light beam. In this case, the reduction in
light reaching a photocell sets off the alarm. In the most common type of photoelectric unit,
however, light is scattered by smoke particles onto a photocell, initiating an alarm. In this type of
detector there is a T-shaped chamber with a light-emitting diode (LED) that shoots a beam of
light across the horizontal bar of the T. A photocell, positioned at the bottom of the vertical base
of the T, generates a current when it is exposed to light. Under smoke-free conditions, the light
beam crosses the top of the T in an uninterrupted straight line, not striking the photocell
positioned at a right angle below the beam. When smoke is present, the light is scattered by
smoke particles, and some of the light is directed down the vertical part of the T to strike the
photocell. When sufficient light hits the cell, the current triggers the alarm.
Both ionization and photoelectric detectors are effective smoke sensors. Both types of smoke
detectors must pass the same test to be certified as UL smoke detectors. Ionization detectors
respond more quickly to flaming fires with smaller fire particles; photoelectric detectors respond
more quickly to smoldering fires. In either type of detector, steam or high humidity can lead to
condensation on the circuit board and sensor, causing the alarm to sound. Ionization detectors are
less expensive than photoelectric detectors, but some users purposely disable them because they
are more likely to sound an alarm from normal cooking due to their sensitivity to minute smoke
particles. However, ionization detectors have a degree of built-in security not inherent to
photoelectric detectors. When the battery starts to fail in an ionization detector, the ion current
falls and the alarm sounds, warning that it is time to change the battery before the detector
becomes ineffective. Back-up batteries may be used for photoelectric detectors.
Sensitive material of MQ-3 gas sensor is SnO2, which with lower conductivity in clean air.
When the target alcohol gas exist, The sensor’s conductivity is more higher along with the gas
concentration rising. MQ-3 gas sensor has high sensitivity to Alcohol, and has good resistance to
disturb of gasoline, smoke and vapor. The sensor could be used to detect alcohol with different
concentration; it is with low cost and suitable for different application.
The above is basic test circuit of the sensor. The sensor needs to be put 2 voltage, heater voltage
and test voltage(VC). VH used to supply certified working temperature to the sensor, while
VC used to detect voltage (VRL) on load resistance whom is in series with sensor. The sensor
has light polarity, Vc need DC power. VC and VH could use same power circuit with
precondition to assure performance of sensor. In order to make the sensor with better
performance, suitable RL value is needed:
Structure and configuration:
Structure and configuration of MQ-3 gas sensor is shown as Fig. 3, sensor composed by micro
AL2O3 ceramic tube, Tin Dioxide (SnO2) sensitive layer, measuring electrode and heater are
fixed into a crust made by plastic and stainless steel net. The heater provides necessary work
conditions for work of sensitive components. The enveloped MQ-4 has 6 pin, 4 of them are used
to fetch signals, and other 2 are used for providing heating current.
Bluetooth:
Bluetooth is a wireless technology used to transfer data between different electronic devices.
The distance of data transmission is small in comparison to other modes of wireless
communication. This technology eradicates the use of cords, cables, adapters and permits the
electronic devices to communicate wirelessly among each other.
The key features of Bluetooth technology:
· Less complication
· Less power consumption
· Available at cheaper rates
· Robustness
Bluetooth technology permits hands free headset for incoming voice calls, ability of printing
and fax, and automatic synchronization of PDA. Click to now more about basics of Bluetooth
Protocol.
Classification
Various types of Bluetooth technology are available in the markets which help the consumers to
communicate wirelessly. The different types of Bluetooth devices are PC cards, radios, dongles,
and headsets. Laptops and other Internet enabled equipments use Bluetooth technology such as
wireless mouse and keyboard to communicate wirelessly. Music players like iPods, music
phones, or other MP3 players make use of stereo headphones.
Applications
The first and foremost application of Bluetooth technology would be to eradicate the tangling of
cables that would mess up the room.
1. Bluetooth’s biggest contribution is to provide a phone with a headset that works wirelessly.
This is possible by providing the caller with an earpiece and a small microphone attached to the
caller’s shirt. The mobile phone can be located in a bag or anywhere in the body. The caller can
dial a number even without touching a button on the mobile phone. This technology has the
advantage of eliminating the radiation hitting the cerebral region.
2. PDA, PC or laptop which has enabled Bluetooth can communicate with each other and
update with its latest information. This technology has helped in synchronizing the data easily.
3. It is difficult to send emails while travelling in a flight. On landing of the flight, the
Bluetooth enabled laptop can send the email only when it gets in touch with the user’s phone.
4. Wireless mouse and keyboards are introduced.
5. One will be alerted on his/her mobile phone when your laptop receives the mail.
6. You can try to locate a printer via laptop. You will get the printout of that document once
that printer is located.
Working
Bluetooth technology was discovered to have wireless protocols to connect several electronic
devices and as a solution to synchronize the data. The Bluetooth standard is maintained by the
Bluetooth Special Interest Group.
At the physical layer, the Bluetooth RF transceiver is positioned. At around 79 Bluetooth
channels are placed with a space of 1MHz. Transmission of data and voice are achievable at
short distances and thereby creating Wireless PANs.
A Bluetooth device is comprised of an adapter. A Bluetooth adapter can be available in the form
of a card to connect the device or integrated into an electronic device.
Link Management Protocol (LMP) is responsible for peer – to – peer message exchange when
the electronic devices interfere in each other’s radio range. This layer creates the link and
negotiation of packet size. If required this layer can perform the segmentation and reassembling
of the packets.
The Bluetooth device enabled by the Service delivery protocol joins the piconet and enquires
with all the services available. A piconet has a star topology with one master and seven slaves.
The concept of Master and Slave is used in the Bluetooth technology. Only after the master takes
the initial action, the devices can begin to talk. Bluetooth GloballD is exchanged among the
electronic devices and a connection is build up after the profiles are matched. Get in-depth of
Bluetooth Protocol Stack here.
Frequency hopping is used in the Bluetooth technology to avoid interfering with other signals.
After the packet is transmitted or received, the Bluetooth signal hops to a new frequency. Each
packet can cover five time slots.
The Bluetooth technology supports asynchronous data channel, or 3 simultaneous synchronous
voice channels, or a channel which supports asynchronous data and synchronous voice.
Bluetooth was selected as our way of communicating PDA/Mobile with a central system. The
reason Bluetooth was selected over Bluetooth for various reasons. First of all, Bluetooth security
is less complex and more stable than that of Wi-Fi. Bluetooth manages a security measure of
only permitting certain selected devices to interact with them; Wi-Fi in the other hand establishes
a WEP key that has been known to be cracked. Another reason that Bluetooth was selected over
Wi-Fi is that Bluetooth has a shorter range of signal emission than Wi-Fi. This is a pro because
the shorter the range the less the amount intruders that will try to infiltrate your home system
Features
Standard 3V3 operation
Bluetooth standard Ver. 2.0 + EDR
compliant
Low current consumption
Hold, Sniff, Park, Deep sleep modes
Support for up to seven slaves
Supports UART,USB,PCM,I2C interface to host system interface
SPP(Serial Port Protocol) firmware
Class 2 module
RELAYS
Relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic
field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays
have two switch positions and they are double throw (changeover) switches.
Relays allow one circuit to switch a second circuit which can be completely separate from the
first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is
no electrical connection inside the relay between the two circuits; the link is magnetic and mechanical.
The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be
as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot provide
this current and a transistor is usually used to amplify the small IC current to the larger value required
for the relay coil. The maximum output current for the popular 555 timer IC is 200mA so these devices
can supply relay coils directly without amplification.
Relays are usually SPDT or DPDT but they can have many more sets of switch contacts, for
example relays with 4 sets of changeover contacts are readily available. For further information about
switch contacts and the terms used to describe them please see the page on switches.
Most relays are designed for PCB mounting but you can solder wires directly to the pins
providing you take care to avoid melting the plastic case of the relay. The supplier's catalogue should
show you the relay's connections. The coil will be obvious and it may be connected either way round.
Relay coils produce brief high voltage 'spikes' when they are switched off and this can destroy
transistors and ICs in the circuit. To prevent damage you must connect a protection diode across the
relay coil.
The animated picture shows a working relay with its coil and switch contacts. You can see a
lever on the left being attracted by magnetism when the coil is switched on. This lever moves the switch
contacts. There is one set of contacts (SPDT) in the foreground and another behind them, making the
relay DPDT.
The relay's switch connections are usually labelled COM, NC and NO:
COM = Common, always connect to this, it is the moving part of the switch.
NC = Normally Closed, COM is connected to this when the relay coil is off.
NO = Normally Open, COM is connected to this when the relay coil is on.
Connect to COM and NO if you want the switched circuit to be on when the relay coil is on.
Connect to COM and NC if you want the switched circuit to be on when the relay coil is off.
Choosing a relay
1. Physical size and pin arrangement If you are choosing a relay for an existing PCB you will need to
ensure that its dimensions and pin arrangement are suitable. You should find this information in
the supplier's catalogue.
2. Coil voltage the relay's coil voltage rating and resistance must suit the circuit powering the relay
coil. Many relays have a coil rated for a 12V supply but 5V and 24V relays are also readily
available. Some relays operate perfectly well with a supply voltage which is a little lower than
their rated value.
3. Coil resistance the circuit must be able to supply the current required by the relay coil. You can
use Ohm's law to calculate the current:
supply voltage
Relay coil current =
coil resistance
4. For example: A 12V supply relay with a coil resistance of 400 passes a current of 30mA. This is
OK for a 555 timer IC (maximum output current 200mA), but it is too much for most ICs and they
will require a transistor to amplify the current.
5. Switch ratings (voltage and current) the relay's switch contacts must be suitable for the circuit
they are to control. You will need to check the voltage and current ratings. Note that the voltage
rating is usually higher for AC, for example: "5A at 24V DC or 125V AC".
6. Switch contact arrangement (SPDT, DPDT etc).
Most relays are SPDT or DPDT which are often described as "single pole changeover" (SPCO) or
"double pole changeover" (DPCO). For further information please see the page on switches
Protection diodes for relays
Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when the
relay coil is switched off. The diagram shows how a signal diode (eg 1N4148) is connected across the
relay coil to provide this protection. Note that the diode is connected 'backwards' so that it will normally
not conduct. Conduction only occurs when the relay coil is switched off, at this moment current tries to
continue flowing through the coil and it is harmlessly diverted through the diode. Without the diode no
current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the
current flowing.
Reed relays
Reed relays generally have higher coil resistances than standard relays (1000 for example) and
a wide range of supply voltages (9-20V for example). They are capable of switching much more rapidly
than standard relays, up to several hundred times per second; but they can only switch low currents
(500mA maximum for example).
Like relays, transistors can be used as an electrically operated switch. For switching small DC
currents (< 1A) at low voltage they are usually a better choice than a relay. However transistors cannot
switch AC or high voltages (such as mains electricity) and they are not usually a good choice for
switching large currents (> 5A). In these cases a relay will be needed, but note that a low power
transistor may still be needed to switch the current for the relay's coil! The main advantages and
disadvantages of relays are listed below:
Advantages of relays:
Relays can switch AC and DC, transistors can only switch DC.
Relays can switch high voltages, transistors cannot.
Relays are a better choice for switching large currents (> 5A).
Relays can switch many contacts at once.
Disadvantages of relays:
DC FAN:
Technical/Catalog Information 3610KL-04W-B10-D00
Vendor NMB Technologies Corporation
Category Fans, Thermal Management
Voltage - Rated 12VDC
Power (Watts) 0.88W
Bearing Type Ball
Size / Dimension Square - 92mm L x 92mm H x 25mm W
Air Flow 26.5 CFM (0.750m³/min)
Features -
Termination 2 Wire Leads
Fan Type Tubeaxial
Noise 25 dB
RPM 1750 RPM
Static Pressure 0.057 in H2O (14.2 Pa)
Weight 0.209 lb (94.8g)
Current Rating 73mA
Voltage Range 6 ~ 13.8VDC
Operating Temperature 14 ~ 158°F (-10 ~ 70°C)
Life Expectancy 70000 hrs @ 25°C
Lead Free Status Lead Free
RoHS Status RoHS Compliant
3610KL 04W B10 D00
3610KL04WB10D00
Other Names P13415 ND
P13415ND
P13415
Features
Using of High-Precision Bearings
Application
Printers.
Communication Equipment.
Machine tools.
Portable amusements.
Servers.
Copy machines.
Facsimile machines.
Projectors.
SOFTWARE DESCRIPTION
Softwares used is:
*KEIL µVision using Embedded C programming
*Express PCB for lay out design
*Express SCH for schematic design
Express PCB
Express PCB is a Circuit Design Software and PCB manufacturing service. One
can learn almost everything you need to know about Express PCB from the help topics included
with the programs given.
Details:
Express PCB, Version 5.6.0
Express SCH
The Express SCH schematic design program is very easy to use. This software
enables the user to draw the Schematics with drag and drop options.
A Quick Start Guide is provided by which the user can learn how to use it.
Details:
Express SCH, Version 5.6.0
EMBEDDED C:
The programming Language used here in this project is an Embedded C
Language. This Embedded C Language is different from the generic C language in few things
like
a) Data types
b) Access over the architecture addresses.
The Embedded C Programming Language forms the user friendly language with access over Port
addresses, SFR Register addresses etc.
Embedded C Data types:
Data Types Size in Bits Data Range/Usage
Signed char:
o Used to represent the – or + values.
o As a result, we have only 7 bits for the magnitude of the signed number, giving us values
from -128 to +127.
Simulator/Debugger:
The simulator/ debugger in KEIL can perform a very detailed simulation of a micro
controller along with external signals. It is possible to view the precise execution time of a single
assembly instruction, or a single line of C code, all the way up to the entire application, simply
by entering the crystal frequency. A window can be opened for each peripheral on the device,
showing the state of the peripheral. This enables quick trouble shooting of mis-configured
peripherals. Breakpoints may be set on either assembly instructions or lines of C code, and
execution may be stepped through one instruction or C line at a time. The contents of all the
memory areas may be viewed along with ability to find specific variables. In addition the
registers may be viewed allowing a detailed view of what the microcontroller is doing at any
point in time.
ARM SOFTWARE:
About KeilARM:
27.Now Click on the Peripherals from menu bar, and check your required port as shown in fig
below
29.Drag the port a side and click in the program file
29.Now keep Pressing function key “F11” slowly and observe.
30.You are running your program successfully
Flash magic
If dumping process of the hex file is completed, then the controller will work as per our
requirement
CONCLUSION