You are on page 1of 30

CONTACTLESS TACHOMETER WITH MOTOR SPEED

CONTROL

ABSTRACT

This article describes how to build a contact-less tachometer (device used to


count the revolutions per minute of a rotating shaft) using an 8051 microcontroller
and a proximity sensor. As the name implies, what makes this device special, is
that it can measure the rotational speed of a shaft without even touching it. This is
very interesting when making direct contact with the rotating shaft is not an option
or will reduce the velocity of the shaft, giving faulty readings. This device is built on
an AT89S52 microcontroller, an alpha-numeric LCD module and a proximity sensor
to detect the rotation of the shaft whose speed is being measured.

The new system attached with this project helps to control the speed
according to the value entered using the key pad. The current speed of this system
will display on the LCD. The speed of the DC motor is controlled using PWM
technique. An H bridge is attached to this system can drives the DC motor.

The idea behind most digital counting device, frequency meters and
tachometers, is a micro-controller, 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 proximity sensor, 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.

Here we are controlling speed, orientation and on/off of a dc motor using


finger tips. When a switch in keypad interfaced with microcontroller is pressed, it
will make the control of the dc motor. The dc motor is controlled by the
microcontroller using a dc driver circuit.
The aim of development of this project is towards providing efficient and simple
method for control speed of DC motor using pulse width modulation technique. The modulation
of pulse width is obtained using microcontroller.
There are several methods for controlling the speed of DC motors. One simple
method is to add series resistance using a rheostat. As considerable power is consumed in the
rheostat, this method is not economical. Another method is to use a series switch that can be
closed or opened rapidly. This type of control is termed as chopper control. The PWM based
chopper circuit smoothly controls the speed of general purpose DC motors.
To get desired modulation of pulse width as output, we have writer program in
microcontroller according to the key being pressed.

Here we are using a 12v DC Motor for controlling the speed and with a
driver circuit using TIP transistors a DC motor of ratings upto 2 Amperes can be
controlled.
BLOCK DIAGRAM
POWER
H- Bridge dc drive
PROXIMITY
SUPPLY
KeyIRpad
SENSOR TXR LCD

89S52
MICROCONTROLLER

The last decade has an existing revolution in the capabilities of microprocessor.


Manufacturers have produced 16 and 32 bit processor to answer the needs of even more
powerful CPU processing capabilities. Because of their processing power and speed, these
processors have found their way into the design of stand-alone products. Micro controller is
another branch in the evolution of microprocessor capability. It is a branch that manufacturers
have been developing with equal vigor. Instead of focusing upon larger word width and address
space the emphasis here has been upon exceedingly fast real-time control. It has focused upon
the integration of the facilities needed to support fast control into a single chip. In the past, the
highest performance real time control application have employed microprocessor with interrupt
handler chips, programmable timer chip and ROM and RAM chips to achieve what can now be
achieved in a single state-of-the-art microcontroller chip.

The Intel 8031/89c52/8751/8951 belonging to the MCS52 family is a stand –alone,


high performance single-chip computer fabricated with Intel’s highly – reliable + 5 Volt,
depletion load, N-channel, silicon gate MOS technology and packaged in a 40 pin. It provides
the hardware features, architectural enhancements and new instructions that are necessary to
make it a powerful and cost effective controller for applications requiring up to 64 K bites of
Program memory and/or up to 64 bytes of data storage.

The 89c52/8751 contains a non-volatile 4K x 8 read-only program memory; a volatile


128 x 8 read/write data memory; 32 I/O lines; two 16 bit timer/counters; a 5v source, two-
priority-level, nested interrupt structure; a serial I/O port for either multi process communication;
I/O expansion or full duplex UART and on-chip oscillator and clock circuits.
The 8031 is identical, except that it takes for program memory. For systems that require extra
capability, 89c52 can be expanded using standard TTL compatible memories and bytes oriented
MCS-80 and MCS-85 peripherals.

Features

The MCS51 contains the following features

Eight-bit CPU registers A (Accumulator)

Sixteen-bit Program counter (PC) and data pointer (DTPR)

Eight-bit program status word (PSW)

Eight-bit stack pointer (SP)

Internal ROM (89c52) or EPROM (8751) or EEPROM (8951)

Four register banks each contains eight registers

Sixteen bytes, which may be addressed at the bit level

Eight bytes of general-purpose data memory

Thirty-two input/output pins arranged as four 8-bit ports

The sixteen bit timer or counters: T0 and T1

Full duplex serial data receiver/transmitter

Control Registers: TCON, TMOD, SCON, PCON, IP and IE

Two external and internal sources

Oscillator and clock circuit

The 89c52 microcontroller, like as 8048 processor that is efficient both as a


controller and as an arithmetic processor. The 89c52 has extensive facilitates for binary and
BCD arithmetic and excels in bit-handling capabilities. Efficient use of program memory results
from an instruction set consisting of 44% of one byte 41% of two byte, 15% three byte
instructions.
THE 89c52 FAMILY

The 89c52 is a stand – alone high – performance single chip computer intended
for use in sophisticated real-time applications such as instrumentation, industrial control and
intelligent computer peripherals. It provides the hardware features, architectural enhancements
and new instructions that make it a powerful and cost effective controller for applications
requiring up to 64 K bytes of program memory and/or up to 64 K bytes of data storage. The
8031 is a control-oriented CPU without on –chip program memory. It can address 64K-bytes of
external program memory in addition to 64K-bytes of External Data Memory. For systems
requiring extra capability, each member of the 89c52 family can be expanded using standard
memories. The 89c52 is on 8031 with the lower 4K bytes of program memory filled with on-
chip mask programmable ROM while the 8751 has 4K-bytes of UV light erasable/electrically-
programmable ROM.

89c52 CPU ARCHITECTURE

The 89c52 CPU manipulates operands in four memory spaces. These are the 64
K-bytes program memory, 384-byte Internal data memory and 16-bit program counter spaces.
The internal data memory address space is further divided into the 256 byte Internal Data RAM
and 128 byte special Function Register (SFR) address spaces. Four Register Banks (each with
eight registers), 128 addressable bits, and the stock reside in the Internal Data RAM. The stock
depth is limited only by the available Internal Data RAM and its location is determined by the 8
–bit stack pointer. All Registers except the program counter and the four 8 Register Bank reside
in the special function Register address space. These memory mopped registers include
arithmetic registers, pointers I/O ports; interrupt system registers, timers and special port. 128
bit locations in the SFR address space are addressable as bits. The 89c52 contain 128 bytes of
Internal Data RAM and 20 SFRs

The 89c52 provide a non-paged program Memory address space to accommodate


relocatable code. Conditional branches are performed relative to the program counter. The
register indirect jump permits branching relative to a 16 bit base register with an offset provided
by an 8-bit index register. Sixteen-bit jumps and calls permit branching to any location in the
contiguous 64 K program Memory address space.

The 89c52 is classified, as an 8-bit machine since the internal ROM, RAM,
SFRs, Arithmetic/Logic unit and external data has are each 8-bit wide. The 89c52
perform operations on bit, nibble, byte and double-byte data types. The 89c52 has
extensive qualities for byte transfer, logic and integer arithmetic operations. It excels at
bit handling since data transfer, logic and conditional branch operations
can be performed directly on Boolean variables.

U1
31 39
E A /V P P 0 .0 38
19 P 0 .1 37
X 1 P 0 .2 36
P 0 .3 35
18 P 0 .4 34
X 2 P 0 .5 33
P 0 .6 32
9 P 0 .7
RE S E T 21
P 2 .0 22
12 P 2 .1 23
13 IN T 0 P 2 .2 24
14 IN T 1 P 2 .3 25
15 T0 P 2 .4 26
T1 P 2 .5 27
1 P 2 .6 28
2 P 1 .0 P 2 .7 PIN DESCRIPTION
3 P 1 .1 17
4 P 1 .2 RD 16
5 P 1 .3 W R 29
6 P 1 .4 P S E N 30
P 1 .5 A L E /P
7
P 1 .6 TX D
11 Vss
8 10
P 1 .7 R X D
8051
Circuit ground potential

Vcc
+5V power supply is during the operations, programming and verification.

Port ‘O’
Port ‘O’ is an 8-bit open drain bi-directional O/O port. It is also the multiplexed low
order address and data bus when using external memory. It is used for data output and output
during programming and verification. Port O can sink/source two TTL loads.

Port 1
Port 1 is an 8-bit quasi-traditional I/O port. It also emits the low-order address byte
during programming and verification. Port 1 can sink/source one TTL Load.

Port 2
Port 2 is an 8-bit quasi-bi-directional I/O port. It also emits the high order address byte
when accessing external memory. It is used for the high-order address and the control signals
during programming and verification. Port 2 can sink/source one TTL load.

Port 3
Port 3 is an 8-bit quasi bi-directional I/O port. It also contains the interrupt, timer, serial
port and RD and WR pins that are used by various options. The output batch corresponding to a
secondary function must be programmed to a one (1) for that function to operate. Port 3 can
sink/source one TTL load. The secondary functions are assigned to the pins of port 3, as follows.

RXD/data (P3.0) - Serial Port’s receiver data input (asynchronous) or data input/output
(synchronous).
TXD/Clock (P3.1) - Serial ports transmitter data output (asynchronous) or clock output
(synchronous).
INTO (P3.2) - Interrupt O input or gate control input for counter 0.
INTI (P3.3) - Interrupt 1 input or gate control input for counter 1.
T0 (P3.4) - Input to counter 0.
T1 (P3.5) - Input to counter 1.
WR (P3.6) - The write control signal batches the data byte from port 0 into the External
Data Memory to port 0.

RST/VPD
A low to high transition on this pin (at approximately 3V) resets the 89c52. If VPD is
held within its space (approximately +5V), while Vcc drops below spec, VPD will provide stand
by power to the RAM. When VPD is low, the RAM’s current is drawn from Vcc. A small
internal resistor permits power on reset using only a capacitor connected to Vcc.

ALE/PROG
Address Latch Enable provides, output used for latching the address into external
memory during the normal operation. Receives the program pulse input during EPROM
programming.

PSEN
The program store enable output is a control signal that enables the external
program memory to the bus during normal fetch operations.

EA/VDD
When held at a TTL high level, the 89c52 executes instructions from the internal
ROM/EPROM when the PC is less than 4096. When held at a TTL low level, the 89c52 fetches
all instructions from external program memory. The pin also receives the 21V EPROM
programming supply voltage.

XTAL1
Input to the oscillators high gain amplifier. A crystal or external source
can be used.

Here the main functions of the microcontroller we incorporate are:

• As keyboard scanner
• As an encoder
• For serial communication

IR Transmitter and receiver

Here we use IR photo diode and IR LED for sensing the speed. The LED and receiver
is arranged in such a manner that the direct IR radiations will fall on the receiver
diode. Thus the obstacle attached to the shaft will interrupt the radiations to fall on
IR diode. This will cause the conduction pf the current through the series resistor
causing a voltage drop. By attaching an NPN transistor it is possible to make the
pulse according to the interruption
LCD DISPLAY

The 89s52 program must interact with the outside world using input and
output devices that communicate directly with a human being. One of the most
common devices attached to an 89s52 device is an LCD display. Some of the most
common LCDs connected to the 89s52 are 16*2 and 20*2 display. This means 16
characters per line by two lines and 20 characters per line by two lines,
respectively.

The 44780 standard requires 3 control lines as well as either 4 or 8 input/output


lines for the data bus. The user may select whether the LCD is to operate with a 4
bit data bus is used, the LCD will require a total of 11 data(3 control lines plus the 8
lines for the data bus)

The EN is called “Enable “.This control line is used to tell the LCD that you are
sending it data. To send data to LCD your program should first set this line high (1)
and then set the other control lines and/or put data on the data bus. When the other
lines are completely ready, bring EN low (0) again. The 1-0 transition tells the 44780
to take the data currently found on the control lines and on the data bus and to
treat it as a command.

The RS lines are the “Register select” line. When RS is low(0),the data is to be
treated as a command or a special instruction(such as clear screen, position cursor
etc).When RS is high(1), the data being send is text data, which should be displayed
on the screen.For example, To display the letter”T” on the screen you would set RS
high.

The RW line is the “read/write” control line.When RW is low(0),the information on


the data bus is being written to the LCD.When RW is high(1), the programs is
effectively querying(or reading) the LCD.Only one instruction(“get LCD status”) is a
read command.All others are write command so RW will always be low.

The display contains two internal byte wide registers,one for command(RS=0)
and the second for characters to be displayed(RS=1).It also contains a user
programmed RAM area(The character RAM) that can be programmed to generate
any desired character that can be found using a dot matrix.To distinguish between
these two data areas, the hex command byte 80 will be used to signify that the
display RAM address 00h is choosen.

Port is used to furnish the command or data byte,and ports 3.2 to 3.4 furnish
register select(RS) and read or write(R/W) levels.

In this project we use 16 * 2 character display for displaying various stages of the
projects. We connect LCD display to the port 1 of the micro controller. LCD display
displays messages at the receiving and transmitting section

LCD is a type of display used in digital watches and many portable computers. LCD
displays utilize to sheets of polarizing material with a liquid crystal solution between them. An
electric current passed through the liquid causes the crystals to align so that light cannot pass
through them. LCD technology has advanced very rapidly since its initial inception over a
decade ago for use in lap top computers. Technical achievements has resulted in brighter
displace, higher resolutions, reduce response times and cheaper manufacturing process.

The liquid crystals can be manipulated through an applied electric voltage so that light is
allowed to pass or is blocked. By carefully controlling where and what wavelength (color) of
light is allowed to pass, the LCD monitor is able to display images. A backlight provides LCD
monitor’s brightness.

Over the years many improvements have been made to LCD to help enhance resolution,
image, sharpness and response times.

One of the latest such advancement is applied to glass during acts as switch allowing
control of light at the pixel level, greatly improving LCD’s ability to display small-sized fonts
and image clearly.

Other advances have allowed LCD’s to greatly reduce liquid crystal cell response times.
Response time is basically the amount of time it takes for a pixel to “change colors”, in reality
response time is the amount of time it takes a liquid crystal cell to go from being active to
inactive.

This is due to following reasons:

• The declining prices of LCDs.

• The ability to display numbers, characters and graphics. This is in contrast to


LEDs, which are limited to numbers and a few characters.

An intelligent LCD display of two lines, 16 characters per line that is interfaced to the
AT89s52 microcontroller.

Incorporation of a refreshing controller into the LCD, thereby relieving the CPU to keep
displaying the data. Ease of programming for characters and graphics.

DC DRIVER
An H-bridge is an electronic circuit which enables a voltage to be applied across a load in either
direction. These circuits are often used in robotics and other applications to allow DC motors to run
forwards and backwards. H-bridges are available as integrated circuits, or can be built from discrete
components.

The term "H-bridge" is derived from the typical graphical representation of such a circuit. An H-bridge is
built with four switches (solid-state or mechanical). When the switches S1 and S4 (according to the first
figure) are closed (and S2 and S3 are open) a positive voltage will be applied across the motor. By
opening S1 and S4 switches and closing S2 and S3 switches, this voltage is reversed, allowing reverse
operation of the motor.

Using the nomenclature above, the switches S1 and S2 should never be closed at the same time, as this
would cause a short circuit on the input voltage source. The same applies to the switches S3 and S4. This
condition is known as shoot-through.
[edit]Operation

The two basic states of an H-bridge.

The H-Bridge arrangement is generally used to reverse the polarity of the motor, but can also be used to
'brake' the motor, where the motor comes to a sudden stop, as the motor's terminals are shorted, or to let
the motor 'free run' to a stop, as the motor is effectively disconnected from the circuit. The following table
summarises operation.

S S S S
Result
1 2 3 4

Motor moves
1 0 0 1
right

Motor moves
0 1 1 0
left

Motor free
0 0 0 0
runs

0 1 0 1 Motor brakes

1 0 1 0 Motor brakes
3*4 KEYPAD

If we are interfacing 16 keys, normally we need 16 pin in microcontroller. To avoid


this we interface these keys as matrix manner. While connecting 16 keys as matrix
manner we need to use only 8 pins in microcontroller, 4 pins each for both rows and
columns, as shown below.

R/ C1 C2 C3 C4
C
R1 1 2 3 4

R2 5 6 7 8
R3 9 0 * #

POWER SUPPLY:

Power supply block consists of following units:

• Step down transformer.


• Bridge rectifier circuit.
• Input filter.
• Voltage regulators.
• Output filter..

Step down transformer:

The step-down transformer is used to step down the supply voltage of 230v ac
from mains to lower values, as the various IC’s used in this project require reduced
voltages. The transformer consists of primary and secondary coils. To reduce or step
down the voltage, the transformer is designed to contain less number of turns in its
secondary core. The outputs from the secondary coil which is center tapped are the ac
values of 0v, 15v and 15v. The conversion of these ac values to dc values to dc values
is done using the full wave rectifier unit.

Rectifier Unit:

A diode bridge is an arrangement of four diodes connected in a bridge circuit. That


provides the polarity of output voltage of any polarity of the input voltage. When used in its most
common application, for conversion of alternating current (A.C) input into direct current (D.C)
output, it is known as a bridge rectifier. The diagram describes a diode-bridge design known as a
full wave rectifier. This design can be used to rectify single phase A.C. when no transformer
center tap is available. A bridge rectifier makes use of four diodes in a bridge arrangement to
achieve full wave rectification. This is a Widely used configuration, both with individual diodes
wired as shown and with single component bridges where the diode bridge is wired internally.

For both positive and negative swings of the transformer, there is a forward path through
the diode bridge. Both conduction paths cause current to flow in the same direction through the
load resister, accomplishing full-wave rectification. While one set of diodes is forward biased,
the other set is reverse biased and effectively eliminated from the circuit.

Input Filter: -

Capacitors are used as filters. The ripples from the dc voltages are removed and
pure dc voltage is obtained. The primary action performed by capacitor is charging and
discharging. It charges in positive half cycle of the ac voltage and it will discharge in
negative half cycle. So it allows only ac voltage and does not allow the dc voltage. This
filter is fixed before the regulator. Capacitors used here are of the value 1000uF
Regulator unit: -

Regulator regulates the output voltage to a specific value. The output voltage is
maintained irrespective of the fluctuations in the input dc voltage. Whenever there are any ac
voltage fluctuations, the dc voltage also changes, and to avoid this regulators are used.

Regulators can be classified as: -

1. Positive regulator, which regulates the positive voltage(7805,7812)

1. > input pin

2. > ground pin

3. > output pin

2. Negative regulator, which regulates the negative voltage (7912).


1. > ground pin

2. > input pin

3. > output pin


Regulators used in this application are: -

7805 which provides 5v dc

7812 which provides 12v dc

7912 which provides -121v dc

Out put Filter: -

This filter is fixed after the Regulator circuit to filter any of the possibly found ripples in
the output received finally. Capacitors used here are of value 10F.
PCB PREPARATION TECHNIQUES

You need to generate a positive (copper black) UV translucent artwork film. You
will never get a good board without good artwork, so it is important to get the best possible
quality at this stage. The most important thing is to get a clear sharp image with a very solid
opaque black. Nowadays, artwork is drawn using either a dedicated PCB CAD program or a
suitable drawing/graphics package. It is absolutely essential that your PCB software prints holes
in the middle of pads, which will act as center marks when drilling. It is virtually impossible to
accurately hand-drill boards without these holes. If you’re looking to buy PCB software at any
cost level and want to do hand-prototyping of boards before production, check that this facility is
available. If you’re using a general-purpose CAD or graphics package, define pads as either a
grouped object containing a black-filled circle with a smaller concentric white-filled circle on top
of it, or as an unfilled circle with a thick black line (i.e. a black ring). When defining pad and line
shapes, the minimum size recommended for vias (through-linking holes) for reliable results is 50
mil, assuming 0.8mm drill size; 1 mil = (1/1000)th of an inch. You can go smaller with smaller
drill sizes, but through-linking will be harder. 65mil round or square pads for normal components
and DIL ICs, with 0.8mm hole, will allow a 12.5 mil down to 10mil if you really need to. Centre-
to-centre spacing of 12.5mil tracks should be 25mil—slightly less may be possible if your printer
can manage it. Take care to preserve the correct diagonal track-track spacing on mitered corners;
grid is 25 mil and track width 12.5mil. The artwork must be printed such that the printed side is
in contact with the PCB surface when exposing, to avoid blurred edges. In practice, this means
that if you design the board as seen from the component side, the bottom (solder side) layer
should be printed the ‘correct’ way round, and the top side of a double-sided board must be
printed mirrored.

Media

Artwork quality is very dependent on both the output device and the media
used. It is not necessary to use a transparent artwork medium—as long as it is
reasonably translucent to UV, its fine-less translucent materials may need a slightly
longer exposure time. Line definition, black opaqueness and toner/ink retention are
much more important. Tracing paper has good enough UV translucency and is
nearly as good as drafting film for toner retention. It stays flatter under laser-printer
heat than polyester or acetate film. Get the thickest you can find as thinner stuff
can crickle. It should be rated at least 90 gsm; 120 gsm is even better but harder to
find. It is cheap and easily available from office or art suppliers.

Output devices

Laser printers offer the best all-round solution. These are affordable, fast, and
good-quality. The printer used must have at least 600dpi resolution for all but the
simplest PCBs, as you will usually be working in multiples of 0.06cm (40 tracks per
inch). 600 dpi divides into 40, so you get consistent spacing and line width. It is very
important that the printer produces a good solid black with no toner pinholes. If
you’re planning to buy a printer for PCB use, do some test prints on tracing paper to
check the quality first. If the printer has a density control, set it to the blackest.
Even the best laser printers don’t generally cover large areas well, but usually this
isn’t a problem as long as fine tracks are solid. When using tracing paper or drafting
film, always use manual paper feed and set the straightest possible paper output
path to keep the artwork as flat as possible and minimize jamming. For small PCBs,
you can usually save paper by cutting the sheet in half. You may need to specify a
vertical offset in your PCB software to make it print on the right part of the page.
Some laser printers have poor dimensional accuracy, which can cause problems for
large PCBs. But as long as any error is linear, it can be compensated by scaling the
printout in software. Print accuracy is likely to be a noticeable problem when it
causes misalignment of the sides on double-sided PCBs—this can usually be
avoided by careful arrangement of the plots on the page to ensure the error is the
same on both layers; for example, choosing whether to mirror horizontally or
vertically when reversing the top-side artwork.
Photo resist PCB laminates

Always use good-quality, pre-coated photo resist fiberglass (FR4) board. Check carefully for
scratches in the protective covering and on the surface after peeling off the covering. You
don’t need darkroom or subdued lighting when handling boards, as long as you avoid direct
sunlight, minimize unnecessary exposure, and develop immediately after UV exposure.
Instagraphic Microtrak board develops really quickly, gives excellent resolution, and is
available in thin (0.8mm) and heavy copper flavors. On using spray-on photo resist, you will
always get dust settling on the wet resist. So it is not recommended unless you have access to
a very clean area or drying oven, or you only want to make low-resolution PCBs.

Exposure

The photo resist board needs to be exposed to UV light through the artwork, using a UV
exposure box. UV exposure units can easily be made using standard fluorescent lamp ballasts
and UV tubes. For small PCBs, two or four 8-watt, 30.5cm tubes will be adequate. For larger
(A3) units, four 38cm tubes are ideal. To determine the tube-to-glass spacing, place a sheet of
tracing paper on the glass and adjust the distance to get the most even light level over the
surface of the paper. Even illumination is a lot easier to obtain with 4-tube units. The UV
tubes you need are sold as replacements for UV exposure units, ‘black light’ tubes for disco
lighting, etc. These look white, occasionally black/blue when off, and light up with a light
purple. Do not use short-wave UV lamps like EPROM eraser tubes and germicidal lamps that
have clear glass, because these emit short-wave UV which can cause eye and skin damage. A
timer that switches off the UV lamps automatically is essential, and should allow exposure
times from 2 to 10 minutes in 15- to 30-second increments. It is useful if the timer has an
audible indication when the timing period has completed. A timer from a scrap microwave
oven would be ideal. Use glass sheet rather than plastic for the top of the UV unit, as it will
flex less and be less prone to scratches. A combined unit, with switch able UV and white
tubes, doubles as an exposure unit and a light-box for lining up double- sided artworks. If
you do a lot of double-sided PCBs, it may be worth making a double-sided exposure unit,
where the PCB can be sandwiched between two light sources to expose both sides
simultaneously. To find the required exposure time for a particular UV unit and laminate
type, expose a test piece in 30-second increments from 2 to 8 minutes, develop, and use the
time which gave the best image. Generally speaking, overexposure is better than
underexposure. For a single-sided PCB, place the artwork’s toner side up on the UV box
glass, peel off the protective film from the laminate, and place its sensitive side down on top
of the artwork. The laminate must be pressed firmly down to ensure good contact all over the
artwork. To expose double-sided PCBs, print the solder-side artwork as normal and the
component side mirrored. Place the two sheets together with the toner sides facing, and
carefully line them up, checking all over the board area for correct alignment, using the holes
in the pads as a guide. A light box is very handy here, but exposure can also be done with
daylight by holding the sheets on the surface of a window. If printing errors have caused
slight mis registration, align the sheets to average the errors across the whole PCB, to avoid
breaking pad edges or tracks when drilling. When these are correctly aligned, staple the
sheets together on two opposite sides, about 10 mm from the edge of the board, forming a
sleeve or envelope. The gap between the board edge and staples is important to stop the
paper distorting at the edge. Use the smallest stapler you can find, so that the thickness of the
staple is not much more than that of the PCB. Expose each side, covering up the top side with
a reasonably light-proof soft cover when exposing the underside. Be very careful when
turning the board over, to avoid the laminate slipping inside the artwork and ruining the
alignment. After exposure, you can usually see a faint image of the pattern in the
photosensitive layer.

Developing
Does not use sodium hydroxide for developing photo resist laminates? It is a completely and
utterly dreadful stuff for developing PCBs. Apart from its causticity, it is very sensitive to
both temperature and concentration, and made-up solution doesn’t last long. When it’s too
weak it doesn’t develop at all, and when too strong it strips all the resist off. It is almost
impossible to get reliable and consistent results, especially when making PCBs in an
environment with large temperature variations. A much better developer is a silicate-based
product that comes as a liquid concentrate. You can leave the board in it for several times the
normal developing time without noticeable degradation. This also means that it is not
temperature critical—no risk of stripping at warmer temperatures. Made-up solution also has
a very long shelf-life and lasts until it’s used up. You can make the solution up really strong
for very fast developing. The recommended mix is 1 part developer to 9 parts water. You can
check for correct development by dipping the board in the ferric chloride very briefly—the
exposed copper should turn dull pink almost instantly. If any shiny copper-colored areas
remain, rinse and develop for a few more seconds. If the board is under-exposed, you will get
a thin layer of resist which isn’t removed by the developer. You can remove this by gently
wiping with dry paper towel, without damaging the pattern. You can either use a
photographic developing tray or a vertical tank for developing.

Etching
Ferric chloride etch-ant is a messy stuff, but easily available and cheaper than most
alternatives. It attacks any metal including stainless steel. So when setting up a PCB etching
area, use a plastic or ceramic sink, with plastic fittings and screws wherever possible, and
seal any metal screws with silicone. Copper water pipes may get splashed or dripped-on, so
sleeve or cover them in plastic; heat-shrink sleeving is great if you’re installing new pipes.
Fume extraction is not normally required, although a cover over the tank or tray when not in
use is a good idea. You should always use the hex hydrate type of ferric chloride, which
should be dissolved in warm water until saturation. Adding a teaspoon of table salt helps to
make the etch-ant clearer for easier inspection. Avoid anhydrous ferric chloride. It creates a
lot of heat when dissolved. So always add the powder very slowly to water; do not add water
to the powder, and use gloves and safety glasses. The solution made from anhydrous ferric
chloride doesn’t etch at all, so you need to add a small amount of hydrochloric acid and leave
it for a day or two. Always take extreme care to avoid splashing when dissolving either type
of ferric chloride, as it tends to clump together and you often get big chunks coming out of
the container and splashing into the solution. It can damage eyes and permanently stain
clothing. If you’re making PCBs in a professional environment, where time is money, you
should get a heated bubble-etch tank. With fresh hot ferric chloride, a PCB will etch in well
under five minutes. Fast etching produces better edge-quality and consistent line widths. If
you aren’t using a bubble tank, you need to agitate frequently to ensure even etching. Warm
the etch-ant by putting the etching tray inside a larger tray filled with boiling water.
Tin plating
Tin-plating a PCB makes it a lot easier to solder, and is pretty much essential for surface
mount boards. Unless you have access to a roller tinning machine, chemical tinning is the
only option. Unfortunately, tin-plating chemicals are expensive but the results are usually
worth it. If you don’t tin-plate the board, either leave the photo resist coating on (most resists
are intended to act as soldering fluxes) or spray the board with rework flux to prevent the
copper from oxidizing. Room-temperature tin-plating crystals produce a good finish in a few
minutes. There are other tinning chemicals available, some of which require mixing with acid
or high-temperature use. Ensure that the temperature of the tinning solution is at least 25oC,
but not more than 40oC. If required, either put the bottle in a hot water bath or put the tinning
tray in a bigger tray filled with hot water to warm it up. Putting a PCB in cold tinning
solution will usually prevent tinning, even if the temperature is subsequently raised. For a
good tinned finish, strip the photo resist thoroughly. Although you can get special stripping
solutions and hand applicators, most resists can be dissolved off more easily and cleanly
using methanol (ethylated spirit). Hold the rinsed and dried PCB horizontal, and dribble few
drops of methanol on the surface, tilting the PCB to allow it to run over the whole surface.
Wait for about ten seconds and wipe off with a paper towel dipped in methanol. Rub the
copper surface all over with wire wool until it is bright and shiny. Wipe with a paper towel to
remove the wire wool fragments and immediately immerse the board in the tinning solution.
Don’t touch the copper surface after cleaning, as finger marks will impair plating. The copper
should turn silver colour within about 30 seconds. Leave the board for about five minutes,
agitating occasionally; do not use bubble agitation. For double-sided PCBs, prop the PCB at
an angle to ensure the solution gets to both sides. Rinse the board thoroughly and rub dry
with paper towel to remove any tinning crystal deposits. If the board isn’t going to be
soldered for a day or two, coat it with either a rework flux spray or a flux pen.

Drilling
If you have fiberglass (FR4) board, you must use tungsten carbide drill bits. Fiberglass eats
normal high-speed steel (HSS) bits very rapidly, although HSS drills are all right for odd
larger sizes (>2 mm). Carbide drill bits are expensive and the thin ones snap very easily.
When using carbide drill bits below 1 mm, you must use a good vertical drill stand—you will
break drill very quickly without one. Carbide drill bits are available as straight-shank or thick
(sometimes called ‘turbo’) shank. In straight shank, the whole bit is the diameter of the hole,
and in thick shank, a standard-size (typically about 3.5 mm) shank tapers down to the hole
size. The straight-shank drills are usually preferred because they break less easily and are
usually cheaper. The longer thin section provides more flexibility. Small drills for PCB use
usually come with either a set of collets of various sizes or a 3-jaw chuck. Sometimes the 3-
jaw chuck is an optional extra and is worth getting for the time it saves on changing collets.
For accuracy, however, 3-jaw chucks aren’t brilliant, and small drill sizes below 1 mm
quickly form grooves in the jaws, preventing good grip. Below 1 mm, you should use collets,
and buy a few extra of the smallest ones; keeping one collet per drill size, as using a larger
drill in a collet will open it out and it no longer grips smaller drills well. You need a good
strong light on the board when drilling, to ensure accuracy. A dichroic halogen lamp, under-
run at 9V to reduce brightness, can be mounted on a microphone gooseneck for easy
positioning. It can be useful to raise the working surface about 15 cm above the normal desk
height for more comfortable viewing. Dust extraction is nice, but not essential—an
occasional blow does the trick! A foot-pedal control to switch the drill ‘off’ and ‘on’ is very
convenient, especially when frequently changing bits. Avoid hole sizes less than 0.8 mm
unless you really need them. When making two identical boards, drill them both together to
save time. To do this, carefully drill a 0.8mm hole in the pad near each corner of each of the
two boards, getting the centre as accurate as possible. For larger boards, drill a hole near the
centre of each side as well. Lay the boards on top of each other and insert a 0.8mm track pin
in two opposite corners, using the pins as pegs to line the PCBs up. Squeeze or hammer the
pins into the boards, and then into the remaining holes. The two PCBs are now ‘nailed’
together accurately and can be drilled together.

Cutting
A small guillotine is the easiest way to cut fiberglass laminate. Ordinary saws (bandsaws,
jigsaws, and hacksaws) will be blunted quickly unless these are carbide-tipped, and the dust
can cause sink irritation. A carbide tile-saw blade in a jigsaw might be worth a try. It’s also
easy to accidentally scratch through the protective film when sawing, causing photo resist
scratches and broken tracks on the finished board. A sheet-metal guillotine is also excellent
for cutting boards, provided the blade is fairly sharp. To make cut-outs, drill a series of small
holes, punch out the blank, and file to size. Alternatively, use a fretsaw or small hacksaw, but
be prepared to replace blades often. With practice it’s possible to do corner cutouts with a
guillotine but you have to be very careful that you don’t over-cut!

CIRCUIT EXPLANATION
The circuit can be mainly divided into three sections

1. Input or sensor section


2. Controller section
3. Output section

The working of this project can thus be explained as follows

1. Input or Sensor section


The input section comprises of the speed sensor and the 3*4 keypad. The speed
sensor is a IR photo diode and IR led setup which provides an interrupt to the
controller whenever motor shaft cuts the IR signal, thus helping the controller to
calculate the speed of the motor.

The 3*4 keypad is used for setting the speed of the motor. If we set the speed by
using the keypad , the controller will check the motor for the preset speed . When
the preset speed is attained, then the motor rotates in that constant speed until we
set another speed using the keypad.

2. Controller section
Here we are using AT 89S52 microcontroller, which is an 8-bit
microcontroller. The controller section here checks the speed of the motor by
using the photo diode and display the speed on the LCD.
Also the controller checks the speed to be set on the motor given by the user
using the keypad and it controls the speed of the motor accordingly by using
PWM technique and attain the preset speed.

We are using PWM technique to control the speed of the DC motor.


In PWM technique the speed is controlled using square pulses which is generated from
microcontroller .When we increase the positive pulse width and decrease negative pulse
width, then the speed of DC motor will be increased due to increase in average voltage.
When we decrease the width of the positive pulse and increase the width of the negative
pulse, the average voltage will be decreased thereby the corresponding speed decreases.
3. Output section
The output section comprises of the 16*2 LCD display and the motor control
circuit. The LCD is used to display the speed and to set the speed using the
matrix keypad.
The motor control section is an H-bridge circuit used to drive the motor. The
speed of the motor is controlled by using PWM technique.