Vous êtes sur la page 1sur 57

WIDE RANGE DIGITAL TACHOMETER (WRDT)

1.0

INTRODUCTION

Digital tachometer is an optical encoder that determines the angular velocity of


a rotating shaft or motor. Digital tachometers are used in different applications such as
automobiles, aeroplanes, and medical and instrumentation applications.
The word tachometer is derived from two Greek words: tachos means speed
and metron means to measure. It works on the principle of a tachometer generator,
which means when a motor is operated as a generator, it produces the voltage according
to the velocity of the shaft. It is also known as revolution-counter, and its operating
principle can be electromagnetic, electronic or optical-based. Power, accuracy, RPM
range, measurements and display are the specifications of a tachometer. Tachometers
can be analogue or digital indicating meters; however, this article focuses only on the
digital tachometers.

1.1 TYPES OF DIGITAL TACHOMETER


Digital tachometers are classified into four types based on the data acquisition
and measurement techniques.
Based on the data acquisition technique, the tachometers are of the following types:
1. Contact type
2. Non-Contact type
Based on the measurement technique, the tachometers are of the following types:
1. Time measurement
2. Frequency measurement

Fig 1.1.A: Contact type

Fig 1.1.B: Non-contact type

WIDE RANGE DIGITAL TACHOMETER (WRDT)

1.1.A CONTACT TYPE


A tachometer which is in contact with the rotating shaft is known as contact type
tachometer. This kind of tachometer is generally fixed to the machine or electric motor.
An optical encoder or magnetic sensor can also be attached to this so that it measures
its RPM.
Digital Tachometers are capable of measuring low-speeds at 0.5 rpm and high
speed at 10,000 rpm and are equipped with a storage pocket for the circumferential
measurement. The specifications of this tachometer are LCD 5 digit display, operational
temperature range of 0 to + 40oC, temperature storage range of 20 to + 55o C and
rotating speed of about 0.5 to 10,000 rpm.
1.1.B NON-CONTACT TYPE
A tachometer that does not need any physical contact with the rotating shaft
is called as noncontact digital tachometer. In this type, a laser or an optical disk is
attached to the rotating shaft, and it can be read by an IR beam or laser, which is directed
by the tachometer.
This type of tachometer can measure from 1 to 99,999 rpm; the measurement
angle is less than 120 degrees, and the tachometer has a five-digit LCD display. These
types of tachometers are efficient, durable, accurate, and compact, and also visible from
long distance
1.1.C TIME MEASUREMENT
A tachometer that calculates the speed by measuring the time interval between
incoming pulses is known as time-based digital tachometer. The resolution of this
tachometer is independent of the speed of the measurement, and it is more accurate for
measuring low speed.
1.1.D FREQUENCY MEASUREMENT
A tachometer that calculates the speed by measuring the frequency of the pulses
is called as frequency-based digital tachometer. This type of tachometer is designed by
using a red LED, and the revolution of this tachometer depends on the rotating shaft,
and it is more accurate for measuring high speed. These tachometers are of low-cost
and high-efficiency, which is in between 1Hz-12 KHz.

The basis of our project is


Non-contact type + Frequency measurement

WIDE RANGE DIGITAL TACHOMETER (WRDT)

1.2 OTHER PRACTICAL TACHOMETERS


1.2.A TACHOGENERATOR
A micro-electric machine that is used to convert, the rotating speed and the shaft
values of a machine into an electric signal is known as tachometer generator. The
operation of the tachometer generator is based on the principle that the angular velocity
of rotor is proportional to the generated EMF if the excitation flux is constant.
These tachometers are specified with generated voltage, accuracy, maximum
speed, ripples and operating temperature. This kind of tachometer generators are used
as sensors in various automobile and electromechanical computer devices. The
generators can be AC or DC types.

Fig 1.2.A: Tachogenerator

1.2.B ELECTRONIC TACHOMETER


A tachometer made purely from electronic components and is used to measure
the speed of an engine or any other moving object in revolutions per minute is known
as an electronic tachometer. Electronic tachometers are used in the dashboard of a car
for measuring the driving speed. These tachometers are light weight, easy to view and
accurate under all conditions. They are usually not potable.

Fig 1.2.B: Electronic tachogenerator

WIDE RANGE DIGITAL TACHOMETER (WRDT)

1.3 INTEL FAMILY 8051 MOCROCONTROLLER


The Intel MCS-51 (commonly referred to as 8051) is a Harvard
architecture, CISC instruction set, single chip microcontroller (C) series which was
developed by Intel in 1980 for use in embedded systems.[1] Intel's original versions were
popular in the 1980s and early 1990s and enhanced binary compatible derivatives
remain popular today.
Intel's original MCS-51 family was developed using NMOS technology, but
later versions, identified by a letter C in their name (e.g.89C51) used CMOS technology
and consume less power than their NMOS predecessors. This made them more suitable
for battery-powered devices.

Fig 1.3: The original intel 8051 (aka mcs-51) chip

The family was continued in 1996 with the enhanced 8-bit MCS-151 and the
8/16/32-bit MCS-251 family of binary compatible microcontrollers.[2] While Intel no
longer manufactures the MCS-51, MCS-151 and MCS-251 family,
enhanced compatible derivatives made by numerous vendors remain popular today.
Some derivatives integrate a digital signal processor (DSP). In addition to these
physical devices, several companies also offer MCS-51 derivatives as IP cores for use
in FPGAs or ASICs designs.

1.4 IR Transmitter Receiver


Infrared (IR) transmitters and receivers are present in many different devices,
though they are most commonly found in consumer electronics. The way this
technology works is that one component flashes an infrared light in a particular pattern,
which another component can pick up and translate into an instruction. These
transmitters and receivers are found in remote controls and all different types of
4

WIDE RANGE DIGITAL TACHOMETER (WRDT)

devices, such as televisions and DVD players. Peripheral devices that include this
technology can also allow a computer to control various other consumer electronics.

Fig 1.4: Optical Transducer

Most common consumer electronic remote controls use infrared light. They
typically generate infrared using light emitting diodes (LEDs), and the main component
of a receiver unit is usually a photodiode. A remote control flashes a pattern of invisible
light, which is picked up and then turned into an instruction by the receiver module.
The parts necessary to construct transmitter and receiver are typically inexpensive, but
these systems are limited to line of sight operation.
We have conceptualised this idea by replacing an IR diode with a normal LED,
because IR gets reflected from all objects, while the requirement in our project is the
reflection of light only from a certain surface, like a reflective one.

1.5 COMPARATOR
To use operational amplifiers in open loop as comparators is quite common.
This especially applies when an op amp is already used in the application, giving the
user the opportunity to use a dual channel (or quad channel) op amp which can save
space in the application. Thesis possible even if a better alternative is to use comparators
that are optimized for this purpose. The op amp is a device which is designed to be used
with negative feedback. A major concern is to ensure the stability of such a
configuration.

Fig 1.5: comparator symbol and characteristics


5

WIDE RANGE DIGITAL TACHOMETER (WRDT)

Other parameters like slew rate and maximum bandwidth are trade-offs with
current consumption and the architecture of an op amp. Comparators, on the other hand,
are designed to operate in open loop configuration without any negative feedback. In
most cases, they are not internally compensated. The speed (propagation delay) and
slew rate (rise and fall time) are maximized. The overall gain is also usually higher. The
use of an op amp as a comparator leads to an optimized situation, where current
consumption versus speed ratio is low. The opposite is even worse. Normally, a
comparator cannot be used instead of an op amp. Most probably, the comparator shows
instability under negative feedback. Generally speaking, comparators and operational
amplifiers cannot substitute each other except for low performance designs.

1.6 Electronic Displays


Electronic Displays are electronic equipment used at the final stage of a circuit
to display the output. The major types of electronic displays used are described in the
following sections.
1.6.A LED Display
A seven-segment display (SSD), or seven-segment indicator, is a form of
electronic display device for displaying decimal numerals that is an alternative to the
more complex dot matrix displays.
Seven-segment displays are widely used in digital clocks, electronic meters,
basic calculators, and other electronic devices that display numerical information.
The seven elements of the display can be lit in different combinations to
represent the Arabic numerals. Often the seven segments are arranged in
an oblique (slanted) arrangement, which aids readability. In most applications, the
seven segments are of nearly uniform shape and size (usually elongated hexagons,
though trapezoids and rectangles can also be used), though in the case of adding
machines, the vertical segments are longer and more oddly shaped at the ends in an
effort to further enhance the readability.

fig 1.6.A : 7 Seg LED

Types of seven segment LED Displays


i)

Common Anode Display

ii)

Common Cathode Display

WIDE RANGE DIGITAL TACHOMETER (WRDT)

1.6.B LCD Displays


A liquid crystal display is a special thin flat panel that can let light go through
it, or can block the light. (Unlike an LED it does not produce its own light). The panel
is made up of several blocks, and each block can be in any shape. Each block is filled
with liquid crystals that can be made clear or solid, by changing the electric current to
that block. Liquid crystal displays are often abbreviated LCDs.

Fig 1.6.B : LCD Display

Liquid crystal displays are often used in battery-powered devices, such as digital
watches, because they use very little electricity. They are also used for flat screen TV's.
Many LCDs work well by themselves when there is other light around (like in a lit
room, or outside in daylight). For smartphones, computer monitor, TV's and some other
purposes, a back-light is built into the product.
Though LCD display could have been easily interfaced, we chose LED ahead
for simplicity and compactness. Also LCD needs more stabilisation time while all you
need to do is provide a delay for repeatedly showing the result due to perception of
vision.

1.7 HEAT SINK


In electronic systems, a heat sink is a passive heat exchanger that cools a device
by dissipating heat into the surrounding medium. In computers, heat sinks are used to
cool central processing units or graphics processors.

Fig 1.7: Power Transistor Heat Sink

WIDE RANGE DIGITAL TACHOMETER (WRDT)

A heat sink is designed to maximize its surface area in contact with the cooling
medium surrounding it, such as the air. Air velocity, choice of material, protrusion
design and surface treatment are factors that affect the performance of a heat sink. Heat
sink attachment methods and thermal interface materials also affect the die temperature
of the integrated circuit. Thermal adhesive or thermal grease improve the heat sink's
performance by filling air gaps between the heat sink and the heat spreader on the
device.

WIDE RANGE DIGITAL TACHOMETER (WRDT)

2.0 BLOCK DIAGRAM

Fig 2.0: Block Diagram of WRDT

WIDE RANGE DIGITAL TACHOMETER (WRDT)

2.1 OPTOCOUPLER
An optical coupler, also called opt-isolator, optocoupler, optocoupler,
photocoupler or optical isolator, is a passive optical component that can combine or
split transmission data (optical power) from optical fibers. It is an electronic device
which is designed to transfer electrical signals by using light waves in order to provide
coupling with electrical isolation between its input and output. The main purpose of an
optocoupler is to prevent rapidly changing voltages or high voltages on one side of a
circuit from distorting transmissions or damaging components on the other side of the
circuit. An optocoupler contains a light source often near an LED which converts
electrical input signal into light, a closed optical channel and a photosensor, which
detects incoming light and either modulates electric current flowing from an external
power supply or generates electric energy directly. The sensor can either be a
photoresistor, a silicon-controlled rectifier, a photodiode, a phototransistor or a triac.

Fig 2.1 : IR-Photo Diodes as Optocoupler

This Sensor module works on the principle of Reflection of Infrared Rays from
the incident surface. A continuous beam of IR rays is emitted by the IR LED. Whenever
a reflecting surface (white/obstacle) comes in front of the Receiver (photo diode), these
rays are reflected back and captured. Whenever an absorbing surface (Black/No
Obstacle) comes in front of the Receiver, these rays are absorbed by the surface and
thus unable to be captured.
FEATURES:
1)
2)
3)
4)

Active low on object detection


Easy interface to connector
Indicator LED
Potentiometer for changing the range of detection

10

WIDE RANGE DIGITAL TACHOMETER (WRDT)

2.2 SIGNAL CONDITIONER CIRCUIT


The signal conditioner circuit performs very vital role in ant electronic circuitry.
Signal conditioning means manipulating the available analogue signal in such a way
that it meets the requirement of the next stage of circuit for further processing. Here
QUAD COMPARATOR DIP IC LM339 is used as a Schmitt trigger, this Schmitt
trigger is used to convert the artery available signal into a perfect square wave to meet
the need of the further frequency metre to further process
The fundamental idea is as shown here-

Fig 2.2
[ Note: Single comparator is used. The IC is used as A to D convertor
The comparator is used as Schmitt trigger, providing the same frequency that
of the input.]

2.2.A INPUT
Input is the measuring quantity. In our project input is the reflecting surface
which is attached to the motor. When the rotational body rotates, the reflecting surface
will repeat equal times the rotating body rotates. This reflecting surface will provide an
appropriate reflected light on the surface of the optical transducer.
2.2.B OUTPUT
Any system without output is of no worth. The output of our system is the speed
of the rotating machine. The speed of machine is displayed in rotation per seconds. A
4 digit 7 segment display is used to show the speed count. This display is interfaced
with AT89S51 microcontroller. It simply shows display count of the frequency of the
number of pulses.

2.3 POWER UNIT


Power is the rate of doing work. It is equivalent to an amount of energy
consumed per unit time. In the SI system, the unit of power is the joule per second (J/s),
known as the watt in honour of James Watt, the eighteenth-century developer of the
steam engine.

11

WIDE RANGE DIGITAL TACHOMETER (WRDT)

The integral of power over time defines the work performed. Because this
integral depends on the trajectory of the point of application of the force and torque,
this calculation of work is said to be path dependent.

Fig 2.3: Power Unit

The same amount of work is done when carrying a load up a flight of stairs
whether the person carrying it walks or runs, but more power is needed for running
because the work is done in a shorter amount of time. The output power of an electric
motor is the product of the torque that the motor generates and the angular velocity of
its output shaft. The power involved in moving a vehicle is the product of the traction
force of the wheels and the velocity of the vehicle. The rate at which a light bulb
converts electrical energy into light and heat is measured in wattsthe higher the
wattage, the more power, or equivalently the more electrical energy is used per unit
time.

2.4 SIGNAL PROCESSOR (Schmitt Trigger)


As the microcontroller cannot deal with analog data (certainly the 8051), some
way must be established in order to help the controller count the pusles. This job is done
by the signal processor block.

Fig 2.4: Schmitt trigger characteristics


12

WIDE RANGE DIGITAL TACHOMETER (WRDT)

The signal processor not only does the job of A-D conversion, it also smoothens
the waveform with a Schmitt trigger employed using comparator, and also amplifies
the signal level.
[Note : The comparator doesnt amplify in reality, but it does the job of comparing to
inputs (within saturation limits), assuming that input signal is quite weak after comparison it
gives the output either high or low (or +vsat, vsat depending on the comparator used), so we
can say that the signal is considerably amplified in other sense.]

2.5 DISPLAY DRIVER


Although there are advanced and complex display driver ICs available, they
increase the hardware and also the cost making the circuit bulkier. Same task can be
done with the help of a simple transistor (NPN BJT) driver.
Here , the base drive ( base current ) is deliberately chosen much higher than
the Ib (sat) rating (available in the datasheet ) . Due to this the collector current can no
longer be given as Ic = * Ib , but by Vcc/ Rc . By choosing small value of Rc (rather
appropriate), collector current can be set as required. This ultimately increases the
driving capacity of the transistor.

Fig 2.4: Transistor Driver


Note: 1. For other displays like lcd, the transistor driver becomes bulkier as the number
Pins is more.

2.Ic should not exceed a certain value Icmax, which increases heating and may
lead to thermal runaway and spoil the display as well as entire circuitry
although heat sink may be present.

13

WIDE RANGE DIGITAL TACHOMETER (WRDT)

2.6 DISPLAY (7 SEGMENT LED)


As the controller used is only 8-bit, the maximum data it can handle is FFH i.e.
255 decimal. Thus maximum speed in RPM that could be measure is restricted to
only 255 RPM, which is a serious drawback.
Thus we decided to measure speed in RPS instead of in RPM. This increased
the range of angular frequency that could be measured immensely. The equivalent
RPM count that could be measured comes out to be around 15K RPM, a major
drawback resulted into a major advantage.
This is the unique feature of our project, and thus we have named it WIDE
RANGE DIGITAL TACHOMTER (WRDT). One output of many test readings
taken is shown below.

Fig 2.6: Circuit functioning at high frequency

14

WIDE RANGE DIGITAL TACHOMETER (WRDT)

3.0 VITAL COMPONENTS NOT MENTIONED IN THE


BLOCK DIAGRAM
3.1 CRYSTAL OSCILLATOR
A crystal oscillator is an electronic oscillator circuit that uses the mechanical
resonance of a vibrating crystal of piezoelectric material to create an electrical signal
with a very precise frequency. This frequency is commonly used to keep track of time
(as in quartz wristwatches), to provide a stable clock signal for digital integrated
circuits.

Fig 3.1.A Crystal Packages

Quartz crystals are manufactured for frequencies from a few tens of kilohertz to
hundreds of megahertz. More than two billion crystals are manufactured annually.
Although RC, LC or any other oscillatory circuit can be used, the crystal
oscillator by far gives best result for Digital Sequential Circuit. . Note the 22pF
capacitors shown in below figure.
Circuit configuration for crystal as CLOCK

Fig 3.1.B : Crystal internal configuration

The optimum load capacitance for a given crystal is specified by the


manufacturer. Printed circuit has its own stray capacitance, hence a capacitors of
particular value used. Usually value of capacitors are same.

15

WIDE RANGE DIGITAL TACHOMETER (WRDT)

3.2 7805 Regulator IC


7805 is a voltage regulator integrated circuit. It is a member of 78xx series of
fixed linear voltage regulator ICs. The voltage source in a circuit may have fluctuations
and would not give the fixed voltage output. The voltage regulator IC maintains the
output voltage at a constant value. The xx in 78xx indicates the fixed output voltage it
is designed to provide. 7805 provides +5V regulated power supply. Capacitors of
suitable values can be connected at input and output pins depending upon the respective
voltage levels.

Fig 3.2 : 7805 Package

Pin No

Function

Name

1
2
3

Input voltage (5V-18V)


Ground (0V)
Regulated output; 5V (4.8V-5.2V)

Input
Ground
Output

IMPORTANT RATINGS:
SPECIFICATION
IOL(MAX)
VI
VDROP
RR
RO
ISC
IPK
IQ
REGLINE
REGLOAD

DESCRIPTION
MAX LOAD CURRENT
RANGE OF INPUT
VOLTAGE
DROPOUT VOLTAGE
RIPPLE REJECTION
OUTPUT RESISTANCE
SHORT CIRCUIT
CURENT
PEAK CURRENT
QUISCENT CURRENT
LINE REGULATION
LOAD REGULATION

RATING
1A
5V 18V
2V TYP
73 dB TYP
15m
230 mA TYP
2.2 A TYP
8 mA TYP
1.6 mV (VI= 8-12V)
4.0 mV(IO= 250750mA)

16

WIDE RANGE DIGITAL TACHOMETER (WRDT)

3.3 HEAT SINK


In electronic systems, a heat sink is a passive heat exchanger that cools a device
by dissipating heat into the surrounding medium. In computers, heat sinks are used to
cool central processing units or graphics processors.

Fig 3.3: Heat Sink mounted on 7805

A heat sink is designed to maximize its surface area in contact with the cooling
medium surrounding it, such as the air. Air velocity, choice of material, protrusion
design and surface treatment are factors that affect the performance of a heat sink. Heat
sink attachment methods and thermal interface materials also affect the die temperature
of the integrated circuit. Thermal adhesive or thermal grease improve the heat sink's
performance by filling air gaps between the heat sink and the heat spreader on the
device.

3.4 9V Battery and Connector


The most common form of nine-volt battery is commonly called the transistor
battery which was introduced for the early transistor radios. It has a rectangular prism
shape with rounded edges and a polarized snap connector at the top. This type is
commonly used in pocket radios, paintball guns, and small electronic devices. They are
also used as backup power to keep the time in certain electronic clocks. This format is
commonly available in primary carbon-zinc and alkaline chemistry, in primary lithium
iron disulfide, and in rechargeable form in nickel-cadmium, nickel-metal hydride and
lithium-ion. Mercury oxide batteries in this form have not been manufactured in many
years due to their mercury content. This type is designated NEDA 1604, IEC 6F22 and
"Ever Ready" type PP3 (zinc-carbon) or MN1604[1] 6LR61 (alkaline).
Most nine-volt alkaline batteries are constructed of six individual 1.5V LR61
cells enclosed in a wrapper. These cells are slightly smaller than LR8D425 AAAA cells

17

WIDE RANGE DIGITAL TACHOMETER (WRDT)

and can be used in their place for some devices, even though they are 3.5 mm shorter
Carbon-zinc types are made with six flat cells in a stack, enclosed in a moisture-resistant
wrapper to prevent drying.

Fig 3.4: Standard 9V Battery and Battery Connector

The battery has both terminals in a snap connector on one end. The smaller
circular (male) terminal is positive, and the larger hexagonal or octagonal (female)
terminal is the negative contact. The connectors on the battery are the same as on the
connector itself; the smaller one connects to the larger one and vice versa.[5] The same
snap style connector is used on other battery types in the Power Pack (PP) series.
Battery polarization is normally obvious since mechanical connection is usually only
possible in one configuration. A problem with this style of connector is that it is very
easy to connect two batteries together in a short circuit, which quickly discharges both
batteries, generating heat and possibly a fire.[6] An advantage is that several nine-volt
batteries can be connected to each other in series to provide higher voltages.

3.5 Light Emitting Diode


A light-emitting diode (LED) is a two-lead semiconductor light source. It is
a pn-junction diode, which emits light when activated.[4]When a suitable voltage is
applied to the leads, electrons are able to recombine with electron holes within the
device, releasing energy in the form of photons.

Fig 3.5: A White bright 10mm LED

18

WIDE RANGE DIGITAL TACHOMETER (WRDT)

This effect is called electroluminescence, and the colour of the light


(corresponding to the energy of the photon) is determined by the energy band gap of
the semiconductor. Led is the very important part of our project .We have used 10mm
bright white led in our WRDT.

3.6 CIRCUIT BOARD


Although General Purpose Board can be used, it only complicates the
design due a huge number of wires which makes the circuit congested. However a more
professional but difficult approach involves the use of Copper Cladded PCB for the
design of tracks. This is done by special technique Etching to be discussed thoroughly
in section

Fig 3.6.A : Copper Cladded Board (Before Etching)

Fig 3.6.B: Etched PCB

19

WIDE RANGE DIGITAL TACHOMETER (WRDT)

4.0 POWER SUPPLY UNIT


DC Power Supplies provide direct current at varying voltage and current to a
device under test. These devices are useful for testing designs in real world power
situations and can act as a constant battery source when testing DC devices. Power
supplies come in variety of configurations and can be used for constant-voltage or
constant-current. There are also units with multiple outputs so that one source can
supply several outputs to the device under test. Loads are used to test the internal power
supply of a unit without risking other elements of the unit.

4.1 CIRCUIT DIAGRAM

Fig 4.1: Power unit

4.2 9V BATTERY
The most common form of nine-volt battery is commonly called the transistor
battery which was introduced for the early transistor radios. It has a rectangular prism
shape with rounded edges and a polarized snap connector at the top. This type is
commonly used in pocket radios, paintball guns, and small electronic devices. They are
also used as backup power to keep the time in certain electronic clocks. This format is
commonly available in primary carbon-zinc and alkaline chemistry, in primary lithium
iron disulphide, and in rechargeable form in nickel-cadmium, nickel-metal hydride and
lithium-ion. Mercury oxide batteries in this form have not been manufactured in many
years due to their mercury content. This type is designated NEDA 1604, IEC 6F22 and
"Ever Ready" type PP3 (zinc-carbon) or MN1604 6LR61 (alkaline).
Most nine-volt alkaline batteries are constructed of six individual 1.5V LR61
cells enclosed in a wrapper.[2] These cells are slightly smaller than LR8D425 AAAA
cells and can be used in their place for some devices, even though they are 3.5 mm
shorter. Carbon-zinc types are made with six flat cells in a stack, enclosed in a
moisture-resistant wrapper to prevent drying.
20

WIDE RANGE DIGITAL TACHOMETER (WRDT)

Fig 4.2: Standard 9V Battery and Battery Connector

The battery has both terminals in a snap connector on one end. The smaller
circular (male) terminal is positive, and the larger hexagonal or octagonal (female)
terminal is the negative contact. The connectors on the battery are the same as on the
connector itself; the smaller one connects to the larger one and vice versa.[5] The same
snap style connector is used on other battery types in the Power Pack (PP) series.
Battery polarization is normally obvious since mechanical connection is usually only
possible in one configuration. A problem with this style of connector is that it is very
easy to connect two batteries together in a short circuit, which quickly discharges both
batteries, generating heat and possibly a fire. An advantage is that several nine-volt
batteries can be connected to each other in series to provide higher voltages.

4.3 LM7805 VOLTAGE REGULATOR IC

Fig 4.3: 7805 with filtering components

We have studied the LM7805 voltage regulator IC in depth in section 3.2. It is


a member of 78xx family. Similar device 79xx can be used in case negative regulated
power supplies are desirable. The ratings mentioned in section 3.2 are critical to
operation of the devices and thus must be paid with massive attention.

21

WIDE RANGE DIGITAL TACHOMETER (WRDT)

4.4 FILTERING ELEMENTS


A filter is a device that removes unwanted signal and allows only desired signal
to pass. By looking at the definition, filter may seem to be a complex circuit, but here
in this case it is just a mere combination of a few capacitors.
At input side to LM7805, line frequency of AC mains must be filtered with a
large value capacitance as input ripple is quite large. For this a 2200uF capacitor is used
which further enhanced by connecting 2 100nF capacitors in parallel which eliminate
supply frequency harmonics.
At the output side to LM7805, as the Ripple Rejection Ratio of IC is good as
shown in the data sheet, only a small ripple is present at the output which is considerably
eliminated by a parallel combination 2 100nF capacitors.

An LED can be connected with a suitable series resistor to indicate ON state of


the supply to make it look more attractive.

22

WIDE RANGE DIGITAL TACHOMETER (WRDT)

5.0 SIGNAL CONDITIONER


A signal conditioner is a circuit that conditions analogue signal in such a way
that it can be used to drive any A to D converter or any analogue IC. Here as the pulses
are only a few microvolts high, they must be conditioned to some extent. This is done
with a powerful analogue amplifier called Operational Amplifier.
In electronics, signal conditioning means manipulating an analogue signal in
such a way that it meets the requirements of the next stage for further processing. Most
common use is in analogue-to-digital converters.
In control engineering applications, it is common to have a sensing stage (which
consists of a sensor), a signal conditioning stage (where usually amplification of the
signal is done) and a processing stage (normally carried out by an ADC and a microcontroller). Operational amplifiers (op-amps) are commonly employed to carry out the
amplification of the signal in the signal conditioning stage.
Signal conditioning can include amplification, filtering, converting, range
matching, isolation and any other processes required to make sensor output suitable for
processing after conditioning. We have used LM339 as a comparator based signal
conditioner. Types of signal conditioning are listed below.
5.1 Filtering
Filtering is the most common signal conditioning function, as usually not all the
signal frequency spectrum contains valid data. The common example is 60 Hz AC
power lines, present in most environments, which will produce noise if amplified.
5.2 Amplifying
Signal amplification performs two important functions: increases the resolution
of the input signal, and increases its signal-to-noise ratio.[citation needed] For example, the
output of an electronic temperature sensor, which is probably in the millivolts range is
probably too low for an analog-to-digital converter (ADC) to process directly. In this
case it is necessary to bring the voltage level up to that required by the ADC.
Commonly used amplifiers on signal on conditioning include sample and
hold amplifiers, peak detectors, log amplifiers, antilog amplifiers, instrumentation
amplifiers and programmable gain amplifiers.

23

WIDE RANGE DIGITAL TACHOMETER (WRDT)

5.3 Isolation
Signal isolation must be used in order to pass the signal from the source to the
measurement device without a physical connection: it is often used to isolate possible
sources of signal perturbations. Also notable is that it is important to isolate the
potentially expensive equipment used to process the signal after conditioning from the
sensor.
Magnetic or optic isolation can be used. Magnetic isolation transforms the
signal from voltage to a magnetic field, allowing the signal to be transmitted without a
physical connection (for example, using a transformer). Optic isolation takes an
electronic signal and modulates it to a signal coded by light transmission (optical
encoding), which is then used for input for the next stage of processing.

Fig 5.4.A: WRDT signal conditioner

Fig 5.4.B: LM339 Voltage Comparator


24

WIDE RANGE DIGITAL TACHOMETER (WRDT)

5.4 VOLTAGE COMPARATOR


Perhaps the most important block in any Signal Conditioning Circuit, a voltage
comparator also acts like an amplifier, waveform smoothers and also level detector. As
due to reflection of light from the rotor, the photo diode undergoes continuous
transitions, i.e. from ON to OFF and OFF to ON. Thus some transition loss or noise is
present. This is eliminated by using a comparator which compares the photo diode OFF
voltage will a reference standard non-inverting terminal voltage. The moment the photo
diode conducts and sends a low pulse, comparator senses the change at the inverting
terminal and changes the output abruptly Thus a much smoother waveform is obtained
at the output of the comparator that is the signal conditioner of our project. The figures
below illustrate this action.

.
Fig 5.4.C: Distorted Input to Signal Conditioner

Fig 5.4.D: Clean and Sharp Digitalized Output Signal Conditioner

25

WIDE RANGE DIGITAL TACHOMETER (WRDT)

6.0 TIME DELAY USING IC 555


Delay can be produce with both software and hardware control, but using a
simple hardware IC 555 considerably simplifies the circuit. It is widely used in
monostable (one shot) mode to generate time delay. We have not used the hardware
delay as it results in increasing cost, complexity in PCB design, reduces the
compactness of the entire machine.

6.1 SCHEME 1 (EXTERNAL DELAY WITH 555)

Fig 6.1.A: Time Delay Circuit

Fig 6.1.B: Output Waveforms for Time Delay Circuit


26

WIDE RANGE DIGITAL TACHOMETER (WRDT)

monostable multivibrator (MMV) often called a one-shot multivibrator, is a


pulse generator circuit in which the duration of the pulse is determined by the R-C
network,connected externally to the 555 timer. In such a vibrator, one state of output is
stable while the other is quasi-stable (unstable). For auto-triggering of output from
quasi-stable state to stable state energy is stored by an externally connected capacitor
C to a reference level. The time taken in storage determines the pulse width. The
transition of output from stable state to quasi-stable state is accomplished by external
triggering.
Pin 1 is grounded. Trigger input is applied to pin 2. In quiescent condition of
output this input is kept at + VCC. To obtain transition of output from stable state to
quasi-stable state, a negative-going pulse of narrow width (a width smaller than
expected pulse width of output waveform) and amplitude of greater than + 2/3 VCC is
applied to pin 2. Output is taken from pin 3. Pin 4 is usually connected to + VCC to
avoid accidental reset. Pin 5 is grounded through a 0.01 u F capacitor to avoid noise
problem. Pin 6 (threshold) is shorted to pin 7. A resistor RA is connected between pins
6 and 8. At pins 7 a discharge capacitor is connected while pin 8 is connected to supply
VCC.

6.2 SCHEME 2 (INTERNAL USING PRAGRAM)


In an 8051 microcontroller, it requires 12 cycles of the processor clock for
executing a single instruction cycle. For an 8051 microcontroller clocked by a 12MHz
crystal, the time taken for executing one instruction cycle is 1S and it is according to
the equation, Time for 1 instruction cycle= 12 /12MHz = 1S. The shortest instructions
will execute in 1S and other instructions will take 2 or more micro seconds depending
up on the size of the instruction. Thus a time delay of any magnitude can be generated
by looping suitable instructions a required number of time.

Fig 6.2.A: Delay using register parameters

27

WIDE RANGE DIGITAL TACHOMETER (WRDT)

Anyway, keep one thing in mind that software delay is not very accurate
because we cannot exactly predict how much time it takes for executing a single
instruction. Generally an instruction will be executed in the theoretical amount of time
but sometimes it may advance or retard due to other reasons. Therefore it is better to
use 8051 Timer for generating delay in time critical applications. However software
delay routines are very easy to develop and well enough for less critical and simple
applications.

Fig 6.2.B: Delay is using NOP instruction

28

WIDE RANGE DIGITAL TACHOMETER (WRDT)

7.0 ATMEL AT89S51 MICROCONTOLLER


7.1 ARCHITECTURE OVERVIEW

Fig 7.1: AT89S51 Architecture

29

WIDE RANGE DIGITAL TACHOMETER (WRDT)

7.2 Port Structures and Operation


All four ports in the AT89C51 and AT89C52 are bidirectional. Each consists of
a latch (Special Function Registers P0 through P3), an output driver, and an input
buffer. The output drivers of Ports 0 and 2, and the input buffers of Port 0, are used in
accesses to external memory. In this application, Port 0 outputs the low byte of the
external memory address, time-multiplexed with the byte being written or read. Port 2
outputs the high byte of the external memory address when the address is 16 bits wide.
Otherwise the Port 2 pins continue to emit the P2 SFR content. All the Port 3 pins, and
two Port 1 pins (in the AT89C52) are multifunctional. The alternate functions can only
be activated if the corresponding bit latch in the port SFR contains a 1. Otherwise the
port pin is stuck at 0. It has less complex feature than other microprocessor.

7.3 AT89S51 PIN DIAGRAM

Fig 7.3: Pin Diagram of AT89S51

30

WIDE RANGE DIGITAL TACHOMETER (WRDT)

7.4 PIN DESCRIPTION AT89S51

Fig 7.4: Pin Description of AT89S51

31

WIDE RANGE DIGITAL TACHOMETER (WRDT)

7.5 INSTRUCTION SET AND OTHER VENDORS (8051)

Fig 7.5.A: 8051 Instruction Set

Fig 7.5.B: Famous 8051 Vendors Worldwide


32

WIDE RANGE DIGITAL TACHOMETER (WRDT)

8.0 LM339 VOLTAGE COMPARATOR


8.1 LM339 PIN DIAGRAM

Fig 8.1: LM339 Pin Diagram

8.2 LM339 DESCRIPTION


These devices consist of four independent voltage comparators that are designed
to operate from a single power supply over a wide range of voltages. Operation from
dual supplies also is possible, as long as the difference between the two supplies is 2 V
to 36 V, and VCC is at least 1.5 V more positive than the input common-mode voltage.
Current drain is independent of the supply voltage. The outputs can be connected to
other open-collector outputs to achieve wired-AND relationships.

33

WIDE RANGE DIGITAL TACHOMETER (WRDT)

8.3 LM339 PIN DESCRIPTION

Fig 8.3: LM339 Pin Description

8.4 WORKING
A dedicated voltage comparator will generally be faster than a general-purpose
comparator pressed into service as a comparator. A dedicated voltage comparator may
also contain additional features such as an accurate, internal voltage reference, an
adjustable hysteresis and a clock gated input.
A dedicated voltage comparator chip such as LM339 is designed to interface
with a digital logic interface (to a TTL or a CMOS). The output is a binary state often
used to interface real world signals to digital circuitry (see analog to digital converter).
If there is a fixed voltage source from, for example, a DC adjustable device in the signal
path, a comparator is just the equivalent of a cascade of amplifiers. When the voltages
are nearly equal, the output voltage will not fall into one of the logic levels, thus analog
signals will enter the digital domain with unpredictable results. To make this range as
small as possible, the amplifier cascade is high gain. The circuit consists of
mainly Bipolar transistors. For very high frequencies, the input impedance of the stages
is low. This reduces the saturation of the slow, large P-N junction bipolar transistors
that would otherwise lead to long recovery times. Fast small Schottky diodes, like those
found in binary logic designs, improve the performance significantly though the
performance still lags that of circuits with amplifiers using analog signals. Slew rate
has no meaning for these devices. For applications in flash ADCs the distributed signal
across eight ports matches the voltage and current gain after each amplifier, and
resistors then behave as level-shifters.
34

WIDE RANGE DIGITAL TACHOMETER (WRDT)

9.0 OVERALL CIRCUIT IN ACTION

Fig 9.0: Overall Circuit Diagram


35

WIDE RANGE DIGITAL TACHOMETER (WRDT)

The circuit diagram, though shown divided the into 3 individual units namely
1. Power unit
2. Signal conditioning
3. Microcontroller and Display,
they are, in actuality , part of an integral unit.
They share the same supply voltage +vcc = 5v and ground as shown by
appropriate symbols and labels. We will see the entire system in depth now, but step by
step.
As the portability of tachometer is not to be sacrificed at any cost, one portable
power unit must be provided. This is accomplished using a fixed 9v dc battery and a
voltage regulator. But this doesn't mean that use of ac mains is of no use. Actually, one
rectifier circuit followed by the same regulator (as used with the battery powered
supply) and some filtering components (also used in battery powered supply). But the
main aim of a designer is not to sacrifice compactness, but usage of ac mains powered
supply, requires a connecting cable to be carried all the time. This is not acceptable at
all, if the circuit is meant to be compact as well as portable. One big disadvantage of
using battery powered supply is the frequent drainage of battery. But we have overcome
this issue using proper program code to save battery and perfect switch positioning
which ensure the most efficient power handling. If battery is kept properly in a dry
environment, may never get drained, still continuous use of the tachometer for say 2-3
hours may need the battery to be changed. This point is again explained in Test Points
(chap 15 )
Now comes the signal conditioner. It can be visualized of consisting of an input,
an output and a primary signal synthesizer. The principle operation of the project is
simple, detection of light reflected from a rotating body. A bright white LED emits light
continuously, but how do we sense it ? It is sensed by a photodiode. The sensitivity of
photodiode should high. But in some cases, we may need to reduce it. Whenever light
ray reflects, it is sensed by the photo diode, which was till now turned off with collector
voltage Vc = +5v approx., is turned on giving a low signal (Vc = 0v ). These low signals
which are analog in nature, are used to gate the the counter of the microcontroller.
However, these pulses cannot be applied directly, as microcontroller only deals with
digital data, that is either 1 or 0 . This job of digitizing the analog pulses is done by a
op amp comparator, texas instruments lm339.When there is no reflection of light, photo
diode is off, its collector voltage is Vc = +5v or greater than the logic high threshold of
the microcontroller.

36

WIDE RANGE DIGITAL TACHOMETER (WRDT)

Thus when diode is off, it sends a +5v signal to the comparator, which compares
this signal at the inverting terminal with a preset signal at the non-inverting terminal,
which is deliberately set such that its less than the OFF state diode voltage (around +5v)
and greater than the ON state diode voltage (a few milli volts). As the comparator
detects a +5v which greater than the non-inverting threshold it gives an output voltage
equal to +vsat = +5v (as stated before all components share the same vcc and ground).
This is nothing but the logic1 of the microcontroller. Whenever light gets reflected from
the rotating body, diode conducts and the inverting terminal voltage of the comparator
is less that the non-inverting terminal threshold, giving output voltage = either -vsat or
0 (depends on whether -vee is grounded or not). As we need a digital signal, -vee is set
to ground. Whenever pulse is obtained, comparator gives a logic 0.
This is how the comparator, which is the signal conditioner, does the job of
smoothening, digitizing and amplifying (in odd sense).
The output of the comparator is connected to the pin number 15 of the
microcontroller. As we have used the Timer register for external event counting (i.e.
pulse counting in this case), these external events must occur at the external timer 1
interrupt pin which the pin number 15 in this case. This is set automatically when we
set a timer x register as a counter in the TMOD register.
Note :- If timer x is set as a timer, then the event to be counted is not external, but the
clock cycles which synchronize the microcontroller AT89S51.

In the TMOD register only, setting the last 2 bits of each nibble with proper
combination we can use different modes. Out of 4 modes, we have used the MODE 2,8bit auto reload mode. If the counter exceeds the value of 255 (FF) , we increment a
register count so that after one roll over of the TF1, if the counted pulse is 55,
it means 155H pulses are counted. But this is an error as this 8 bit controller cannot be
used to display a number which exceeds 255 (in fact we can display the number above
255, but it increases the complexity almost a 1000 times, and any rotating body is very
less likely to be running at a speed greater than, say even a 200 RPS.
One 16 bit timer is used as a counter to count the number of pulses coming out
of the comparator. A comparator to work properly, must have a pull up resistor at the
output pin. If you look at our circuit diagram, you will not find any. This is because port
3 of the AT89S51 (at one pin of which comparator output is given) already has internal
pull up resistors.
To calculate speed in RPS, the simplest way is to count the number pulses
reflecting back from the rotating body for duration of 1 sec. To serve this purpose, the
other timer is used as an internal delay timer. As stated before, in the TMOD register,
if we reset the TMOD.7 or TMOD.2 bits (timer/counter control bits for timer 1 and 0

37

WIDE RANGE DIGITAL TACHOMETER (WRDT)

respectively), we set the respective timer in the timer delay mode. In this mode, the
counter register (so called) is incremented by every clock pulse coming from the crystal
which synchronizes the entire operations of the microcontroller. Out of the 4 modes,
we have used the MODE1, the 16 bit counter. The delay scheme used is identical to the
one used in chap 6 under the software delay scheme, except that here, instead of using
a 8 bit register, we use a 16 bit timer to produce larger delay. As we need to have a 1
sec delay, using only 16 bit counter is not enough because maximum delay that can be
produced with a 16 bit register with a clock of 11.0592 MHz (what we used), max delay
is 1.085*10^6*65535 = 71msec. So we use another register with initial count 14H and
decrement it every time TF0 rolls over, thus we get a delay of 1 sec. This is same as
giving a 71 msec delay 14 times (0.071*14 = 1).
Now the final and the most important task to be done is the displaying of the
counted pulses. The conventional persistence strategy for 7 seg LED is used. Here we
first convert the number to decimal. As this is a 8 bit controller, maximum number is 3
digit only (255 or FFH). We first divide the number by 100, and we display the quotient.
We first enable the MSB digit by enabling its transistor and disable all others. Then we
find out the corresponding code for a given number depending upon whether the display
is Common Anode type or Common Cathode type. These codes are usually pre stored
in the program memory as look up tables and accessed using base + index addressing
mode. Remember we do not display the number (or character) say 1 directly, but send
its 7 seg code which nothing but a bit pattern depending on which of the a-g segments
need logic 1 for CK display and logic 0 for CA display.
Once MSD is sent, we again set off the MSD transistor by giving a 0 base drive,
we then divide remainder of the first result by 10 and again find the 7 seg code for the
quotient. We now turn the middle digit transistor driver on, keeping all others off. We
display the 7 seg code, wait for some time and again turn of the driver. And lastly, the
remainder of the previous result is nothing but the LSD, whose 7 seg code is searched
for and then sent out to corresponding digit by making that transistor driver on.
Now the important question, If only one digit is getting ON at a given time, how
does the display look continuous to our eyes? The answer is Persistence of Vision.
Once the display subroutine is done, we repeat the process a number of times until a
parameter in a register becomes zero. Microcontroller performs instructions almost
within a microsecond, but our eyes can at max catch only 120 frames per second.
However a, the display routine time is much smaller than the time for which 120 frames
may last. Thus out eyes can virtually sense no change in the very fast turn ON and OFF
of the display. Thus if the display routine is repeated for a finite duration, our eyes see
the display as if it was a continuous one, due persistence of vision.
After completion of display, controller restarts the 1 sec time delay and counter
and again displays the result. This process keeps on continuing as long as power is
running. Thus very fast varying speeds, which are termed as dynamic speeds can be
easily measured. This is a huge bonus.

38

WIDE RANGE DIGITAL TACHOMETER (WRDT)

In this way, our project, the Wide Range Digital Tachometer (WRDT) first
converts the analog pulses into digital ones, then counts them for a perfectly set 1 sec
duration, and immediately displays the result, ready to count for 1 sec again. The
efficiency is in the higher 95s as will be shown in the performance graphs (chap 10).

Fig 9.1: Real time OUTPUT

39

WIDE RANGE DIGITAL TACHOMETER (WRDT)

10. TACHOMETER CALIBRATION UNIT


In this chapter we will see the tachometer calibration unit. To calibrate he
tachometer a rated DC shunt motor is used which is powered with a voltage supply of
maximum 12v. The figure shows the physical appearance of the motor.

Fig 10.0.1: 12v DC motor (1000Rpm)

The armature and field are shunted and connected in parallel to supply voltage.
The voltage supply is variable 0-12V DC power supply. Here by varying the armature
voltage the speed variation in proportion is observed.

Fig 10.0.2: Circuit Diagram

Va=Armature voltage
For Va=0V: Speed of motor = 0RPM = 0RPS
For Va=3V: Speed of motor = 250RPM = 4 OR 5 RPS
For Va=6V: Speed of motor = 500RPM = 8 OR 9 RPS
For Va=9V: Speed of motor = 750RPM = 12 OR 13 RPS
Speed of motor = 1000RPM = 16 OR 17 RPS

40

WIDE RANGE DIGITAL TACHOMETER (WRDT)

10.1 CIRCUIT FOR VARIABLE OUTPUT VOLTAGE


The circuit uses a astable multivibrator using IC555

Fig 10.1.1: Voltage Controller Circuit

For duty cycle = 1%

For duty cycle = 75%

For duty cycle = 25%

For duty cycle = 99%


41

WIDE RANGE DIGITAL TACHOMETER (WRDT)

As the output source and sink current of IC555 is only 200mA, the output of the
IC is given to the motor driving L293D which provides a high current and isolates the
motor from the supply in order to prevent the supply from back EMF of the motor.

Note: As the calibration unit is only for demonstration purpose, there are many
specifications (like l293d, 12v DC shunt motor etc) not covered in the report.

42

WIDE RANGE DIGITAL TACHOMETER (WRDT)

11. PERFORMANCE GRAPHS


As our WRDT measure speed in RPS, to have a comparison with speeds in
RPM, we have to use a multiplication of 60 in our result. The following graph displays
the linearity between the two readings-one with our WRDT and other with analog
tachometer used for calibration test of a 1000 RPM DC motor.

CALIBRATION TEST
RELATIONSHIP BETWEEN RPM V/S RPS READINGS
(MULTIPLICATION FACTOR 60)

SPPED IN RPS - WRDT

30
25
20
15
10
5
0
0

200

400

600

800

1000

1200

1400

1600

SPEED IN RPM - ANALOG TACHOMETER

Fig 11.1: Graph with MF = 60

Analog Tachometer Reading in


RPM (for calibration test) X axis
950
820
800
680
440
380

WRDT Readings in RPS


Y axis
16
14
13
12
7
6

Fig 11.2: Table for MF = 60

43

WIDE RANGE DIGITAL TACHOMETER (WRDT)

But in case of a motor or any other rotating body, operating at lower speed, a
multiplication factor of 60 means that, the resolution is 60.It means that a change of 60
RPM will correspond to a change of 1 RPS. This is highly objectionable in case of such
motors. However, this is not a big set-off, as we can reduce multiplication factor by
increasing the number of reflecting surfaces. This increase the accuracy of low speed
measurements greatly. One such instance where a 500 RPM motor was tested with a
multiplication factor of 30 (two reflecting surfaces) is shown below.

CALIBRATION TEST
RELATIONSHIP BETWEEN RPM V/S RPS READINGS
(MULTIPLICATION FACTOR 30)

SPPED IN RPS - WRDT

25
20
15
10
5
0
0

100

200

300

400

500

600

700

SPEED IN RPM - ANALOG TACHOMETER

Fig 11.3: Graph for MF = 30

Analog Tachometer Reading in


RPM (for calibration test) X axis
600
550
500
450
400
350
300
250
200
150
100

WRDT Readings in RPS


Y axis
20
18
16
15
13
11
10
8
6
5
3

Fig 11.4: Table for MF = 30

44

WIDE RANGE DIGITAL TACHOMETER (WRDT)

12.0 PROGRAME CODING


ORG 000H

MAIN:

MOV DPTR,#LUT

// moves the addres of LUT to DPTR

MOV P1,#00000000B

// Sets P1 as an output port

MOV P0,#00000000B

// Sets P0 as an output port

MOV R6,#14D
SETB P3.5
MOV TMOD,#01100001B // Sets Timer1 as Mode2 counter & Timer0 as
Mode timer
MOV TL1,#00000000B //loads initial value to TL1
MOV TH1,#00000000B //loads initial value to TH1
SETB TR1

BACK:

// starts timer(counter) 1

MOV TH0,#00000000B //loads initial value to TH0


MOV TL0,#00000000B //loads initial value to TL0
SETB TR0

HERE:

JNB TF0,HERE

//starts timer 0
// checks for Timer 0 roll over

CLR TR0

// stops Timer0

CLR TF0

// clears Timer Flag 0

DJNZ R6,BACK
CLR TR1

// stops Timer(counter)1

CLR TF0

// clears Timer Flag 0

CLR TF1

// clears Timer Flag 1

ACALL DLOOP
SJMP MAIN

// Calls subroutine DLOOP for displaying the count


// jumps back to the main loop
45

WIDE RANGE DIGITAL TACHOMETER (WRDT)


DLOOP:
BACK1:

MOV R5,#100D
MOV A,TL1

// loads the current count to the accumulator

MOV B,#100D
DIV AB

// isolates the first digit of the count

SETB P1.0
ACALL DISPLAY
MOV P0,A

// converts the 1st digit to 7 seg pattern

// puts the pattern to Port 0

ACALL DELAY

// 1mS delay

ACALL DELAY
MOV A,B
MOV B,#10D
DIV AB

// isolates the secong digit of the count

CLR P1.0
SETB P1.1
ACALL DISPLAY

// converts the 2nd digit to 7 seg pattern

MOV P0,A
ACALL DELAY
ACALL DELAY
MOV A,B

// moves the last digit of the count to accumulator

CLR P1.1
SETB P1.2
ACALL DISPLAY

// converts the 3rd digit to 7 seg pattern

MOV P0,A
ACALL DELAY
ACALL DELAY

46

WIDE RANGE DIGITAL TACHOMETER (WRDT)


CLR P1.2
DJNZ R5,BACK1

// repeats the subroutine DLOOP 100 times

RET
DELAY: MOV R7,#250D

// 1mS delay

DEL1: DJNZ R7,DEL1


RET
DISPLAY: MOVC A,@A+DPTR

// gets 7 seg digit drive pattern for current value


In A

RET
LUT:

DB 40H

// Look up table (LUT) starts here

DB 79H
DB 24H
DB 30H
DB 19H
DB 12H
DB 03H
DB 78H
DB 00H
DB 10H
END

47

WIDE RANGE DIGITAL TACHOMETER (WRDT)

13.0 BURNING THE HEX CODE


In order to store the software code into the controller memory, which is nothing
but a flash ROM, it must be flashed with some hardware tools accompanied by some
software called IDE.
The software platform we used was Keil Microvision V5 and the hardware used
to flash the ROM was USBASP which is a USB programmer.

13.1 BUILDING HEX FILE


The following steps are involved in building the hex file:
1. Create a new Microvision Project in the project menu. Save the file with
proper name.
2. Select your target microcontroller (AT89S51 in this case) and add startup
files if needed.
3. Open text editor and save yourfile.asm.
4. Write down your code.
5. Add the existing file yourfile.asm to source group one in target.
6. Build target.
7. You will see hex file in the destination folder. Burn the code using USBASP.

Fig 13.1.A: Steps 1 to 4

48

WIDE RANGE DIGITAL TACHOMETER (WRDT)

Fig 13.1.B: Steps 5 to 7

Fig 13.1.C: PRPGISP program windows

Fig 13.1.D: USBASP

49

WIDE RANGE DIGITAL TACHOMETER (WRDT)

14.0 MAJOR PROCESSES INVOLVED IN


FABRICATING CIRCUIT
The major process involved in the fabrication of circuit are as follows:-

1 ) Etching PCB
2 ) Soldering

14.1 Etching PCB


A printed circuit board mechanically supports and electrically connects
electronic components using conductive tracks, pads, and other features etched from
copper sheets laminated on to a nonconductive substrate. PCB can be single sided (one
copper layer) , Double sided ( two copper layers ) or multi-layer conductors on different
layers are connected with plated through holes called vias . Advance PCB may contain
components like capacitors, resistors or active devices embedded in the substrate.
Printed circuit board are used in all the simplest electronic product. Alternatives
to PCBs include wire wrap and point to point construction. PCBs required the additional
design effort to lay out the circuit but manufacturing circuits with PCB is cheaper and
faster than with other wiring methods as components are mounted and wired with one
single part.
The materials required for etching PCB are as follows:1 ) Copper Cladded Board.
2 ) LASER Printer.
3 ) fine sand paper or Kitchen scrubber.
4 ) Chemicals
a ) Hydrochloric Acid (HCL)
b ) Ferrous chloride (Fecl3)
c ) Thinner or Acetone
5 ) Electronic or Hand drill with Fine Drill Bits (0.5mm-1.2mm)
6 ) Hacksaw

50

WIDE RANGE DIGITAL TACHOMETER (WRDT)

The process of PCB etching involves :14.2.1 DESIGN


After analysing the circuit diagram , The very first step for etching PCB
involves designing of layout for components and there connections on the board.this is
done by various softweres like ExpressPCB, Egal, etc.

Fig 14.2.1 : PCB track design using EXPRESS PCB

14.2.2 PRINT THE DESIGN


A ) Selection of Paper - Selecting an appropriate paper is your first step in
making a right selection. Glossy photo quality paper or even a glossy thick magazine
sheet would do wonders.
B ) Selection of Printer - We have used a printer to transfer the circuit diagram
onto the copper board. If you are using a sharpie or a marker, go ahead with it. Set your
printer to output maximum toner and printer your circuit on the glossy paper.

51

WIDE RANGE DIGITAL TACHOMETER (WRDT)

Fig 14.2.2 : Laser Print (PART A)

14.3 PREPARE BOARD AND TONER TRANSFER


14.3.A Prepare the Copper board
Normal Copper board availabe at your radio shop would be good enough. Use
a kitchen scrub or a fine sand paper and rub surface until you feel it is clean. DO NOT
over do it. Once done, clean it with water and a clean cloth and avoid touching the
surface.
14.3.B Transfer Tonner on board
This step is not as complicated as the title says. Switch on your cloths iron and
turn it to its highest setting. Place the printed paper over the board and start moving the
iron over it for 10-15 minutes. Now drop the board into a mug of water and peel off the
glossy paper.
14.3.C Etching the Board
Mix Hydrochloric acid to Ferric chloride in a ratio of 2:3 and drop your copper
board into it. Within 2-3 minutes you can see the copper removed from the board and
tracks clearly visible.

52

WIDE RANGE DIGITAL TACHOMETER (WRDT)

14.3.D Remove Tonner


Wash the etched board thoroughly in water and then use acetone or a nail polish
remover and clean the surface so that the toner is removed and copper tracks are clearly
visible.

14.3.E Drilling holes and Soldering


Once the toner is completely removed, use a hand driller or an electronic drill
and drill holes into the board to mount the components. Place the components and
solder them across.
You are ready with a complete professionally (almost) looking circuit board. If you
have all the tools and parts in hand, the entire process takes less than an hour.
Cautions:Muriatic Acid is dangerous. Hydrogen peroxide, although not dangerous,
still gives your skin a burnt effect. Be careful with these solutions.

14.4 SOLDERING
Soldering is a process in which two or more metal items are joined together
by melting and flowing a filler metal (solder) into the joint, the filler metal having a
lower melting point than the adjoining metal. Soldering differs from welding in that
soldering does not involve melting the work pieces. In brazing, the filler metal melts
at a higher temperature, but the work piece metal does not melt. For the efficient
soldering flux is used.

Fig 14.4 : Needle type Soldering Tip

53

WIDE RANGE DIGITAL TACHOMETER (WRDT)

The purpose of flux is to facilitate the soldering process. One of the obstacles
to a successful solder joint is an impurity at the site of the joint, for example, dirt, oil
or oxidation. The impurities can be removed by mechanical cleaning or by chemical
means, but the elevated temperatures required to melt the filler metal (the solder)
encourages the work piece (and the solder) to re-oxidize. This effect is accelerated as
the soldering temperatures increase and can completely prevent the solder from
joining to the work piece.
Soldering irons have a ton of different tips, and each of them is better suited for
different tasks. However, we have preferred to use a 1 mm needle tip soldering iron for
efficient soldering. The fig shows the appearance of the iron tip.

54

WIDE RANGE DIGITAL TACHOMETER (WRDT)

15.0 KEY SPECIFICATIONS OF USED ICS


15.1 AT89S51 SPECIFICATIONS
SPECIFICATION
DESCRIPTION
VIL
Input Low Voltage
VIL
Input High Voltage
IS
Power Supply Current
1/t clcl
Oscillator Frequency
Vcc
Power supply
Rpd
Reset Pull-down Resistor
ILI
Input Leakage Current
CIO
Pin Capacitance
VOH
Output High Voltage

RATING
0.2 VCC-0.1V
VCC+0.5V
6.5mA
33MHz
4.0V to 5.5V
0.3Mohm
+10uA
10pF
0.75Vcc

15.2 LM339 SPECIFICATIONS


SPECIFICATION
DESCRIPTION
VCC
Power Supply Voltage
VIO
Input Offset Voltage
IBIAS
Input Bias Current
IIO
Input Offset Current
ICC
Supply Current
GV
Voltage Gain
ISINK
Output Sink Current
VSAT
Saturation Voltage

RATING
36V
5mVdc
250Na
5nA
2.5mA
200V/mV
16mA
400mV

15.3 LM7805 SPECIFICATIONS


SPECIFICATION
IOL(MAX)
VI
VDROP
RR
RO
ISC
IPK
IQ
REGLINE
REGLOAD

DESCRIPTION
Max Load Current
Range of Input Voltages
Dropout Voltage
Ripple Rejection
Output Resistance
Short Circuit Current
Peak Current
Quiescent Current
Line Regulation
Load Regulation

RATING
1A
5V 18V
2V TYP
73 dB TYP
15m
230 mA TYP
2.2 A TYP
8 mA TYP
1.6 mV (VI= 8-12V)
4.0 mV(IO= 250750mA)
55

WIDE RANGE DIGITAL TACHOMETER (WRDT)

16. TEST POINTS


After few years it may observe that the circuitry may malfunction or
may not work, so if one would like to find the errors in the circuit than one can
go for following testing points:
1. The very basic and first test point of the circuit is power unit. The battery
which is used in power unit needs to be checked whether it is providing a
appropriate voltage above 8V. If the battery fails to give the voltage equal/above
8V, replace the battery for powering the circuit properly.
2. At the output of the power unit, check whether the voltage is approximately
equal to 5V.
3. To check the working of the sensor, connect the DSO across photo diode
check whether the photo diode is in working state.
4. To check the working of the signal conditioning circuit, connect the DSO
across the output of IC LM339 and VCC and check whether a perfect square
wave is achieved.
5. To check the 7 segment display, connect the DMM across any select line (D0,
D1, D2) and segments (a, b, c, d, e, f, g, decimal)
6. If all above parameters are alright, then if EPROM is used to store the
programme code the technician may need to check the bit values are as per the
HEX codes, in case if they are showing errors then re-program the controller as
there are chances of alteration of bit values in the case of microcontroller

56

WIDE RANGE DIGITAL TACHOMETER (WRDT)

17.0 COST ESTIMATION


SR.NO.

COMPONENT

Cost
(Rs)

Circuit board
( Cu cladded )
Microcontroller
( AT89S51 )

15

3
4
5
6
7
8
9
10
11
12
13
14
15
16

Sockets
a. Microcontroller
b. Comparator
7 Seg common anode 4 Digit display

40

3
3
45

Comparator
(LM339)
Tx = LED
Rx = Photo Diode
Resisters
( <10 )
Preset

12

Capacitor
( < 10 )
BJT
( 2N2222) x 3
Switches
Crystal
( 11.0952 MHz )
Ferric chloride and gloves
Glossy Paper
9v Battery and Cap
Voltage Regulator
(LM7805)
Aluminium Foil
TOTAL

10

10
7
10
5

5
5
12
35
15
20
10
20
272

57

Vous aimerez peut-être aussi