Abstract A digital ohmmeter is an electrical instrument that used to measured resistance in electronics. In this mini project, the task given is to design a digital ohmmeter by using 8051 Microcontroller Board and external circuit contains chip ADC 0831 and LCD 2x16 characters. The result of resistance value is shown in LCD. Theory of voltage divider is used to determine the value of resistor measured. The range of resistor measured is set from 1k Ω to 1MΩ. Program is written using Keil uVision2 in the form of c program. After the program is compiled, the program will executed by using 8051 Microcontroller Board. Schematic diagram and flow chart of this project are included in this report.
3
Digital Ohmmeter
1.0 Introduction 1.1 Program Description In this mini project, ADC 0831 is used to convert the input voltage into 8-bit binary numbers. After getting data from ADC 0831, the 8-bit binary value is then converted into resistance value by using calculation of voltage divider theory. The resistance value is then show in LCD. The software used for this mini project is Keil uVision2 and Flash Magic. Program is written in the form of c program. Basic Concepts and Theory of Voltage Divider (Potential Divider) In electronics, a voltage divider (also known as a potential divider) is a simple linear circuit that produces an output voltage, Vout that is a fraction of its input voltage, Vin. Voltage division refers to the partitioning of a voltage among the components of the divider. The basic circuit for a voltage divider for resistor in series is shown below. Vin Rreference Vout Rmeasure
In this circuit the two resistor are connected in series across Vin, which is the power supply voltage connected to the resistor, Rreference, where the output voltage Vout is the voltage across the resistor Rmeasure which is given by the formula. If more resistors are connected in series to the circuit, the different voltages will appear across each resistor with regards to their individual resistance providing different voltage points from a single supply. Vout can be calculated by using voltage divider formula:
From above equation, Rmeasure can also be calculated.
4
Digital Ohmmeter
1.2 Hardware Description 2x16 Characters LCD Liquid Crystal Display (LCD) is very helpful in providing user interface as well as for debugging purpose. The most common type of LCD controller is HD44780 which provides a simple interface between the controller & an LCD.
Figure: Character LCD type HD44780 pin diagram Pin no. 1 2 3
Name VSS VDD VEE
4
RS
5
RW
6 7 8 9 10 11 12 13 14
E D1 D2 D3 D4 D5 D5 D6 D7
Description Power supply (GND) Power supply (+5V) Contrast adjust 0 = Instruction input 1 = Data input 0 = write to LCD module 1 = Read from LCD module Enable signal Data bus line (LSB) Data bus line 1 Data bus line 2 Data bus line 3 Data bus line 4 Data bus line 5 Data bus line 6 Data bus line (MSB)
Table: Character LCD pins with 1 controller
ADC0831 The ADC0831 series are 8-bit successive approximation Analogue/Digital converters with a serial I/O and configurable input multiplexers with up to 8 channels. The data output is 8-bit binary value and is between 0 up to 255 decimal. The gaps between bits by bits are referred to Vref that determine by user.
Figure: Top view and pin connection of ADC0831
5
Digital Ohmmeter
8051 Microcontroller Board A microcontroller is a single chip microprocessor system which contains a processor core, data and program memory, serial and parallel I/O, timers, external and internal interrupt handling mechanism.
Figure: Block Diagram of a microcontroller
Figure: Pin connection of 8051 Microcontroller Board.
Other equipment that needed in this project: 1. Wires 2. Different values of resistors between 100Ω to 1MΩ 3. Power supply 4. RS232 connector 5. Breadboard
6
Digital Ohmmeter
1.3 Block Diagram of Digital Ohmmeter
Power supply
LCD DISPLAY . . . 16
Circuit to measure resistance
P2.0 . . . P2.7 Microcontroller 8051
7
. . .
1
Digital Ohmmeter
2.0 Algorithm The calculation involved in this program is mainly use voltage divider theorem. Vin = 5V Rreference = 33k Ω
Vout
Rmeasure
In this project, Vin is set to 5V and Rreference is set to 33kΩ. Rreference is determined by setting the range of measure the resistance. Range to measure the resistance is set between 1kΩ to 1MΩ. √ √
By using the above formula, Rreference is equal to 31.6kΩ by using range 1kΩ to 1MΩ. Rreference is set to 33kΩ because this value is near to 31.6kΩ. Rmeasure can be calculated by using formula below:
The value of Vo in voltage divider circuit is converted to binary value by using ADC0831. The 8051 microcontroller is getting binary value from ADC0831 when the program is running. To convert binary value to Vo, formula below is used. x = binary value from ADC0831 For example, if the value of x is 128, Rmeasure is equal to 33.27kΩ. Steps to getting Rmeasuse are shown below:
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.