Professional Documents
Culture Documents
IR Birectional Visitor Counter PDF
IR Birectional Visitor Counter PDF
Contact us:
+91-120-4298000
+91-9212314779
info@hbeonlabs.com
training@hbeonlabs.com
www. hbeonlabs.com
using 8051
A counter that can change its state in either direction, under control of an
updown selector input, is known as an updown counter. The circuit
given here can count numbers from 0 to 9999 in up and down modes
depending upon the state of the selector. It can be used to count the
number of persons entering a hall in the up mode at entrance gate. In the
down mode, it can count the number of persons leaving the hall by
decrementing the count at exit gate. It can also be used at gates of parking
areas and other public places.
This circuit divided in three parts: sensor, controller and counter display.
The sensor would observe an interruption and provide an input to the
controller which would run the counter in up/down mode depending upon
the selector setting. The same count is displayed on a set of 7-segment
displays through the controller.
This is very wonderful project to control the working of IR birectional
Visitor counter. These sensor are equipped with the CPU which control
the counter.
1. 8051 Microcontroller
2. ULN2003
3. LCD .
4.LM358
5.Relay
6.IR TRANSMITTER-RECEVER
APPLICATIONS
Telecom
Mobile phone systems (handsets and base stations), modems, routers
Automotive application
Braking system, Traction control, Airbag release system, Management units,
and Steer-by-wire systems.
Domestic application
Dishwasher, television, washing machines, microwave ovens, Video
recorders, Security system, Garage door controllers, Calculators, Digital
watches, VCRs, Digital cameras, Remote Controls, Treadmills
Robotic
Fire fighting robot, Automatic floor cleaner, robotic arm
Aerospace application
Flight control system, Engine controllers, Autopilots, Passenger entertainment
system
Medical equipment
Anesthesia monitoring system, ECG monitors, Pacemakers, Drug delivery
systems, MRI scanners
Defense system
Radar systems, Fighter aircraft flight control system, Radio system, Missile
guidance systems
Office automation
Laser printers, Fax machines, Pagers, Cash registers, Gas pumps, Credit /Debit
card readers, Thermostats, Grain analyzers.
COMPONENTS
LIST OF COMPONENTS USED
AUTOMATIC ROOM LIGHT CONTROLLER
Name
Capacity
Quantity
Code
2 Pin Connector
Screw
J1
2 Pin Connector
Male
J6
Diode
IN40007
D1,D2,D3,D4
Regulator
7805
U1
Regulator
7812
U3
Capacitor
1000f
C1
Capacitor
10f
C2
Ceramic Capacitor
22pf
C3,C4
Crystal
11.0592mhz
XTL
SW5
RL2
40 Pin Base
U2
16 Pin Base
U5
8 Pin Base
U4
U2
ULN2003
U5
LM358
1`
U4
LED
D5,D6
Push Button
Relay
8051
12V
AT89S52
LCD Base
16 Pin
LCD
LCD
16*2
LCD
Resistance
220
R1,R5
Resistance
1k
R3
Resistance
10k
R2
Variable resistance
100k
RV1,RV2
Transformer
12-0-12
PCB
Design
NOTE:- Please use only above mentioned component code to make your Project.
Other components are extra in layout design which you can use to make others
projects.
COMPONENT DESCRIPTION
1)MICRO-CONTROLLER 8051 DESCRIPTION
The IC 8051 is a low-power; high-performance CMOS 8-bit microcomputer with 4K
bytes of Flash programmable and erasable read only memory (PEROM). The device
is manufactured using Atmels high-density nonvolatile memory technology and is
compatible with the industry-standard MCS-51 instruction set and pin out. The onchip Flash allows the program memory to be reprogrammed in-system or by a
conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU
with Flash on a monolithic chip, the Atmel IC 8051 is a powerful microcomputer
which provides a highly-flexible and cost-effective solution to many embedded
control applications. The IC 8051 provides the following standard features: 4K bytes
of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector
two-level interrupt architecture, full duplex serial port, on-chip oscillator and clock
circuitry. In addition, the IC 8051 is designed with static logic for operation down to
zero frequency and supports two software selectable power saving modes. The Idle
Mode stops the CPU while allowing the RAM, timer/counters, serial port and
interrupt system to continue functioning.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
8051
(8031)
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
Vcc
P0.0(AD0)
P0.1(AD1)
P0.2(AD2)
P0.3(AD3)
P0.4(AD4)
P0.5(AD5)
P0.6(AD6)
P0.7(AD7)
EA/VPP
ALE/PROG
PSEN
P2.7(A15)
P2.6(A14)
P2.5(A13)
P2.4(A12)
P2.3(A11)
P2.2(A10)
P2.1(A9)
P2.0(A8)
PROCESSOR
A processor is an electronic device capable of manipulating data in a way specified by
a sequence of instructions.
INSTRUCTIONS
Instructions in a computer are binary numbers just like data. Different numbers, when
read and executed by a processor, cause different things to happen. The instructions
are also called opcodes or machine codes.
Different bit patterns activate or deactivate different parts of the processing core.
Every processor has its own instruction set varying in number, bit pattern and
functionality.
PROGRAM
The sequence of instructions is what constitutes a program. The sequence of
instructions may be altered to suit the application.
ASSEMBLY LANGUAGE
Writing and understanding such programs in binary or hexadecimal form is very
difficult ,so each instructions is given a symbolic notation in English language called
as mnemonics. A program written in mnemonics Form is called an assembly language
program. But it must be converted into machine language for execution by processor.
ASSEMBLER
An assembly language program should be converted to machine language for
execution by processor. Special software called ASSEMBLER converts a program
written in mnemonics to its equivalent machine opcodes.
HIGH LEVEL LANGUAGE
A high level language like C may be used to write programs for processors. Software
called compiler converts this high level language program down to machine code.
Ease of programming and portability.
PIN DESCRIPTION
VCC (Pin 40)
Provides voltage to the chip . +5V
GND (Pin 20)
Ground
XTAL1 (Pin 19) and XTAL2 (Pin 18)
Crystal Oscillator connected to pins 18, 19.Two capacitors of 30pF value. Time for
one machine cycle:11.0592/12=1.085 secs
RST (Pin 9)
RESET pin
1.Active high. On applying a high pulse to this pin, microcontroller will reset and
terminate all activities.
2.INPUT pin
3.Minimum 2 machine cycles required to make RESET
4.Value of registers after RESET
External Access: EA 31
Connected to VCC for on chip ROM
Connected to Ground for external ROM containing the code Input Pin
Program Store Enable: PSEN 29
Output Pin
In case of external ROM with code it is connected to the OE pin of the ROM
Address Latch Enable: ALE 30
Output Pin. Active high
In case of external ROM ,ALE is used to de multiplex (PORT 0) the address and data
bus by connecting to the G pin of 74LS373 chip
I/O Port Pins and their Functions:
Four ports P0,P1,P2,P3 with 8 pins each, making a total of 32 input/output pins
On RESET all ports are configured as output. They need to be programmed to make
them function as inputs
PORT 0
Pins 32-39
Can be used as both Input or Output
External pull up resistors of 10K need to be connected
Dual role: 8051 multiplexes address and data through port 0 to save pins .AD0-AD7
ALE is used to de multiplex data and address bus
PORT 1
Pins 1 through 8
Both input or output
No dual function
Internal pull up registers
On RESET configured as output
PORT 2
Pins 21 through 28
No external pull up resistor required
Both input or output
Dual Function: Along with Port 0 used to provide the 16-Bit address for external
memory. It provides higher address A8-A16
PORT 3
Pins 10 through 17
No external pull up resistors required
PROCESSOR
ARCHITECTURE
Block Diagram
External interrupts
Interrupt
Control
On-chip
ROM for
program
code
Timer/Counter
On-chip
RAM
Timer 1
Timer 0
CPU
OSC
Bus
Control
4 I/O Ports
Serial
Port
P0 P1 P2 P3
TxD RxD
Address/Data
Counter
Inputs
ALU
The Arithmetic Logic Unit (ALU) performs the internal arithmetic manipulation of
data line processor. The instructions read and executed by the processor decide the
operations performed by the ALU and also control the flow of data between registers
and ALU. Operations performed by the
ALU are Addition , Subtraction , Not , AND , NAND , OR , NOR , XOR , Shift
Left/Right , Rotate Left/right , Compare etc. Some ALU supports Multiplication and
Division. Operands are generally transferred from two registers or from one register
and memory location to ALU data inputs. The result of the operation is the placed
back into a given destination register or memory location from ALU output.
REGISTERS
Registers are the internal storage for the processor. The number of registers varies
significantly between processor architectures.
WORKING REGISTERS
Temporary storage during ALU Operations and data transfers.
INDEX REGISTERS
Points to memory addresses.
STATUS REGISTERS
Stores the current status of various flags denoting conditions resulting from various
operations.
CONTROL REGISTERS
Contains configuration bits that affect processor operation and the operating modes
of various internal subsystems.
Memory Organization
Program Memory
Data Memory
The right half of the internal and external data memory spaces available on Atmels
Flash microcontrollers. Hardware configuration for accessing up to 2K bytes of
external RAM. In this case, the CPU executes from internal Flash. Port 0 serves as a
multiplexed address/data bus to the RAM, and 3 lines of Port 2 are used to page the
RAM. The CPU generates RD and WR signals as needed during external RAM
accesses. You can assign up to 64K bytes of external data memory. External data
memory addresses can be either 1 or 2 bytes wide. One-byte addresses are often used
in conjunction with one or more other I/O lines to page the RAM. Two-byte addresses
can also be used, in which case the high address byte is emitted at Port 2.
Internal data memory addresses are always 1 byte wide, which implies an address
space of only 256 bytes. However, the addressing modes for internal RAM can in fact
accommodate 384 bytes. Direct addresses higher than 7FH access one memory space,
and indirect addresses higher than 7FH access a different memory space. Thus, the
Upper 128 and SFR space occupying the same block of addresses, 80H through FFH,
although they are physically separate entities. The lowest 32 bytes are grouped into 4
banks of 8 registers. Program instructions call out these registers as R0 through R7.
Two bits in the Program Status Word (PSW) select which register bank is in use. This
architecture allows more efficient use of code space, since register instructions are
shorter than instructions that use direct addressing.
Register Instructions
The register banks, which contain registers R0 through R7, can be accessed by
instructions whose opcodes carry a 3- bit register specification. Instructions that access
the registers this way make efficient use of code, since this mode eliminates an address
byte. When the instruction is executed, one of the eight registers in the selected bank is
accessed. One of four banks is selected at execution time by the two bank select bits in
the PSW.
Register-Specific Instructions
Some instructions are specific to a certain register. For example, some instructions
always operate on the Accumulator, so no address byte is needed to point to it. In these
cases, the opcode itself points to the correct register. Instructions that refer to the
Accumulator as A assemble as Accumulator-specific opcodes.
Indexed Addressing
Program memory can only be accessed via indexed addressing. This addressing mode is
intended for reading look-up tables in program memory. A 16-bit base register (either
DPTR or the Program Counter) points to the base of the table, and the Accumulator is set
up with the table entry number. The address of the table entry in program memory is
formed by adding the Accumulator data to the base pointer. Another type of indexed
addressing is used in the case jump instruction. In this case the dest ination address of a
jump instruction is computed as the sum of the base pointer and the Accumulator data.
SRAM
Volatile, fast, low capacity, expensive, requires lesser external support circuitry.
DRAM
Volatile, relatively slow, highest capacity needs continuous refreshing. Hence require
external circuitry.
OTP ROM
One time programmable, used for shipping in final products.
EPROM
Erasable programmable, UV Erasing, Used for system development and debugging.
EEPROM
Electrically erasable and programmable, can be erased programmed in- circuit, Used for
storing system parameters.
FLASH
Electrically programmable & erasable, large capacity, organized as sectors.
BUSES
A bus is a physical group of signal lines that have a related function. Buses allow for the
transfer of electrical signals between different parts of the processor
Processor buses are of three types:
Data bus
Address bus
Control bus
CONTROLLER LOGIC
Processor brain decodes instructions and generate control signal for various sub units. It
has full control over the clock distribution unit of processor.
I/O Peripherals
The I/O devices are used by the processor to communicate with the external world
Parallel Ports.
Serial Ports.
ADC/DAC.
a) Power Supply: For 12v power supply we can use 12 v step down transformer,
bridge
rectifier,
12
v
regulator.
b) Switch: Any general-purpose switch can be used. Switch is used as circuit breaker.
c) L.D.R: (Light Depending Resistance) it is a special type of resistance whose value
depends on the brightness of light, which is falling on it. It has resistance of about
1mega ohm when in total darkness, but a resistance of only about 5k ohms when
brightness illuminated. It responds to a large part of light spectrum.
d) L.E.D: A diode is a component that only allows electricity to flow one way. It can
be thought as a sort of one way street for electrons. Because of this characteristic,
dioded are used to transform or rectify AC voltage into a DC voltage. Diodes have
two connections, an anode and a cathode. The cathode is the end on the schematic
with the point of the triangle pointing towards a line. In other words, the triangle
points toward that cathode. The anode is, of course, the opposite end. Current flows
from the anode to the cathode. Light emitting diodes, or LEDs, differ from regular
diodes in that when a voltage is applied, they emit light.
This light can be red (most common), green, yellow, orange, blue (not very common),
or infa red. LEDs are used as indicators, transmitters, etc. Most likely, a LED will
never burn out like a regular lamp will and requires many times less current. Because
LEDs act like regular diodes and will form a short if connected between + and -, a
current limiting resistor is used to prevent that very thing. LEDs may or may not be
drawn with the circle surrounding them.
e) Variable resistance: (Potentiometer) Resistors are one of the most common
electronic components. A resistor is a device that limits, or resists current. The current
limiting ability or resistance is measured in ohms, represented by the Greek symbol
Omega. Variable resistors (also called potentiometers or just "pots") are resistors that
have a variable resistance. You adjust the resistance by turning a shaft. This shaft
moves a wiper across the actual resistor element. By changing the amounts of resistor
between the wiper connection and the connection (s) to the resistor element, you can
change the resistance. You will often see the resistance of resistors written with K
(kilohms) after the number value. This means that there are that many thousands of
ohms. For example, 1K is 1000 ohm, 2K is 2000 ohm, 3.3K is 3300 ohm, etc. You
may also see the suffix M (mega ohms). This simply means million. Resistors are also
rated by their power handling capability. This is the amount of heat the resistor can
take before it is destroyed. The power capability is measured in W (watts).
Common wattages for variable resistors are 1/8W, 1/4W, 1/2W and 1W. Anything of
a higher wattage is referred to as a rheostat.
f) P.C.B: (Printed Circuit Board) with the help of P.C.B it is easy to assemble circuit
with neat and clean end products. P.C.B is made of bakelite with surface pasted with
copper track-layout. For each components leg, hole is made. Connection pin is passed
through the hole and is soldered.
Description Of Components:
Power Supply
TRANSFORMER:
A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled conductors the transformer's coils or "windings". Except
for air-core transformers, the conductors are commonly wound around a single iron-rich
core, or around separate but magnetically-coupled cores. A varying current in the first or
"primary" winding creates a varying magnetic field in the core (or cores) of the
transformer. 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 circuit, electric charge will flow in the secondary
winding of the transformer and transfer energy from the primary circuit to the load
connected in the secondary circuit.
The secondary induced voltage VS, of an ideal transformer, is scaled from the primary VP
by a factor equal to the ratio of the number of turns of wire in their respective windings:
Refer to the transformer circuit in figure as you read the following explanation: The
primary winding is connected to a 60-hertz ac voltage source. The magnetic field (flux)
builds up (expands) and collapses (contracts) about the primary winding. The expanding
and contracting magnetic field around the primary winding cuts the secondary winding
and induces an alternating voltage into the winding. This voltage causes alternating
current to flow through the load. The voltage may be stepped up or down depending on
the design of the primary and secondary windings.
The CORE, which provides a path for the magnetic lines of flux.
The PRIMARY WINDING, which receives energy from the ac source.
The SECONDARY WINDING, which receives energy from the primary winding
and delivers it to the load.
The ENCLOSURE, which protects the above components from dirt, moisture,
and mechanical damage.
BRIDGE RECTIFIER
A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave
rectification. This is a widely used configuration, both with individual diodes wired as
shown and with single component bridges where the diode bridge is wired internally.
Basic operation
According to the conventional model of current flow originally established by Benjamin
Franklin and still followed by most engineers today, current is assumed to flow through
electrical conductors from the positive to the negative pole. In actuality, free electrons in
a conductor nearly always flow from the negative to the positive pole. In the vast
majority of applications, however, the actual direction of current flow is irrelevant.
Therefore, in the discussion below the conventional model is retained.
In the diagrams below, when the input connected to the left corner of the diamond is
positive, and the input connected to the right corner is negative, current flows from the
upper supply terminal to the right along the red (positive) path to the output, and returns
to the lower supply terminal via the blue (negative) path.
When the input connected to the left corner is negative, and the input connected to the
right corner is positive, current flows from the lower supply terminal to the right along
the red path to the output, and returns to the upper supply terminal via the blue path.
In each case, the upper right output remains positive and lower right output negative.
Since this is true whether the input is AC or DC, this circuit not only produces a DC
output from an AC input, it can also provide what is sometimes called "reverse polarity
Output smoothing
For many applications, especially with single phase AC where the full-wave bridge
serves to convert an AC input into a DC output, the addition of a capacitor may be
desired because the bridge alone supplies an output of fixed polarity but continuously
varying or "pulsating" magnitude (see diagram above).
The function of this capacitor, known as a reservoir capacitor (or smoothing capacitor) is
to lessen the variation in (or 'smooth') the rectified AC output voltage waveform from the
bridge. One explanation of 'smoothing' is that the capacitor provides a low impedance
path to the AC component of the output, reducing the AC voltage across, and AC current
through, the resistive load. In less technical terms, any drop in the output voltage and
current of the bridge tends to be canceled by loss of charge in the capacitor. This charge
flows out as additional current through the load. Thus the change of load current and
voltage is reduced relative to what would occur without the capacitor. Increases of
voltage correspondingly store excess charge in the capacitor, thus moderating the change
in output voltage / current.
The simplified circuit shown has a well-deserved reputation for being dangerous,
because, in some applications, the capacitor can retain a lethal charge after the AC power
source is removed. If supplying a dangerous voltage, a practical circuit should include a
reliable way to safely discharge the capacitor. If the normal load cannot be guaranteed to
perform this function, perhaps because it can be disconnected, the circuit should include a
bleeder resistor connected as close as practical across the capacitor. This resistor should
consume a current large enough to discharge the capacitor in a reasonable time, but small
enough to minimize unnecessary power waste.
Because a bleeder sets a minimum current drain, the regulation of the circuit, defined as
percentage voltage change from minimum to maximum load, is improved. However in
many cases the improvement is of insignificant magnitude.
The capacitor and the load resistance have a typical time constant = RC where C and R
are the capacitance and load resistance respectively. As long as the load resistor is large
enough so that this time constant is much longer than the time of one ripple cycle, the
above configuration will produce a smoothed DC voltage across the load.
In some designs, a series resistor at the load side of the capacitor is added. The smoothing
can then be improved by adding additional stages of capacitorresistor pairs, often done
only for sub-supplies to critical high-gain circuits that tend to be sensitive to supply
voltage noise.
The idealized waveforms shown above are seen for both voltage and current when the
load on the bridge is resistive. When the load includes a smoothing capacitor, both the
voltage and the current waveforms will be greatly changed. While the voltage is
smoothed, as described above, current will flow through the bridge only during the time
when the input voltage is greater than the capacitor voltage. For example, if the load
draws an average current of n Amps, and the diodes conduct for 10% of the time, the
average diode current during conduction must be 10n Amps. This non-sinusoidal current
leads to harmonic distortion and a poor power factor in the AC supply.
In a practical circuit, when a capacitor is directly connected to the output of a bridge, the
bridge diodes must be sized to withstand the current surge that occurs when the power is
turned on at the peak of the AC voltage and the capacitor is fully discharged. Sometimes
a small series resistor is included before the capacitor to limit this current, though in most
applications the power supply transformer's resistance is already sufficient.
Output can also be smoothed using a choke and second capacitor. The choke tends to
keep the current (rather than the voltage) more constant. Due to the relatively high cost of
an effective choke compared to a resistor and capacitor this is not employed in modern
equipment.
Some early console radios created the speaker's constant field with the current from the
high voltage ("B +") power supply, which was then routed to the consuming circuits,
(permanent magnets were then too weak for good performance) to create the speaker's
constant magnetic field. The speaker field coil thus performed 2 jobs in one: it acted as a
choke, filtering the power supply, and it produced the magnetic field to operate the
speaker.
REGULATOR IC (78XX)
It is a three pin IC used as a voltage regulator. It converts unregulated DC current into
regulated DC current.
Normally we get fixed output by connecting the voltage regulator at the output of the
filtered DC (see in above diagram). It can also be used in circuits to get a low DC voltage
from a high DC voltage (for example we use 7805 to get 5V from 12V). There are two
types of voltage regulators 1. fixed voltage regulators (78xx, 79xx) 2. variable voltage
regulators (LM317) In fixed voltage regulators there is another classification 1. +ve
voltage regulators 2. -ve voltage regulators POSITIVE VOLTAGE REGULATORS This
include 78xx voltage regulators. The most commonly used ones are 7805 and 7812. 7805
gives fixed 5V DC voltage if input voltage is in (7.5V, 20V).
When this filter is used, the RC charge time of the filter capacitor (C1) must be short and
the RC discharge time must be long to eliminate ripple action. In other words, the
capacitor must charge up fast, preferably with no discharge at all. Better filtering also
results when the input frequency is high; therefore, the full-wave rectifier output is easier
to filter than that of the half-wave rectifier because of its higher frequency.
For you to have a better understanding of the effect that filtering has on Eavg, a
comparison of a rectifier circuit with a filter and one without a filter is illustrated in views
A and B of figure 4-16. The output waveforms in figure 4-16 represent the unfiltered and
filtered outputs of the half-wave rectifier circuit. Current pulses flow through the load
resistance (RL) each time a diode conducts. The dashed line indicates the average value of
output voltage. For the half-wave rectifier, Eavg is less than half (or approximately 0.318)
of the peak output voltage. This value is still much less than that of the applied voltage.
With no capacitor connected across the output of the rectifier circuit, the waveform in
view A has a large pulsating component (ripple) compared with the average or dc
component. When a capacitor is connected across the output (view B), the average value
of output voltage (Eavg) is increased due to the filtering action of capacitor C1.
UNFILTERED
The value of the capacitor is fairly large (several microfarads), thus it presents a
relatively low reactance to the pulsating current and it stores a substantial charge.
The rate of charge for the capacitor is limited only by the resistance of the conducting
diode, which is relatively low. Therefore, the RC charge time of the circuit is relatively
short. As a result, when the pulsating voltage is first applied to the circuit, the capacitor
charges rapidly and almost reaches the peak value of the rectified voltage within the first
few cycles. The capacitor attempts to charge to the peak value of the rectified voltage
anytime a diode is conducting, and tends to retain its charge when the rectifier output
falls to zero. (The capacitor cannot discharge immediately.) The capacitor slowly
discharges through the load resistance (RL) during the time the rectifier is nonconducting.
The rate of discharge of the capacitor is determined by the value of capacitance and the
value of the load resistance. If the capacitance and load-resistance values are large, the
RC discharge time for the circuit is relatively long.
A comparison of the waveforms shown in figure 4-16 (view A and view B) illustrates
that the addition of C1 to the circuit results in an increase in the average of the output
voltage (Eavg) and a reduction in the amplitude of the ripple component (Er), which is
normally present across the load resistance.
Now, let's consider a complete cycle of operation using a half-wave rectifier, a capacitive
filter (C1), and a load resistor (RL). As shown in view A of figure 4-17, the capacitive
filter (C1) is assumed to be large enough to ensure a small reactance to the pulsating
rectified current. The resistance of RL is assumed to be much greater than the reactance of
C1 at the input frequency. When the circuit is energized, the diode conducts on the
positive half cycle and current flows through the circuit, allowing C1 to charge. C1 will
charge to approximately the peak value of the input voltage. (The charge is less than the
peak value because of the voltage drop across the diode (D1)). In view A of the figure,
the heavy solid line on the waveform indicates the charge on C1. As illustrated in view B,
the diode cannot conduct on the negative half cycle because the anode of D1 is negative
with respect to the cathode. During this interval, C1 discharges through the load resistor
(RL). The discharge of C1 produces the downward slope as indicated by the solid line on
the waveform in view B. In contrast to the abrupt fall of the applied ac voltage from peak
value to zero, the voltage across C1 (and thus across RL) during the discharge period
gradually decreases until the time of the next half cycle of rectifier operation. Keep in
mind that for good filtering, the filter capacitor should charge up as fast as possible and
discharge as little as possible.
Figure. - Capacitor filter circuit (positive and negative half cycles). POSITIVE HALFCYCLE
Figure. - Capacitor filter circuit (positive and negative half cycles). NEGATIVE HALFCYCLE
Since practical values of C1 and RL ensure a more or less gradual decrease of the
discharge voltage, a substantial charge remains on the capacitor at the time of the next
half cycle of operation. As a result, no current can flow through the diode until the rising
ac input voltage at the anode of the diode exceeds the voltage on the charge remaining on
C1. The charge on C1 is the cathode potential of the diode. When the potential on the
anode exceeds the potential on the cathode (the charge on C1), the diode again conducts,
and C1 begins to charge to approximately the peak value of the applied voltage.
After the capacitor has charged to its peak value, the diode will cut off and the capacitor
will start to discharge. Since the fall of the ac input voltage on the anode is considerably
more rapid than the decrease on the capacitor voltage, the cathode quickly become more
positive than the anode, and the diode ceases to conduct.
Operation of the simple capacitor filter using a full-wave rectifier is basically the same as
that discussed for the half-wave rectifier. Referring to figure, you should notice that
because one of the diodes is always conducting on alternation, the filter capacitor charges
and discharges during each half cycle. (Note that each diode conducts only for that
portion of time when the peak secondary voltage is greater than the charge across the
capacitor.)
Another thing to keep in mind is that the ripple component (E r) of the output voltage is
an ac voltage and the average output voltage (Eavg) is the dc component of the output.
Since the filter capacitor offers relatively low impedance to ac, the majority of the ac
component flows through the filter capacitor. The ac component is therefore bypassed
(shunted) around the load resistance, and the entire dc component (or Eavg) flows through
the load resistance. This statement can be clarified by using the formula for XC in a halfwave and full-wave rectifier. First, you must establish some values for the circuit.
As you can see from the calculations, by doubling the frequency of the rectifier, you
reduce the impedance of the capacitor by one-half. This allows the ac component to pass
through the capacitor more easily. As a result, a full-wave rectifier output is much easier
to filter than that of a half-wave rectifier. Remember, the smaller the XC of the filter
capacitor with respects to the load resistance, the better the filtering action. Since
Remember, also, that the load resistance is an important consideration. If load resistance
is made small, the load current increases, and the average value of output voltage (Eavg)
decreases. The RC discharge time constant is a direct function of the value of the load
resistance; therefore, the rate of capacitor voltage discharge is a direct function of the
current through the load. The greater the load current, the more rapid the discharge of the
capacitor, and the lower the average value of output voltage. For this reason, the simple
capacitive filter is seldom used with rectifier circuits that must supply a relatively large
load current. Using the simple capacitive filter in conjunction with a full-wave or bridge
rectifier provides improved filtering because the increased ripple frequency decreases the
capacitive reactance of the filter capacitor.
Unique Characteristics
In the linear mode the input common-mode voltage range includes ground and the
output voltage can also swing to ground, even though operated from only a single
power supply voltage.
The unity gain cross frequency is temperature compensated.
The input bias current is also temperature compensated
Advantages
n Two internally compensated op amps
n Eliminates need for dual supplies
n Allows direct sensing near GND and VOUT also goes to
GND
n Compatible with all forms of logic
n Power drain suitable for battery operation
Features
n Available in 8-Bump micro SMD chip sized package,
(See AN-1112)
n Internally frequency compensated for unity gain
n Large dc voltage gain: 100 dB
n Wide bandwidth (unity gain): 1 MHz
(temperature compensated)
Wide power supply range:
Single supply: 3V to 32V
or dual supplies: 1.5V to 16V
Very low supply current drain (500 A)essentially
independent of supply voltage
n Low input offset voltage: 2 mV
n Input common-mode voltage range includes ground
n Differential input voltage range equal to the power
supply voltage
n Large output voltage swing
RELAY
The relay takes advantage of the fact that when electricity flows through a coil, it
becomes an electromagnet. The electromagnetic coil attracts a steel plate, which is
attached to a switch. So the switch's motion (ON and OFF) is controlled by the current
flowing to the coil, or not, respectively.
A very useful feature of a relay is that it can be used to electrically isolate different parts
of a circuit. It will allow a low voltage circuit (e.g. 5VDC) to switch the power in a high
voltage circuit (e.g. 100 VAC or more).
The
relay
operates
mechanically,
so
it
can
not
operate
at
high
speed.
can
be
used
as
an
on/off
switch
that
controls
current.
This symbol
symbol is
Current
flows
(Cathode).
from
the
anode
side
to
the
cathode
side.
Although all diodes operate with the same general principle, there are different types
suited to different applications. For example, the following devices are best used for the
applications noted.
Voltage
The
regulation
diode
circuit
(Zener
symbol
Diode)
is
It is used to regulate voltage, by taking advantage of the fact that Zener diodes tend to
stabilize at a certain voltage when that voltage is applied in the opposite direction.
Light
The
emitting
circuit
diode
symbol
is
This type of diode emits light when current flows through it in the forward direction.
(Forward biased)
The graph above shows the electrical characteristics of a typical diode. When a small
voltage is applied to the diode in the forward direction, current flows easily. Because the
diode has a certain amount of resistance, the voltage will drop slightly as current flows
through the diode. A typical diode causes a voltage drop of about 0.6 - 1V (VF) (In the
case of silicon diode, almost 0.6V)
This voltage drop needs to be taken into consideration in a circuit which uses many
diodes in series. Also, the amount of current passing through the diodes must be
considered.
When voltage is applied in the reverse direction through a diode, the diode will have a
great resistance to current flow. Different diodes have different characteristics when
reverse-biased. A given diode should be selected depending on how it will be used in the
circuit. The current that will flow through a diode biased in the reverse direction will vary
from several mA to just A, which is very small.
The limiting voltages and currents permissible must be considered on a case by case
basis. For example, when using diodes for rectification, part of the time they will be
required to withstand a reverse voltage. If the diodes are not chosen carefully, they will
break down.
Fig. 2.28
Diodes
Fig. 2.29
Emitting
Diode
(LED)
LEDs
Light emitting diodes must be choosen according to how they will be used, because there
are various kinds. The diodes are available in several colors. The most common colors
are red and green, but there are even blue ones. The device on the far right in the
photograph combines a red LED and green LED in one package. The component lead in
the middle is common to both LEDs. As for the remaing two leads, one side is for the
green, the other for the red LED. When both are turned on simultaneously, it becomes
orange.
When an LED is new out of the package, the polarity of the device can be determined by
looking at the leads. The longer lead is the Anode side, and the short one is the Cathode
side.
The polarity of an LED can also be determined using a resistance meter, or even a 1.5 V
battery.
When using a test meter to determine polarity, set the meter to a low resistance
measurement range. Connect the probes of the meter to the LED. If the polarity is correct,
the LED will glow. If the LED does not glow, switch the meter probes to the opposite
leads on the LED. In either case, the side of the diode which is connected to the black
meter probe when the LED glows, is the Anode side. Positive voltage flows out of the
black probe when the meter is set to measure resistance.
It is possible to use an LED to obtain a fixed voltage. The voltage drop (forward voltage
or VF) of an LED is comparatively stable at just about 2V.
RESISTORS
Resistors
The resistor's function is to reduce the flow of electric current. There are two classes of
resistors; fixed resistors and the variable resistors. They are also classified according to
the material from which they are made. The typical resistor is made of either carbon film
or metal film. There are other types as well, but these are the most common. The
resistance value of the resistor is not the only thing to consider when selecting a resistor
for use in a circuit. The "tolerance" and the electric power ratings of the resistor are also
important. The tolerance of a resistor denotes how close it is to the actual rated resistence
value. For example, a 5% tolerance would indicate a resistor that is within 5% of the
specified resistance value.
Fixed Resistors
A fixed resistor is one in which the value of its resistance cannot change.
Rough size
Rating power Thickness Length
(W)
(mm)
(mm)
1/8
1/4W
1/4
1/2W
1/2
Variable Resistors
There are two general ways in which variable resistors are used. One is the variable
resistor which value is easily changed, like the volume adjustment of Radio. The other is
semi-fixed resistor that is not meant to be adjusted by anyone but a technician. It is used
to adjust the operating condition of the circuit by the technician. Semi-fixed resistors are
used to compensate for the inaccuracies of the resistors, and to fine-tune a circuit. The
rotation angle of the variable resistor is usually about 300 degrees. Some variable
resistors must be turned many times to use the whole range of resistance they offer. This
allows for very precise adjustments of their value.
These are called "Potentiometers" or "Trimmer Potentiometers."
In the photograph to the left, the variable resistor typically used for volume controls can e
seen on the far right. Its value is very easy to adjust. The four resistors at the center of the
photograph are the semi-fixed type. These ones are mounted on the printed circuit board.
The
two
resistors
on
the
left
are
the
trimmer
potentiometers.
Angle
There are three ways in which a variable resistor's value can change according to the
rotation angle of its axis.
When type "A" rotates clockwise, at first, the resistance value changes slowly and then in
the second half of its axis, it changes very quickly. The "A" type variable resistor is
typically used for the volume control of a radio, for example. It is well suited to adjust a
low sound subtly. It suits the characteristics of the ear. The ear hears low sound changes
well, but isn't as sensitive to small changes in loud sounds. A larger change is needed as
the volume is increased. These "A" type variable resistors are sometimes called "audio
taper" potentiometers.
As for type "B", the rotation of the axis and the change of the resistance value are directly
related. The rate of change is the same, or linear, throughout the sweep of the axis. This
type suits a resistance value adjustment in a circuit, a balance circuit and so on.
They are sometimes called "linear taper" potentiometers. Type "C" changes exactly the
opposite way to type "A". In the early stages of the rotation of the axis, the resistance
value changes rapidly, and in the second half, the change occurs more slowly. This type
isn't too much used. It is a special use. As for the variable resistor, most are type "A" or
type "B".
Example
Value Multiplier
Black
Brown
Red
Orange 3
0.05
(%)
(Brown=1),(Black=0),(Orange=3)
10
Tolerance
Color
103
Tolerance(Gold)
10k
=
ohm
5%
Yellow
Example
(Yellow=4),(Violet=7),(Black=0),(Red=2)
470
10
47k
Tolerance(Brown) = 1%
Green
0.5
Blue
0.25
Violet
0.1
Gray
White
Gold
-1
Silver
-2
10
None
20
ohm
CAPACITORS
Capacitors
The capacitor's function is to store electricity, or electrical energy. The capacitor also
functions as a filter, passing alternating current (AC), and blocking direct current (DC).
This symbol F is used to indicate a capacitor in a circuit diagram. The capacitor is
constructed with two electrode plates facing each other, but separated by an insulator.
When DC voltage is applied to the capacitor, an electric charge is stored on each
electrode. While the capacitor is charging up, current flows. The current will stop flowing
when the capacitor has fully charged.
Types of Capacitor
positive side is indicated by a "+" (plus) symbol. Electrolytic capacitors range in value
from about 1F to thousands of F. Mainly this type of capacitor is used as a ripple filter
in a power supply circuit, or as a filter to bypass low frequency signals, etc. Because this
type of capacitor is comparatively similar to the nature of a coil in construction, it isn't
possible to use for high-frequency circuits. (It is said that the frequency characteristic is
bad.)
The photograph on the left is an example of the different values of electrolytic capacitors
in which the capacitance and voltage differ.
Ceramic Capacitors
Ceramic capacitors are constructed with materials such as titanium acid barium used as
the dielectric. Internally, these capacitors are not constructed as a coil, so they can be
used in high frequency applications. Typically, they are used in circuits which bypass
high frequency signals to ground. These capacitors have the shape of a disk. Their
capacitance is comparatively small. The capacitor on the left is a 100pF capacitor with a
diameter of about 3 mm. The capacitor on the right side is printed with 103, so 10 x
103pF becomes 0.01 F. The diameter of the disk is about 6 mm. Ceramic capacitors
have no polarity. Ceramic capacitors should not be used for analog circuits, because they
can distort the signal.
Variable Capacitors
Variable capacitors are used for adjustment etc. of frequency mainly. On the left in the
photograph is a "trimmer," which uses ceramic as the dielectric. Next to it on the right is
one that uses polyester film for the dielectric. The pictured components are meant to be
mounted on a printed circuit board.
When adjusting the value of a variable capacitor, it is advisable to be careful. One of the
component's leads is connected to the adjustment screw of the capacitor. This means that
the value of the capacitor can be affected by the capacitance of the screwdriver in your
hand. It is better to use a special screwdriver to adjust these components.
Circuit Diagram
with more ROM and RAM as 8049 (2kB ROM/128B RAM) and 8050 (4kB
ROM/256B RAM); with ROMless versions as 8039 and 8040; and 8049 had
also an EPROM version 8749 (the funny thing is, that 8749 came in 1981,
one year after 8051/8751). 8048's were second sourced by a number of
manufacturers, including NEC, Toshiba, and were cloned also behind the
then iron curtain in Czechoslovakia (Tesla MHB8048/8035) and USSR.
Application specific versions of 8048 were also built quite early, with
adding of various peripherals, such as 8-bit ADC in 8022 and a parallel-bus
slave interface in 8041/8042. The MCS-48 family was used in a quite wide
range of applications. One of the first applications of 8048 was in a gaming
console (Magnavox Odyssey2), but there were also more "serious"
applications, for example in one of the first car engine "computerized"
control units. But the biggest hit came when IBM decided to use 8048 in its
original PC keyboard. Although in the AT keyboard IBM used the
(presumably cheaper) 6805, it used 8042 as a co-processor on the
mainboard, communicating with the keyboard. The 8042 is still present in
almost each and every PC even today, but don't search for a chip with
"8042" on it - it is integrated in the chipset. It may come as a surprise to
somebody, but thanks to this fact the 8048 with its derivatives is most
probably the most widespread microcontroller at all.
As in the 70s there were no pdf-s and no world-wide web, datasheets and
other documentation is hardly available over the internet. I believe Intel will
give out a copy if one really wants it (there is a "literature request" form at
their "museum" pages). However, there seems to be a couple of enthusiastic
people, one of the maintaining a wonderful document called Grokking the
MCS-48 System at http://home.mnet-online.de/al/mcs-48/mcs-48.pdf .
8051: THE CLASSICS
In 1980, Intel introduced the successor to 8048, the 8051. Intel made sure
that the transition from the already successful model will be as smooth as
possible. Architecturally, the 8051 is an extension to 8048. Almost every
feature and resource of 8048 is present in 8051 in same or superior form.
4kB ROM and 128B RAM on chip. Pin compatibility was not maintained,
but it was not a real issue. Software compatibility is not binarywise but
source-wise, but that is also acceptable. The preliminary datasheet read:
"Enhanced MCS-48 Architecture". The extensions included code and data
memory extended to 64kB with appropriate support in instruction set and
registers (DPTR), relative conditional and unconditional jumps (conditionals
and DJNZ were constrained within a 256-byte page in 8048), four register
banks instead of two, "unlimited" stack (8048 had stack limited to 16 bytes),
multiple and divide instructions. As for peripherals, second timer was added
and both were extended to 16 bits with multiple modes (including 8-bit
autoreload mode), and an UART (which was a luxury that many lower-end
microcontrollers didn't have even a couple of years ago). The raw clock
sourced by Temic/Atmel). Philips on the other hand employed sourcecompatibility for its XA family, which seems to be adequate for most of the
applications, where legacy code has to be maintained or parallel
development with 8051 is needed; and poses little constraint on the chip
design itself. All in all, the 16-bit versions of 8051 gained far less popularity
than the 8051 and are less widespread.
FLASH FOR THE MASSES
In the 90s, Atmel introduced a derivative of 8051 with Flash code memory,
enabling fast erasure and reprogramming. It enabled to use the productiongrade chip in development, and enabled the chips used in the product to be
reprogrammed when upgrade or a bugfix was needed, cutting down costs. It
brought down the 8051 to the masses - the small "garage" companies and
hobbyists. Besides that, Atmel introduced also 89C2051 with decreased pin
count (and price).This was a smart move, the chip proved to be extremely
popular in many small applications. Today, virtually all manufacturers
produce 8051 derivatives with Flash, most of them able to be programmed
via some few-pin serial interface (called in-situ programming (ISP), SPIstyle or UART-style) and the higher-end versions also able to reprogram
themselves (in-application programming, IAP). MaskROM and EPROM windowed or OTP - seems to become extinct, at least in the mainstream
applications.
NEED FOR SPEED
The need for higher processing power, addressed unsuccessfully by the 16bit versions, has been solved by introducing the high speed derivatives of
8051. The original 12-clock instruction cycle scheme is obviously inefficient
and also the technology progressed enough to achieve higher clock rates
than the original 12MHz. The first derivative addressing this in a radical
way is the now legendary Dallas DS80C320. It featured a 4-clocker core
with incompatible timing, and could be clocked as high as 33MHz.
Unfortunately, it was produced as ROMless only. The following step was
taken by Cygnal, where a single-clock core has been developed. In the toprange models, the clocking is as high as 100MHz, being the fastest 8051s
around.
Today, there are many 8051 derivatives with sped-up cores available. They
can be divided into two groups: the
6-clockers (e.g. the 8xC51RD2) and
2-clockers (Philips LPC9xx) have the same number of instruction cycle per
instruction as the original; while the 4-clockers and singleclockers are
incompatible in this way, requiring recalculation of timing loops if used.
WHERE IS IT GOING?
The 8051 is a sound mcu core with rich history. However, it seems that it is
already over its peak, although it might take quite a lot of time until it will be
completely replaced by most modern microcontrollers. So we now have
superfast 8051 derivatives with loads of internal FLASH and RAM. ISP and
IAP seems to be the standard these days. There are the 8051s built around
advanced analog circuits, mainly high resolution ADC. There are derivatives
suitable for extreme applications high temperature, radiation hardened.
There are softcores around, tuned up, and even open source. There is a
wealth of knowledge and experience, however, it is scattered around and the
newbies tend to get the easier path - competing 8-bit microcontrollers
usually do have a single-stop information resource site, so this knowledge
and experience seems to die out as the "old boys" retire gradually. The price
difference between the high-end 8-bitters and the much more powerful lowend 32-bit RISCs (such as the ARMs) seems to decrease rapidly and will
change eventually, as the 32-bitters are becoming the standard in all but the
least demanding applications.So there is perhaps still a need for the 8051s,
but this need is decreasing and 8051s life cycle is slowly approaching its
end.
CHAPTER 3
DESIGNING & WORKING
SOLDERING
Soldering is the process of joining two metallic conductor the joint where
two metal conductors are to be join or fused is heated with a device called
soldering iron and then as allow of tin and lead called solder is applied
which melts and converse the joint. The solder cools and solidifies quickly
to ensure is good and durable connection between the jointed metal
converting the joint solder also present oxidation.
SOLDERING AND DESOLDERING TECHIQUES:
These are basically two soldering techniques.
Manual soldering with iron.
Mass soldering.
SOLDERING WITH IRON
The surface to be soldered must be cleaned & fluxed. The soldering iron
switched on and bellowed to attain
soldering temperature. The solder in form of wire is allied hear the
component to be soldered and heated with iron. The surface to be soldered is
filled, iron is removed and joint is cold without disturbing.
SOLDER JOINT ARE SUPPOSED TO
1.Provide permanent low resistance path.
2.Make a robust mechanical link between P.C.B. and leads of components.
3.Allow heat flow between component, joining elements and P.C.B.
4.Retain adequate strength with temperature variation. The following
precaution should be taken while soldering:
1.Use always an iron plated copper core tip for soldering iron.
2.Slightly for the tip with a cut file when it is cold.
3.Use a wet sponge to wipe out dirt from the tip before soldering instead of
asking the iron.
4.Tighten the tip screw if necessary before iron is connected to power
supply.
5.Clean component lead and copper pad before soldering.
6.Apply solder between component leads, P.C.B. pattern and tip of soldering
iron.
7.Iron should be kept in contact with the joint for 2-3 seconds only instead of
keeping for very long or very small time.
8.Use optimum quantity of solder
PROBLEM FACED
During soldering, many of the connection become short cktd. So
we desolder the connection and did soldering again.
A leg of the crystal oscillator was broken during mounting. So it
has to be replaced.
LED`s get damaged when we switched ON the supply so we
replace it by the new one.
TROUBLESHOOT
Care should be taken while soldering. There should be no
shorting of joints.
Proper power supply should maintain.
Project should be handled with care since IC are delicate
Component change and check again circuit
CHAPTER 5 CONCULSION
AREA OF APPLICATIONS
REFRENCES
1.Collins, J.; Pymm, P, Replacement of the station data logger at
Hunterston B nuclear power station,
Retrofit and Upgrading of Computer Equipment in Nuclear
Power Stations, IEE Colloquium on 11 Mar 1991 Page(s):11 - 15.
2.Engel berg, S.; Kaminsky, T.; Horesh, M.;
Instrumentation notes - A USB-Enabled, FLASH-Disk-Based
DASVol. 10, Issue 2, April 2007 Page(s):63 66.
, Instrumentation & Measurement Magazine, IEEE,
3.Erdem, H, Design and implementation of data acquisition for
fuzzy logic controller
Industrial Technology, 2002. IEEE ICIT '02. 2002 IEEE
International Conference on 11-14 Dec. 2002 Page(s):199 - 204
vol.1.
4.Kuchta, R.; Stefan, P.; Barton, Z.; Vrba, R.; Sveda, M, Wireless
temperature data logger,
Sensors and the International Conference on new Techniques in
Pharmaceutical and Biomedical Research, 2005 Asian Conference
on 5-7 Sept. 2005 Page(s):208 212.
5.Lee Tat Man, Recording power demand characteristics and
harmonic pollution by a general-purpose data logger,
Advances in Power System Control, Operation and Management,
1991. APSCOM-91., 1991 International Conference on 5-8 Nov
1991 Page(s):737 - 743 vol.2.
6.Luharuka, E.; GAO, R.X., A microcontroller-based data
acquisition for physiological sensing
, Instrumentation and Measurement Technology Conference,
2002. IMTC/2002. Proceedings of the 19th IEEE, 21-23 May
2002 Page(s):175 - 180 vol.1
WEBSITES
www.atmel.com
www.seimens.com
www.philipsemiconductors.com
www.howstuffworks.com
www.alldatasheets.com
www.efyprojects.com
www.thomson.com/learning
APPENDIX
For further details regarding to software and hardware and any further
queries contact to the given address.
HBeonLabs
info@hbeonlabs.com
training@hbeonlabs.com
www. hbeonlabs.com