Professional Documents
Culture Documents
Circuit1 Oscilloscope
Circuit1 Oscilloscope
PC-BASED OSCILLOSCOPE
M.M. VIJAI ANAND tive side itself, so both the half cycles are whether the cycle is positive or negative.
read as positive when it is given as input to It is the most critical part of the circuit
T
his circuit conditions different sig- the ADC. During positive half cycle, diode and if it operates improperly, the symme-
nals of frequency below 1 kHz and D3 is on and diode D4 is off, and op-amps try of the analogue signal displayed in the
displays their waveforms on the PC’s A1 and A2 act as inverters. Thus the output PC monitor gets affected. At the zero-cross-
screen. The hardware is used to condition is a replica of the input. During the nega- ing instant when the input signal transits
the input waveform and convert it to the tive half cycle, diode D3 is off and diode D4 to negative side, the zero-crossing detec-
digital format for interfacing to the PC. The is on. With R2=R3=R4=R5=R6=R=330 tor informs the PC by taking pin 15 of 25-
software for acquiring the data into the PC ohms, the voltage (V) at output pin 1 of op- pin ‘D’ connector of the parallel port high.
and displaying the same on its screen is amp A1 is related to the input voltage (Vi) The input at pin 15 of ‘D’ connector goes
written in Turbo C. as follows: low when the input signal transits to posi-
The input waveform (limited to 5V Vi/R +V/(2R)+V/R=0 tive side. The zero-crossing detector com-
peak-to-peak) is first applied to a full-wave V= -(2/3)Vi municates with the PC through bit D3 of
rectifier comprising op-amps A1 and A2 The final output voltage (Vo) at pin 7 the status port 379Hex.
of quad op-amp LM324 (IC4) and a zero- of op-amp A2 is given by the following The zero-crossing detector has been
crossing detector built around LM3914 dot/ relationship: realised using LM3914 IC. You may adjust
bar display driver (IC8) simultaneously. Vo=(1+R/2R)(-2Vi/3)= -Vi VR1 such that the last LED (LED10) goes
The full-wave rectifier rectifies the in- As Vi is negative, the output voltage is off when the input signal transits negative
put signal such that the negative half cycle positive. side of the input waveform. The LM3914
of the input signal is available in the posi- The zero-crossing detector detects itself rectifies the input signal and allows
PARTS LIST input voltage to 8-bit digital output. The control port address is 0x037a. The port
Semiconductors: data bus is tristate buffered. With eight addresses for parallel ports are summarised
IC1 - 74244 bits, the resolution is 5V/255 = 19.6 mV. below:
IC2 - 7805
IC3 - ADC 0804 The inbuilt clock generator Printer Data port Status port Control port
IC4, IC5 - LM324 circuit produces a frequency of
IC7 - CD4016
IC8 - LM3914 about 640 kHz with R1=10 kilo- LPT1 0x0378 0x0379 0x037a
T1 - Transistor SL100 ohms and C4=150 pF, which are LPT2 0x0278 0x0279 0x027a
D1-D4 - 1N4001 switching diode
L1-L10 - Red LED the externally connected timing LPT3 0x03bc 0x03bd 0x03be