11
DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C VOLTMETER RANGE (0 - 250V) BY EJIONYE ONYEKACHI CHRIS (2005/23016EE) A THESIS SUBMITTED TO THE DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING, FEDDERAL UNIVERSITY OF TECHNOLOGY MINNA. NOVEMBER, 2010

DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

Embed Size (px)

Citation preview

Page 1: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

DESIGN AND CONSTRUCTION OF A

DIGITAL A.C/D.C VOLTMETER

RANGE (0 - 250V)

BY

EJIONYE ONYEKACHI CHRIS

(2005/23016EE)

A THESIS SUBMITTED TO THE DEPARTMENT OF

ELECTRICAL AND COMPUTER ENGINEERING,

FEDDERAL UNIVERSITY OF TECHNOLOGY MINNA.

NOVEMBER, 2010

Page 2: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

DEDICATION

I dedicate this work to God Almighty for his grace, love, strength and inspiration and to my

mother Dr. (Mrs) T.N Ejionye for her unending love and care.

II

Page 3: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

DECLARATION

I, Ejionye Onyekachi Chris, declare that this work was done by me and ha~ never been

presented elsewhere for the award of a degree. I also hereby relinquish the copyright to

"

the Federal University of Te'chnology, Minna.

Ejionye Chris Onyekachi (Name of stud t

Engr A. G Raj i e of Head of Department)

111

MR L.J Olatomiwa (Name of Supervisor)

~ . 0'1> I/-'uV(;Lo/O 19p.atu e and date)

er)

~::::::::::::::===~--J.J[ ( Jl/I 0 (Signature and date)

Page 4: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

ACKNOWLEDGEMENT

I thank God almighty, who is merciful and faithful in all things and has done exceedingly more

than I can imagine. I thank him for his grace, provision, protection and sustenanCf through the

academic stress undergone throughout my stay in this institution.

Abundant appreciation goes to my supervisor, Mr L. J. Olatomiwa who has remained committed

in interest, advice and supervision that led to the successful completion of thi s work.

My ~i !lce re gratitude goes to all lecturers in the dep:lrtP.1c>n! of' FI.;:'rtrira\lcomputer engineering,

for having lectured me the best way they can throughout my stay in school and for their

contributions to the success of this project.

Much gratitude goes to my parent Mr and Mrs. Dick Thony Iherinwa for their parental support.

love, moral and financial support.l cannot forget my beloved brother Dr E.C. Ejionye, who has

really shown me, that love cannot only be felt but also can be seen.

My sincere gratitude also goes to those who have always inspired me and mentor me one way or

the other throughout my entire life up to this moment.

Much love and thanks goes to my dear sisters in person of Mrs chizzy, Miss Uzoma Iherinwa,

Miss Gladden Iherinwa, Chinyere Iwuajoku, Chioma Anichebe, Miss Ebere Nmaju. And to my

lovely friends whom have been beside me from the start in persons of Chimezie Nzom, Enemali

Okwoli , Ajiboye Wale (Walex), Vivian Moyo, Vicky, Aishatu, Femi, Fagbemi, Dayo, Murruf,

Paulinajekeli , Helen Nwachukwu, Nkechinyere Umegbo, Bukky, Worus, Dammy, Abey,

v

Page 5: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

ACKNOWLEDGEMENT

I thank God almighty, who is merciful and faithful in all things and has done exceedingly more

than I can imagine. I thank him for his grace, provision, protection and sustenanCf through the

academic stress undergone throughout my stay in this institution.

Abundant appreciation goes to my supervisor, Mr L. J. Olatomiwa who has remained committed

in interest, advice and supervision that led to the successful completion of thi s work.

My !' incere gmtitude goes to all lecturers in the dep3rtmr nt of F I ~rtri ca\!(,0mpt!te r engineering,

for having lectured me the best way they can throughout my stay in school and for their

contributions to the success of this project.

Much gratitude goes to my parent Mr and Mrs. Dick Thony Iherinwa for their parental support,

love, moral and financial support.! cannot forget my beloved brother Dr E.C. Ejionye, who has

really shown me, that love cannot only be felt but also can be seen.

My sincere gratitude also goes to those who have always inspired me and mentor me one way or

the other throughout my entire life up to this moment.

Much love and thanks goes to my dear sisters in person of Mrs chizzy, Miss Uzoma Iherinwa,

Miss Gladden Iherinwa, Chinyere Iwuajoku, Chioma Anichebe, Miss Ebere Nmaju. And to my

lovely friends whom have been beside me from the start in persons of Chimezie Nzom, Enemali

Okwoli, Ajiboye Wale (Walex), Vivian Moyo, Vicky, Aishatu, Femi , Fagbemi, Dayo, Murruf,

Paulinajekeli , Helen Nwachukwu, Nkechinyere Umegbo, Bukky, Worus, Dammy, Abey,

v

Page 6: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

Ikenna, Joseph, Chidera and Lukman. Also to those who ~ loved and supported me, your

cooperation can never be over emphasizes. Ca.nnot thank you all enough.

vi

Page 7: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

ABSTRACT

The design and construction of a digital voltmeter is presented in this project work by applying

the appreciation of the technique used to convert an analogue voltage signal to a digital display

via successive approximation technique and the use of a miccrocontroller.

The AID converter (ADC0804) is a CMOS 8 bit successive approximation AID converter, which

translate the analogue voltage at the input into a 8 bit digital word at the output. An increase in

the analogue input voltage give a corresponding increase of a single binary count of the encoder

oftheADC.

The 8 bit digital word at the output of the encoder (ADC) is loaded into one of the four ports of

the microcontroller which is made of 8 data line, where they are computed and converted to the

decimal equivalent and sent to the liquid crystal display (LCD) where it dispays the decimal

value computed by the microcontroller, which indicates the value of the analogue ac/dc voltage

signal measured.

vii

Page 8: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

TABLE OF CONTENT

Tittle page .............................................................................................................................. j

Declaration .............................................................................................................................. ii

Dedication ............................................................................................................................... .iii

Certification ............................................................................................................................. .iv

Acknowledgement .................................................................................................................... v

Abstract .................................................................................................................................... vii

Table of content ....................................................................................................................... viii

List of figures ............................................................................................................................ xi

List of tables .............................................................................................................................. xii

Chapter One : General Introduction ........................................................................................... 1

1.1 Introduction .................................................................................................................... 1

1.2 Project objective and Motivation ................................................................................... 2

1.3 Methododlogy ................................................................................................................ 2

1.4 Method used in measurement and instrumentation ....................................................... .3

1.4.1 Analogue methodltechnique .......................................................... ............ ......... 3

1.4.2 Comparison technique ............................................ ............................................ 4

1.4.3 Digital technique ................................................................................................. 4

viii

Page 9: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

1.5 Voltage measurement ...................................................................................................... 4

1.6 Analogue to digital conversion ........................................................................................ 5

1.7 Project outline ................................................................................................................. 5

Chapter Two : Theoretical background ....................................................................................... 6

2.1 Literature review ............................................................................................................. 6

2.2 Successive approximation converter ............................................................................... 8

2.3 The analogue to digital converter ................................................................................... 11

2.4 The microcontrolIer ........................................................................................................ 14

2.5 The liquid crystal display (LCD) ..................................................................................... 16

Chapter Three : Design analysis and construction ...................................................................... 18

3.1 Construction .................................................................................................................... 18

3.2 Design analysis and methodology ................................................................................... 19

3.2.1 The probes ........................................................................................................... 20

3.2.2 The rectifier .......................................................................................................... 20

3.2.3 The shunt resistor ................................................................................................. 21

3.2.4 Potential dividers .................................................................................................. 22

3.2.5 The Diodes ........................................................................................................... 23

3.2.6 Analogue to digital coverters (ADC0804) ........................................................... .23

ix

Page 10: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

3.2.7 The microcontroller ..... ...... ...... .... .. ......... ..... ..... ..... ... .... .... ............. .................... .. 25

3.2.8 The visual display unit.. ... .... .... ...... ........ ... ..... ..... ..... ...... ........... .... ...................... 26

3.2.9 The battery monitor .................. ...... .. ........... ...... ... ........ ......... .. ......... ....... ....... .... . 29

3.3 Programming a microcontroller ..... .. .......... ........... ........ .... ................ ..... .. ............ .......... .30

3.4 The programe flowchart ..................................................................................... ........ .... 31

Chapter Four: Testing and Result.. ................ ................ .. ... ....... ........ ... ...................... ...... ....... .33

4.1 Device packaging ................ .............. .... ..................... ........... .... .... ........ ...... .... ... ........... .33

4.2 Testing and Result ............................................................................ .............. ............... 33

4.3 Discussion of result ........ ....... .......... ....... ........ ................. .. .. ............ ...... ... ......... ....... .. ... . 34

Chapter Five: Conclusion and recommendatioll ......................................................... ............ ... 35

5.1 Conclusion ... .... ... ... ....... ...... ...... .. ...... ...... .................. .......... ... .. ...... ....... ........... ... ......... .. 36

5.2 problem encountered!challenges ....... .... .... ..... .... ..... ... .. .... ...... ... .. .. ... ........... .......... ......... 36

5.3 Recommendation ...... .... ................. ... ............... .... ........ .... .. ...... ................... ................... 37

5.4 Refference .................................................................................. ................................. ... 38

Appendix A:

Appendix B :

Appendix C :

Appendix D :

x

Page 11: DESIGN AND CONSTRUCTION OF A DIGITAL A.C/D.C …dspace.futminna.edu.ng/jspui/bitstream/1/3835/1... · The design and construction of a digital voltmeter is presented in this project

LIST OF FIGURES

Fig 2.1 simplified block diagram of a successive approximation technique ................................ 10

Fig 2.2 Flowchart of the operation of the successive approximation ADC .............................. .11

Fig 2.3 Block diagram of ADC0804 architecture ...... ..................... ............................................. 13

Fig 2.4 Pin layout of 8951 ................... ........................................................................................ 15

Fig 2.5 Intel 8051 architecture ......................................... ...................................... ...................... 16

Fig 2.6 Diagram of a 2-by-16 character LCD format .................................................................. 18

Fig 3.1 Block diagram of a digital (ac/dc) voltmeter ........................................... ...................... 20

Fig 3.2 Diagram showing the connection between the rectifier, diode and the potential divider .....

.......................................... ........................................................................................................... 23

Fig 3.3 diagram of ADC at free running mode ........................................................................... 24

Fig 3.4 Diagram showing the ports and parts of a microcontroller .............................................. 25

Fig 3.5 Diagram of a 2-by-16 LCD .................................................... ........................................... 27

Fig 3.6 A diagram showing the pin connection ofLM 324 ................................. : ......................... 29

Fig 3. 7The programe flowchart .................................................................................................... 31

xi

( ...