Rank Display System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 45

RANK DISPLAY SYSTEM

INTRODUCTION
There are so many games where the winner is the one who takes the
least time in successfully completing the task given. Take for instance
the ‘fastest finger first’ in KBC quiz show on TV or the ‘fastest
crossing first’ in any type of race. In these competitions, sometimes
there may be two or more players who appear to complete the task in
equal time. In such cases, it becomes difficult for the judge to announce
the winner, though there may be time difference of a few milliseconds
between the individuals in accomplishing the task.

Here is a circuit based on Atmel microcontroller AT89C51 that can


resolve the time-difference ambiguity and indicate correct ranking of all
the participants on a liquid-crystal display (LCD) module. It has been
designed for a maximum of eight participants playing at a time, denoted
by alphabets 'A' through 'H,' and can be used both for a 'fastest finger
first' quiz and 'fastest crossing first' race.

1
RANK DISPLAY SYSTEM

CIRCUIT DESCRIPTION

 Fig. shows the circuit of the microcontroller- based rank display


system. It comprises microcontroller AT89S51, transistor array IC
ULN2803, LCD module (16x2), regulator IC 7805 and a few
discrete components.
 IC AT89C51 is a low-power, high performance, 8-bit
microcomputer with 4 KB of Flash programmable and erasable
read-only memory (PEROM), 128B of RAM, 32 input/output
(I/O ) lines, two 16- bit timers/counters, a five-vector two-level
interrupt architecture, a full-duplex serial port, on-chip oscillator
and clock circuitry.
 Port-0 pins of the microcontroller (IC1) are pulled high via 4.7-
kilo-ohm resistor network RNW1 and interfaced with switches S1
through S8 (corresponding to players 'A' through 'H'), respectively.
 Port-0 pins P0.0 through P0.7 are also connected to pins 11
through 18 of ULN2803.
 Port-2 pins P2.0 through P2.7 are connected to inputs 1 through 8
of IC2.
 Each time a switch is pressed, a feedback is sent from port 2
through port 0 via ULN2803 (IC2). The purpose of this feedback is
to make a given pin of port-0 'low', independent of the condition of
the corresponding switch (S1 through 58) just after it has been
pressed once.
 One more input switch S11 is provided to reset the circuit for
starting the next round. Switch S11 is connected to P3.0 pin 10 of
the microcontroller. Pressing of switch S11 starts the next round of
questions. Thus, it acts as a latch. R1 through R8 are current-
limiting resistors.

2
RANK DISPLAY SYSTEM

 Port-l pins Pl.0 through P1.7 and port-3 pins P3.1 through P3.3 of
the microcontroller are interfaced with data line pins 7 through 14
and pins 4 through 6 of the LCD module for displaying the various
rankings. Contrast pin 3 of the LCD module can be controlled
using preset VR1.
 Pin 3.4 of the microcontroller is used to control piezobuzzer PZ1.
When P3.4 goes low, piezobuzzer PZ1 sounds. Pin 3.6 of IC1 is
connected to slide switch S9 for selection between race and quiz.
 Switch S10 is used to manually reset the microcontroller, while the
power-on reset signal for the microcontroller is derived from the
combination of capacitor C5 and resistor R10.
 A 11.0592MHz crystal generates the basic clock frequency for the
microcontroller.
 230V AC mains is stepped down by transformer X1 to deliver the
secondary output of 12V, 500mA. The transformer output is
rectified by a full-wave bridge rectifier comprising diodes D1
through D4, filtered by capacitor C3 and then regulated by IC 7805
(IC3). Capacitors C4 and C9 bypass any ripple present in the
regulated power supply.

3
RANK DISPLAY SYSTEM

WORKING

 First of all, select the mode by using switch S9.For example, when
you slide switch S9 towards 'quiz' option, the given circuit, can be
used as 'fastest finger first' quiz system.
 At the resumption of power, a message "Welcome to all the
players" is displayed on the LCD. After some time, it displays
players' names 'A' through 'H' in the first line and the message
'First Question' in the second line.
 Now the quizmaster can ask the first question. The monitor
program continuously checks the status of port 0. If any input
switch S1 through S8 is found low (by the controller program), it
means that the corresponding switch has been pressed.
 As soon as any of competitors 'A' through 'H' presses his switch
first, his rank is stored as ‘1’immediately in the rank table at the
corresponding RAM location. The buzzer sounds a beep and the
timer starts recording.
 The status of the rank table is updated repeatedly at intervals into
the rank table and this status is maintained (due to latching at port
0, offered by feedback from IC2) until the next key is pressed.
 Now the second case arises:
1. If the remaining seven players press their switches within 30
seconds, the LCD displays the message "Done in Time" and
the buzzer sounds a beep. Thereafter, the LCD displays the
ranks ('1' through'8') of all players below their names.
2. If the remaining seven players don't press their switches
within30 seconds, at the end of this period the LCD displays
the message "Time Out" and the buzzer sounds a beep. After
that, the ranks of those who have pressed their switches

4
RANK DISPLAY SYSTEM

within time are displayed below their names, while '-' is


displayed below the names of the remaining players.
 The display stays in this position and the monitoring program
checks the status of pin P3.0. If P3.0 (pin 10) of IC1 goes low on
pressing switch S11 for about 2 ms, all the things are initialized for
the next question and the LCD shows the message 'Next Question'
('Next Round' for race).
 For race competitions, the circuit works in a similar manner but
you need to replace switch S11 with a foot switch or LDR-laser
light combination. The message "Welcome to all the players" is
replaced with "Welcome to all the racers." 'Next Question' is
replaced with 'Next Round'. "Done in Time" is replaced with
"Covered in Time".
 In actual application, where contestants are seated in different
locations, you can extend input switches S1 through S8 to the
players. For this, connect a pair of wires to the connecting
terminals of each of these switches on the PCB to extend these to
players. In this case, tactile switches S1 through S8 are not
required on the PCB.

5
RANK DISPLAY SYSTEM

PICTURES OF PROJECT

fig.1 LCD displaying message ‘FIRST QUESTION’

fig.2 LCD displaying ranks of the players


HARDWARE DETAILS
6
RANK DISPLAY SYSTEM

1. 8051 MICROCONTROLLER
fig.3 AT89S51microcontroller

1.1 INTRODUCTION
The 8051 microcontroller belongs
to the MCS-5 (c) family. Its
features are summarized
below:
 Internal ROM and RAM
 Input & output ports with
programmable pins.
 Timer and Counter
 Serial Data Communication.

8051 architecture consists of these specific features:


 8-bit CPU with Register A and B.
 16-bit program Counter (PC) and Data Pointer (DPTR)
 8 bit Program Status Word (PSW)
 Internal ROM of 4KB
 Internal RAM of 128B
 4 register banks, each consisting 8 registers
 16 bytes which may be addressed at bit level
 8 bytes of general-purpose data memory
 32- input/output pins arranged as 4-8 bit ports PO-P3
 Two 16 bit timer/counters (TO-TI)
 Fully duplexed serial data receiver/transmitter (SBUF)
 Control register TMOD,TCON,SCOM,PCON,IP and IE
 Oscillator and Clock circuit.

7
RANK DISPLAY SYSTEM

1.2 PIN DIAGRAM AND ARCHITECTURE

fig.4 PIN DIAGRAM AND ARCHITECTURE of 8051

1.3 PIN CONFIGURATION


Pin Name Description Type
1 P1.0 or T2 Port 1 Bit 0 or Timer 2 External Input Input/Output
Port 1 Bit 1 or Timer 2 External
2 P1.1 or T2CAP Input/Output
Reload/Capture
3 P1.2 Port 1 Bit 2 Input/Output
4 P1.3 Port 1 Bit 3 Input/Output
5 P1.4 Port 1 Bit 4 Input/Output
6 P1.5 Port 1 Bit 5 Input/Output
7 P1.6 Port 1 Bit 6 Input/Output
8 P1.7 Port 1 Bit 7 Input/Output
9 Reset System Reset Input
10 P3.0 or RXD Port 3 Bit 0 or Serial Receive Input/Output

8
RANK DISPLAY SYSTEM

11 P3.1 or TXD Port 3 Bit 1 or Serial Transmit Input/Output


12 P3.2 or INT0 Port 3 Bit 2 or External Interrupt 0 Input/Output
13 P3.3 or INT1 Port 3 Bit 3 or External Interrupt 1 Input/Output
14 P3.4 or T0 Port 3 Bit 4 or Timer 0 External Input Input/Output
15 P3.5 or T1 Port 3 Bit 5 or Timer 1 External Input Input/Output
16 P3.6 or WR Port 3 Bit 6 or Write Strobe Input/Output
17 P3.7 or RD Port 3 Bit 7 or Read Strobe Input/Output
18 XTAL1 Crystal Input Input
19 XTAL2 Crystal Output Output
20 VSS Circuit Ground Input
21 P2.0 or Addr8 Port 2 Bit 0 or Address bit 8 Input/Output
22 P2.1 or Addr9 Port 2 Bit 1 or Address bit 9 Input/Output
P2.2 or
23 Port 2 Bit 2 or Address bit 10 Input/Output
Add10
24 P2.3 or Addr11 Port 2 Bit 3 or Address bit 11 Input/Output
25 P2.4 or Addr12 Port 2 Bit 4 or Address bit 12 Input/Output
26 P2.5 or Addr13 Port 2 Bit 5 or Address bit 13 Input/Output
27 P2.6 or Addr14 Port 2 Bit 6 or Address bit 14 Input/Output
28 P2.7 or Addr15 Port 2 Bit 7 or Address bit 15 Input/Output
Signal of this pin is used for reading
29 PSEN from external program memory Output
(ROM).
30 ALE This pin emits an impulse sequence with Output
a frequency equal to 1/6 of the frequency
generated by the main oscillator. If
external memory is used, signal from this
pin controls the additional register for

9
RANK DISPLAY SYSTEM

temporary storage of the lower address


byte (A0 - A7). This pin also serves as a
control input during the writing of
program to MCU.
When this pin is connected to the ground,
MCU gets program instructions from
external program memory. In case that
internal program memory is used
31 EA (common case), this pin should be Input
connected to the positive supply pole
(VCC). During the loading of program to
internal Flash memory, this pin is at
+12V
32 P0.7/Addr7 Port 0 Bit 7 or Address bit 7/Data bit 7 Input/Output
P0.6 or
33 Port 0 Bit 6 or Address bit 6/Data bit 6 Input/Output
Addr6/Data6
P0.5 or
34 Port 0 Bit 5 or Address bit 5/Data bit 5 Input/Output
Addr5/Data5
P0.4 or
35 Port 0 Bit 4 or Address bit 4/Data bit 4 Input/Output
Addr4/Data4
P0.3 or
36 Port 0 Bit 3 or Address bit 3/Data bit 3 Input/Output
Addr3/Data3
P0.2 or
37 Port 0 Bit 2 or Address bit 2/Data bit 2 Input/Output
Addr2/Data2
P0.1 or
38 Port 0 Bit 1 or Address bit 1/Data bit 1 Input/Output
Addr1/Data1

10
RANK DISPLAY SYSTEM

P0.0 or
39 Port 0 Bit 0 or Address bit 0/Data bit 0 Input/Output
Addr0/Data0
40 VCC Supply Voltage Input
T abl e 1.Pi n descri pt i on of 8051

2. LCD

fig.5 A LCD

2.1 INTRODUCTION

These components are “specialized” for being used with the


microcontrollers, which means that they cannot be activated by standard
IC circuits. They are used for writing different messages on a miniature
LCD.

 LCD screen consists of two lines with 16


characters each. Each character consists of 5x8 or 5x11 dot matrix.

 It displays all letters of alphabet, greek letters, punctuation marks,


mathematical symbols etc. In addition, it is possible to display
symbols that user makes up on its own.
11
RANK DISPLAY SYSTEM

 Contrast on display depends on the power supply voltage and


whether messages are displayed in one or two lines. For that
reason, variable voltage 0-Vdd is applied on pin marked as Vee.
Trimmer potentiometer is usually used for that purpose.

 The LCD Character standard requires 3 control lines as well as


either 4 or 8 I/O lines for the data bus.

 The user may select whether the LCD is to operate with a 4-bit
data bus or an 8-bit data bus. If a 4-bit data bus is used the LCD
will require a total of 7 data lines (3 control lines plus the 4 lines
for the data bus). If an 8-bit data bus is used the LCD will require a
total of 11 data lines (3 control lines plus the 8 lines for the data
bus). The three control lines are referred to as EN, RS, and R/W.
 There are three memory blocks inside the display:

 DDRAM Display Data RAM


 CGRAM Character Generator RAM
 CGROM Character Generator ROM

16 Gnd
16 15
15 Vcc
14
14 D7
13 D6
13 12
12 D5
11
11 D4
10 D3
10 9
9 D2
8
8 D1
7 D0
7 6 E
3

6
5
5 R/W
4 RS
4 3 2
3 Contrast
2
2 Vcc
1 Gnd
1
1

fig.6 LCD Pin Diagram

12
RANK DISPLAY SYSTEM

2.2 PIN CONFIGURATION

Pin Name Function

1 VSS Ground voltage

2 VCC +5V

3 VEE Contrast voltage

Register Select
4 RS 0 = Instruction Register
1 = Data Register

Read/ Write, to choose write or


read mode
5 R/W
0 = write mode
1 = read mode

Enable
0 = start to latch data to LCD
6 EN
character
1= disable

7 DB0 -D0(LSB)

8 DB1 -D1

9 DB2 -D2

10 DB3 -D3

11 DB4 -D4

12 DB5 -D5

13 DB6 -D6

14 DB7 -D7(MSB)

15 BPL Back Plane Light

16 GND Ground voltage 13


RANK DISPLAY SYSTEM

T abl e 2.Pi n descri pt i on of LC D

3. DARLINGTON ARRAY (ULN 2803)

fig.7 Darlington Array


3.1 INTRODUCTION

A ULN2803 is an Integrated Circuit (IC) chip with a High Voltage/High


Current Darlington Transistor Array. It allows you to interface TTL
signals with higher voltage/current loads. In English, the chip takes low
level signals (TLL, CMOS, PMOS, NMOS - which operate at low
voltages and low currents) and acts as a relay of sorts itself, switching on
or off a higher level signal on the opposite side.

Its features are:

 A TTL signal operates from 0-5V, with everything between 0.0


and 0.8V considered "low" or off, and 2.2 to 5.0V being
considered "high" or on. The maximum power available on a TTL
signal depends on the type, but generally does not exceed 25mW
(~5mA @ 5V), so it is not useful for providing power to something
like a relay coil. On the output side the ULN2803 is generally rated
at 50V/500mA, so it can operate small loads directly.

 Alternatively, it is frequently used to power the coil of one or more


relays, which in turn allow even higher voltages/currents to be
controlled by the low level signal. In electrical terms, the
ULN2803 uses the low level (TTL) signal to switch on/turn off the
higher voltage/current signal on the output side.

14
RANK DISPLAY SYSTEM

Its features are summarized below:


 Output current (single output) 500mA MAX.
 High sustaining voltage output 50V MIN.
 Output clamp diodes.
 Inputs compatible with various types of logic

3.2 PIN DIAGRAM

fig.8 Pin Diagram of ULN 2803

The ULN2803 comes in an 18-pin IC configuration and includes eight


(8) transistors.

 Pins 1-8 receive the low level signals,

 pin 9 is grounded (for the low level signal reference).

 Pin 10 is the common on the high side and would generally be


connected to the positive of the voltage you are applying to the
relay coil.

 Pins 11-18 are the outputs (Pin 1 drives Pin 18, Pin 2 drives 17,
etc.).

15
RANK DISPLAY SYSTEM

4. RESISTORS

The resistor's function is to reduce the flow of electric current. This


symbol is used to indicate a resistor in a circuit diagram, known as a
schematic. Resistance value is designated in units called the "Ohm."
There are two classes of resistors; fixed resistors and the variable
resistors. They are also classified according to the material from which
they are made.
Fixed Resistors
A fixed resistor is one in which the value of its resistance cannot change.
 Carbon film resistors
This is the most general purpose, cheap resistor. Usually the tolerance of
the resistance value is ±5%. Power ratings of 1/8W, 1/4W and 1/2W are
frequently used. Carbon film resistors have a disadvantage; they tend to
be electrically noisy. The physical size of different resistors are as
follows.

16
RANK DISPLAY SYSTEM

Rough size

Rating power Thickness Length


(W) (mm) (mm)

1/8 2 3

1/4 2 6

1/2 3 9

Fig. 9 Carbon film resistors

From the top of the photograph


1/8W
1/4W
1/2W
T abl e 3.Si zes of dif f erent resist ors

 Metal film resistors


Metal film resistors are used when a higher tolerance (more accurate
value) is needed. They are much more accurate in value than carbon
film resistors. They have about ±0.05% tolerance. They have about
±0.05% tolerance. Ni-Cr (Nichrome) seems to be used for the
material of resistor. The metal film resistor is used for bridge circuits,
filter circuits, and low-noise analog signal circuits.
Rough size

Rating power Thickness Length


(W) (mm) (mm)

1/8 2 3

1/4 2 6
Fig. 10 Metal film resistors(From the top of the photograph
1 3.5 12

2 5 15 1/8W (tolerance ±1%), 1/4W ( tolerance ±1%),

1W (tolerance ±5%) ,

17
RANK DISPLAY SYSTEM

T abl e 4.Si zes of dif f erent resist ors 2W (tolerance ±5%))

Variable resistors
There are two general ways in which variable resistors are used.
1. One is the variable resistor which value is easily changed, like the
volume adjustment of Radio.
2. The other is semi-fixed resistor that is not meant to be adjusted by
anyone but a technician. Semi-fixed resistors are used to
compensate for the inaccuracies of the resistors, and to fine-tune a
circuit
The rotation angle of the variable resistor is usually about 300 degrees.
Some variable resistors must be turned many times to use the whole
range of resistance they offer.These are called "Potentiometers" or
"Trimmer Potentiometers."
In the photograph , the four resistors at
the center of the photograph are the
semi-fixed type.
The two resistors on the left are the
trimmer potentiometers.This
symbol is used to represent
variable resistor in circuit diagram
fig.11 Variable Resistors

Resistor colour code


T abl e 5.C ol or C odes of resi st or

18
RANK DISPLAY SYSTEM

Colour Value Multiplier Tolerance


Black 0 0 -
Brown 1 1 ±1
Red 2 2 ±2
Example 1
Orange 3 3 ±0.05
(Brown=1),(Black=0),(Orange=3)
Yellow 4 4 - 10 x 103 = 10k ohm

Green 5 5 ±0.5 Tolerance(Gold) = ±5%


Blue 6 6 ±0.25
Violet 7 7 ±0.1
Gray 8 8 -
White 9 9 -
Gold - -1 ±5
Silver - -2 ±10
None - - ±20 Example 2
(Yellow=4),(Violet=7),(Black=0),
(Red=2)
470 x 102 = 47k ohm
Tolerance(Brown) = ±1%

5. CAPACITORS

The capacitor's function is to store electricity, or electrical energy. The


capacitor also functions as a filter, passing alternating current (AC), and
blocking direct current (DC).
This symbol is used to indicate a capacitor in a circuit diagram.
The capacitor is constructed with two electrode plates facing eachother,
but separated by an insulator. When DC voltage is applied to the
capacitor, an electric charge is stored on each electrode. While the
19
RANK DISPLAY SYSTEM

capacitor is charging up, current flows. The current will stop flowing
when the capacitor has fully charged.
The value of a capacitor (the capacitance), is designated in units called
the Farad ( F ). The capacitance of a capacitor is generally very small, so
units such as the microfarad ( 10-6F ), nanofarad ( 10-9F ), and picofarad
(10-12F ) are used.
Sometimes, a three-digit code is used to indicate the value of a capacitor.
For example, when the code is [103], it indicates 10 x 103, or 10,000pF =
10 nanofarad( nF ) = 0.01 microfarad( µF ).

BREAKDOWN VOLTAGE
When using a capacitor, you must pay attention to the maximum voltage
which can be used. This is the "breakdown voltage." The breakdown
voltage is the voltage that when exceeded will cause the dielectric
(insulator) inside the capacitor to break down and conduct. When this
happens, the failure can be catastrophic.

The types of capacitors used in our project are:


Electrolytic Capacitors (Electrochemical type capacitors)
 Aluminum is used for the electrodes by using a thin oxidization
membrane.
 Large values of capacitance can be obtained in comparison with
the size of the capacitor, because the dielectric used is very thin.
 The most important characteristic of electrolytic capacitors is that
they have polarity. They have a positive and a negative electrode.
[Polarised]
 If the capacitor is subjected to voltage exceeding its working
voltage, or if it is connected with incorrect polarity, it may burst.

20
RANK DISPLAY SYSTEM

Generally, in the circuit diagram, the positive


side is indicated by a "+" (plus) symbol.
Electrolytic capacitors range in value from
about 1µF to thousands of µF. Mainly this
type of capacitor is used as a ripple filter in a
power supply circuit, or as a filter to bypass low
frequency signals, etc.
Fig.12 Electrolytic Capacitors

From the left to right:


1µF (50V) [diameter 5 mm, high 12 mm]
47µF (16V) [diameter 6 mm, high 5 mm]
100µF (25V) [diameter 5 mm, high 11 mm]
220µF (25V) [diameter 8 mm, high 12 mm]
1000µF (50V) [diameter 18 mm, high 40 mm]

Ceramic Capacitors
Ceramic capacitors are constructed with materials such as titanium
acid barium used as the dielectric. Internally, these capacitors are not
constructed as a coil, so they can be used in high frequency
applications. Typically, they are used in circuits which bypass high
frequency signals to ground.
These capacitors have the shape of a disk. Their capacitance is
comparatively small.

fig.13 Ceramic Capacitors

21
RANK DISPLAY SYSTEM

The capacitor on the left is a 100pF capacitor with a diameter of about 3 mm.
The capacitor on the right side is printed with 103, so 10 x 103pF becomes 0.01 µF. The
diameter of the disk is about 6 mm.
Ceramic capacitors have no polarity. Ceramic capacitors should not be
used for analog circuits, because they can distort the signal.

6. DIODES

A diode is a semiconductor device which allows current


to flow through it in only one direction. A diode is
specifically made to allow current to flow through it in
only one direction.

22
RANK DISPLAY SYSTEM

Some ways in which the diode can be used are listed here.
A diode can be used as a rectifier that converts AC to DC for a power
supply device.
Diodes can be used to separate the signal from radio frequencies.
Diodes can be used as an on/off switch that controls current.
This symbol is used to indicate a diode in a circuit diagram
Rectification / Switching / Regulation
Diode
The stripe stamped on one end of the diode
shows indicates the polarity of the diode.
The stripe shows the cathode side.
The devices shown in the picture are diodes
used for rectification. They are made to handle
relatively high currents. The device on top can
handle as high as 6A, and the one below it can
safely handle up to 1A.
However, it is best used at about 70% of its fig.14 Rectifier Diodes
rating because this current value is a maximum rating. This diode is
typically used to protect the circuit from momentary voltage spikes.
Light Emitting Diode ( LED )
Light emitting diodes must be chosen according to how they will
be used, because there are various kinds.
The diodes are available in several colors. The most common
colors are red and green, but there
are even blue ones.
The device on the far right in the
photograph combines a red LED
and green LED in one package. The
fig.15 LED’s
component lead in the middle is
common to both LEDs. As for the remaing two leads, one side is
23
RANK DISPLAY SYSTEM

for the green, the other for the red LED. When both are turned on
simultaneously, it becomes orange.

7. PIEZOBUZZER

fig.16 A Piezobuzzer

24
RANK DISPLAY SYSTEM

Basically, the sound source of a piezoelectric sound component is


a piezoelectric diaphragm. A piezoelectric diaphragm consists of a
piezoelectric ceramic plate which has electrodes on both sides and
a metal plate (brass or stainless steel). A piezoelectric ceramic
plate is attached to a metal plate with adhesives. Fig. 18 shows the
oscillating system of a piezoelectric diaphragm. Applying D.C.
voltage between electrodes of a piezoelectric diaphragm causes
mechanical distortion due to the piezoelectric effect. The
piezoelectric diaphragm bends toward the direction shown in
Fig.17. The metal plate bonded to the piezoelectric element does
not expand. Conversely, when the piezoelectric element shrinks,
the piezoelectric diaphragm bends in the direction shown in Fig.18.
Thus, when AC voltage is applied across electrodes, the bending
shown in Fig.17 and Fig.18 is repeated producing sound waves in
air.

8. POWER SUPPLY

The term power supply is Electrode

Piezoelectric
Piezoelectric
Element

more commonly abbreviated Electrode


Ceramics
Piezoelectric
Diaphragm

to PSU Piezoelectric
Ceramics
Metal
Plate

To provide a useable low


voltage the PSU needs to do a Fig. 17 Structure of Piezoelectric Diaphragm

number of things:-

 Reduce the Mains AC (a) Extended State

(Alternating current) (c) A. C. Voltage Applied

voltage to a lower level.

 Convert this lower (b) Shrinked State

voltage from AC to DC
(Direct current)

Fig. 18 Oscillation System


25
RANK DISPLAY SYSTEM

 Regulate the DC output to compensate for varying load (current


demand)

 Provide protection against excessive input/output voltages

1. Reduction of AC Mains

This is achieved by using a device known as a Transformer, an


electromagnetic device consisting of an ferrous iron core which has a
large number of turns of wire wound around it, known as the Primary
Winding. The ends of these turns of wire being connected to the input
voltage (in this case Mains AC).

fig.19 A step-down transformer

A second number of turns of wire are wound around the Primary


Winding, this set being known as the Secondary Winding.

The difference between the number of turns provides us with a way of


reducing (in our case) a high AC voltage to a lower one.

2. Conversion of AC to DC

To convert our now low AC voltage to DC we use a Rectifier Diode


connected to the Secondary Winding.

This is a silicon diode, only allows current to flow in one direction)

26
RANK DISPLAY SYSTEM

As our low AC voltage will be working at a frequency of 50Hz (Mains


AC frequency) it is desirable to reduce the inherent hum on this to a
lower level.

This is achieved by a technique known as Smoothing (“Ironing” out the


bumps in the AC).

A simple way to reduce the hum is to use Full Wave Rectification.

fig.20Rectification of AC

3. Regulation of Output Voltage

In a simple PSU the easiest way to provide regulation to compensate for


varying load conditions is to use a pair of relatively high value
Electrolytic Capacitors.

Their values in this case being in the region of 470uF to 2000uF .

One of these capacitors is connected across the DC output of the rectifier


diode(s) or bridge, this capacitor also providing an extra degree of
smoothing the output waveform.

The second capacitor is connected via a low value, medium to high


wattage resistor, which assists in limiting the current demand.

27
RANK DISPLAY SYSTEM

fig.21Electrolytic Capacitor

4. Voltage Regulator

Regulator, usually having three legs, converts varying input voltage and
produces a constant regulated output voltage. They are available in a
variety of outputs. 
 
The most common part numbers start with the numbers 78 or 79 and
finish with two digits indicating the output voltage. The number 78
represents positive voltage. The 78XX series of voltage regulators are
designed for positive input.
The LM78XX series typically has the ability to drive current up to 1A.
The component has three legs: Input leg which can hold up to 36VDC
Common leg (GND) and an output leg with the regulator's voltage. For
maximum voltage regulation, adding a capacitor in parallel between the
common leg and the output is usually recommended.

fig.22Voltage Regulator 7805

PCB ETCHING
Etching is the process where the excess copper is removed to leave the
individual tracks or traces as they are sometimes called.
Many different chemical solutions can be used to etch circuit boards.
Ranging from slow controlled speed etches used for surface preparation
to the faster etches used for etching the tracks. Copper etching is

28
RANK DISPLAY SYSTEM

normally exothermic. Almost all etching solutions liberate toxic


corrosive fumes, extraction is highly recommended. All etchants are
corrosive and toxic, mainly due to the high metal content.
Ferric Chloride
It is an old favorite chemical very good at staining fingers, clothing, etc
brown. Etch rate can be very high but is dependant on solution
movement over the surface of the board and temperature. At 70C using
Spray etching, 1oz copper is removed in a little under a minute, normal
etching temperature is more likely to be 45C.
When up to 5% of HCL is added, it increases etch rate, helps to stop
staining, and reduces the risk of the solution sludging. Ferric especially
with extra HCL makes a very good stainless steel etchant.
The basic etching reaction takes place in 3 stages. First the ferric ion
oxidizes copper to cuprous chloride, which is then further oxidized to
cupric chloride.
1. FeCl3 + Cu > FeCl2 + CuCl
2. FeCl3 + CuCl > FeCl2 + CuCl2
As the cupric chloride builds up at further reaction takes place,
3. CuCl2 + Cu > 2CuCl

The etch rate quickly falls off after about 17oz/gallon (100g/l of copper
has been etched for a typical solution containing 5.3lb/gallon (530g/l) of
ferric chloride.

SOLDERING
Soldering is a process in which two or more metal items are joined
together by melting and flowing a filler metal into the joint, the filler
metal having a relatively low melting point. Soft soldering is
characterized by the melting point of the filler metal, which is below
400 °C (800 °F). The filler metal used in the process is called solder.

29
RANK DISPLAY SYSTEM

In a soldering process, heat is applied to the parts to be joined, causing


the solder to melt and be drawn into the joint by capillary action and to
bond to the materials to be joined by wetting action. After the metal
cools, the resulting joints are not as strong as the base metal, but have
adequate strength, electrical conductivity, and water-tightness for many
uses. Soldering is an ancient technique mentioned in the Bible and there
is evidence that it was employed up to 5000 years ago in Mesopotamia.

The tools that are essential to solder are a

1. Soldering iron : There are several


things to consider when choosing a
soldering iron.

 Wattage Fig.23 soldering


iron
 adjustable or fixed temperature
 power source (electric or gas)
 portable or bench use

2. Solder : Soldering filler materials are available in many


different alloys for differing
applications. In electronics
assembly, the eutectic alloy
of 63% tin and 37% lead has
been the alloy of choice.

fig.24 solder

Common solder alloys are mixtures of tin and lead:

30
RANK DISPLAY SYSTEM

 63/37: melts at 183 °C (361.4 °F) (eutectic: the only mixture that
melts at a point, instead of over a range)
 60/40: melts between 183–190 °C (361–374 °F)
 50/50: melts between 185–215 °C (365–419 °F)

3. Flux: In high-temperature metal joining processes, the


primary purpose of flux is to prevent oxidation of the
base and filler materials. Flux is a substance which is
nearly inert at room temperature, but which becomes
strongly reducing at elevated temperatures, preventing
the formation of metal oxides. Secondarily, flux acts as
a wetting agent in the soldering process, reducing the
surface tension of the molten solder and causing it to
better wet out the parts to be joined.

THE SOFTWARE PROGRAM

31
RANK DISPLAY SYSTEM

The software program (rank .asm) is written in assembly language. The


assembly-level program can be written using any text editor and saved
as ‘rank .asm’. It will generate the Intel hex file (rank.hex) and listing
file (rank .1st) when the program is assembled using the asm51 cross
assembler from metalink. The hex file is used to program the chip.
RANK.ASM
latch equ p2

keys equ p0

dline equ p1

restart equ p3.0

rs equ p3.3

rw equ p3.2

en equ p3.1

buzzer equ p3.4

mode equ p3.6

flag equ p3.5

org 0000h

sjump main

32
RANK DISPLAY SYSTEM

org 000bh

clr tr0

mov tl0, #00h

mov th0, #00h

djnz r5, al

setb buzzer

al : djnz, return

mov r7, #136

djnz r6, return

mov r6, #3

mov r5, #20

clr buzzer

mov a, #0c0h
acall command
mov dptr, #timeout
acall read
acall display
setb buzzer
setb flag

33
RANK DISPLAY SYSTEM

return : reti
main : mov ie, #00h
setb ea
setb et0
mov tmod, #0lh
mov tcon, #00h
mov tl0, #00h
mov th0, #00h
mov r7, #136
mov r6, #3
mov r5, #20
mov latch, #0
mov keys, #0ffh
acall lcdly
acall lcd_int
mov dptr, #welcome
acall read
mov a, #0c0h
acall command
jnb mode , race1
mov dptr, #welcome1
sjmp fff1
race1 : mov dptr, #welcome2

34
RANK DISPLAY SYSTEM

fff1 : acall read


acall dispdly
mov a, #80h
acall command
mov dptr, #plrname
acall read
mov a, #0c0h
acall command
jnb mode, race2
mov dptr, #firstqtn
sjmp fff2
race2 : mov dptr, #firstrnd
fff2 : acall read
here : clr flag
mov latch, #0
mov keys, #0ffh
acall lcdly
mov 04h, #48
blankrank : mov r0, #31h
again : mov @r0, # ' - '
inc r0
cjne r0, #39h, again
chk : mov a, keys

35
RANK DISPLAY SYSTEM

cjne a, #0ffh , first


sjmp chk
first : clr buzzer
next rank : inc 04h
mov r0, #31h
chkl : jb flag , result1

setb tr0
mov a, keys
cpl a
xrl a, latch
cjne a, #0, scan
sjmp chk1
scan : jb acc.0, store
inc r0
jb acc.1, store
inc r0
jb acc.2, store
inc r0
jb acc.3 , store
inc r0
jb acc.4 , store
inc r0
jb acc.5 , store

36
RANK DISPLAY SYSTEM

inc r0
jb acc.6, store
inc r0
jb acc.7 , store
store : mov @r0, 04h
orl a, latch
mov latch, a
cjne r4 , #56 , next _ rank
sjmp result
result : clr tr0
mov tl0 , #00h
mov th0, #00h
mov r7, #136
mov r6, #3
mov r5, #20
clr buzzer
mov a, #0c0h
acall command
jnb mode, race4
mov dptr, #intime
sjmp fff4
race4 : mov dptr, # intime1
fff4 : acall read

37
RANK DISPLAY SYSTEM

acall dispdly
setb buzzer
result1 : clr tr0
mov r0, #31h
mov a, #0c0h
acall command
show : mov a ,@r0
acall display
mov a, # ‘ ’
acall display
inc r0
cjne r0, #39h, show
stay : jb restart, stay
mov r1, #4
s1 : mov r2, #200
djnz r2, $
djnz r1, s1
jb restart , stay
nxt_ Ques : mov a, #0c0h
acall command
jnb mode, race3
mov dptr, #nxtqtn
sjmp fff3

38
RANK DISPLAY SYSTEM

race3 : mov dptr , #nxtrnd


fff3 : acall read
jmp here
read : c1r a
movc a, @a+dptr
jz down
acall display
inc dptr
sjmp read
down : ret
lcd_int : mov a, #38h
acall command
mov a, #0ch
acall command
mov a,#01h
acall command
mov a, #06h
acall command
ret
command : mov dline , a
clr rs
nop
nop

39
RANK DISPLAY SYSTEM

c1r rw
nop
nop
setb en
acall lcdly1
clr en
acall lcdly1
ret
display : mov dline , a
setb rs
nop
nop
clr rw
nop
nop
setb en
acall lcdly
clr en
acall lcdly
ret
lcdly : mov r1 , # 0ah
lp1 : mov r2 , # 0ffh
djnz r2 , $

40
RANK DISPLAY SYSTEM

djnz r1 , lp1
ret
lcdly1 : mov r1 , #3fh
lp2 : mov r2 , #0ffh
djnz r2 , $
djnz r1 , lp2
ret
dispdly : mov r1, #255
d1 : mov r2, #255
d2 : mov r3, # 30
djnz r3, $
djnz r2, d2
djnz r1 ,d1
ret

;Look up table starts from here


plrname : db ‘A’, ‘ ’,‘B’, ‘ ’,‘C’, ‘ ’,‘D’, ‘ ’,‘E’, ‘ ’,‘F’, ‘ ’,‘G’, ‘ ’,
‘H’, 0
welcome : db ‘WELCOME To ALL’, 0
welcome1 : db ‘THE PLAYERS’, 0
welcome2 : db ‘THE RACERS’, 0
firstqtn : db ‘FIRST QUESTION’, 0
firstrnd : db ‘FIRST ROUND’, 0

41
RANK DISPLAY SYSTEM

nxtqtn : db ‘NEXT QUESTTON’, 0


nxtrnd : db ‘NEXT ROUND’, 0
intime : db ‘DONE IN TIME’, 0
intime1 : db ‘COVERED IN TIME’, 0
timeout : db ‘TIME OUT’, 0
end

42
RANK DISPLAY SYSTEM

PROBLEMS FACED

1. We faced problem in determining the correct values of the


components.
2. Incorrect connection due to confined space on the pcb and shorting of
various connections close to each other.
3. Burning of transistors and capacitors.
4. Burning of PCB tracks.
5. Voltage fluctuations.
6. Fault in PCB layouts.
7. Writing code for working of the circuit.

43
RANK DISPLAY SYSTEM

FUTURE SCOPE

In actual application, where contestants are seated in different locations,


you can extend input switches S1 through S8 to the players. For this,
connect a pair of wires to the connecting terminals of each of these
switches on the PCB to extend these to players. In this case, tactile
switches S1 through S8 are not required on the PCB.

44
RANK DISPLAY SYSTEM

REFERENCES

1. Kenneth J Ayala, “The 8051 Microcontroller: Architecture, Programming

and Applications”, Penram International, Mumbai.

2. Muhammad Ali Mazidi and Janice Gillispie Mazidi, “The 8051

Microcontroller and Embedded Systems”, Pearson Education, New Delhi.

3. “Electronics For You”, Magazine, June 2008.

4. www.alldatasheets.com

5. www.en.wikipedia.org

45

You might also like