Professional Documents
Culture Documents
Chapter 1
Introduction
1. INTRODUCTION
This Project “Automatic Room Light Controller with Visitor Counter using
Microcontroller” is a reliable circuit that takes over the task of controlling the room lights
as well us counting number of persons/ visitors in the room very accurately. When
somebody enters into the room then the counter is incremented by one and the light in the
room will be switched ON and when any one leaves the room then the counter is
decremented by one. The light will be only switched OFF until all the persons in the
room go out. The total number of persons inside the room is also displayed on the seven
segment displays. The microcontroller does the above job. It receives the signals from the
sensors, and this signal is operated under the control of software which is stored in ROM.
Microcontroller AT89c251 continuously monitor the LDR’s 1 & 2 (Light Dependent
Resistor), When any object pass through the LDR’s then the light falling on the LDR’s
are obstructed , this obstruction is sensed by the Microcontroller.
2 X 16
LCD
IR IR
SENSOR SENSOR 89C52
Microcontro
ller
POWER
SUPPLY
COUNTER
2. Regulators
3. 89c51 microcontroller
4. Sensors
5. Capacitors
6. Diodes
7. Potentiometer
8. Bulb
9. Master PCB
Chapter 2
89C52
Microcontroller
89C52 MICROCONTROLLER
2. INTRODUCTION
The Intel 89C52 is Harvard architecture, single chip microcontroller (µC) which was
developed by Intel in 1980 for use in embedded systems. Intel's original versions were
popular in the 1980s and early 1990s, but has today largely been superseded by a vast
range of faster and/or functionally enhanced 8051-compatible devices manufactured by
more than 20 independent manufacturers including Atmel, Infineon Technologies
(formerly Siemens AG), Maxim Integrated Products (via its Dallas Semiconductor
subsidiary), NXP (formerly Philips Semiconductor), Nuvoton (formerly Winbond), ST
Microelectronics, Silicon Laboratories (formerly Cygnal), Texas Instruments and Cypress
Semiconductor. Intel's official designation for the 8051 family of µCs is MCS 51.Intel's
original 8051 family was developed using NMOS technology, but later versions,
identified by a letter C in their name (e.g., 80C51) used CMOS technology and were less
power-hungry than their NMOS predecessors. This made them more suitable for battery-
powered devices.
Figure 2.1
2.2 FEATURES
EA/VP Pin
The EA on pin 31 is tied high to make the 8051 executes program from Internal ROM
Reset Circuit
Figure 2.4
RESET is an active High input When RESET is set to High, 8051 goes back to the power
on state.
The 8051 is reset by holding the RST high for at least two machine cycles and then
returning it low.
Power-On Reset
Manual reset
After a reset, the program counter is loaded with 0000H but the content of on-chip RAM
is not affected.
The 8051 uses the crystal for precisely that: to synchronize it’s operation. Effectively, the
8051 operates using what are called "machine cycles." A single machine cycle is the
minimum amount of time in which a single 8051 instruction can be executed. Although
many instructions take multiple cycles.
8051 has an on-chip oscillator. It needs an external crystal that’s decides the operating
frequency of the 8051.
Figure 2.5
A cycle is, in reality, 12 pulses of the crystal. That is to say, if an instruction takes one
machine cycle to execute, it will take 12 pulses of the crystal to execute. Since we know
the crystal is pulsing 11,059,000 times per second and that one machine cycle is 12
pulses, we can calculate how many instruction cycles the 8051 can execute per second:
11,059,000 / 12 = 921,583
11.0592 MHz crystals are often used because it can be divided to give you exact clock
rates for most of the common baud rates for the UART, especially for the higher speeds
(9600, 19200). Despite the "oddball" value, these crystals are readily available and
commonly used.
CHAPTER 3
Interfacing
LCD, RELAYS,
Transistors and LDRs
3.1.1 Introduction
The most commonly used Character based LCDs are based on Hitachi's HD44780
controller or other which are compatible with HD44580. In this tutorial, we will discuss
about character based LCDs, their interfacing with various microcontrollers, various
interfaces (8-bit/4-bit), programming, special stuff and tricks you can do with these
simple looking LCDs which can give a new look to your application.
The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4 Line
LCDs which have only 1 controller and support at most of 80 characters, whereas LCDs
supporting more than 80 characters make use of 2 HD44780 controllers.
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two
pins are extra in both for back-light LED connections). Pin description is shown in the
table below.
Most projects you create with the 8051 CPU require some form of display. The most
common way to accomplish this is with the LCD (Liquid Crystal Display). LCDs have
become a cheap and easy way to get text display for embedded system Common displays
are set up as 16 to 20 characters by 1 to 4 lines.
PIN EXPLANATION
Note that the EN line must be raised/lowered before/after each instruction sent to the
LCD regardless of whether that instruction is read or write text or instruction. In short,
you must always manipulate EN when communicating with the LCD. EN is the LCD's
way of knowing that you are talking to it. If you don't raise/lower EN, the LCD doesn't
know you're talking to it on the other lines.
The diagram above showing typical microcontroller interface circuit using NPN
transistor; the RB resistor is used to control the current on base terminal that make
transistor OFF and ON (saturate); while the RC resistor is the current limiter for the
load. if the load operate with the same voltage as the supplied power (Vcc) you can by
pass the RC (not use).
Notice the diode (also known as the clamp diode) in the inductive load circuit is needed
to protect the transistor again the EMF (Electromotive Force) voltage generated by the
inductor component when the transistor is switched on and off rapidly, this voltage is
oppose the source voltage. The diode will act as a short circuit to the high voltage
generated by the inductor component, you can use any general purpose diode with
capable on handling minimum 1 A of current such as 1N4001, 1N4002, etc.
LDR is nothing but the light dependent resistor whose resistance varies or swings depend
on the intensity of light falls on it. So The LDR's resistance can reach 1M in dark
conditions and 100 ohms in full brightness. So there will be instaneous variations from
voltage level to VCC to GND by making use of following circuit.
Here Vcc can be connected to 12V so if u can make use of LDR = 1k you can get the
voltage around 5V across it.
Signal
LDR conditioning ADC 89C52
ckt
Relays are devices which allow low power circuits to switch a relatively high
Current/Voltage ON/OFF. For a relay to operate a suitable pull-in & holding current
should be passed through its coil. Generally relay coils are designed to operate from a
particular voltage often its 5V or 12V.
The function of relay driver circuit is to provide the necessary current (typically 25
to 70ma) to energize the relay coil.
Figure 1
Figure 1 shows the basic relay driver circuit. As you can see an NPN transistor BC547
is being used to control the relay. The transistor is driven into saturation (turned ON)
when a LOGIC 1 is written on the PORT PIN thus turning ON the relay. The relay is
turned OFF by writing LOGIC 0 on the port pin.
A diode (1N4007/1N4148) is connected across the relay coil, this is done so as to protect
the transistor from damage due to the BACK EMF generated in the relay's inductive coil
when the transistor is turned OFF. When the transistor is switched OFF the energy stored
in the inductor is dissipated through the diode & the internal resistance of the relay coil
NOTE: This relay driver circuit is to be used only with controllers for using this circuit
with other digital IC's like LM 555 use a resistor should be used between that IC's
output & the base of transistor. No need of pull up resistor in that case.
CHAPTER 4
Switches
4 Switches
• Transistors
• Relays
4.1.1 Introduction
In the Diode tutorials we saw that simple diodes are made up from two pieces of
semiconductor material, either Silicon or Geranium to form a simple PN-junction and we
also learnt about their properties and characteristics. If we now join together two
individual diodes end to end giving two PN-junctions connected together in series, we
now have a three layer, two junctions, three terminal device forming the basis of a
Bipolar Junction Transistor, or BJT for short. This type of transistor is generally
known as a Bipolar Transistor, because its basic construction consists of two PN-
junctions with each terminal or connection being given a name to identify it and these are
known as the Emitter, Base and Collector respectively.
The word Transistor is an acronym, and is a combination of the words Transfer Varistor
used to describe their mode of operation way back in their early days of development.
There are two basic types of bipolar transistor construction, NPN and PNP, which
basically describes the physical arrangement of the P-type and N-type semiconductor
materials from which they are made. Bipolar Transistors are "CURRENT" Amplifying or
current regulating devices that control the amount of current flowing through them in
proportion to the amount of biasing current applied to their base terminal. The principle
of operation of the two transistors types NPN and PNP, is exactly the same the only
difference being in the biasing (base current) and the polarity of the power supply for
each type.
The construction and circuit symbols for both the NPN and PNP bipolar transistor are
shown above with the arrow in the circuit symbol always showing the direction of
conventional current flow between the base terminal and its emitter terminal, with the
direction of the arrow pointing from the positive P-type region to the negative N-type
region, exactly the same as for the standard diode symbol.
In the previous tutorial we saw that the standard Bipolar Transistor or BJT, comes in
two basic forms. An NPN (Negative-Positive-Negative) type and a PNP (Positive-
Negative-Positive) type, with the most commonly used transistor type being NPN
Transistors. We also learnt that the transistor junctions can be biased in one of three
different ways - Common Base, Common Emitter and Common Collector. In this
tutorial we will look more closely at the "Common Emitter" configuration using NPN
Transistors and an example of its current flow characteristics is given below.
Figure 4.1.3
We know that the transistor is a "CURRENT" operated device and that a large current
(Ic) flows freely through the device between the collector and the emitter terminals.
However, this only happens when a small biasing current (Ib) is flowing into the base
terminal of the transistor thus allowing the base to act as a sort of current control input.
The ratio of these two currents (Ic/Ib) is called the DC Current Gain of the device and is
given the symbol of hfe or nowadays Beta, (β). Beta has no units as it is a ratio. Also, the
current gain from the emitter to the collector terminal, Ic/Ie, is called Alpha, (α), and is a
function of the transistor itself. As the emitter current Ie is the product of a very small
base current to a very large collector current the value of this parameter α is very close to
unity, and for a typical low-power signal transistor this value ranges from about 0.950 to
0.999.
PNP Transistors are the exact opposite to the NPN Transistors device we looked at
previously. Basically, in this type of transistor construction the two diodes are reversed
with respect to the NPN type, with the arrow, which also defines the Emitter terminal this
time pointing inwards in the transistor symbol. Also, all the polarities are reversed which
means that PNP Transistors "sink" current as opposed to the NPN transistor which
"sources" current. Then, PNP Transistors use a small output base current and a negative
base voltage to control a much larger emitter-collector current. The construction of a PNP
transistor consists of two P-type semiconductor materials either side of the N-type
material as shown below.
PNP Transistors have very similar characteristics to their NPN bipolar cousins, except
that the polarities (or biasing) of the current and voltage directions are reversed for any
one of the possible three configurations looked at in the first tutorial, Common Base,
Common Emitter and Common Collector. Generally, PNP Transistors require a negative
(-ve) voltage at their Collector terminal with the flow of current through the emitter-
collector terminals being Holes as opposed to Electrons for the NPN types. Because the
movement of holes across the depletion layer tends to be slower than for electrons, PNP
transistors are generally more slower than their equivalent NPN counterparts when
operating.
4.1.7Transistor Matching
You may think what is the point of having PNP Transistors, when there are plenty of
NPN Transistors available?. Well, having two different types of transistors PNP & NPN,
can be an advantage when designing amplifier circuits such as Class B Amplifiers that use
"Complementary" or "Matched Pair" transistors or for reversible H-Bridge motor control
circuits. A pair of corresponding NPN and PNP transistors with near identical
characteristics to each other are called Complementary Transistors for example, a
TIP3055 (NPN), TIP2955 (PNP) are good examples of complementary or matched pair
silicon power transistors. They have a DC current gain, Beta, (Ic / Ib) matched to within
10% and high Collector current of about 15A making them suitable for general motor
control or robotic applications.
We saw in the first tutorial of this Transistors section, that transistors are basically made
up of two Diodes connected together back-to-back. We can use this analogy to determine
whether a transistor is of the type PNP or NPN by testing its Resistance between the three
different leads, Emitter, Base and Collector. By testing each pair of transistor leads in
both directions will result in six tests in total with the expected resistance values in Ohm's
given below.
1. Emitter-Base Terminals - The Emitter to Base should act like a normal diode and
conduct one way only.
4.2 RELAY
4.2.1Introduction
A relay is an electrically operated switch. Current flowing through the coil of the relay
creates a magnetic field which attracts a lever and changes the switch contacts. The coil
current can be on or off so relays have two switch positions and they are double throw
(changeover) switches.
The supplier's catalogue should show you the relay's connections. The coil will be
obvious and it may be connected either way round. Relay coils produce brief high voltage
'spikes' when they are switched off and this can destroy transistors and ICs in the circuit.
To prevent damage you must connect a protection diode across the relay coil.
The relay's switch connections are usually labelled COM, NC and NO:
• COM = Common, always connect to this, it is the moving part of the switch.
• NC = Normally Closed, COM is connected to this when the relay coil is off.
• NO = Normally Open, COM is connected to this when the relay coil is on.
• Connect to COM and NO if you want the switched circuit to be on when the
relay coil is on.
• Connect to COM and NC if you want the switched circuit to be on when the
relay coil is off.
A relay is used to indirectly control power on/off to high current draw applications. This
allows you to use a low current carrying switch to control high amperage equipment
without using much more expensive switches and extensive runs of large gage wire.
Relays also are often remote mounted keeping hi current cables/wires away from the
user. Think about it... a worker at a power distribution facility doesn't run outside, drive
to the dam 25 miles away then throw a giant switch every time he needs to route power
somewhere. He merely throws a switch which activates a remote relay controlling the
power. No need to be right there, no need to run costly heavier gage wires to the worker's
location On a much smaller scale, you are using relays everyday you drive your rig for
everything from headlights to cooling fans.
supply voltage
Relay coil current =
coil resistance
4. For example: A 12V supply relay with a coil resistance of 400 passes a current
of 30mA. This is OK for a 555 timer IC (maximum output current 200mA), but it
is too much for most ICs and they will require a transistor to amplify the current.
5. Switch ratings (voltage and current)
The relay's switch contacts must be suitable for the circuit they are to control. You
will need to check the voltage and current ratings. Note that the voltage rating is
usually higher for AC, for example: "5A at 24V DC or 125V AC".
Transistors and ICs must be protected from the brief high voltage produced when a relay
coil is switched off. The diagram shows how a signal diode (eg 1N4148) is connected
'backwards' across the relay coil to provide this protection.
Advantages of relays:
• Relays can switch AC and DC, transistors can only switch DC.
• Relays can switch high voltages, transistors cannot.
• Relays are a better choice for switching large currents (> 5A).
• Relays can switch many contacts at once.
Disadvantages of relays:
To control hi current circuits that your existing fuse box can't handle.
For example, I use a relay to control power to my c.b. linear which uses a 25 amp fuse.
High current headlights often come with a relay bundle to keep from frying your original
headlight harness while letting your original headlight circuit act as the switching control.
Fog lights are a good candidate for the 'Simple Relay Circuit'.
CHAPTER 5
Diodes, Capacitors
and Resistors
5.1 Diodes
5.1.1 Introduction
In electronics a diode is a two-terminal electronic component that restricts current flow
chiefly to one direction. The term usually refers to a semiconductor diode, the most
common type today, which is a crystal of semiconductor connected to two electrical
terminals, a P-N junction. A vacuum tube diode, now little used, is a vacuum tube with
two electrodes; a plate and a cathode.
The most common function of a diode is to allow an electric current in one direction
(called the forward direction) while blocking current in the opposite direction (the
reverse direction). Thus, the diode can be thought of as an electronic version of a check
valve. This unidirectional behavior is called rectification, and is used to convert
alternating current to direct current, and remove modulation from radio signals in radio
receivers.
However diodes can have more complicated behavior than this simple on-off action, due
to their complex non-linear electrical characteristics, which can be tailored by varying the
construction of their P-N junction. These are exploited in special purpose diodes that
perform many different functions. Diodes are used to regulate voltage (Zener diodes),
electronically tune radio and TV receivers (varactor diodes), generate radio frequency
oscillations (tunnel diodes), and produce light (light emitting diodes).
Diodes were the first semiconductor electronic devices. The discovery of crystals'
rectifying abilities was made by German physicist Ferdinand Braun in 1897. The first
semiconductor diodes, called cat's whisker diodes were made of crystals of minerals such
as galena. Today most diodes are made of silicon, but other semiconductors such as
germanium are sometimes used.
Electronic Symbol
Most diodes today are based on semiconductor p-n junctions. In a p-n diode,
conventional current is from the p-type side (the anode) to the n-type side (the cathode),
but not in the opposite direction. Another type of semiconductor diode, the Schottky
diode, is formed from the contact between a metal and a semiconductor rather than by a
p-n junction.
In this discussion the term diode and rectifier will be used interchangeably; however, the
term diode usually implies a small signal device with current typically in the milliamp
range; and a rectifier, a power device, conducting from1 to 1000 amps or even higher.
Many diodes or rectifiers are identified as 1NXXXX. A semiconductor diode consists of
a PN junction and has two (2) terminals, an anode (+) and a cathode (-). Current flows
from anode to cathode within the diode. A diode and schematic representation are shown
below.
An ideal diode is like a light switch in your home. When the switch is closed, the
circuit is completed; and the light turn’s on. When the switch is open, there is no current
and the light is off.
This can be shown as:
However, the diode has an additional property; it is unidirectional, i.e. current flows in
only one direction (anode to cathode internally).When a forward voltage is applied, the
diode conducts; and when a reverse voltage is applied, there is no conduction. A
mechanical analogy is a rat chat, which allows motion in one direction only.
Characteristics of diode
Notice that the diode conducts a small current in the forward direction up to a
threshold voltage, 0.3 for germanium and 0.7 for silicon; after that it conducts as we
might expect. The forward voltage drop, Vf, is specified at a forward current, If.
Leakage current
In the reverse direction there is a small leakage current up until the reverse breakdown
voltage is reached. This leakage is undesirable, obviously the lower the better, and is
specified at a voltage less the than breakdown; diodes are intended to operate below their
breakdown voltage.
Current Rating
The current rating of a diode is determined primarily by the size of the diode chip, and
both the material and configuration of the package, Average Current is used, not RMS
current. A larger chip and package of high thermal conductivity are both conducive to a
higher current rating.
Switching
The switching speed of a diode depends upon its construction and fabrication. In
general the smaller the chip the faster it switches, other things being equal. The chip
geometry, doping levels, and the temperature at nativity determine switching speeds . The
reverse recovery time, trr, is usually the limiting parameter; trr is the time it takes a diode
to switch from on to off.
5.1.6 Applications
Radio demodulation
The first use for the diode was the demodulation of amplitude modulated (AM) radio
broadcasts. The history of this discovery is treated in depth in the radio article. In
summary, an AM signal consists of alternating positive and negative peaks of voltage,
whose amplitude or “envelope” is proportional to the original audio signal. The diode
(originally a crystal diode) rectifies the AM radio frequency signal, leaving an audio
signal which is the original audio signal, minus atmospheric noise. The audio is extracted
using a simple filter and fed into an audio amplifier or transducer, which generates sound
waves.
Power conversion
Rectifiers are constructed from diodes, where they are used to convert alternating current
(AC) electricity into direct current (DC).
Over-voltage protection
Diodes are frequently used to conduct damaging high voltages away from sensitive
electronic devices. They are usually reverse-biased (non-conducting) under normal
circumstances. When the voltage rises above the normal range, the diodes become
forward-biased (conducting).
Logic gates
Diodes can be combined with other components to construct AND and OR logic gates.
This is referred to as diode logic.
Temperature measurements
A diode can be used as a temperature measuring device, since the forward voltage drop
across the diode depends on temperature, as in a Silicon band gap temperature sensor.
From the Shockley ideal diode equation given above, it appears the voltage has a positive
temperature coefficient (at a constant current) but depends on doping concentration and
operating temperature (Size 2007). The temperature coefficient can be negative as in
typical thermistors or positive for temperature sense diodes down to about 20 Kelvin’s.
Current steering
5.2 CAPACITOR
5.2.1 Introduction
Electronic Symbol
Unit
Farad: This is the ratio of the electric charge on each conductor to the potential
difference between them.
5.2.2Types of Capacitor
A non-polarized ("non polar") capacitor is a type of capacitor that has no implicit polarity
-- it can be connected either way in a circuit. Ceramic, mica and some electrolytic
capacitors are non-polarized. You'll also sometimes hear people call them "bipolar"
capacitors.
A polarized ("polar") capacitor is a type of capacitor that have implicit polarity -- it can
only be connected one way in a circuit. The positive lead is shown on the schematic (and
often on the capacitor) with a little "+" symbol. The negative lead is generally not shown
on the schematic, but may be marked on the capacitor with a bar or "-" symbol. Polarized
capacitors are generally electrolytics.
5.2.3Applications
Capacitors have many uses in electronic and electrical systems. They are so common that
it is a rare electrical product that does not include at least one for some purpose.
5.3 POTENTIOMETER
5.3.1 Introduction
ELECTRONIC SYMBOL
(Europe)
(US)
A linear taper potentiometer (uses the letter 'B' in the designation e.g. 100kB) has a
resistive element of constant cross-section, resulting in a device where the resistance
between the contact (wiper) and one end terminal is proportional to the distance between
them. Linear taper describes the electrical characteristic of the device, not the geometry
of the resistive element. Linear taper potentiometers are used when an approximately
proportional relation is desired between shaft rotation and the division ratio of the
potentiometer; for example, controls used for adjusting the centering of (an analog)
cathode-ray oscilloscope.
Logarithmic potentiometer
Most (cheaper) "log" pots are actually not logarithmic, but use two regions of different
resistance (but constant resistivity) to approximate a logarithmic law. A log pot can also
be simulated with a linear pot and an external resistor. True log pots are significantly
more expensive.
Logarithmic taper potentiometers are often used in connection with audio amplifiers.
Digital potentiometer
Potentiometers are widely used as user controls, and may control a very wide variety of
equipment functions. The widespread use of potentiometers in consumer electronics has
declined in the 1990s, with digital controls now more common. However they remain in
many applications, such as volume controls and as position sensors.
Audio control
One of the most common uses for modern low-power potentiometers is as audio control
devices. Both linear pots (also known as "faders") and rotary potentiometers (commonly
called knobs) are regularly used to adjust loudness, frequency attenuation and other
characteristics of audio signals.
The 'log pot' is used as the volume control in audio amplifiers, where it is also called an
"audio taper pot", because the amplitude response of the human ear is also logarithmic. It
ensures that, on a volume control marked 0 to 10, for example, a setting of 5 sounds half
as loud as a setting of 10. There is also an anti-log pot or reverse audio taper which is
simply the reverse of a log pot. It is almost always used in a ganged configuration with a
log pot, for instance, in an audio balance control.
Television
Potentiometers were formerly used to control picture brightness, contrast, and color
response. A potentiometer was often used to adjust "vertical hold", which affected the
synchronization between the receiver's internal sweep circuit (sometimes a multivibrator)
and the received picture signal.
Transducers
Potentiometers are also very widely used as a part of displacement transducers because of
the simplicity of construction and because they can give a large output signal.
The potentiometer can be used as a voltage divider to obtain a manually adjustable output
voltage at the slider (wiper) from a fixed input voltage applied across the two ends of the
pot. This is the most common use of pots.
Chapter 6
Power Supply
6. Power supply
6. Introduction
Circuit Diagram
Figure 6
Components used
• DC Battery
• Full Wave Rectifier
• Diodes
• Capacitors
• Voltage Regulator
• Transformer
6.1 TRANSFORMER
6.1.1 Introduction
A transformer is a 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.
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:
The transformer is based on two principles: firstly, that an electric current can produce a
magnetic field (electromagnetism) and secondly 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.
Figure 6.1.2
An ideal transformer
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 primary and secondary coils.
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
Φ equals 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 densityB 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 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
6.1.4 Applications
The output voltage can only be held roughly constant; the regulation is specified by two
measurements:
• Load regulation is the change in output voltage for a given change in load
current (for example: "typically 15mV, maximum 100mV for load currents
between 5mA and 1.4A, at some specified temperature and input voltage").
• Line regulation or input regulation is the degree to which output voltage
changes with input (supply) voltage changes - as a ratio of output to input change
(for example "typically 13mV/V"), or the output voltage change over the entire
specified input voltage range (for example "plus or minus 2% for input voltages
between 90V and 260V, 50-60Hz").
A half-wave rectifier will only give one peak per cycle and for this and other reasons is
only used in very small power supplies. A full wave rectifier achieves two peaks per
cycle and this is the best that can be done with single-phase input. For three-phase inputs
a three-phase bridge will give six peaks per cycle and even higher numbers of peaks can
be achieved by using transformer networks placed before the rectifier to convert to a
higher phase order.
Chapter 7
Sensors (LDRs)
INTRODUCTION
A photo resistor or light dependent resistor or cadmium sulfide (CdS) cell is a resistor
whose resistance decreases with increasing incident light intensity. It can also be
referenced as a photoconductor.
A photo resistor is made of a high resistance semiconductor. If light falling on the device
is of high enough frequency, photons absorbed by the semiconductor give bound
electrons enough energy to jump into the conduction band. The resulting free electron
(and its hole partner) conduct electricity, thereby lowering resistance.
As the name suggests, a light dependant resistor (LDR)is a component whose resistance
changes when the amount of light falling on it (called the light intensity) changes. All you
need to remember is that the resistance goes down as the amount of light goes up.
Resistance decreases as light intensity increases, light is low, dark is high (resistance).
The LDR can be used in a circuit to automatically switch lights on at night (see relay).
7.3 Applications
Photo resistors come in many different types. Inexpensive cadmium sulfide cells can be
found in many consumer items such as camera light meters, street lights, clock radios,
alarms, and outdoor clocks.
They are also used in some dynamic compressors together with a small incandescent
lamp or light emitting diode to control gain reduction.
Lead sulfide and indium antimonide LDRs are used for the mid infrared spectral region.
Ge: Cu photoconductors are among the best far-infrared detectors available, and are used
for infrared astronomy and infrared spectroscopy.
Chapter 8
Figure 8.1
while (1)
{
lcd_cmd_dis (0x8A, 0);
visit count ();
}
}
Main () End
else
COUNT = 0;
show counts ();
}
}
}
}
Main () End
Bibliography
www.google.com
www.wikipedia.com
www.doctronics.co.uk
www.technologystudent.com
www.8051projects.net
www.williamson-labs.com
www.atmel.com
www.electronics-tutorials.com
www.101science.com
www.electronis.howstuffworkls.com
www.allaboutcircuits.com
www.kpsec.freeuk.com
www.tech-faq.com