You are on page 1of 55

BL1

AUTOMATIC DIM BRIGHT CONTROL OF VEHICLE


HEADLIGHTS

ABSTRACT:

Night time driving has always been risky. In spite of headlights controls

that are available on all vehicles, accidents seem invisible. Accidents at night

mainly own their invisibility to the excessive brightness of the head lights on

vehicles. This makes it almost impossible for the drivers to drive safe.

So, attempting for manual light controlling like fighting a losing battle. To

overcome this problem, developing the ‘automatic dim bright’ system using

MICROCONTROLLER ATMEGA8, which is also the underlying theme of this

project?

One benefit of the innovation, in addition to the safety benefits, is that it

can be immediately incorporated into new vehicle programs and/or installed in

existing motor vehicles at minimum installation effort and cost. Furthermore, as

will be seen, the innovation is adaptable to all vehicle types and styles including

but not limited to, two wheelers, standard passenger sedans, convertibles,

recreational vehicles, trailers, vans and trucks. Another important benefit is that

manufacturing and investment costs for practicing the innovation is very low.
BL2

BLOCK DIAGRAM

INTRODUCTION TO EMBEDDED SYSTEMS


EMBEDDED SYSTEM
An embedded system is a special-purpose computer system designed to
perform one or a few dedicated functions, sometimes with real-time computing
constraints. It is usually embedded as part of a complete device including hardware
and mechanical parts. In contrast, a general-purpose computer, such as a personal
computer, can do many different tasks depending on programming. Embedded
systems have become very important today as they control many of the common
devices we use.
Since the embedded system is dedicated to specific tasks, design engineers
can optimize it, reducing the size and cost of the product, or increasing the
BL3

reliability and performance. Some embedded systems are mass-produced,


benefiting from economies of scale.
Physically, embedded systems range from portable devices such as digital
watches and MP3 players, to large stationary installations like traffic lights, factory
controllers, or the systems controlling nuclear power plants. Complexity varies
from low, with a single microcontroller chip, to very high with multiple units,
peripherals and networks mounted inside a large chassis or enclosure.
In general, "embedded system" is not an exactly defined term, as many
systems have some element of programmability. For example, Handheld
computers share some elements with embedded systems — such as the operating
systems and microprocessors which power them — but are not truly embedded
systems, because they allow different applications to be loaded and peripherals to
be connected.
An embedded system is some combination of computer hardware and
software, either fixed in capability or programmable, that is specifically designed
for a particular kind of application device. Industrial machines, automobiles,
medical equipment, cameras, household appliances, airplanes, vending machines,
and toys (as well as the more obvious cellular phone and PDA) are among the
myriad possible hosts of an embedded system. Embedded systems that are
programmable are provided with a programming interface, and embedded systems
programming is a specialized occupation.
Certain operating systems or language platforms are tailored for the
embedded market, such as Embedded Java and Windows XP Embedded. However,
some low-end consumer products use very inexpensive microprocessors and
limited storage, with the application and operating system both part of a single
program. The program is written permanently into the system's memory in this
BL4

case, rather than being loaded into RAM (random access memory), as programs on
a personal computer are.
APPLICATIONS OF EMBEDDED SYSTEM
We are living in the Embedded World. You are surrounded with many
embedded products and your daily life largely depends on the proper functioning
of these gadgets. Television, Radio, CD player of your living room, Washing
Machine or Microwave Oven in your kitchen, Card readers, Access Controllers,
Palm devices of your work space enable you to do many of your tasks very
effectively. Apart from all these, many controllers embedded in your car take care
of car operations between the bumpers and most of the times you tend to ignore all
these controllers.

In recent days, you are showered with variety of information about these
embedded controllers in many places. All kinds of magazines and journals
regularly dish out details about latest technologies, new devices; fast applications
which make you believe that your basic survival is controlled by these embedded
products. Now you can agree to the fact that these embedded products have
successfully invaded into our world. You must be wondering about these
embedded controllers or systems. What is this Embedded System?
The computer you use to compose your mails, or create a document or
analyze the database is known as the standard desktop computer. These desktop
computers are manufactured to serve many purposes and applications.
You need to install the relevant software to get the required processing
facility. So, these desktop computers can do many things. In contrast, embedded
controllers carryout a specific work for which they are designed. Most of the time,
engineers design these embedded controllers with a specific goal in mind. So these
controllers cannot be used in any other place.
BL5

Theoretically, an embedded controller is a combination of a piece of


microprocessor based hardware and the suitable software to undertake a specific
task.
These days designers have many choices in
microprocessors/microcontrollers. Especially, in 8 bit and 32 bit, the available
variety really may overwhelm even an experienced designer. Selecting a right
microprocessor may turn out as a most difficult first step and it is getting
complicated as new devices continue to pop-up very often.
In the 8 bit segment, the most popular and used architecture is Intel's 8031.
Market acceptance of this particular family has driven many semiconductor
manufacturers to develop something new based on this particular architecture.
Even after 25 years of existence, semiconductor manufacturers still come out with
some kind of device using this 8031 core.
 Military and aerospace software applications

From in-orbit embedded systems to jumbo jets to vital battlefield networks,


designers of mission-critical aerospace and defense systems requiring real-time
performance, scalability, and high-availability facilities consistently turn to the
LynxOS® RTOS and the LynxOS-178 RTOS for software certification to DO-
178B.

Rich in system resources and networking services, LynxOS provides an off-the-


shelf software platform with hard real-time response backed by powerful
distributed computing (CORBA), high reliability, software certification, and long-
term support options.

The LynxOS-178 RTOS for software certification, based on the RTCA DO-
178B standard, assists developers in gaining certification for their mission- and
BL6

safety-critical systems. Real-time systems programmers get a boost with


LynuxWorks' DO-178B RTOS training courses.

LynxOS-178 is the first DO-178B and EUROCAE/ED-12B certifiable,


POSIX®-compatible RTOS solution.

 Communications applications

"Five-nines" availability, CompactPCI hot swap support, and hard real-time


response—LynxOS delivers on these key requirements and more for today's
carrier-class systems. Scalable kernel configurations, distributed computing
capabilities, integrated communications stacks, and fault-management facilities
make LynxOS the ideal choice for companies looking for a single operating system
for all embedded telecommunications applications—from complex central
controllers to simple line/trunk cards.

LynuxWorks Jumpstart for Communications package enables OEMs to rapidly


develop mission-critical communications equipment, with pre-integrated, state-of-
the-art, data networking and porting software components—including source code
for easy customization.

The Lynx Certifiable Stack (LCS) is a secure TCP/IP protocol stack designed
especially for applications where standards certification is required.

 Electronics applications and consumer devices

As the number of powerful embedded processors in consumer devices


continues to rise, the BlueCat® Linux® operating system provides a highly
reliable and royalty-free option for systems designers.
BL7

And as the wireless appliance revolution rolls on, web-enabled navigation


systems, radios, personal communication devices, phones and PDAs all benefit
from the cost-effective dependability, proven stability and full product life-cycle
support opportunities associated with BlueCat embedded Linux. BlueCat has
teamed up with industry leaders to make it easier to build Linux mobile phones
with Java integration.

For makers of low-cost consumer electronic devices who wish to integrate the
LynxOS real-time operating system into their products, we offer special MSRP-
based pricing to reduce royalty fees to a negligible portion of the device's MSRP.

 Industrial automation and process control software

Designers of industrial and process control systems know from experience that
LynuxWorks operating systems provide the security and reliability that their
industrial applications require.

From ISO 9001 certification to fault-tolerance, POSIX conformance, secure


partitioning and high availability, we've got it all. Take advantage of our 20 years
of experience.

MICROCONTROLLER VERSUS MICROPROCESSOR


What is the difference between a Microprocessor and Microcontroller? By
microprocessor is meant the general purpose Microprocessors such as Intel's X86
family (8086, 80286, 80386, 80486, and the Pentium) or Motorola's 680X0 family
(68000, 68010, 68020, 68030, 68040, etc). These microprocessors contain no
RAM, no ROM, and no I/O ports on the chip itself. For this reason, they are
commonly referred to as general-purpose Microprocessors.
BL8

A system designer using a general-purpose microprocessor such as the


Pentium or the 68040 must add RAM, ROM, I/O ports, and timers externally to
make them functional. Although the addition of external RAM, ROM, and I/O
ports makes these systems bulkier and much more expensive, they have the
advantage of versatility such that the designer can decide on the amount of RAM,
ROM and I/O ports needed to fit the task at hand. This is not the case with
Microcontrollers.

A Microcontroller has a CPU (a microprocessor) in addition to a fixed


amount of RAM, ROM, I/O ports, and a timer all on a single chip. In other words,
the processor, the RAM, ROM, I/O ports and the timer are all embedded together
on one chip; therefore, the designer cannot add any external memory, I/O ports, or
timer to it. The fixed amount of on-chip ROM, RAM, and number of I/O ports in
Microcontrollers makes them ideal for many applications in which cost and space
are critical.
In many applications, for example a TV remote control, there is no need for
the computing power of a 486 or even an 8086 microprocessor. These applications
most often require some I/O operations to read signals and turn on and off certain
bits.

MICROCONTROLLERS FOR EMBEDDED SYSTEMS


In the Literature discussing microprocessors, we often see the term
Embedded System. Microprocessors and Microcontrollers are widely used in
embedded system products. An embedded system product uses a microprocessor
(or Microcontroller) to do one task only. A printer is an example of embedded
system since the processor inside it performs one task only; namely getting the data
and printing it. Contrast this with a Pentium based PC. A PC can be used for any
BL9

number of applications such as word processor, print-server, bank teller terminal,


Video game, network server, or Internet terminal. Software for a variety of
applications can be loaded and run. Of course the reason a pc can perform myriad
tasks is that it has RAM memory and an operating system that loads the application
software into RAM memory and lets the CPU run it.
In an Embedded system, there is only one application software that is
typically burned into ROM. An x86 PC contains or is connected to various
embedded products such as keyboard, printer, modem, disk controller, sound card,
CD-ROM drives, mouse, and so on. Each one of these peripherals has a
Microcontroller inside it that performs only one task. For example, inside every
mouse there is a Microcontroller to perform the task of finding the mouse position
and sending it to the PC. Table 1-1 lists some embedded products.

MICROCONTROLLER
ATmega8L
Features
• High-performance, Low-power AVR® 8-bit Microcontroller
• Advanced RISC Architecture
– 130 Powerful Instructions – Most Single-clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16 MHz
– On-chip 2-cycle Multiplier
• High Endurance Non-volatile Memory segments
– 8K Bytes of In-System Self-programmable Flash program memory
– 512 Bytes EEPROM
– 1K Byte Internal SRAM
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C/100 years at 25°C(1)
BL10

– Optional Boot Code Section with Independent Lock Bits


In-System Programming by On-chip Boot Program
True Read-While-Write Operation
– Programming Lock for Software Security
• Peripheral Features
– Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture
Mode
– Real Time Counter with Separate Oscillator
– Three PWM Channels
– 8-channel ADC in TQFP and QFN/MLF package
Eight Channels 10-bit Accuracy
– 6-channel ADC in PDIP package
Six Channels 10-bit Accuracy
– Byte-oriented Two-wire Serial Interface
– Programmable Serial USART
– Master/Slave SPI Serial Interface
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
• Special Microcontroller Features
– Power-on Reset and Programmable Brown-out Detection
– Internal Calibrated RC Oscillator
– External and Internal Interrupt Sources
– Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, and
Standby
• I/O and Packages
– 23 Programmable I/O Lines
– 28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF
• Operating Voltages
– 2.7 - 5.5V (ATmega8L)
– 4.5 - 5.5V (ATmega8)
• Speed Grades
– 0 - 8 MHz (ATmega8L)
– 0 - 16 MHz (ATmega8)
• Power Consumption at 4 Mhz, 3V, 25°C
– Active: 3.6 mA
– Idle Mode: 1.0 mA
– Power-down Mode: 0.5 µA

Pin Configurations
BL11
BL12
BL13
BL14

The AVR core combines a rich instruction set with 32 general purpose working registers.
All the32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle. The
resulting architecture is more code efficient while achieving throughputs up to ten times faster
than conventional CISC microcontrollers. The ATmega8 provides the following features: 8K
bytes of In-System Programmable Flash with Read-While-Write capabilities, 512 bytes of
EEPROM, 1K byte of SRAM, 23 general purpose I/O lines, 32 general purpose working
registers, three flexible Timer/Counters with compare modes, internal and external interrupts, a
serial programmable USART, a byte oriented Two-wire Serial Interface, a 6-channel ADC (eight
channels in TQFP and QFN/MLF packages) with10-bit accuracy, a programmable Watchdog
Timer with Internal Oscillator, an SPI serial port, and five software selectable power saving
modes. The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, SPI port, and
interrupt system to continue functioning. The Power-down mode saves the register contents but
freezes the Oscillator, disabling all other chip functions until the next Interrupt or Hardware
Reset. In Power-save mode, the asynchronous timer continues to run, allowing the user to
maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode
stops the CPU and all I/O modules except asynchronous timer and ADC, to minimize switching
noise during ADC conversions. In Standby mode, the crystal/resonator Oscillator is running
while the rest of the device is sleeping. This allows very fast start-up combined with low-power
consumption. The device is manufactured using Atmel’s high density non-volatile memory
technology. The Flash Program memory can be reprogrammed In-System through an SPI serial
interface, by a conventional non-volatile memory programmer, or by an On-chip boot program
running on the AVR core. The boot program can use any interface to download the application
program in the Application Flash memory. Software in the Boot Flash Section will continue to
run while the Application Flash Section is updated, providing true Read-While-Write operation.
By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic
chip, the AtmelATmega8 is a powerful microcontroller that provides a highly-flexible and cost-
effective solution to many embedded control applications. The ATmega8 AVR is supported with
a full suite of program and system development tools, including C compilers, macro assemblers,
program debugger/simulators, In-Circuit Emulators, and evaluation kits.

Disclaimer Typical values contained in this datasheet are based on simulations and
characterization of other AVR microcontrollers manufactured on the same
process technology. Min and Max values will be available after the device is
characterized.
Pin Descriptions
VCC Digital supply voltage.
GND Ground.
Port B (PB7..PB0)
XTAL1/XTAL2/TOSC1/
TOSC2
Port B is an 8-bit bi-directional I/O port with internal pull-up
resistors (selected for each bit). The Port B output buffers have
symmetrical drive characteristics with both high sink and source
capability. As inputs, Port B pins that are externally pulled low will source
BL15

current if the pull-up resistors are activated. The Port B pins are tri-stated
when a reset condition becomes active, even if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input
to the inverting Oscillator amplifier and input to the internal clock
operating circuit. Depending on the clock selection fuse settings, PB7 can
be used as output from the inverting Oscillator amplifier. If the Internal
Calibrated RC Oscillator is used as chip clock source, PB7..6 is used as
TOSC2..1input for the Asynchronous Timer/Counter2 if the AS2 bit in
ASSR is set.
Port C (PC5..PC0) Port C is an 7-bit bi-directional I/O port with internal pull-
up resistors (selected for each bit). The Port C output buffers have symmetrical
drive characteristics with both high sink and source capability. As inputs, Port C
pins that are externally pulled low will source current if the pull-up resistors are
activated. The Port C pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
PC6/RESET If the RSTDISBL Fuse is programmed, PC6 is used as an
I/O pin. Note that the electrical characteristics of PC6 differ from those of the
other pins of Port C. If the RSTDISBL Fuse is un programmed, PC6 is used as a
Reset input. A low level on this pin for longer than the minimum pulse length will
generate a Reset, even if the clock is not running. Shorter pulses are not
guaranteed to generate a Reset.
Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-
up resistors (selected for each bit). The Port D output buffers have symmetrical
drive characteristics with both high sink and source capability. As inputs, Port D
pins that are externally pulled low will source current if the pull-up resistors are
activated. The Port D pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
RESET Reset input. A low level on this pin for longer than the minimum
pulse length will generate a reset, even if the clock is not running. Shorter pulses
are not guaranteed to generate a reset.
AVCC AVCC is the supply voltage pin for the A/D Converter, Port C
(3..0), and ADC (7..6). It should beexternally connected to VCC, even if the ADC
is not used. If the ADC is used, it should be con-nected to VCC through a low-
pass filter. Note that Port C (5..4) use digital supply voltage, VCC.
AREF AREF is the analog reference pin for the A/D Converter.
ADC7..6 (TQFP and
QFN/MLF Package
Only) In the TQFP and QFN/MLF package, ADC7..6 serve as analog
inputs to the A/D converter.These pins are powered from the analog supply and
serve as 10-bit ADC channels.

RS-232
BL16

From Wikipedia, the free encyclopedia

In telecommunications, RS-232 (Recommended Standard 232) is the traditional name for a


series of standards for serial binary single-ended data and control signals connecting between a
DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is
commonly used in computer serial ports. The standard defines the electrical characteristics and
timing of signals, the meaning of signals, and the physical size and pin out of connectors. The
current version of the standard is TIA-232-F Interface Between Data Terminal Equipment and
Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange, issued in 1997.

An RS-232 port was once a standard feature of a personal computer for connections to modems,
printers, mice, data storage, un-interruptible power supplies, and other peripheral devices.
However, the limited transmission speed, relatively large voltage swing, and large standard
connectors motivated development of the universal serial bus which has displaced RS-232 from
most of its peripheral interface roles. Many modern personal computers have no RS-232 ports
and must use an external converter to connect to older peripherals. Some RS-232 devices are still
found especially in industrial machines or scientific instruments.

Scope of the standard


The Electronic Industries Association (EIA) standard RS-232-C[1] as of 1969 defines:

 Electrical signal characteristics such as voltage levels, signaling rate, timing and slew-
rate of signals, voltage withstand level, short-circuit behavior, and maximum load
capacitance.
 Interface mechanical characteristics, pluggable connectors and pin identification.
 Functions of each circuit in the interface connector.
 Standard subsets of interface circuits for selected telecom applications.

The standard does not define such elements as

 character encoding (for example, ASCII, Baudot code or EBCDIC)


 the framing of characters in the data stream (bits per character, start/stop bits, parity)
 protocols for error detection or algorithms for data compression
 bit rates for transmission, although the standard says it is intended for bit rates lower than
20,000 bits per second. Many modern devices support speeds of 115,200 bit/s and above
 power supply to external devices.

Details of character format and transmission bit rate are controlled by the serial port hardware,
often a single integrated circuit called a UART that converts data from parallel to asynchronous
start-stop serial form. Details of voltage levels, slew rate, and short-circuit behavior are typically
controlled by a line driver that converts from the UART's logic levels to RS-232 compatible
signal levels, and a receiver that converts from RS-232 compatible signal levels to the UART's
logic levels.
BL17

History
RS-232 was first introduced in 1962.[2] The original DTEs were electromechanical
teletypewriters, and the original DCEs were (usually) modems. When electronic terminals (smart
and dumb) began to be used, they were often designed to be interchangeable with teletypes, and
so supported RS-232. The C revision of the standard was issued in 1969 in part to accommodate
the electrical characteristics of these devices.[citation needed]

Since application to devices such as computers, printers, test instruments, and so on was not
considered by the standard, designers implementing an RS-232 compatible interface on their
equipment often interpreted the requirements idiosyncratically. Common problems were non-
standard pin assignment of circuits on connectors, and incorrect or missing control signals. The
lack of adherence to the standards produced a thriving industry of breakout boxes, patch boxes,
test equipment, books, and other aids for the connection of disparate equipment. A common
deviation from the standard was to drive the signals at a reduced voltage. Some manufacturers
therefore built transmitters that supplied +5 V and -5 V and labeled them as "RS-232
compatible".[citation needed]

Later personal computers (and other devices) started to make use of the standard so that they
could connect to existing equipment. For many years, an RS-232-compatible port was a standard
feature for serial communications, such as modem connections, on many computers. It remained
in widespread use into the late 1990s. In personal computer peripherals, it has largely been
supplanted by other interface standards, such as USB. RS-232 is still used to connect older
designs of peripherals, industrial equipment (such as PLCs), console ports, and special purpose
equipment, such as a cash drawer for a cash register.[citation needed]

The standard has been renamed several times during its history as the sponsoring organization
changed its name, and has been variously known as EIA RS-232, EIA 232, and most recently as
TIA 232. The standard continued to be revised and updated by the Electronic Industries Alliance
and since 1988 by the Telecommunications Industry Association (TIA).[3] Revision C was issued
in a document dated August 1969. Revision D was issued in 1986. The current revision is TIA-
232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment
Employing Serial Binary Data Interchange, issued in 1997. Changes since Revision C have been
in timing and details intended to improve harmonization with the CCITT standard V.24, but
equipment built to the current standard will interoperate with older versions.[citation needed]

Related ITU-T standards include V.24 (circuit identification) and V.28 (signal voltage and
timing characteristics).[citation needed]

Limitations of the standard


Because the application of RS-232 has extended far beyond the original purpose of
interconnecting a terminal with a modem, successor standards have been developed to address
the limitations. Issues with the RS-232 standard include:[4]
BL18

 The large voltage swings and requirement for positive and negative supplies increases
power consumption of the interface and complicates power supply design. The voltage
swing requirement also limits the upper speed of a compatible interface.
 Single-ended signaling referred to a common signal ground limits the noise immunity and
transmission distance.
 Multi-drop connection among more than two devices is not defined. While multi-drop
"work-arounds" have been devised, they have limitations in speed and compatibility.
 Asymmetrical definitions of the two ends of the link make the assignment of the role of a
newly developed device problematic; the designer must decide on either a DTE-like or
DCE-like interface and which connector pin assignments to use.
 The handshaking and control lines of the interface are intended for the setup and
takedown of a dial-up communication circuit; in particular, the use of handshake lines for
flow control is not reliably implemented in many devices.
 No method is specified for sending power to a device. While a small amount of current
can be extracted from the DTR and RTS lines, this is only suitable for low power devices
such as mice.
 The 25-way connector recommended in the standard is large compared to current
practice.

Role in modern personal computers

PCI Express x1 card with one RS-232 port


Main article: Serial port

In the book, PC 97 Hardware Design Guide,[5] Microsoft deprecated support for the RS-232
compatible serial port of the original IBM PC design. Today, RS-232 has mostly been replaced
in personal computers by USB for local communications. Compared with RS-232, USB is faster,
uses lower voltages, and has connectors that are simpler to connect and use. However, USB is
limited by standard to no more than 5 meters of cable, thus favoring RS-232 when longer
distances are needed. Both standards have software support in popular operating systems. USB is
designed to make it easy for device drivers to communicate with hardware. However, there is no
direct analog to the terminal programs used to let users communicate directly with serial ports.
USB is more complex than the RS-232 standard because it includes a protocol for transferring
data to devices. This requires more software to support the protocol used. RS-232 only
standardizes the voltage of signals and the functions of the physical interface pins. Serial ports of
personal computers are also sometimes used to directly control various hardware devices, such as
BL19

relays or lamps, since the control lines of the interface can be easily manipulated by software.
This isn't feasible with USB, which requires some form of receiver to decode the serial data.

As an alternative, USB docking ports are available which can provide connectors for a keyboard,
mouse, one or more serial ports, and one or more parallel ports. Corresponding device drivers are
required for each USB-connected device to allow programs to access these USB-connected
devices as if they were the original directly-connected peripherals. Devices that convert USB to
RS-232 may not work with all software on all personal computers and may cause a reduction in
bandwidth along with higher latency.

Personal computers may use a serial port to interface to devices such as uninterruptible power
supplies. In some cases, serial data is not exchanged, but the control lines are used to signal
conditions such as loss of power or low battery alarms.

Many fields (for example, laboratory automation, surveying) provide a continued demand for
RS-232 I/O due to sustained use of very expensive but aging equipment. It is often far cheaper to
continue to use RS-232 than it is to replace the equipment. Additionally, modern industrial
automation equipment, such as PLCs, VFDs, servo drives, and CNC equipment are
programmable via RS-232. Some manufacturers have responded to this demand: Toshiba re-
introduced the DE-9M connector on the Tecra laptop.

Serial ports with RS-232 are also commonly used to communicate to headless systems such as
servers, where no monitor or keyboard is installed, during boot when operating system isn't
running yet and therefore no network connection is possible. An RS-232 serial port can
communicate to some embedded systems such as routers as an alternative to network mode of
monitoring.

Standard details
In RS-232, user data is sent as a time-series of bits. Both synchronous and asynchronous
transmissions are supported by the standard. In addition to the data circuits, the standard defines
a number of control circuits used to manage the connection between the DTE and DCE. Each
data or control circuit only operates in one direction, that is, signaling from a DTE to the
attached DCE or the reverse. Since transmit data and receive data are separate circuits, the
interface can operate in a full duplex manner, supporting concurrent data flow in both directions.
The standard does not define character framing within the data stream, or character encoding.

Voltage levels
BL20

Diagrammatic oscilloscope trace of voltage levels for an uppercase ASCII "K" character (0x4b)
with 1 start bit, 8 data bits, 1 stop bit

The RS-232 standard defines the voltage levels that correspond to logical one and logical zero
levels for the data transmission and the control signal lines. Valid signals are plus or minus 3 to
15 volts; the ±3 V range near zero volts is not a valid RS-232 level. The standard specifies a
maximum open-circuit voltage of 25 volts: signal levels of ±5 V, ±10 V, ±12 V, and ±15 V are
all commonly seen depending on the power supplies available within a device. RS-232 drivers
and receivers must be able to withstand indefinite short circuit to ground or to any voltage level
up to ±25 volts. The slew rate, or how fast the signal changes between levels, is also controlled.

For data transmission lines (TxD, RxD and their secondary channel equivalents) logic one is
defined as a negative voltage, the signal condition is called marking, and has the functional
significance. Logic zero is positive and the signal condition is termed spacing. Control signals
are logically inverted with respect to what one sees on the data transmission lines. When one of
these signals is active, the voltage on the line will be between +3 to +15 volts. The inactive state
for these signals is the opposite voltage condition, between −3 and −15 volts. Examples of
control lines include request to send (RTS), clear to send (CTS), data terminal ready (DTR), and
data set ready (DSR).

Because the voltage levels are higher than logic levels typically used by integrated circuits,
special intervening driver circuits are required to translate logic levels. These also protect the
device's internal circuitry from short circuits or transients that may appear on the RS-232
interface, and provide sufficient current to comply with the slew rate requirements for data
transmission.

Because both ends of the RS-232 circuit depend on the ground pin being zero volts, problems
will occur when connecting machinery and computers where the voltage between the ground pin
on one end, and the ground pin on the other is not zero. This may also cause a hazardous ground
loop. Use of a common ground limits RS-232 to applications with relatively short cables. If the
two devices are far enough apart or on separate power systems, the local ground connections at
either end of the cable will have differing voltages; this difference will reduce the noise margin
of the signals. Balanced, differential, serial connections such as USB, RS-422 and RS-485 can
tolerate larger ground voltage differences because of the differential signaling.[6]

Unused interface signals terminated to ground will have an undefined logic state. Where it is
necessary to permanently set a control signal to a defined state, it must be connected to a voltage
source that asserts the logic 1 or logic 0 level. Some devices provide test voltages on their
interface connectors for this purpose.

Connectors

RS-232 devices may be classified as Data Terminal Equipment (DTE) or Data Communication
Equipment (DCE); this defines at each device which wires will be sending and receiving each
signal. The standard recommended but did not make mandatory the D-subminiature 25 pin
connector. In general and according to the standard, terminals and computers have male
BL21

connectors with DTE pin functions, and modems have female connectors with DCE pin
functions. Other devices may have any combination of connector gender and pin definitions.
Many terminals were manufactured with female terminals but were sold with a cable with male
connectors at each end; the terminal with its cable satisfied the recommendations in the standard.

Presence of a 25 pin D-sub connector does not necessarily indicate an RS-232-C compliant
interface. For example, on the original IBM PC, a male D-sub was an RS-232-C DTE port (with
a non-standard current loop interface on reserved pins), but the female D-sub connector was used
for a parallel Centronics printer port. Some personal computers put non-standard voltages or
signals on some pins of their serial ports.

The standard specifies 20 different signal connections. Since most devices use only a few
signals, smaller connectors can often be used.

Pinouts

The following table lists commonly-used RS-232 signals and pin assignments. [7] See serial port
for non-standard variations including the popular DE-9 connector.

Signal Origin DB-25


Name Typical purpose Abbreviation DTE DCE pin
Data Terminal
Indicates presence of DTE to DCE. DTR ● 20
Ready
Data Carrier
DCE is connected to the telephone line. DCD ● 8
Detect
DCE is ready to receive commands or
Data Set Ready DSR ● 6
data.
DCE has detected an incoming ring signal
Ring Indicator RI ● 22
on the telephone line.
DTE requests the DCE prepare to receive
Request To Send RTS ● 4
data.
Clear To Send Indicates DCE is ready to accept data. CTS ● 5
Transmitted Data Carries data from DTE to DCE. TxD ● 2
Received Data Carries data from DCE to DTE. RxD ● 3
Common Ground GND common 7
Protective
PG common 1
Ground

The signals are named from the standpoint of the DTE. The ground signal is a common return for
the other connections. The DB-25 connector includes a second "protective ground" on pin 1.

Data can be sent over a secondary channel (when implemented by the DTE and DCE devices),
which is equivalent to the primary channel. Pin assignments are described in following table:

Signal Pin
BL22

Common Ground 7 (same as primary)


Secondary Transmitted Data (STD) 14
Secondary Received Data (SRD) 16
Secondary Request To Send (SRTS) 19
Secondary Clear To Send (SCTS) 13
Secondary Carrier Detect (SDCD) 12

Cables

Main article: Serial cable

The standard does not define a maximum cable length but instead defines the maximum
capacitance that a compliant drive circuit must tolerate. A widely-used rule-of-thumb indicates
that cables more than 50 feet (15 metres) long will have too much capacitance, unless special
cables are used. By using low-capacitance cables, full speed communication can be maintained
over larger distances up to about 1,000 feet.[8] For longer distances, other signal standards are
better suited to maintain high speed.

Since the standard definitions are not always correctly applied, it is often necessary to consult
documentation, test connections with a breakout box, or use trial and error to find a cable that
works when interconnecting two devices. Connecting a fully-standard-compliant DCE device
and DTE device would use a cable that connects identical pin numbers in each connector (a so-
called "straight cable"). "Gender changers" are available to solve gender mismatches between
cables and connectors. Connecting devices with different types of connectors requires a cable
that connects the corresponding pins according to the table above. Cables with 9 pins on one end
and 25 on the other are common. Manufacturers of equipment with 8P8C connectors usually
provide a cable with either a DB-25 or DE-9 connector (or sometimes interchangeable
connectors so they can work with multiple devices). Poor-quality cables can cause false signals
by crosstalk between data and control lines (such as Ring Indicator). If a given cable will not
allow a data connection, especially if a Gender changer is in use, a Null modem may be
necessary.

Conventions
For functional communication through a serial port interface, conventions of bit rate, character
framing, communications protocol, character encoding, data compression, and error detection,
not defined in RS 232, must be agreed to by both sending and receiving equipment. For example,
consider the serial ports of the original IBM PC. This implementation used an 8250 UART using
asynchronous start-stop character formatting with 7 or 8 data bits per frame, usually ASCII
character coding, and data rates programmable between 75 bits per second and 115,200 bits per
second. Data rates above 20,000 bits per second are out of the scope of the standard, although
higher data rates are sometimes used by commercially manufactured equipment. In the particular
case of the IBM PC, baud rates were programmable with arbitrary values, so that a PC could be
connected to, for example, MIDI music controllers (31,250 bits per second) or other devices not
using the rates typically used with modems. Since most devices do not have automatic baud rate
BL23

detection, users must manually set the baud rate (and all other parameters) at both ends of the
RS-232 connection.

BATTERY

An electrical battery is one or more electrochemical cells that convert stored chemical energy
into electrical energy.[1] Since the invention of the first battery (or "voltaic pile") in 1800 by
Alessandro Volta and especially since the technically improved Daniell cell in 1836, batteries
have become a common power source for many household and industrial applications.
According to a 2005 estimate, the worldwide battery industry generates US$48 billion in sales
each year,[2] with 6% annual growth.[3]

There are two types of batteries: primary batteries (disposable batteries), which are designed to
be used once and discarded, and secondary batteries (rechargeable batteries), which are designed
to be recharged and used multiple times. Batteries come in many sizes, from miniature cells used
to power hearing aids and wristwatches to battery banks the size of rooms that provide standby
power for telephone exchanges and computer data centers.

History
Main article: History of the battery

The symbol for a battery in a circuit diagram. It originated as a schematic drawing of the earliest
type of battery, a voltaic pile.
BL24

In strict terms, a battery is a collection of multiple electrochemical cells, but in popular usage
battery often refers to a single cell.[1] For example, a 1.5-volt AAA battery is a single 1.5-volt
cell, and a 9-volt battery has six 1.5-volt cells in series. The first electrochemical cell was
developed by the Italian physicist Alessandro Volta in 1792, and in 1800 he invented the first
battery, a "pile" of many cells in series.[4]

The usage of "battery" to describe electrical devices dates to Benjamin Franklin, who in 1748
described multiple Leyden jars (early electrical capacitors) by analogy to a battery of cannons.[5]
Thus Franklin's usage to describe multiple Leyden jars predated Volta's use of multiple galvanic
cells.[6] It is speculated, but not established, that several ancient artifacts consisting of copper
sheets and iron bars, and known as Baghdad batteries may have been galvanic cells.[7]

Volta's work was stimulated by the Italian anatomist and physiologist Luigi Galvani, who in
1780 noticed that dissected frog's legs would twitch when struck by a spark from a Leyden jar,
an external source of electricity.[8] In 1786 he noticed that twitching would occur during lightning
storms.[9] After many years Galvani learned how to produce twitching without using any external
source of electricity. In 1791, he published a report on "animal electricity." [10] He created an
electric circuit consisting of the frog's leg (FL) and two different metals A and B, each metal
touching the frog's leg and each other, thus producing the circuit A–FL–B–A–FL–B...etc. In
modern terms, the frog's leg served as both the electrolyte and the sensor, and the metals served
as electrodes. He noticed that even though the frog was dead, its legs would twitch when he
touched them with the metals.

Within a year, Volta realized the frog's moist tissues could be replaced by cardboard soaked in
salt water, and the frog's muscular response could be replaced by another form of electrical
detection. He already had studied the electrostatic phenomenon of capacitance, which required
measurements of electric charge and of electrical potential ("tension"). Building on this
experience, Volta was able to detect electric current through his system, also called a Galvanic
cell. The terminal voltage of a cell that is not discharging is called its electromotive force (emf),
and has the same unit as electrical potential, named (voltage) and measured in volts, in honor of
Volta. In 1800, Volta invented the battery by placing many voltaic cells in series, piling them
one above the other. This voltaic pile gave a greatly enhanced net emf for the combination, [11]
with a voltage of about 50 volts for a 32-cell pile. [12] In many parts of Europe batteries continue
to be called piles.[13][14]

Volta did not appreciate that the voltage was due to chemical reactions. He thought that his cells
were an inexhaustible source of energy,[15] and that the associated corrosion effects at the
electrodes were a mere nuisance, rather than an unavoidable consequence of their operation, as
Michael Faraday showed in 1834.[16] According to Faraday, cations (positively charged ions) are
attracted to the cathode,[17] and anions (negatively charged ions) are attracted to the anode.[18]

Although early batteries were of great value for experimental purposes, in practice their voltages
fluctuated and they could not provide a large current for a sustained period. Later, starting with
the Daniell cell in 1836, batteries provided more reliable currents and were adopted by industry
for use in stationary devices, in particular in telegraph networks where they were the only
practical source of electricity, since electrical distribution networks did not exist at the time. [19]
BL25

These wet cells used liquid electrolytes, which were prone to leakage and spillage if not handled
correctly. Many used glass jars to hold their components, which made them fragile. These
characteristics made wet cells unsuitable for portable appliances. Near the end of the nineteenth
century, the invention of dry cell batteries, which replaced the liquid electrolyte with a paste,
made portable electrical devices practical.[20]

Since then, batteries have gained popularity as they became portable and useful for a variety of
purposes.[21]

Principle of operation

A voltaic cell for demonstration purposes. In this example the two half-cells are linked by a salt
bridge separator that permits the transfer of ions, but not water molecules.

A battery is a device that converts chemical energy directly to electrical energy. [22] It consists of a
number of voltaic cells; each voltaic cell consists of two half-cells connected in series by a
conductive electrolyte containing anions and cations. One half-cell includes electrolyte and the
electrode to which anions (negatively charged ions) migrate, i.e., the anode or negative electrode;
the other half-cell includes electrolyte and the electrode to which cations (positively charged
ions) migrate, i.e., the cathode or positive electrode. In the redox reaction that powers the battery,
cations are reduced (electrons are added) at the cathode, while anions are oxidized (electrons are
removed) at the anode.[23] The electrodes do not touch each other but are electrically connected
by the electrolyte. Some cells use two half-cells with different electrolytes. A separator between
half-cells allows ions to flow, but prevents mixing of the electrolytes.

Each half-cell has an electromotive force (or emf), determined by its ability to drive electric
current from the interior to the exterior of the cell. The net emf of the cell is the difference
between the emfs of its half-cells, as first recognized by Volta. [12] Therefore, if the electrodes
have emfs and , then the net emf is ; in other words, the net emf is the difference
between the reduction potentials of the half-reactions.[24]

The electrical driving force or across the terminals of a cell is known as the terminal
voltage (difference) and is measured in volts.[25] The terminal voltage of a cell that is neither
charging nor discharging is called the open-circuit voltage and equals the emf of the cell.
Because of internal resistance,[26] the terminal voltage of a cell that is discharging is smaller in
magnitude than the open-circuit voltage and the terminal voltage of a cell that is charging
exceeds the open-circuit voltage.[27] An ideal cell has negligible internal resistance, so it would
maintain a constant terminal voltage of until exhausted, then dropping to zero. If such a cell
maintained 1.5 volts and stored a charge of one coulomb then on complete discharge it would
perform 1.5 joule of work.[25] In actual cells, the internal resistance increases under discharge, [26]
and the open circuit voltage also decreases under discharge. If the voltage and resistance are
plotted against time, the resulting graphs typically are a curve; the shape of the curve varies
according to the chemistry and internal arrangement employed.[28]
BL26

As stated above, the voltage developed across a cell's terminals depends on the energy release of
the chemical reactions of its electrodes and electrolyte. Alkaline and zinc–carbon cells have
different chemistries but approximately the same emf of 1.5 volts; likewise NiCd and NiMH
cells have different chemistries, but approximately the same emf of 1.2 volts. [29] On the other
hand the high electrochemical potential changes in the reactions of lithium compounds give
lithium cells emfs of 3 volts or more.[30]

Categories and types of batteries


Batteries are classified into two broad categories, each type with advantages and disadvantages.
[31]

 Primary batteries irreversibly (within limits of practicality) transform chemical energy to


electrical energy. When the initial supply of reactants is exhausted, energy cannot be
readily restored to the battery by electrical means.[32]
 Secondary batteries can be recharged; that is, they can have their chemical reactions
reversed by supplying electrical energy to the cell, restoring their original composition.[33]

Some types of primary batteries used, for example, for telegraph circuits, were restored to
operation by replacing the components of the battery consumed by the chemical reaction. [34]
Secondary batteries are not indefinitely rechargeable due to dissipation of the active materials,
loss of electrolyte and internal corrosion.

Primary batteries

Main article: Primary cell

Primary batteries can produce current immediately on assembly. Disposable batteries are
intended to be used once and discarded. These are most commonly used in portable devices that
have low current drain, are used only intermittently, or are used well away from an alternative
power source, such as in alarm and communication circuits where other electric power is only
intermittently available. Disposable primary cells cannot be reliably recharged, since the
chemical reactions are not easily reversible and active materials may not return to their original
forms. Battery manufacturers recommend against attempting to recharge primary cells.[35]

Common types of disposable batteries include zinc–carbon batteries and alkaline batteries. In
general, these have higher energy densities than rechargeable batteries,[36] but disposable batteries
do not fare well under high-drain applications with loads under 75 ohms (75 Ω).[31]

Secondary batteries

Main article: Rechargeable battery

Secondary batteries must be charged before use; they are usually assembled with active materials
in the discharged state. Rechargeable batteries or secondary cells can be recharged by applying
BL27

electric current, which reverses the chemical reactions that occur during its use. Devices to
supply the appropriate current are called chargers or rechargers.

The oldest form of rechargeable battery is the lead–acid battery.[37] This battery is notable in that
it contains a liquid in an unsealed container, requiring that the battery be kept upright and the
area be well ventilated to ensure safe dispersal of the hydrogen gas produced by these batteries
during overcharging. The lead–acid battery is also very heavy for the amount of electrical energy
it can supply. Despite this, its low manufacturing cost and its high surge current levels make its
use common where a large capacity (over approximately 10 Ah) is required or where the weight
and ease of handling are not concerns.

A common form of the lead–acid battery is the modern car battery, which can, in general, deliver
a peak current of 450 amperes.[38] An improved type of liquid electrolyte battery is the sealed
valve regulated lead–acid battery (VRLA battery), popular in the automotive industry as a
replacement for the lead–acid wet cell. The VRLA battery uses an immobilized sulfuric acid
electrolyte, reducing the chance of leakage and extending shelf life. [39] VRLA batteries have the
electrolyte immobilized, usually by one of two means:

 Gel batteries (or "gel cell") contain a semi-solid electrolyte to prevent spillage.
 Absorbed Glass Mat (AGM) batteries absorb the electrolyte in a special fiberglass
matting.

Other portable rechargeable batteries include several "dry cell" types, which are sealed units and
are, therefore, useful in appliances such as mobile phones and laptop computers. Cells of this
type (in order of increasing power density and cost) include nickel–cadmium (NiCd), nickel–zinc
(NiZn), nickel metal hydride (NiMH), and lithium-ion (Li-ion) cells.[40] By far, Li-ion has the
highest share of the dry cell rechargeable market. [3] Meanwhile, NiMH has replaced NiCd in
most applications due to its higher capacity, but NiCd remains in use in power tools, two-way
radios, and medical equipment.[3] NiZn is a new technology that is not yet well established
commercially.

Recent developments include batteries with embedded electronics such as USBCELL, which
allows charging an AA cell through a USB connector,[41] and smart battery packs with state-of-
charge monitors and battery protection circuits to prevent damage on over-discharge. low self-
discharge (LSD) allows secondary cells to be precharged prior to shipping.

Battery cell types

There are many general types of electrochemical cells, according to chemical processes applied
and design chosen. The variation includes galvanic cells, electrolytic cells, fuel cells, flow cells
and voltaic piles.[42]

Wet cell

A wet cell battery has a liquid electrolyte. Other names are flooded cell, since the liquid covers
all internal parts, or vented cell, since gases produced during operation can escape to the air. Wet
BL28

cells were a precursor to dry cells and are commonly used as a learning tool for electrochemistry.
It is often built with common laboratory supplies, such as beakers, for demonstrations of how
electrochemical cells work. A particular type of wet cell known as a concentration cell is
important in understanding corrosion. Wet cells may be primary cells (non-rechargeable) or
secondary cells (rechargeable). Originally, all practical primary batteries such as the Daniell cell
were built as open-topped glass jar wet cells. Other primary wet cells are the Leclanche cell,
Grove cell, Bunsen cell, Chromic acid cell, Clark cell, and Weston cell. The Leclanche cell
chemistry was adapted to the first dry cells. Wet cells are still used in automobile batteries and in
industry for standby power for switchgear, telecommunication or large uninterruptible power
supplies, but in many places batteries with gel cells have been used instead. These applications
commonly use lead–acid or nickel–cadmium cells.

Dry cell

"Dry cell" redirects here. For the heavy metal band, see Dry Cell (band).

Line art drawing of a dry cell:


1. brass cap, 2. plastic seal, 3. expansion space, 4. porous cardboard, 5. zinc can, 6. carbon rod, 7.
chemical mixture.

A dry cell has the electrolyte immobilized as a paste, with only enough moisture in it to allow
current to flow. Unlike a wet cell, a dry cell can operate in any orientation without spilling as it
contains no free liquid, making it suitable for portable equipment. By comparison, the first wet
cells were typically fragile glass containers with lead rods hanging from the open top, and
needed careful handling to avoid spillage. Lead–acid batteries did not achieve the safety and
portability of the dry cell until the development of the gel battery.

A common dry cell battery is the zinc–carbon battery, using a cell sometimes called the dry
Leclanché cell, with a nominal voltage of 1.5 volts, the same as the alkaline battery (since both
use the same zinc–manganese dioxide combination).

A standard dry cell comprises a zinc anode (negative pole), usually in the form of a cylindrical
pot, with a carbon cathode (positive pole) in the form of a central rod. The electrolyte is
ammonium chloride in the form of a paste next to the zinc anode. The remaining space between
the electrolyte and carbon cathode is taken up by a second paste consisting of ammonium
chloride and manganese dioxide, the latter acting as a depolariser. In some more modern types of
so-called 'high-power' batteries (with much lower capacity than standard alkaline batteries), the
ammonium chloride is replaced by zinc chloride.

Molten salt

Molten salt batteries are primary or secondary batteries that use a molten salt as electrolyte. Their
energy density and power density give them potential for use in electric vehicles, but they
operate at high temperatures and must be well insulated to retain heat.
BL29

Reserve

A reserve battery is stored in unassembled form and is activated, ready-charged, when its internal
parts are assembled, e.g. by adding electrolyte; it can be stored unactivated for a long period of
time. For example, a battery for an electronic fuze might be activated by the impact of firing a
gun, breaking a capsule of electrolyte to activate the battery and power the fuze's circuits.
Reserve batteries are usually designed for a short service life (seconds or minutes) after long
storage (years). A water-activated battery for oceanographic instruments or military applications
becomes activated on immersion in water.

Battery cell performance

A battery's characteristics may vary over load cycle, over charge cycle, and over lifetime due to
many factors including internal chemistry, current drain, and temperature.

Battery capacity and discharging

A device to check battery voltage.

A battery's capacity is the amount of electric charge it can store. The more electrolyte and
electrode material there is in the cell the greater the capacity of the cell. A small cell has less
capacity than a larger cell with the same chemistry, and they develop the same open-circuit
voltage.[43]

Because of the chemical reactions within the cells, the capacity of a battery depends on the
discharge conditions such as the magnitude of the current (which may vary with time), the
allowable terminal voltage of the battery, temperature, and other factors. [43] The available
capacity of a battery depends upon the rate at which it is discharged. [44] If a battery is discharged
at a relatively high rate, the available capacity will be lower than expected.

The capacity printed on a battery is usually the product of 20 hours multiplied by the constant
current that a new battery can supply for 20 hours at 68 F° (20 C°), down to a specified terminal
voltage per cell. A battery rated at 100 A·h will deliver 5 A over a 20-hour period at room
temperature. However, if discharged at 50 A, it will have a lower capacity.[45]

The relationship between current, discharge time, and capacity for a lead acid battery is
approximated (over a certain range of current values) by Peukert's law:

where

is the capacity when discharged at a rate of 1 amp.


BL30

is the current drawn from battery (A).


is the amount of time (in hours) that a battery can sustain.
is a constant around 1.3.

For low values of I internal self-discharge must be included.

Internal energy losses and limited rate of diffusion of ions through the electrolyte cause the
efficiency of a real battery to vary at different discharge rates. When discharging at low rate, the
battery's energy is delivered more efficiently than at higher discharge rates, [45] but if the rate is
very low, it will partly self-discharge during the long time of operation, again lowering its
efficiency.

Installing batteries with different A·h ratings will not affect the operation of a device (except for
the time it will work for) rated for a specific voltage unless the load limits of the battery are
exceeded. High-drain loads such as digital cameras can result in delivery of less total energy, as
happens with alkaline batteries.[31] For example, a battery rated at 2000 mA·h for a 10- or 20-
hour discharge would not sustain a current of 1 A for a full two hours as its stated capacity
implies.

Fastest charging, largest, and lightest batteries

As of 2012 Lithium iron phosphate (LiFePO4) batteries were the fastest-charging and
discharging batteries (supercapacitors, in some ways comparable to batteries, charge faster). [46]
The world's largest battery, composed of Ni–Cd cells, was in Fairbanks, Alaska.[47] Sodium–
sulfur batteries were being used to store wind power.[48] Lithium–sulfur batteries have been used
on the longest and highest solar-powered flight. [49] The speed of recharging of lithium-ion
batteries can be increased by manufacturing changes.[50]

Battery lifetime
Primary batteries

Disposable (or "primary") batteries typically lose 8 to 20 percent of their original charge every
year at room temperature (20°–30°C).[51] This is known as the "self discharge" rate, and is due to
non-current-producing "side" chemical reactions which occur within the cell even if no load is
applied. The rate of the side reactions is reduced if the batteries are stored at lower temperature,
although some batteries can be damaged by freezing. High or low working temperatures may
reduce battery performance. This will affect the initial voltage of the battery. For an AA alkaline
battery, this initial voltage is approximately normally distributed around 1.6 volts.

Discharging performance of all batteries drops at low temperature.[52]

Secondary batteries
BL31

Storage life of secondary batteries is limited by chemical reactions that occur between the battery
parts and the electrolyte; these are called "side reactions". Internal parts may corrode and fail, or
the active materials may be slowly converted to inactive forms. Since the active material on the
battery plates changes chemical composition on each charge and discharge cycle, active material
may be lost due to physical changes of volume; this may limit the cycle life of the battery.

Rechargeable batteries.

Old chemistry rechargeable batteries self-discharge more rapidly than disposable alkaline
batteries, especially nickel-based batteries; a freshly charged nickel cadmium (NiCd) battery
loses 10% of its charge in the first 24 hours, and thereafter discharges at a rate of about 10% a
month.[53] However, newer low self-discharge nickel metal hydride (NiMH) batteries and modern
lithium designs have reduced the self-discharge rate to a relatively low level (but still poorer than
for primary batteries).[53] Most nickel-based batteries are partially discharged when purchased,
and must be charged before first use. [54] Newer NiMH batteries are ready to be used when
purchased, and have only 15% discharge in a year.[55]

Although rechargeable batteries have their energy content restored by charging, some
deterioration occurs on each charge–discharge cycle. Low-capacity NiMH batteries (1700–2000
mA·h) can be charged for about 1000 cycles, whereas high-capacity NiMH batteries (above 2500
mA·h) can be charged for about 500 cycles. [56] NiCd batteries tend to be rated for 1000 cycles
before their internal resistance permanently increases beyond usable values. Under normal
circumstances, a fast charge, rather than a slow overnight charge, will shorten battery lifespan. [56]
However, if the overnight charger is not "smart" and cannot detect when the battery is fully
charged, then overcharging is likely, which also damages the battery. [57] Degradation usually
occurs because electrolyte migrates away from the electrodes or because active material falls off
the electrodes. NiCd batteries suffer the drawback that they should be fully discharged before
recharge. Without full discharge, crystals may build up on the electrodes, thus decreasing the
active surface area and increasing internal resistance. This decreases battery capacity and causes
the "memory effect". These electrode crystals can also penetrate the electrolyte separator,
thereby causing shorts. NiMH, although similar in chemistry, does not suffer from memory
effect to quite this extent. [58] A battery does not suddenly stop working; its capacity gradually
decreases over its lifetime, until it can no longer hold sufficient charge.[59]

An analog camcorder battery [lithium ion].

Automotive lead–acid rechargeable batteries have a much harder life.[60] Because of vibration,
shock, heat, cold, and sulfation of their lead plates, few automotive batteries last beyond six
years of regular use.[61] Automotive starting batteries have many thin plates to provide as much
current as possible in a reasonably small package. In general, the thicker the plates, the longer
the life of the battery. [60] They are typically drained only a small amount before recharge. Care
BL32

should be taken to avoid deep discharging a starting battery, since each charge and discharge
cycle causes active material to be shed from the plates.

"Deep-cycle" lead–acid batteries such as those used in electric golf carts have much thicker
plates to aid their longevity.[62] The main benefit of the lead–acid battery is its low cost; the main
drawbacks are its large size and weight for a given capacity and voltage. [60] Lead–acid batteries
should never be discharged to below 20% of their full capacity, [63] because internal resistance
will cause heat and damage when they are recharged. Deep-cycle lead–acid systems often use a
low-charge warning light or a low-charge power cut-off switch to prevent the type of damage
that will shorten the battery's life.[64]

Extending battery life

Battery life can be extended by storing the batteries at a low temperature, as in a refrigerator or
freezer, which slows the chemical reactions in the battery. Such storage can extend the life of
alkaline batteries by about 5%; rechargeable batteries can hold their charge much longer,
depending upon type.[65] To reach their maximum voltage, batteries must be returned to room
temperature; discharging an alkaline battery at 250 mA at 0°C is only half as efficient as it is at
20°C.[36] Alkaline battery manufacturers such as Duracell do not recommend refrigerating
batteries.[35]

Prolonging life in multiple cells through cell balancing

Analog front ends that balance cells and eliminate mismatches of cells in series or parallel
combination significantly improve battery efficiency and increase the overall pack capacity. As
the number of cells and load currents increase, the potential for mismatch also increases. There
are two kinds of mismatch in the pack: state-of-charge (SOC) mismatch and capacity/energy
(C/E) mismatch. Though the SOC mismatch is more common, each problem limits the pack
capacity (mAh) to the capacity of the weakest cell.

Cell balancing principle

Battery pack cells are balanced when all the cells in the battery pack meet two conditions:

1. If all cells have the same capacity, then they are balanced when they have the same State
of Charge (SOC.) In this case, the Open Circuit Voltage (OCV) is a good measure of the
SOC. If, in an out of balance pack, all cells can be differentially charged to full capacity
(balanced), then they will subsequently cycle normally without any additional
adjustments. This is mostly a one-shot fix.
2. If the cells have different capacities, they are also considered balanced when the SOC is
the same. But, since SOC is a relative measure, the absolute amount of capacity for each
cell is different. To keep the cells with different capacities at the same SOC, cell
balancing must provide differential amounts of current to cells in the series string during
both charge and discharge on every cycle.

Cell balancing electronics


BL33

Cell balancing is defined as the application of differential currents to individual cells (or
combinations of cells) in a series string. Cells in a series string normally receive identical
currents. A battery pack requires additional components and circuitry to achieve cell balancing.
However, the use of a fully integrated analog front end for cell balancing reduces the required
external components to just balancing resistors.

Cell mismatch results more from limitations in process control and inspection than from
variations inherent in the lithium ion chemistry. The use of a fully integrated analog front end for
cell balancing can improve the performance of series connected Li-ion Cells by addressing both
SOC and C/E issues.[66] SOC mismatch can be remedied by balancing the cell during an initial
conditioning period and subsequently only during the charge phase. C/E mismatch remedies are
more difficult to implement and harder to measure and require balancing during both charge and
discharge periods.

This solution eliminates the quantity of external components, as for discrete capacitors, diodes,
and most other resistors to achieve balance.

The linear supply

The component blocks of a linear supply are common to all variants, and
can be described as follows:

• Input circuit: conditions the input power and protects the unit,
typically voltage selector, fuse, on-off switching, filter and transient
suppressor
BL34

• Transformer: isolates the output circuitry from the ac input, and steps
down(or up) the voltage to the required operating level

• Rectifier and reservoir: converts the ac transformer voltage to dc,


reduces the ac ripple component of the dc and determines the output
hold-up time when the input is interrupted

• Regulation: stabilizes the output voltage against input and load


fluctuations

• Supervision: protects against over-voltage and over-current on the


output and signals the state of the power supply to other circuitry; often
omitted on simpler circuits.

The switch-mode supply

The advantage of the direct-off-line switch-mode supply is that it


eliminates the 50Hzmains transformer and replaces it with one operating
at a much higher frequency, typically 30-300 kHz. This greatly reduces
its weight and volume. The component blocks are somewhat different
from a linear supply. The input circuit performs a similar function but
requires more stringent filtering. This is followed immediately by a
rectifier and reservoir which must work at the full line voltage, and feeds
the switch element which chops the high-voltage dc at the chosen
switching frequency.

POTENTIAL TRANSFORMER

A transformer is a static device that transfers electrical energy from one


circuit to another through inductively coupled conductors—the
transformer's coils. A varying current in the first or primary winding
creates a varying magnetic flux in the transformer's core and thus a
varying magnetic field through the secondary winding. This varying
magnetic field induces a varying electromotive force (EMF) or "voltage"
in the secondary winding. This effect is called mutual induction.
BL35

If a load is connected to the secondary, an electric current will flow in


the secondary winding and electrical energy will be transferred from the
primary circuit through the transformer to the load. In an ideal
transformer, the induced voltage in the secondary winding (Vs) is in
proportion to the primary voltage (Vp), and is given by the ratio of the
number of turns in the secondary (Ns) to the number of turns in the
primary (Np) as follows:

By appropriate selection of the ratio of turns, a transformer thus allows


an alternating current (AC) voltage to be "stepped up" by making Ns
greater than Np, or "stepped down" by making Ns less than Np.

In the vast majority of transformers, the windings are coils wound


around a ferromagnetic core, air-core transformers being a notable
exception.

Transformers range in size from a thumbnail-sized coupling transformer


hidden inside a stage microphone to huge units weighing hundreds of
tons used to interconnect portions of power grids. All operate with the
same basic principles, although the range of designs is wide. While new
technologies have eliminated the need for transformers in some
electronic circuits, transformers are still found in nearly all electronic
devices designed for household ("mains") voltage. Transformers are
essential for high-voltage electric power transmission, which makes
long-distance transmission economically practical.

The transformer is based on two principles: first, that an electric current


can produce a magnetic field (electromagnetism), and, second that a
changing magnetic field within a coil of wire induces a voltage across
the ends of the coil (electromagnetic induction). Changing the current in
the primary coil changes the magnetic flux that is developed. The
changing magnetic flux induces a voltage in the secondary coil.
BL36

An ideal transformer is shown in the adjacent figure. Current passing


through the primary coil creates a magnetic field. The primary and
secondary coils are wrapped around a core of very high magnetic
permeability, such as iron, so that most of the magnetic flux passes
through both the primary and secondary coils.

Induction law

The voltage induced across the secondary coil may be calculated from
Faraday's law of induction, which states that:

where Vs is the instantaneous voltage, Ns is the number of turns in the


secondary coil and Φ is the magnetic flux through one turn of the coil. If
the turns of the coil are oriented perpendicular to the magnetic field
lines, the flux is the product of the magnetic flux density B and the area
A through which it cuts. The area is constant, being equal to the cross-
sectional area of the transformer core, whereas the magnetic field varies
with time according to the excitation of the primary. Since the same
magnetic flux passes through both the primary and secondary coils in an
BL37

ideal transformer, the instantaneous voltage across the primary winding


equals

Taking the ratio of the two equations for Vs and Vp gives the basic
equation for stepping up or stepping down the voltage

Np/Ns is known as the turns ratio, and is the primary functional


characteristic of any transformer. In the case of step-up transformers,
this may sometimes be stated as the reciprocal, Ns/Np. Turns ratio is
commonly expressed as an irreducible fraction or ratio: for example, a
transformer with primary and secondary windings of, respectively, 100
and 150 turns is said to have a turns ratio of 2:3 rather than 0.667 or
100:150.

Diodes
The diode is a two-terminal device whose function is to pass current in
one direction but not in the other. A conventional diode is formed from
the junction of p-type and n- type silicon. The ideal device has a “brick-
wall” V-I characteristic: the practical silicon diode has an exponential
characteristic which approximates to the brick wall, if viewed
Forward bias
The first thing to notice is that the forward voltage V is not constant,
nor is it zero. It has two determinants, forward current I and temperature
T. They are related by the
I = I [exp (V · q/kT) - 1] (4.1)
known as the “diode equation” or the “Ebers-Moll equation”, arguably
the most fundamental mathematical expression in the whole of
semiconductor electronics.
Forward current
BL38

The maximum forward current, I max, is limited by power dissipation, I


· V . This leads to a rise in junction temperature, which must not exceed
some maximum value, usually between 125°C and 200°C. Diodes are
rated for continuous use but it is possible to exceed the rating for pulse
applications, when the average power dissipation depends on the duty
cycle (P = D · P ). Rectifier diodes are also characterised for “surge”
current, which can exceed the average current by 30-70 times. The
specification is linked to a typical surge duration. Frequently, for US-
manufactured rectifiers, this is quoted at 8.33ms, which is one half-cycle
at 60Hz, the US mains frequency. If no current-time curves are shown
the value can be extrapolated to a limited degree for other time values by
taking a constant I t product. This specification is important when
considering power supply switch-on surges, when a reservoir capacitor
is being charged from zero. Remember that V carries on rising with I as
I max is exceeded.
Temperature dependence of forward voltage
The other determinant of forward voltage is temperature. I in the diode
equation has an
exponential temperature dependence which dominates the voltage
temperature preferred other ordinary diode Confusion is often caused by
the variety of zener (unidirectional diode symbols in breakdown)
common use. This list Schottky shows the accepted symbols (from
BS3939/ IEC 60617) for the most bidirectional frequent types.
Breakdown varicap light
Reverse bias
So far we have only considered the forward characteristic, that is for
positive applied voltage. An ideal diode would block all current flow in
the reverse direction. A practical diode doesn’t. There are two main
reverse characteristics, reverse leakage current I and reverse breakdown
voltage VBR. The diode equation (4.1) holds good in the reverse
direction until VBR is approached; in the low-voltage region IR is
almost equal to IS.
Breakdown VBR is that voltage at which the reverse-biased junction
can no longer withstand the applied electric field. At this point,
avalanche breakdown occurs and a current limited mainly by the
BL39

external source impedance will flow. If the device maximum power


dissipation is exceeded the junction will be destroyed. Diodes operated
conventionally, as opposed to Zener diodes to which we will return
shortly, are always run at reverse voltages lower than VBR.
A common over-voltage excursion is the inductive turn-off transient It
can be difficult to predict the maximum voltage of the transient and,
since the energy dissipated by a breakdown may be much less than
needed to destroy the diode, such
breakdowns may go unnoticed during the evaluation of the design.
Diodes are available which are characterised for the amount of
avalanche breakdown energy they can withstand, and should be used if a
circuit is expected to deliver predictable transients above the normal
breakdown voltage.
POSITIVE VOLTAGE REGULATORS
BL40

Load and line regulation


Load regulation refers to the permissible shift in output voltage when the
load is varied, usually from none to full. Line (or input) regulation
similarly refers to the permissible shift in output voltage when the input
is varied, usually from maximum to minimum.
Provided that the design of the input circuit has been properly
considered as described above, so that the input voltage never goes
outside the regulator’s operational range, these parameters should be
wholly a function of the regulator circuit itself. The regulator is
essentially a feedback circuit which compares its output voltage against
a reference voltage, so the regulation depends on two parameters: the
stability of the reference, and the gain of the feedback error amplifier. If
you use a monolithic regulator IC, then these factors are taken into
account by the manufacturer who will specify regulation as a data sheet
parameter.
Thermal regulation
A monolithic regulator IC includes the voltage reference on-chip, along
with other circuitry and the series pass element. This means that the
reference is subject to a thermal shift when the power dissipation of the
series pass element changes. This gives rise to a separate longer term
component of regulation, called thermal regulation, defined as the
change in output voltage caused by a change in dissipated power for a
specified time. Provided the chip has been well-designed, thermal
regulation is not a significant factor for most purposes, but it is rarely
specified in data sheets and for some precision applications may render
monolithic regulators unsuitable.
Load sensing
No three-terminal regulator can maintain a constant voltage at anywhere
other than its output terminals. It is common in larger systems for the
load to be located at some distance from the power supply module, so
that load-dependent voltage drops occur in the wiring connecting the
load to the power supply output . This directly impacts the achievable
load regulation. The accepted way to overcome this problem is to split
the regulator feedback path, and incorporate two extra “sensing”
terminals which are connected so as to sense the output voltage at the
BL41

load itself (Figure 7.11). The voltage drop across this extra pair of wires
is negligible because they only carry the signal current. The voltage at
the regulator output is adjusted so as to regulate the voltage at the
sensing terminals.

Ripple and noise


Ripple is the component of the ac supply frequency (or more often its
second harmonic) which is present on the output voltage; noise is all
other ac contamination on the output.In a linear power supply, ripple is
the predominant factor and is given by the ac across the reservoir
capacitor reduced by the ripple rejection (typically 70-80dB) of the
regulator circuit. A figure of less than 1mV RMS should be easy to
obtain. HF noise is filtered by the reservoir and output capacitors and
there are no significant internal noise sources, provided that the regulator
isn’t allowed to oscillate, so that apart from supply-
frequency ripple linear power supplies are very “quiet” units.
Switching noise
The same cannot be said for switch-mode power supplies. Here the noise
is mainly due to output voltage spikes at the switching frequency, caused
by fast-rise-time edges and HF ringing at these edges feeding through, or
past, filtering components to the output. The ESR and ESL of typical
output filter capacitors (see page 92) limits their ability to attenuate these
BL42

spikes, while the self-inductance of ground wiring limits the high


frequency effectiveness of ground decoupling anyway. Switch-mode
output ripple and noise is typically 1% of the rail voltage, or 100-
200mV. In fact comparing ripple and noise specifications is the easiest
way to distinguish a linear from a switch-mode unit, if there is no other
obvious indication. The bandwidth over which the specification applies
is important, since there is significant energy in the high-order
harmonics of the switching noise, and at least 10MHz is needed to get a
true picture. Because of stray coupling over this extended bandwidth the
noise frequently appears in common mode, on both supply and 0V
simultaneously, and is then very difficult to control. Differential mode
noise spikes can be reduced dramatically by including a ferrite bead in
series, and a small ceramic capacitor in parallel with the output
capacitor. The presence of switching noise is not a problem for digital
circuits, but it creates difficulties for sensitive analogue circuits if their
bandwidth exceeds the switching frequency. It can cause interference on
video signals, mis-clocking in pulse circuits and voltage shifts in dc
amplifiers.

RELAY

A relay is an electrically operated switch. Many relays use an


electromagnet to operate a switching mechanism mechanically, but other
operating principles are also used. Relays are used where it is necessary
to control a circuit by a low-power signal (with complete electrical
isolation between control and controlled circuits), or where several
circuits must be controlled by one signal. The first relays were used in
long distance telegraph circuits, repeating the signal coming in from one
circuit and re-transmitting it to another. Relays were used extensively in
telephone exchanges and early computers to perform logical operations.

A type of relay that can handle the high power required to directly drive
an electric motor is called a contactor. Solid-state relays control power
BL43

circuits with no moving parts, instead using a semiconductor device to


perform switching. Relays with calibrated operating characteristics and
sometimes multiple operating coils are used to protect electrical circuits
from overload or faults; in modern electric power systems these
functions are performed by digital instruments still called "protective
relays".

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.
BL44

Basic design and operation

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 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 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.
BL45

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 remains in its last state. This is achieved with a solenoid
operating a ratchet and cam mechanism, or by having two opposing
coils with an over-center spring or permanent magnet to hold the
armature and contacts in position while the coil is relaxed, or with a
remanent core. In the ratchet and cam example, the first pulse to the
coil turns the relay on and the second pulse turns it off. In the two coil
example, a pulse to one coil turns the relay on and a pulse to the
opposite coil turns the relay off. This type of relay has the advantage
that one coil consumes power only for an instant, while it is being
switched, and the relay contacts retain this setting across a power
outage. A remanent core latching relay requires a current pulse of
opposite polarity to make it change state.

Reed relay

A reed relay is a reed switch enclosed in a solenoid. The switch has a


set of contacts inside an evacuated or inert gas-filled glass tube which
protects the contacts against atmospheric corrosion; the contacts are
made of magnetic material that makes them move under the influence
of the field of the enclosing solenoid. Reed relays can switch faster than
BL46

larger relays, require only little power from the control circuit, but have
low switching current and voltage ratings.

Top, middle: reed switches, bottom: reed relay

Mercury-wetted relay

A mercury-wetted reed relay is a form of reed relay in which the


contacts are wetted with mercury. Such relays are used to switch low-
voltage signals (one volt or less) where the mercury reduces the contact
resistance and associated voltage drop, for low-current signals where
surface contamination may make for a poor contact, or for high-speed
applications where the mercury eliminates contact bounce. Mercury
wetted relays are position-sensitive and must be mounted vertically to
work properly. Because of the toxicity and expense of liquid mercury,
these relays are now rarely used. See also mercury switch.

Polarized relay

A polarized relay placed the armature between the poles of a


permanent magnet to increase sensitivity. Polarized relays were used in
middle 20th Century telephone exchanges to detect faint pulses and
correct telegraphic distortion. The poles were on screws, so a
technician could first adjust them for maximum sensitivity and then
apply a bias spring to set the critical current that would operate the
relay.

Machine tool relay


BL47

A machine tool relay is a type standardized for industrial control of


machine tools, transfer machines, and other sequential control. They
are characterized by a large number of contacts (sometimes extendable
in the field) which are easily converted from normally-open to
normally-closed status, easily replaceable coils, and a form factor that
allows compactly installing many relays in a control panel. Although
such relays once were the backbone of automation in such industries as
automobile assembly, the programmable logic controller (PLC) mostly
displaced the machine tool relay from sequential control applications.

Contactor relay

A contactor is a very heavy-duty relay used for switching electric


motors and lighting loads, although contactors are not generally called
relays. Continuous current ratings for common contactors range from
10 amps to several hundred amps. High-current contacts are made with
alloys containing silver. The unavoidable arcing causes the contacts to
oxidize; however, silver oxide is still a good conductor.[2] Such devices
are 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
BL48

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 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.
BL49

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

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 over current protection to prevent damage from


over-loading the motor, or to protect against short circuits in
connecting cables or internal faults in the motor windings. [3] One type
of electric motor overload protection relay is operated by a heating
element in series with the electric motor. The heat generated by the
motor current heats a bimetallic strip or melts solder, releasing a spring
to operate contacts. Where the overload relay is exposed to the same
environment as the motor, a useful though crude compensation for
motor ambient temperature is provided.
BL50

Pole and throw

Circuit symbols of relays. (C denotes the common terminal in SPDT and


DPDT types.)

Since relays are switches, the terminology applied to switches is also


applied to relays. A relay will switch one or more poles, each of whose
contacts can be thrown by energizing the coil in one of three ways:

 Normally-open (NO) contacts connect the circuit when the relay is


activated; the circuit is disconnected when the relay is inactive. It
is also called a Form A contact or "make" contact. NO contacts
can also be distinguished as "early-make" or NOEM, which means
that the contacts will close before the button or switch is fully
engaged.
 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.
 Change-over (CO), or double-throw (DT), contacts control two
circuits: one normally-open contact and one normally-closed
BL51

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:

 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.
 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.
 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).
 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).

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.
BL52

Applications

Relays are used to and for:

 Control a high-voltage circuit with a low-voltage signal, as in some


types of modems or audio amplifiers,
 Control a high-current circuit with a low-current signal, as in the
starter solenoid of an automobile,
 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

 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,
 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 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.
BL53

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.
 Time delay functions. Relays can be modified to delay opening or
delay closing 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.

PIR Sensor
General Description
The PIR (Passive Infra-Red) Sensor is a pyroelectric device that detects motion by
measuring changes in the infrared levels emitted by surrounding objects. This motion can be
detected by checking for a high signal on a single I/O pin.
Theory of Operation
Pyroelectric devices, such as the PIR sensor, have elements made of a crystalline material
that generates an electric charge when exposed to infrared radiation. The changes in the amount
of infrared striking the element change the voltages generated, which are measured by an
on-board amplifier. The device contains a special filter called a Fresnel lens, which focuses the
infrared signals onto the element. As the ambient infrared signals change rapidly, the on-board
amplifier trips the output to indicate motion.
Connecting and Testing
Connect the 3-pin header to your circuit so that the minus (-) pin connects to ground or
Vss, the plus (+) pin connects to +5 volts or Vdd and the OUT pin connects to your
microcontroller’s I/O pin. One easy way to do this would be to use a standard servo/LCD
extension cable, available separately from Parallax (#805-00002). This cable makes it easy to
plug sensor into the servo headers on our Board Of Education or Professional Development
Board. If you use the Board Of Education, be sure the servo voltage jumper(located between
the 2 servo header blocks) is in the Vdd position, not Vin. If you do not have this jumper
on your board you should manually connect to Vdd through the breadboard.
BL54

You may also plug the sensor directly into the edge of the breadboard and
connect the signals from there. Remember the position of the pins when you plug the sensor
into the breadboard. Once the sensor warms up (settles) the output will remain low until there
is motion, at which time the output will swing high for a couple of seconds, then return low. If
motion continues the output will cycle in this manner until the sensors line of sight of still again.
Calibration
The PIR Sensor requires a ‘warm-up’ time in order to function properly. This is due to
the settling time involved in ‘learning’ its environment. This could be anywhere from 10-60
seconds. During this time there should be as little motion as possible in the sensors field of view.
Sensitivity
The PIR Sensor has a range of approximately 20 feet. This can vary with environmental
conditions. The sensor is designed to adjust to slowly changing conditions that would
happen normally as the day progresses and the environmental conditions change, but
responds by toggling its output when sudden changes occur, such as when there is motion.

CONCLUSION:

Glare during driving is a serious problem for drivers. This is caused due to the sudden exposure
of our eyes to a very bright light; the bright headlights of vehicles in this case. This causes a
temporary blindness called the Troxler effect. Eventually this becomes the major reason for night
accidents. The driver should actually turn down the bright lights immediately to avoid glare to
the other person which is not happening. Hence, is the idea for the design and development of a
prototype circuit called the automatic headlight dimmer using MICROCONTROLLER
ATMEGA8. It gives the driver to use high beam light when required. But it automatically
switches the headlight to low beam when it senses a vehicle approaching from the opposite side.

REFERENCES
BL55

[1] C.Susana Martinez, S.L.Macknik and D.H.Hubel, The role of fixational eye movements in
visual perception, Nature Reviews Neuroscience 5, 2004, pp.229-240.
[2] Ryota Kanai, Yukiyasu Kamitani and Universiteit Utrecht, Time-locked perceptual fading
Induced by visual Transients, unpublished.
[3] S.Aishwarya, Bright Headlights a major cause of accidents, The Hindu, Online edition, May
02,2006.
[4] C.Guttman, High intensity headlights could cause road accidents by dazzling oncoming
drivers, Eurotimes, April 2003.
[5] J.J.Fazzalaro, Limitations on Headlight brightness, OLD research report, Br.J.Ophthalmol.
87(1), pp.113- 117, 2003.
[6] S.T.Chrysler, P.J.Carlson and H.Gene Hawkins, Imapcts of Retroreflectivity on sign
Management, 0- 1796-3, 2003.
[7] Lighting the future standard and high performance automotive halogen bulbs-Hella
[8] A.Majumder and S.Irani, Contrast Enhancement of Images using Human Contrast Sensitivity
[9] A.B.Watson, Temporal sensitivity, Vision RPS, vol.9, pp.947-952, 1969.
[10] R.Shapley, E.Kaplan and K.Purpura, Contrast sensitivity and light adaptation in
photoreceptors or in the retinal network,1993.
[11] A.T.Bahill, Development, validation and sensitivity analyses of human eye movement
models*, pp.311- 357, 1980.

You might also like