0% found this document useful (0 votes)
84 views

Vivekanand Education Society'S: Institute of Technology

The document describes a project to create a digital voltmeter using an 89C51 microcontroller. It includes a circuit diagram and explanation of the components, which are an 89C51 microcontroller, ADC0804 analog to digital converter, 16x1 LCD display, potentiometer, and various resistors and capacitors. The microcontroller reads the analog voltage from the ADC and displays the digital value on the LCD. Block and working principles are provided, along with applications, advantages, calculations, and code for the project.

Uploaded by

Fazle Rahman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Vivekanand Education Society'S: Institute of Technology

The document describes a project to create a digital voltmeter using an 89C51 microcontroller. It includes a circuit diagram and explanation of the components, which are an 89C51 microcontroller, ADC0804 analog to digital converter, 16x1 LCD display, potentiometer, and various resistors and capacitors. The microcontroller reads the analog voltage from the ADC and displays the digital value on the LCD. Block and working principles are provided, along with applications, advantages, calculations, and code for the project.

Uploaded by

Fazle Rahman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

VIVEKANAND EDUCATION SOCIETY'S

INSTITUTE OF TECHNOLOGY
Approved by AICTE & Affiliated to Mumbai University

ELECTRONIC WORKSHOP - 2

REPORT

Report Title: Digital Voltmeter using 89C51

PROJECT MEMBERS:

1. Ajay Patkar 59
2. Prasad Pawaskar 61
3. Vishal Thakur 74
Digital Voltmeter Using 89C51 Micro controller

Prasad Pawaskar Ajay Patkar Vishal Thakur

Electronics T.E. Electronics T.E. Electronics T.E.

Vivekanand Institute Of Vivekanand Institute Of Vivekanand Institute Of


technology Mumbai technology Mumbai technology Mumbai

The basic schematical layout of this project


is as shown in fig a.
Abstract – Digital voltmeter as the name
suggests is a microcontroller based project. This circuit consists of following
The main objective of this paper is to perform components:
a project to get digital voltage reading from an
1. 89C51 Based Controller: 1
analog source and display the voltage value
2. ADC0804: 1
digitally on a LCD display.
3. LCD 16x1: 1
Index Terms – Introduction, Working
Principle .Block Diagram, Circuit Diagram,
Circuit Explanation, Features, Advantages, 4. Potentiometer 10K: 1
Disadvantages, Conclusion. 5. Resistor 10K: 2
6. Resistor 200K: 1
I. INTRODUCTION 7. Resistor 100K: 1
8. Capacitor 33pF: 2
9. Capacitor 10uF: 1
The digital voltmeter basically is the model 10. Capacitor 150pF: 1
of demonstrating the use of analog to digital 11. Capacitor 100nF: 1
converter with the most popular micro 12. Crystal 12Mhz: 11
controller IC – 89C51.

What we have done is simply interface an


ADC to a 89C51 and a LCD display to the
output ports of 89C51. Thus , the ADC takes
in input analog voltage and converts it to
digital while 89C51 displays it on the LCD
display
ADC i.e. it reads the output of the ADC.
While on the other hand it gives output to
the LCD or in other words 89c51 drives the
LCD unit

Voltage reference

This is a simple voltage divider network that


is used to get input to the input pins of the
ADC.

L C D driver

The micro controller itself acts as the LCD


driver unit.

L C D Section

The LCD forms the output of the project.


The digital voltage received by the micro
II. Circuit Explanation controller as to be converted into some
particular limit so that it can be displayed on
the LCD. The output available on LCD is
The circuit shown in fig. is explained as
the digital representation of the analog input
follows showing the operation of each
voltage. The inputs to it are the 8 bit digital
component:
output from the micro controller.
ADC

This is used to convert the analog input


voltage to digital output voltage. As seen in
the figure a. the input probes i.e. Probe+ and
Probe- are connected to the IN+ and IN-
terminals of the ADC through a voltage III. Block diagram
divider circuit. The 8 bit output is connected
to the Port 1.0 to Port pins P1.7. RD’, WR’ , The operation of the entire circuit can be
CS’ and INTR are interfaced with RD’ WR’ shown as follows in the form of following
T1 T0 of 89c51 respectively. The o/p of block diagram:
ADC is 8 bit digital representation of the
input analog voltage.
Analog Input Micro controller LCD
Micro controller 89c51

The micro controller 89c51 forms the basic


heart of the project. It gets input from the
Fig b. Block Diagram observations of the voltage value on the
LCD panel. Rather, if an AC input voltage is
1. Analog Input given at the input terminals, the output
This is the input section of project. We varies indefinitely as is the nature of AC
apply analog voltage to positive and voltage. Thus, the instantaneous value of the
negative terminal of ADC. This voltage AC voltage is not steadily shown on the
is applied to voltage divider network. LCD panel.

2. Micro controller:

This section provides controlling of V. Applications Of DVM


digital voltage that is applied to ADC
.The digital voltage which is taken from
the ADC is compared to the reference  Used in conversion of analog
level set in the micro controller. Port 1 is voltage to digital voltage.
used as input port. Port 2 is used as  In Laboratories for displaying
output port. Port 3 is used as control digital voltage.
signals. Port 0 is not used.  It is used in applications where
3. LCD: we require high accuracy.

LCD is used to display digital output. It


is the output section of the project. VI. Advantages

The digital voltmeter designed uses a


IV. Working Of Circuit microcontroller which is said to be highly
efficient in handling the data carrier
This project aims at building a Digital operation in terms of being faster and being
Voltmeter using an 8051microcontroller. All error‐free and accurate. Thus, it can be
the data accessed and processed by them considered as a reliable device for observing
microcontroller is the digital data. And thus, voltages of magnitudesfrom0 to 14V. Rather
the usage of an analog‐to‐digital converter than using the obsolete analogue ways of
finds its necessity here. A standard finding out the voltages, the digital
analog‐to‐digital converter ADC0804 is voltmeter provides much more precise and
used in the current project. The input voltage accurate values of voltages in a given circuit
(which is the analog input)is restricted to be in the range of the voltmeter.
in the range of 0‐15V. The processed data in
the 8051 is used to drive a display output on
a LCD display unit. The display is in the
form of digits and is accurate to a value of
one decimal. The input voltage is desired to
be that of a DC voltage for steady
VII. Calculation IX. Future Scope
This project can be further improved by
adding an Atmega8 IC technology to it and
All we want is input voltage to ADC should also making scope for measurement of very
not increase 5V and our maximum input
voltage to voltmeter is 15V only. So we slight change by adding more decimals.
design the voltage divider circuit as follows.
Vmax is Maximum input voltage to voltmeter.
Vip is input voltage to ADC.
R1 and R2 are resistance of voltage divider
circuit.
Vmax = 15V
V = R2*Vmax/(R1+R2)
5/15 = R2/R1+R2
3 = R1/R2+1
2 = R1/R2
R2 = R1/2
Let’s take R1 as 200K and R2 will be 100K
Maximum current: Imax = (Vmax‐Vi/pmax)/R1
(approx)
Vmax = 15V
Vi/pmax = 5V
R1 = 200K
Imax = (15‐5)/200 = 10/200 = 0.02mA

VIII. References
The following were some of the websites
used to prepare this paper.

1. www.electroschematics.com
2. www.youtube.com
3. www.efy.com
4. Multisim By National Instruments
X. Code
lcd_cmd equ 0800h acall start

lcd_st equ 0801h

lcd_wr equ 0802h acall print_hex3

lcd_rd equ 0803h

DAC equ 0600h sjmp DVM

ORG 08100h Start:

DVM: mov P2, #(lcd_cmd SHR 8) mov dptr,#DAC

mov R0, #(lcd_cmd AND 255) mov R7,#10000000b

mov R7,#00h mov a,#0

mov dptr, #mesg3 nxtbit: xrl a,r7

acall wr_string movx @dptr,A

acall delay

mov R7,#40h jb P3.5,keep

mov dptr, #mesg3 xrl a,R7

acall wr_string keep: xch a,R7

clr c

mov R7, #01h rrc a

mov dptr, #mesg1 xch a,R7

acall wr_string jnc nxtbit

cpl a

mov R7, #41h ret

mov dptr, #mesg2

acall wr_string wr_string: acall lcd_busy

mov a, R7
orl a, #080h MOVC A,@A+PC

movx @R0, a mvcoff3a:

nxt_char: ACALL char_from_Acc

acall lcd_busy POP ACC

clr a ANL A,#0FH

movc a, @a+dptr ADD A,#HEXstring3-mvcoff3b

inc dptr MOVC A,@A+PC

jz str_end mvcoff3b:

AJMP char_from_Acc

mov R1, #(lcd_wr AND 255) HEXstring3:

movx @R1, a DB '0123456789ABCDEF'

sjmp nxt_char

str_end: ret Char_from_ACC: push acc

acall lcd_busy

lcd_busy: pop acc

mov R1, #(lcd_st AND 255) mov R1, #(lcd_wr AND 255)

movx a, @R1 movx @R1, a

jb acc.7, lcd_busy ret

ret

mesg1: db "DVM Prog ",0

print_hex3: mesg2: db "Voltage = ",0

PUSH ACC mesg3: db " ",0

SWAP A

ANL A,#0FH Delay: MOV R0, #05h

ADD A,#HEXstring3-mvcoff3a loop1: MOV R1, #08h


loop2: CLR C

DJNZ R1, loop2 MOV 07h,R1

DJNZ R0, loop1 MOV 06h,R0

ret MOV A,R0

div16_16: SUBB A,R2

CLR C MOV R0,A

MOV R4,#00h MOV A,R1

MOV R5,#00h SUBB A,R3

MOV B,#00h MOV R1,A

div1: JNC div3

INC B MOV R1,07h

MOV A,R2 MOV R0,06h

RLC A div3:

MOV R2,A CPL C

MOV A,R3 MOV A,R4

RLC A RLC A

MOV R3,A MOV R4,A

JNC div1 MOV A,R5

div2: RLC A

MOV A,R3 MOV R5,A

RRC A DJNZ B,div2

MOV R3,A MOV R3,05h

MOV A,R2 MOV R2,04h

RRC A end

MOV R2,A

You might also like