Professional Documents
Culture Documents
1 March 2009
Abstract : A microcontroller based phase meter has been designed and fabricated. The paper deals
with the hardware and software features of the phase meter. The phase difference between the two
signals is obtained by measuring the ON time '' of the XOR gate and the time period 'T' of the signal
using the two timers of C8051F020 microcontroller. The phase meter is designed for the measurement of
phase difference between 0 - 360O for frequencies up to 10 kHz with an accuracy of ± 0.1 at 500 Hz
signal frequency.
Keywords : Microcontroller, C8051F020, Phase meter, Phase difference.
1. INTRODUCTION where 'T' is the time period of the signal and ‘’
is the phase difference in degrees.
The phase meter has innumerable applications in
industry and R&D laboratories. Although several 3. WORKING OF MICROCONTROLLER
attempts have been made to design and fabricate both BASED PHASE METER:
analog and digital phase meters, they suffer from
limitations like compactness, complexity in design, lack Fig. 2 shows the schematic diagram of a
of storage, and serial communication facilities etc., C8051F020 microcontroller based phase meter. Flip-
which are very important for research applications. The flops 1 and 2 convert the two input signals S1 and S2,
microcontroller C8051F020 [1] based phase meter into square wave signals of a 50% duty cycle. The
overcomes the above difficulties. frequencies of these square waves is half that of the input
signals. If the signals are directly applied to the XOR
2. PRINCIPLE gate, only a phase difference of 180O can be measured.
The outputs of these two flip-flops are applied to an XOR
The principle involved in the design of the gate which produces a signal that's 'ON' time '' is
microcontroller based phase meter is similar to the proportional to the phase difference between these two
principle involved in the conventional digital phase meter signals. The 'ON' time of the XOR gate varies linearly
[2]. The measurement of the phase is based on the with the phase difference from 0 - 360O. Fig.3 shows
relationship of the phase angle to the delay between the the linear relationship between the phase angle and the
zero crossings of two input signals. As shown in Fig.1, output of the XOR gate [5].
the phase shift '' and the delay '' between the zero
crossings of the signals is presented by a simple equation The output of the XOR gate and that of flip-flop-2
below; are applied to the interrupt inputs INT0 and INT1
= ( / T)* 360 …………. (1)
Start
63
L. Shrimanth Sudheer, S.S. Patil, R. Laxmikant, Nagabhushana Katte and P. Bhaskar
64