PC-Based Data Logger
As we all know that physics is most interesting topic but some time we feel uncomfortable to deal with some physics varying variable due to lack of precise practical apparatus. Now, here is simple PC-based project (PC-based data logger), used in physics laboratories for automating simple experiment and or monitoring slowly varying physical variable such as temperature. The wide range of operating voltage +5V to -5V at the data rate of 18 samples/second with resolution of 39.2 mV makes this circuit more versatile.
The entire hardware circuit of PC-based data logger is designed around analog to digital converter (ADC) IC ADC0804 followed by sample and hold IC LF398 with operational amplifier (op-amp) IC op-07.
The analogue input is given to pin 3 of op-amp IC, configured as differential amplifier through resistor R4. Resistor R3 and R4 of same value for series input to op-amp IC is used here. The gain of amplifier is 0.5 set by feedback resistor, biasing resistor R3 and R5 with input resistor.
The swing of output from 0V to +5V is for swing in input -5 to +5V. The output is obtained from pin 6 given to the input pin 3 of IC6. IC6 is sample and hold amplifier which get control signal from computer through parallel port pin 14 to pin 8 for sample and hold mode. A poly propylene capacitor C5 is used as hold capacitor connected to pin 6 of IC6. The output from pin 5 is given to pin 6 of IC7 according to control signal logic 1 puts in simple mode while logic 0 puts in hold mode.
The analogue output from sample and hold IC is fed to analogue to digital converter IC7 for conversion into binary data. The IC7 is controlled by three pin referred as chip-set (CS), read (RD) and write (WR) inputs. Logic 0 on CS and RD pin enable analogue to digital converter (ADC) and convert data to appear on output pin (11 to 18), where write WR pin occur low-to-high the conversation of analogue signal to binary signal is held. The end-of-conversion signal is done by INTR pin.
Here INTR pin indicate whether the conversion is start or over (i.e. low on INTR pin over the conversion where high starts the conversion and remain up to conversion). The signals from Analogue to Digital converter (ADC) through INTR go to inverter IC, inverted signal fed to pin 10 of parallel port. Digital output D0 through D7 of analogue to digital conversion is connected to pin 2 through 9 of parallel port, refer as data pins. Detail of register pin of parallel port is shown in table 1.
Register Pin Detail of the PC’s Parallel Port
Parallel Port pin NO.
Control – 0
Data – 0
Data – 1
Data – 2
Data – 3
Data – 4
Data – 5
Data – 6
Data – 7
Status – 6
Status – 7
Status – 5
Status – 4
Control – 1
Status – 3
Control – 2
Control – 3
The control bit 1 is used to control sample /hold IC (IC6) where logic 0 and logic 1 is provided from pin 14 to pin 8 when control bit is high and low respectively. Control bit 2 is connected to WR pin of ADC through diode D5.
The output for 1 Hz square wave and sine wave input with amplitudes of 4V and 5V, respectively, are shown in figure 2
Software:- The source code for data logger is written in C-Programming language for easy to use and understand.
PCB design:- PCB design of PC-Based Data Logger
Figure 4: Component Side PCB Layout
Resistor (all ¼-watt, ± 5% Carbon, unless stated otherwise)
R1 = 470 Ω
R2, R4 = 20 KΩ
R3, R5, R8 = 10 KΩ
R6, R7 = 1 KΩ
C1 – C4 = 1000 µF, 25V (electrolytic capacitor)
C5 = 0.01 µF (ceramic disc capacitor)
C6 = 150 pF (ceramic disc capacitor)
IC1 = 7812 (+12V regulator)
IC2 = 7805 (+5V regulator)
IC3 = 7912 (-12V regulator)
IC4 = 7905 (-5V regulator)
IC5 = OP-07 (operational amplifier)
IC6 = LF398 (sample and hold amplifier)
IC7 = ADC0804analogue-to-digital converter
IC8 = 74LS04 (hex inverter)
D1 – D5 = 1N4007 (rectifier diode)
LED1 = LED (power-indicator)
X1 = 230V/50Hz or 110/50Hz AC primary to 15V-0V-15V, 1A secondary step-down transfer
25-pin D type female connector
Two 25-pin D type male connector (for connecting two circuit to the female connector at the back of the PC and circuit)