tachometer

49
INTRODUCTION The tachometer also called revolution counter is an instrument used to measure the rotation speed of a shaft or disk, as with electric motors. Generally these measurements are rated in round per minute (R.P.M). The word is formed from Greek roots tachos, meaning speed and metron, meaning measure. The traditional tachometer is laid out as a dial, with a needle indicating the current reading and marking safe and dangerous levels. Recently, digital tachometers giving a direct numeric output have become more common. In its most familiar form, a tachometer measures the speed at which a mechanical device is rotating. A common example is the tachometer found on automobile dashboards. The traditional tachometer requires physical contact between the instrument and the device being measured. In applications where this is not feasible for technical or safety reasons, it may be possible to use a contactless tachometer to take measurements from a distance. A contactless tachometer can be a permanent part of the system, or it can be handheld for occasional spot measurements. This device is built on an AT89C2051 microcontroller, a 7-segment display and a phototransistor to detect the rotation of the shaft whose speed is being measured. 1

description

tachometer project

Transcript of tachometer

Page 1: tachometer

INTRODUCTION

The tachometer also called revolution counter is an instrument used to

measure the rotation speed of a shaft or disk, as with electric motors. Generally these

measurements are rated in round per minute (R.P.M). The word is formed from Greek

roots tachos, meaning speed and metron, meaning measure. The traditional

tachometer is laid out as a dial, with a needle indicating the current reading and

marking safe and dangerous levels. Recently, digital tachometers giving a direct

numeric output have become more common. In its most familiar form, a tachometer

measures the speed at which a mechanical device is rotating. A common example is

the tachometer found on automobile dashboards. The traditional tachometer requires

physical contact between the instrument and the device being measured. In

applications where this is not feasible for technical or safety reasons, it may be

possible to use a contactless tachometer to take measurements from a distance. A

contactless tachometer can be a permanent part of the system, or it can be handheld

for occasional spot measurements.

This device is built on an AT89C2051 microcontroller, a 7-segment display

and a phototransistor to detect the rotation of the shaft whose speed is being

measured.

The idea behind most digital counting device, frequency meters and

tachometer, is a microcontroller, used to count the pulses coming from a sensor or any

other electronic device. In the case of this tachometer, the counted pulses will come

from phototransistor, which will detect any reflective element passing in front of it,

and thus, will give an output pulse for each and every rotation of the shaft, as show in

the picture. Those pulses will be fed to the microcontroller and counted.

The pulses picked up by the phototransistor are sensed by the internal

comparator of AT89C2051 and, through software, each pulse representing one

rotation of the object is detected. By counting the number of such pulses, on an

average per minute basis, the RPM is evaluated.

1

Page 2: tachometer

Just point the light-sensitive probe tip atop the spinning shaft towards the

spinning blade, disk or chuck and read the rpm. The only requirement is that you first

place a contrasting colour mask. A strip of white adhesive tape is ideal on the

spinning object. Position it such that the intensity of light reflected from the object’s

surface changes as it rotates. Each time the tape spins past the probe, the momentary

increase in reflected light is detected by the phototransistor. The signal processor and

microcontroller circuit counts the increase in the number of such light reflections

sensed by it and thereby evaluates the rpm, which is displayed on the 4-digit, 7-

segment display. The phototransistor is kept inside a plastic tube, which has a convex

lens fitted at one end. A convex lens of about 1cm diameter and 8-10cm focal length

is a common item used by watch repairers and in cine film viewer toys. It can be

obtained from them to set up the experiment. The phototransistor is fixed on a piece

of cardboard such that it faces the lens at a distance of about 8 cm. The leads from the

phototransistor are taken out and connected.

2

Page 3: tachometer

Literature Review:

2.1. Working of Tachometer

Benfield, A. E. in Sep 1949 [1] .This paper appears in the Proceedings of the

IEEE.Volume: 20 , Issue: 9 Page(s): 663-667

The theory and operation of a simple tachometer are described, in which a

direct electrical e.m.f. is generated by attaching a magnet to the rotating member. It is

shown how the position and orientation of the magnet affect the magnitude of the

generated e.m.f., and suggestions are made for further increasing the e.m.f. generated

per rate of revolution.

2.2. Induction type digital tachometer

Ahmad, M. in Aug 1984 This paper appears in the Proceedings of the IEEE.

Volume: 72 , Issue: 9 Page(s): 1096

An induction-type digital tachometer in which the number of pulses is

proportional to the speed is described. Even for very low speeds the number of pulses

is high, making it very suitable for extremely low speed measurement.

3

Page 4: tachometer

Problem Identification:

Comparison of the contactless digital tachometer with the use of the 8051

microcontroller revealed the disadvantage with its usage. Many problems were

realized in its application, thus limiting the functionality of its usage. Some of these

problems are

It was realized that the sensor produces a very small signal used to reflect infra red

light from the LED into the detector and the distance from the material.

Measuring revolution per minute values less than 60 rpm with a single pulse was

problematic.

Obtaining multiple pulses to increase the accuracy of the tachometer was also another

challenge.

The microcontroller AT89C2051 is being connected to an external crystal oscillator.

This initial printed circuit board (PCB) was designed to work only with the optical

sensor mentioned above .No other sensor can be used to replace it should it get spoilt

hence limiting its usage.

4

Page 5: tachometer

Methodology:

4.1. PCB DESIGN:

Layout of desired circuit diagram and preparation is first and most important

operation in any printed circuit board manufacturing process. First of all layout of

component side is to be made in accordance with available component dimensions.

The following points are to be observed while forming the layout of P.C.B.

a) Between two components, sufficient space should be maintained.

b) High wattage/max. Dissipated components should be mounted at a sufficient distance

from semiconductors and electrolytic capacitors.

c) The most important point is that the components layout is making proper

compromisation with copper side circuit layout.

d) The two most popular boards are single sided boards and the double sided boards.

The single sided P.C.B. is widely used for general purpose application where the cost

is to be low and the layout is simple.

4.2. PREPARING CIRCUIT LAYOUT:

First of all the actual size circuit layout is to be drawn on the copper side of

the copper clad board. Then enamel paint is applied on the tracks of connection with

the help of a sharp brush. We have to apply the paints surrounding the point at which

the connection is to be made. It avoids the disconnection between the leg of the

component and circuit track. After completion of painting work, it is allowed to dry.

4.3. DRILLING:

After completion of painting work, holes of 1/32 inch (1mm) diameter are

drilled at desired points where we have to fix the components.

5

Page 6: tachometer

4.4. ETCHING:

The removal of excess of copper on the plate apart from the printed circuit is

known as etching. For this process the copper clad board with printed circuit is

placed in the solution of FeCl3 (Ferric chloride) with 3-4 drop of HCl in it and is kept

so for about 2 hrs. And is taken out when all the excess copper is removed from the

P.C.B.

After etching, the P.C.B. is kept in clean water for about half an hour in order

to get P.C.B. away from dry acidic profile which may cause poor performance of the

circuit. After the P.C.B. has been thoroughly washed paint is removed by soft piece of

cloth dipped in thinner or turpentine. Then P.C.B. is checked as per the layout. Now

the P.C.B. is ready for use.

4.5. SOLDERING:

Soldering is the process of joining two metallic conductors, the joint where

the two metal conductors are to be joined or fused is heated with a device called

soldering iron and then an alloy of tin and lead called solder is applied which melts

and covers the joint. The solder cools and solidifies quickly to ensure a good and

durable connection between the joined metals. Covering the joint with solder also

prevents oxidation.

6

Page 7: tachometer

4.6. CIRCUIT DIAGRAM

:

7

Page 8: tachometer

4.7. LIST OF COMPONENTS:

No. COMPONENT SPECIFICATION QTY.

1. Transformer 220/12V 1

2. Microcontroller

AT89C2051 1

3. Current Buffer

ULN2003 1

4. Operational Amplifier

CA3140 1

5. pnp Transistor BC557 4

6. npn transistor 2N2222 1

7. LED Blue 1

8. Phototransistor L14F1 1

9. Rectifier diode, D1

1N4007 1

10

.

4- digit, 7 segment display

KLQ564 1

11

.

Resistor 1KOhm,10KOhm,

1.2KOhm

11

8

Page 9: tachometer

12. Resistor Network,

RNW1

10KOhm 1

13. Preset 4.7KOhm 1

14. Electrolytic

capacitor, C1

10µF, 16V 1

15. Ceramic disk

capacitor,C2, C5,

C6

0.1µF 3

16. Ceramic disk

capacitor, C3, C4

22pF 2

17. Push-to-on switch,

S1

1

18. Crystal Oscillator,

XTAL

12MHz 1

19. DC Motor 150rpm, 60rpm 2

9

Page 10: tachometer

4.7.1. POWER SUPPLY:

The Regulated Power Supply is required for the proper functioning of all the

components in an electronic system. The microcontroller requires regulated output of

5V for its operation, while 12V is required for operating relays and motors. The

Regulated Power Supply circuit basically requires an AC supply of 220-230V, step-

down transformer, rectifier circuit, regulator and stabilizing capacitors.

Power supply circuits are built using-

Filters

Rectifiers

Voltage regulators.

Starting with an ac voltage, a steady dc voltage is obtained by rectifying the ac

voltage, then filtering to a dc level, and finally, regulating to obtain a desired fixed dc

voltage. The regulation is usually obtained from an IC voltage regulator. The ac

voltage, typically 120 V rms, is connected to a transformer, which steps that ac

voltage down to the level for the desired dc output. A diode rectifier then provides a

full-wave rectified voltage that is initially filtered by a simple capacitor filter to

produce a dc voltage. This resulting dc voltage usually has some ripple or ac voltage

variation. A regulator circuit can use this dc input to provide a dc voltage that not only

has much less ripple voltage but also remains the same dc value even if the input dc

voltage varies somewhat, or the load connected to the output dc voltage changes. This

voltage regulation is usually obtained using one of a number of popular voltage

regulator IC units.

In this project, two voltage regulator ICs are used. One is LM7812, for 12V

regulated output and the other is LM7805, for 5V regulated output.

IC VOLTAGE REGULATORS:

Voltage regulators comprise a class of widely used ICs. Regulator IC units

contain the circuitry for reference source, comparator amplifier, control device, and

10

Page 11: tachometer

overload protection all in a single IC. Although the internal construction of the IC is

somewhat different from that described for discrete voltage regulator circuits, the

external operation is much the same. IC units provide regulation of a fixed positive

voltage, a fixed negative voltage or an adjustably set voltage.

A power supply can be built using a transformer connected to the ac supply

line to step the ac voltage to desired amplitude, then rectifying that ac voltage,

filtering with a capacitor and RC filter, if desired, and finally regulating the dc voltage

using an IC regulator. The regulators can be selected for operation with load currents

from hundreds of mille amperes to tens of amperes, corresponding to power ratings

from mill watts to tens of watts.

THREE-TERMINAL VOLTAGE REGULATORS:

1. Input 2. GND 3. Output

Figure no. 4.1

The fixed voltage regulator has an unregulated dc input voltage, VI, applied

to one input terminal, a regulated output dc voltage, VO, from a second terminal, with

the third terminal connected to ground. For a selected regulator, IC device

specifications list a voltage range over which the input voltage can vary to maintain a

regulated output voltage over a range of load current. The specifications also list the

amount of output voltage change resulting from a change in load current (load

regulation) or in input voltage.

11

Page 12: tachometer

4.7.2. TRANSFORMER:

Figure no. 4.2

A transformer is a static piece of apparatus by means of which electric

power in one circuit is transformed into electric power of the same frequency in

another circuit. It can raise or lower the voltage in a circuit but with a corresponding

decrease or increase in current. The physical basis of a transformer is mutual

induction between two circuits linked by a common magnetic flux. A transformer

consists of two coils having mutual inductance and a laminated steel core. The two

coils are insulated from each other and the steel core, other necessary parts are some

suitable container for the assembled core and winding; a suitable medium for

insulating the core and its windings from its container; suitable bushing for insulating

and bringing out the terminal of winding from the tank.

12

Page 13: tachometer

4.7.3. DIODE:

Figure no. 4.3

PN Junction diodes:-

It is a P type region and an N type region formed in the same crystal

structure, a PN junction diode is produced. Some of the conduction electrons near the

junction diffuse into the P type semiconductor from the N type semiconductor across

the junction combining with the holes. The loss of electron makes the N type

semiconductor positively charged and hence the neutralization of the holes. On the

other hand makes the P type semiconductor negatively charged. This region where

positive and negative charges develop is called depletion region. If a P region is made

positive with respect to the N region by an external circuit, then junction is forward

biased and junction has a very low resistance to the flow of current.

4.7.4. Microcontroller (AT89C2051):

The AT89C2051 is a low-voltage, high-performance CMOS 8-bit

microcomputer with 2K bytes of Flash programmable and erasable read only memory

(PEROM). The device is manufactured using Atmel’s high-density nonvolatile

memory technology and is compatible with the industry-standard MCS-51 instruction

set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel

AT89C2051 is a power-ful microcomputer which provides a highly-flexible and cost-

effective solution to many embedded control applications.

13

Page 14: tachometer

Features

Compatible with MCS-51 ™ Products

2K Bytes of Reprogrammable Flash Memory – Endurance: 1,000 Write/Erase

Cycles

2.7V to 6V Operating Range

Fully Static Operation: 0 Hz to 24 MHz

Two-level Program Memory Lock

128 x 8-bit Internal RAM

15 Programmable I/O Lines

Two 16-bit Timer/Counters

Six Interrupt Sources

Programmable Serial UART Channel

Direct LED Drive Outputs

On-chip Analog Comparator

Low-power Idle and Power-down Modes

4.7.5. Current Buffer (ULN2003):

These versatile devices are useful for driving a wide range of loads including

solenoids, relays DC motors, LED displays filament lamps, thermal print- heads and

high power buffers in the situations when the input signal is not providing enough

currents.

Here we need to drive DC motor and the motor needs a specific amount of

current. It’s in the range of 30-100 mA. But such high currents cannot be delivered by

simple ICs or parallel port etc. Hence we need a current buffer for that. So we select

Uln-2003 in this case.The pin connection of ULN 2003 is as follow:

14

Page 15: tachometer

Figure no. 4.4

The ULN 2003 is an inversion buffer and hence output is taken from pin 9 and the

output pin.If we are driving motor according to the signal from some IC which is not

able to provide enough current, then

Firstly we input that signal to one of the 7 input pins of ULN 2003, say pin 1.

Then output I taken from the Pin 9 and the corresponding output pin i.e. pin 16

as shown below:

Figure no. 4.5

15

Page 16: tachometer

We also connect a high current power source of appropriate voltage between

pin 9 and pin 8.

When the input signal to the IC ULN 2003 is HIGH, then the output of the IC at

the corresponding output pin is LOW. But if input signal to the IC ULN 2003 is

LOW, then the output of the IC at the corresponding output pin is HIGH.

Hence in the above circuit, when input at pin 1 is HIGH, then the DC motor would

start running as at the positive terminal of motor we have a HIGH and at the negative

terminal we have a LOW (pin 16). But if input signal is LOW, the DC motor would

not work as we have HIGH at both terminals of the motor.

4.7.6. Operational Amplifier (CA3140):

The CA3140 is an integrated circuit operational amplifiers that combine the

advantages of high voltage PMOS transistors with high voltage bipolar transistors on

a single monolithic chip. The CA3140A and CA3140 BiMOS operational amplifiers

feature gate protected MOSFET (PMOS) transistors in the input circuit to provide

very high input impedance, very low input current, and high speed performance. The

CA3140A and CA3140 operate at supply voltage from 4V to 36V (either single or

dual supply). These operational amplifiers are internally phase compensated to

achieve stable operation in unity gain follower operation, and additionally, have

access terminal for a supplementary external capacitor if additional frequency roll-off

is desired. Terminals are also provided for use in applications requiring input offset

voltage nulling. The use of PMOS field effect transistors in the input stage results in

common mode input voltage capability down to 0.5V below the negative supply

terminal, an important attribute for single supply applications. The output stage uses

bipolar transistors and includes built-in protection against damage from load terminal

short circuiting to either supply rail or to ground.FN957 The CA3140A and CA3140

are intended for operation at supply voltages up to 36V (±18V).

FEATURES:

MOSFET Input Stage

Very High Input Impedance (ZIN) -1.5TΩ (Typ)

16

Page 17: tachometer

Very Low Input Current (Il) -10pA (Typ) at ±15V

Wide Common Mode Input Voltage Range (VlCR) - Can be Swung 0.5V

Below Negative Supply Voltage Rail

Output Swing Complements Input Common Mode Range

Directly Replaces Industry Type 741 in Most Applications

Pb-Free Plus Anneal Available (RoHS Compliant)

4.7.7. Transistor:

A transistor consists of two pn junctions formed by sandwiching either p-type

or n-type semiconductor between a pair of opposite types. Accordingly; there are

two types of transistors, namely:-

(1) n-p-n-transistor

(2) p-n-p transistor

An n-p-n transistor is composed of two n-type semiconductor separated by a

thin section of p-type. However a p-n-p transistor is formed by two p-sections

separated by a thin section of n-type.

In each type of transistor, the following points may be noted:-

1. There are two pn junctions. Therefore, transistor may be regarded as a

combination of two diodes connected back to back.

2. There are three terminals, taken from each type of semiconductor

3. The middle section is very thin layear. This is the most important factor in the

function of a transistor.

17

Page 18: tachometer

npn Transistor (2N2222):

Figure no. 4.6

The 2N2222 is a common NPN bipolar junction transistor used for general

purpose low-power amplifying or switching applications. It is designed for low to

medium current, low power, medium voltage, and can operate at moderately high

speeds. The 2N2222 is considered a very common transistor and is used as an

exemplar of an NPN transistor. It is frequently used as a small-signal transistor.

Pnp Transistor (BC557):

The BC557 is general purpose silicon, PNP, bipolar junction transistor. It has

maximum VCE rated at -65V and can sink maximum current of -98mA. It has typical

power dissipation of 495mW. It can give gain more than 200.

Specifications:

Maximum VCE : -16V

Maximum collector current: -98mA

Typical Gain: Between 124 to 798

Maximum power dissipation: 495mW

Package: TO-92

18

Page 19: tachometer

4.7.8. Light Emitting Diode (LED):

A light-emitting diode (LED) is a semiconductor light source. LEDs are used

as indicator lamps in many devices and are increasingly used for other lighting.

Appearing as practical electronic components in 1962, early LEDs emitted low-

intensity red light, but modern versions are available across the visible, ultraviolet,

and infrared wavelengths, with very high brightness.

Figure no. 4.7

When a light-emitting diode is forward-biased (switched on), electrons are

able to recombine with electron holes within the device, releasing energy in the form

of photons. This effect is called electroluminescence and the color of the light

(corresponding to the energy of the photon) is determined by the energy gap of the

semiconductor. An LED is often small in area (less than 1 mm2), and integrated

optical components may be used to shape its radiation pattern.[6] LEDs present

many advantages over incandescent light sources including lower energy

consumption, longer lifetime, improved physical robustness, smaller size, and faster

switching. LEDs powerful enough for room lighting are relatively expensive and

require more precise current and heat management than compact fluorescent

lamp sources of comparable output.

Light-emitting diodes are used in applications as diverse as aviation

lighting, automotive lighting, advertising, general lighting, and traffic signals. LEDs

have allowed new text, video displays, and sensors to be developed, while their high

switching rates are also useful in advanced communications technology. Infrared

19

Page 20: tachometer

LEDs are also used in the remote control units of many commercial products

including televisions, DVD players, and other domestic appliances.

4.7.9. Phototransistor (L14F1):

A phototransistor is in essence a bipolar transistor encased in a transparent

case so that light can reach the base-collector junction. It was invented by Dr. John N.

Shive (more famous for his wave machine) at Bell Labs in 1948, but it wasn't

announced until 1950. The electrons that are generated by photons in the base-

collector junction are injected into the base, and this photodiode current is amplified

by the transistor's current gain β (or hfe). If the emitter is left unconnected, the

phototransistor becomes a photodiode. While phototransistors have a high

erresponsivity for light they are not able to detect low levels of light any better than

photodiodes.[ Phototransistors also have significantly longer response times.

. Figure no. 4.8

Photo transistors are operated in their active regime, although the base

connection is left open circuit or disconnected because it is not required. The base of

the photo transistor would only be used to bias the transistor so that additional

collector current was flowing and this would mask any current flowing as a result of

the photo-action. For operation the bias conditions are quite simple. The collector of

an n-p-n transistor is made positive with respect to the emitter or negative for a p-n-p

transistor. The light enters the base region of the phototransistor where it causes hole

electron pairs to be generated. This mainly occurs in the reverse biased base-collector

junction. The hole-electron pairs move under the influence of the electric field and

provide the base current, causing electrons to be injected into the emitter.

20

Page 21: tachometer

Characteristics:

Phototransistor has a high level of gain.

phototransistor has a much lower level of noise.

4.7.10. 7-Segment Display:

A seven segment display is the most basic electronic display device that can

display digits from 0-9. They find wide application in devices that display numeric

information like digital clocks, radio, microwave ovens, electronic meters etc. The

most common configuration has an array of eight LEDs arranged in a special pattern

to display these digits. They are laid out as a squared-off figure ‘8’. Every LED is

assigned a name from 'a' to 'h' and is identified by its name. Seven LEDs 'a' to 'g' are

used to display the numerals while eighth LED 'h' is used to display the dot/decimal.

Figure no. 4.9

A seven segment is generally available in ten pin package. While eight pins

correspond to the eight LEDs, the remaining two pins (at middle) are common and

internally shorted. These segments come in two configurations, namely, Common

cathode (CC) and Common anode (CA). In CC configuration, the negative terminals

of all LEDs are connected to the common pins. The common is connected to ground

and a particular LED glows when its corresponding pin is given high. In CA

arrangement, the common pin is given a high logic and the LED pins are given low to

display a number.

21

Page 22: tachometer

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, 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 readability. The numerals 0,1,6, 7 and 9 may be represented

by two or more different glyphs on seven-segment displays. The seven segments are

arranged as a rectangle of two vertical segments on each side with one horizontal

segment on the top, middle, and bottom. Seven-segment displays may use a liquid

crystal display (LCD), arrays of light-emitting diodes (LEDs), or other light-

generating or controlling techniques such as cold cathode gas discharge,

A vacuum fluorescent, incandescent filaments, and others.

4.7.11. CAPACITOR:

Capacitor essentially consists of two conducting surface separating by a

layer of an insulating medium called dielectric. The conducting surface may be in the

form of either circular or rectangular plates or be of spherical or cylindrical shape.

The purpose of a capacitor is to store the electrical energy by electrostatic stress in the

dielectric (the word condenser is a misnomer since a capacitor does not condense

electric as such it merely stores it). The property of a capacitor to store electricity may

be called its capacitance. A capacitors ability to store energy, its capacitance is

dependent on three factors (a) the surface area of the plates of which it is composed

(b) the thickness of the insulating material (c) the material of which the dielectric is

composed of. Essentially a system in which two or more metal plates (conductor) are

placed in close proximity to each other & are separated by an insulating material

called the dielectric. When the plates of the capacitor are connected to a voltage

source there will be a surplus of electrons on the plate connected to the negative side

and a shortage of electron on a plate connected to the positive side of the voltage

source. The surpluses of electrons on the negative plate will repel the electrons on the

other plate driving them back toward the positive plate will attract electrons from the

negative plate of the voltage source. The electron flow will continue until the

negative and positive charges on the capacitor plates are equal to the Voltage source.

22

Page 23: tachometer

When the condition exists the capacitor is said to be charged. When the voltage

source is disconnected the condition of unbalance that has been setup on the capacitor

plates will remain thus providing a means of storing electricity in the capacitor ratio

between the magnitude of the charge on the plates and the voltage difference between

the plate is called the capacitance ‘c’.

Types of Capacitor:

There are a very, very large variety of different types of capacitors:

Dielectric Capacitor

Film Capacitor

Ceramic Capacitors

Electrolytic Capacitors

In this project, electrolytic & ceramic capacitors are used:

Ceramic Capacitors:

Ceramic Capacitors or Disc Capacitors as they are generally called, are made

by coating two sides of a small porcelain or ceramic disc with silver and are then

stacked together to make a capacitor. For very low capacitance values a single

ceramic disc of about 3-6mm is used. Ceramic capacitors have a high dielectric

constant (High-K) and are available so that relatively high capacitances can be

obtained in a small physical size.

Ceramic Capacitor

Figure no. 4.10

23

Page 24: tachometer

They exhibit large non-linear changes in capacitance against temperature and

as a result are used as de-coupling or by-pass capacitors as they are also non-polarized

devices. Ceramic capacitors have values ranging from a few picofarads to one or two

microfarads but their voltage ratings are generally quite low.Ceramic types of

capacitors generally have a 3-digit code printed onto their body to identify their

capacitance value in pico-farads.

Electrolytic Capacitors:

Electrolytic Capacitors are generally used when very large capacitance values

are required. Here instead of using a very thin metallic film layer for one of the

electrodes, a semi-liquid electrolyte solution in the form of a jelly or paste is used

which serves as the second electrode (usually the cathode). The dielectric is a very

thin layer of oxide which is grown electro-chemically in production with the thickness

of the film being less than ten microns. This insulating layer is so thin that it is

possible to make capacitors with a large value of capacitance for a small physical size

as the distance between the plates, d is very small.

Figure no. 4.11

The majority of electrolytic types of capacitors are Polarised, that is the DC

voltage applied to the capacitor terminals must be of the correct polarity. Electrolytic

Capacitors are generally used in DC power supply circuits due to their large

capacitances and small size to help reduce the ripple voltage or for coupling and

decoupling applications.

24

Page 25: tachometer

4.7.12. RESISTOR:

Resistors are the electronic components used to control the current passing

through the circuit. They are calibrated in ohms. In other word resistance are circuit

elements having the function of introducing electrical resistance into the circuit.

There are three basic types :( a) Fixed resistor (b) Rheostat (c) Potentiometer

A fixed resistor is a two terminal resistor whose electrical resistance is constant.

A rheostat is a resistor that can be changed in resistance value without opening the

circuit to make adjustment.

A potentiometer is an adjustable resistor with three terminals, one at each end of the

resistor element and third movable along its length.

4.8. PCB Layout:

The PCB layout of the project is:-

Figure no.4.12

25

Page 26: tachometer

4.9. Working:

The tachometer comprises AT89C2051 microcontroller, ULN2003 high-

current Darlington transistor array, CA3140 operational amplifier, common-anode 7-

segment (4-digit multiplexed) display and its four anode-driving transistors. The

AT89C2051 is a 20-pin, 8-bit microcontroller of Intel’s 8051 family made by Atmel

Corporation. Port-1 pins P1.7 through P1.2, and port-3 pin P3.7 are connected to input

pins 1 through 7 of ULN2003. Port-1 pins are pulled up with 10-kilo-ohm resistor

network RNW1. They drive all the seven segments of the display with the help of

internal inverters. Port-3 pins P3.0 through P3.3 of the microcontroller are connected

to the base of transistors T1 through T4, respectively, to select one digit out of the

four at a time and to supply anode-drive currents to the common anode pin of

respective digit. When pin P3.0 of microcontroller IC1 goes low, it drives transistor

T1 into saturation, which provides the drive current to anode pin 6 of 4- digit, 7-

segment, common-anode display DIS1. Similarly, transistors T2 through T4,

respectively, provide supply to common-anode pins 8, 9 and 12 of DIS1. Thus

microrocontroller IC1 drives the segment in multiplexed manner using its port pins.

This is time-division multi-plexing process. Segment data and display-enable pulse

for display are refreshed every 5ms. Thus, the dis-play appears to be continuous even

though it lights up one by one. Switch S1 is used to manually reset the

microcontroller, while the power-on-reset signal for the microcontroller is given by

C1 and R6. A 12MHz crystal is connected to pins 4 and 5 of IC1 to generate the basic

clock frequency for the microcontroller. The circuit uses a 6V battery for power

supply or alternatively mains derived low voltage supply.

4.9. Software:

The software is written in Assembly language and assembled using 8051

cross-assembler. It is well commented and easy to understand. It uses AT89C2051’s

internal timer for measuring the period of one cycle of the rotation in units of 100

microseconds. Thus if the speed is 1500 rpm, it is 25 rps, and the time taken for one

cycle is 40 ms. The timer uses an interrupt to count overflows every 100

microseconds and so the number counted by the timer program in this case will be

‘400.’ This is divided by ‘600,000’ (so many 100/µs present in a minute), giving a

result of ‘1500.’ This gives the rpm. These digits are displayed on the 4-digit, 7-

26

Page 27: tachometer

segment display. To perform the division, subroutine UDIV32 is employed, which is

a standard subroutine available for 8051 family for 32-bit number by 16-bit number

division. It has an accuracy of 5 rpm in a 6000rpm count. The software for this

project is given below;

Program burned in microcontroller

$mod51ORG 0H AJMP 30HORG 0BH; TIMER 0 INTERRUPT VECTORAJMP TIMER0ISR; Timer 0 Interrupt service routine addressORG 30H MOV SP,#60H ;set stack pointer MOV P3,#0FFH ;set all port 3 bits high to enable inputs also MOV P1,#03 ;set port 1 to all zeros expect bits 0,1 MOV TMOD,#01100001B ;TIMER 1 - MODE 2COUNTER,TIMR-0 TO 16 bit timerBEG: MOV TH0,#0ffH ;TIMER REG.0 IS SET TO 0,GIVES 64ms MOV TL0,#-99 ; timer low reg. is also so setb et0 setb ea mov 44h,#0 mov 45h,#0 acall delay ajmp lowsigdelay: mov r2,#10 djnz r2,$ ;wait 20 us retlowsig: jb p3.6,lowsig call delay jnb p3.6,$ setb tr0 ; start timer mov c,p3.6 ;high begins mov p3.5,c acall delay jb p3.6, $ mov c,p3.6 ;low now mov p3.5,c acall delay jnb p3.6,$ mov c,p3.6 ;high begins again mov p3.5,c clr tr0 ;stop timer clr et0 ;and interrupt by timer mov r3,#0 ;number 600000 or 927c0 hex as Dividend

27

Page 28: tachometer

mov r2,#09h ; 9 mov r1,#27h ;27 mov r0,#0c0h ; c0 mov r5,45h ;divisor is time for one cycle mov r4,44h call UDIV32 ;divide 60000/t mov 40h,r0 mov 41h,r1 mov r1,41h mov r2,40h CALL HEX2BCD mov 50h,#0FFH call refreshdisp: call refresh1 djnz 50h,disp ; so many times for a visible time limit jmp beg;16 Bit Hex to BCD Conversion for 8051 Microcontroller;This routine is for 16 bit Hex to BCD conversion;;Accepts a 16 bit binary number in R1,R2 and returns 5digit BCD in ;R7,R6,R5,R4,R3(upto 64K ) Hex2BCD: ;r1=high byte, r7 most significant digit, R2= LSByte MOV R3,#00D MOV R4,#00D MOV R5,#00D MOV R6,#00D MOV R7,#00D MOV B,#10D MOV A,R2 DIV AB MOV R3,B ; MOV B,#10 ; R7,R6,R5,R4,R3 DIV AB MOV R4,B MOV R5,A CJNE R1,#0H,HIGH_BYTE ; CHECK FOR HIGHBYTE SJMP ENDDHIGH_BYTE: MOV A,#6 ADD A,R3 MOV B,#10 DIV AB MOV R3,B ADD A,#5 ADD A,R4 MOV B,#10 DIV AB MOV R4,B ADD A,#2 ADD A,R5

28

Page 29: tachometer

MOV B,#10 DIV AB MOV R5,B CJNE R6,#00D,ADD_IT SJMP CONTINUEADD_IT: ADD A,R6CONTINUE: MOV R6,A DJNZ R1,HIGH_BYTE MOV B, #10D MOV A,R6 DIV AB MOV R6,B MOV R7,AENDD: retDISP1:REFRESH:; content of 18 to 1B memory locations areoutput on LEDs ; only numbers 0 to 9 and A to F are valid data inthese locations MOV 18H,r3 ; least significant digit MOV 19H,r4 ; next significant digit MOV 1AH,r5 MOV 1BH,R6 ; most significant digit (max:9999) RETrefresh1: MOV R0,#1bh ; 1b,1a,19,18, holds values for 4 digits MOV R4,#8 ; pin p3.3_ 0 made low one by one startswth 18 mov r7,#2 ; decimal pt.on 3rd digit from left (2 ndfromright)PQ2: CALL SEGDISP dec R0 mov a,r4 rrc a mov r4,a jnc pQ2 PV3:RETSEGDISP:mov dptr,#ledcode MOV A,@R0 ANL A,#0FH MOVC A,@A+dptrsegcode:MOV R5,A ORL A,#03H ; WE WANT TO USE PORT 1 BITS 0AND 1 FOR INPUT ANLOG ; so retain them high S3: MOV P1,A ; SEGMENT_PORT MOV A,R5 ;we use p3.7 for the segment ‘a’ of display RRC A ;so get that bit D0into carry rrc a mov p3.7,c ;segment ‘a;

29

Page 30: tachometer

S1: MOV A,R4 ; get digit code from r4 00001000 cpl a ;11110111 rrc a ;11111011-1 mov p3.0,c ; output to drive transsitors for digit light-ing rrc a ;11111101-1 mov p3.1,c rrc a ;11111110-1 mov p3.2,c rrc a ;1111111-0 yes low makes left most digit showmsdigitmov p3.3,cS5:S4: ACALL DELAY1 ; let it burn for some time MOV A,#0ffH ; extinguish the digit after that time MOV P3,A ; to prevent shadow s6: RETledcode:DB 7EH,0CH,0B6H,9EH,0CCH,0DAH,0FAH ;these are code for the numbers 0 to 9 and A to F DB 0EH,0FEH,0CEH,0EEH,0F8H,72H,0BCH,0F6H,0E2H DELAY1:MOV 55h,#0ffH ; 1ms N: NOP DJNZ 55h,N RETTIMER0ISR:mov th0,#0ffh mov tl0,#-90 ; in 100 us steps push acc mov a,#1 clr c add a, 44h ;count time btwn pulses mov 44h,a mov a,#0 addc a,45h ;add carry to most sign. byte mov 45h,a pop acc reti; subroutine UDIV32;32 bit /16 bit to 32 bit quotient and remainder un-signed;input r3,r2,r1,r0 = dividend X;input r5,r4 = divisor y;output r3-r0 = quotient Q of X/Y;r7,r6,r5,r4 =remainder;alters acc, flagsUDIV32: push 08 ;save reg. bank 1 push 09 push 0AH push 0BH push 0CH

30

Page 31: tachometer

push 0DH push 0EH push 0Fh push dpl push dphpush Bsetb RS0 ;select reg.bank 1mov r7,#0mov r6,#0mov r5,#0mov r4,#0mov B,#32 ;set loop countdiv_lp32:clr RS0 ;selet reg.bank 0clr Cmov a,r0 ;shift highestbit of Xrlc amov r0,amov a,r1 ;shift next bit of Xrlc amov r1,amov a,r2 ;shift next bit of Xrlc amov r2,amov a,r3 ;shift next bit of Xrlc amov r3,asetb rs0 ;reg. bank 1mov a,r4 ;lowest bit of remainderrlc amov r4,amov a,r5 ;shift next bit of remrlc amov r5,amov a,r6 ;shift next bit of remrlc amov r6,amov a,r7 ;shift next bit of remrlc amov r7,amov a,r4clr Csubb a,04mov dpl,amov a,r5subb a,5mov dph,amov a, r6subb a,#0mov 06,amov a,r7

31

Page 32: tachometer

subb a,#0mov 07,acpl Cjnc div_321mov r7,7mov r6,6mov r5,dphmov r4,dpldiv_321: mov a,r0rlc amov r0,a ; shift result bit into partial quotientmov a,r1rlc amov r1,amov a,r2rlc amov r2,amov a,r3rlc amov r3,adjnz B,div_lp32mov 7,r7mov 6,r6mov 5,r5mov 4,r4mov 3,r3mov 2,r2mov 1,r1mov 0,r0clr rs0pop Bpop dphpop dplpop 0Fhpop 0EHpop 0Dhpop 0Chpop 0bhpop 0ahpop 09pop 08retEND

32

Page 33: tachometer

Advantages of Contactless Tachometer:

It takes less than a minute to read out r.p.m.

It reads the r.p.m. with the maximum speed and the average speed

It gives better performance and reliability.

It is portable so we can carry it to large rotating machine to note the r.p.m.

It does not interfere with the motor on test because we are not touching any

component.

It refreshes the L.C.D. after the reset key is pressed.

Compact in size.

It can measure maximum r.p.m. of 9900.

Applications:

It can be used by the companies that prepare the fan. It can be used to check the

performance of the fan.

This can be used by the companies that manufacture motor that has the r.p.m.

less than 9900.

It can be used as optical counter.

It can be used to check the r.p.m. for the hard disk drives, floppy disk drives in

the field of electronics.

Result:

33

Page 34: tachometer

Digital tachometers are particularly suitable for the precision measurement and

monitoring of time related quantities, which are able to be converted into a

proportional frequency using appropriate sensors. Time-related quantities include

rotational and linear velocity, flow rate and related quantities. In this project, the

rotational speed of dc motor is measured using phototransistor which is then displayed

in the 7-segment display. In our project, we have used two dc motors of different

speeds i.e. of 150 rpm and 60 rpm. By using two different dc motors, we can show

variable speed readings without the use of a variable motor which is costly.Thus, the

cost of the project is reduced.

The operation of the digital tachometer with the use of Atmel AT89C2051

microcontroller had problems and limitations in that the measurement of revolution

per minute values less than 60 rpm with a single pulse was problematic. Also to

obtaining multiple pulses to increase the accuracy of the tachometer was also another

challenge. The microcontroller AT89C2051 is connected to an external crystal

oscillator.

Conclusion:

34

Page 35: tachometer

The specific objectives and scope of this project was to:

Reduce cabling works by the use of electronic printed control board (PCB)

Showing variable speed readings by the use of two dc motors.

Change from ATMEL AT89C2052 to AT89C2051.

In this project we have used two dc motors of different speeds instead of a

variable motor which reduces the cost of the project.

A digital tachometer based on phototransistor’s infrared light reflection technique

has been demonstrated successfully. Its major advantage is that it does not require any

physical contact with the rotating shaft to measure its speed. This project can be

extended further by adding data logging feature to the design. This is required in

certain applications where the RPM of a rotating shaft is needed to be monitored. The

data logger keeps the records of varying RPM over time, and those records are later

transferred to a PC through the USB interface.

There are some few recommendations for further research in developing or expanding

this project design. These recommendations are

1. The project could be enhanced to regulate the power supply, and also to

provide a very simple battery monitor, with a green and a red LED, indicating

whether the battery needs to be changed or not.

2. The project could also be enhanced to detect the direction of rotation of the

shaft.

3. More effective and efficient kind of sensor with the same functionality could

be used so that the distance from the infra red sensor to the shaft could be

positioned further than the present distance

Reference:

1. Andrew Huang -1998 (contactless Tachometer)

35

Page 36: tachometer

2. Sourabh Biyani- contactless Tachometer using IR sensor

3. Jim McGhee- 1999 (contactless Tachometer using PIC16C715)

4. www.4crawler.com/Diesel/Cheap Tricks/Tachometer/index.shtml

5. www.geocities.com/steves_workshopwas/tachometer.htm

36