Академический Документы
Профессиональный Документы
Культура Документы
LPT-to-I2C
interface and the PC’s parallel port. The proposed system has a Long cables
Adapter
SCL SCL
master-slave architecture and consists of an LPT-to-I2C adapter
for the parallel port, which operates as single master, up to 8 S1
SDA SDA
slave modules (measurements nodes) based on the TMP75
digital sensor IC and LabVIEW application software. Such a
system can be deployed across a building, laboratory or any
SCL
other facility, for current environmental monitoring, or it may
serve as an educational tool for students. S2
SDA
Keywords: temperature monitoring, digital sensors, parallel port,
LabVIEW
SCL
I. INTRODUCTION
S8
Digital measurements of temperature are extensively used SDA
6 5 v cc
C1 R5 D1
74LS05 v cc 2 1
v cc 100n
U1D
330 DIODE
8 9 0 0 0
v cc C2
100n v cc v cc v cc v cc
74LS05
0
R8 v cc R4 R3 R2 R1
J1 v cc
VCC 470 4.7k 4.7k 4.7k 4.7k
1 SCL R6 U1B VB1
2 SDA U2 1
3 GND 4.7k 4 3 SCL 14
4 1 8 v cc SDAin 2
NC VCC 15
CON4 2 7 74LS05 3
Lx Ly 16
R9 3 6 0 4
Sx Sy 17
470 4 5 U1A U1E 5
GND NC
7
18
J2 v cc 2 1 10 11 6
VCC P82B715P 19
1 SCL v cc 0 7
2 SDA R7 74LS05 20
3 GND 74LS05 8
4 4.7k
14
21
v cc 9
CON4 22
0 J3
10
U1F 23
v cc 13 12 SDAout 11
1 24
2 74LS05 12
C3
C4 25
CAP 100n
CON2 13
SUB-D 25
0 0
of the Status register (located at the base address+1), which is earlier operating systems.
responsible for controlling the pin 11 of the LPT port. Note that the embedded I2C API also provides functionality
Finally, the bit 1 (Auto Linefeed) of the Control register, at for converting data in two’s complement format to decimal
the location base address+2, is used for controlling the pin 14 format. This is useful in many applications, including in the
of the LPT port and thus the SCL signal for the I2C device. case of the TMP75, which outputs the conversion result as a
A picture of the developed LPT-to-I2C adapter is presented 12-bit two’s complement word.
in Fig. 3. It connects to the I²C target system via one of the
B. The Measurement Nodes
two 4-pin screw terminals on the board and requires an
The circuit diagram of a measurement node is shown in
external +5 VDC power supply, which is indicated by a LED.
Fig. 4. The TMP75 requires no external components for
There is no need to operate modifications of the parallel port
operation except for pull-up resistors on SCL and SDA lines.
settings from the BIOS utility.
It features three address pins, A2, A1 and A0, allowing up to
The embedded I2C Driver API includes a number of
eight devices to be connected to the I2C bus. The slave
LabVIEW virtual instruments (VIs) that conform to the main
address of each sensor will be set up by connecting each
events on the I2C bus: I2C Start.vi (is used to generate the
address pin to either the supply voltage (VDC) or the ground
Start condition), I2C Stop.vi (is used to generate the Stop
(GND) via an associated jumper (J1, J2 or J3), according to
condition), I2C Send.vi (is used to transmit messages to the
the specifications in the datasheet. For instance, if all address
I2C slave device), I2C Read 1 Byte.vi (reads a byte of serial
pins are grounded, the slave address of the TMP75 is
data from the addressed I2C device), etc. All these VIs have
1001000 [16].
been developed by using the In Port.vi and Out Port.vi
The TMP75 digital sensor IC is mounted on a separate SO-
functions of the LabVIEW environment, which are low-level
8 to 8-pin DIP adapter PCB, which inserts into a main board,
VIs that allow reading from and writing to a specific register
as presented in Fig. 5. Such a module is also compatible with
address. Unfortunately, they work only on Windows XP and
v cc v cc v cc v cc
1
R4 R3
R2 R1
I2C J5
470 470
4.7k 4.7k J1
Signals
2
v cc v cc 1
2
1 U1 U2 A0 2
2 3
3 1 8 v cc 1 8 v cc
4 NC VCC SDA VCC
2 7 2 7 A0 0 CON3
Lx Ly SCL A0
to LPT
CON4
3 6 3 6 A1 J2
0 Sx Sy ALERT A1
4 5 4 5 A2 v cc 1
GND NC GND A2 A1 2
3
P82B715P TMP75
0
0 CON3
0
J3
J4
v cc v cc v cc v cc 1
1 A2 2
2
+5 VDC CON2
C4
2.2u
C3
100n
C1
100n
C2
100n
3
0 CON3
0 0 0
Fig. 3. Board of the LPT-to-I2C adapter and associated Fig. 4. Circuit diagram of a measurement node based on
I2C LabVIEW library. the TMP75 digital sensor.
16
temperature sensor, but it can easily be modified to
selectively scan any number of sensors. The temperature data
I 2C can be recorded automatically, at predefined time intervals
Signals TMP75
(e.g., 2 minutes, as in Fig. 6), and/or manually, at any
moment, by simply pressing the “Save Now” button. For
quick review and management, the content of the data files
can be imported directly into Microsoft Excel.
A snapshot of the block diagram of the LabVIEW
application is shown in Fig. 7. Basically, it reflects the two-
wire timing diagram of the TMP75, by calling I2C VIs in
Fig. 5. Measurement node based on the TMP75 digital sensor
(main board and sensor mounting adapter). sequence and configuring them with proper information, as
specified in the TMP75’s datasheet. First, 9, 10, 11 or 12 bits
the TMP175 temperature sensor having similar features, but of resolution are achieved by addressing the Configuration
allowing up to 27 devices to be addressed on a single bus Register of the TMP75 and setting the resolution bits
interface (in this case, one, two or all address pins could be accordingly (in the sequence structure at the top of the block
left float – the associated jumper will not be connected). Both diagram). Then, in a while loop, the two’s complement
sensors are capable of a ±1.5 °C accuracy over the temperature data are continuously read each second from the
temperature range from -25 °C to +85 °C, with a Temperature Register, converted to Celsius degrees and
measurement resolution of 0.0625 °C. displayed in digital and graphical format. Additional data
processing is used for retaining the maximum and minimum
III. APPLICATION SOFTWARE temperature values from launching the program, as well as for
The application software makes use of I2C Driver API for implementing the recording algorithm with various options.
the developed LPT-to-I2C adapter, while further taking If necessary, additional software features can be added with
advantage of LabVIEW capabilities for data analysis, less or more effort, depending on the application. These may
visualization and storage. It provides user-friendly operation include: visual and acoustic alarms for each temperature
sensor, simple and advanced temperature statistics, e-mail
and accommodates multiple functionality, including (Fig. 6):
and SMS notifications when the temperature exceeds a
selecting the remote temperature sensor to be read
certain limit, creating average room temperature profiles,
(from the pull-down menu);
generation of automatic reports, etc.
selecting the desired measurement resolution: 0.5 °C, Moreover, it is possible to perform web-based temperature
0.250 °C, 0.125 °C or 0.0625 °C; monitoring with just a few clicks of the mouse. Remote users
displaying the current value of the ambient can view and control the front panel (GUI) of the application
temperature, as well as its minimum and maximum over the Internet, either from LabVIEW or from a Web
values over time; browser, by connecting to the LabVIEW built-in Web Server.
displaying the temperature vs. time as a graph; When using a Web browser, only the prior installation of
recording temperature data together with timestamps LabVIEW Run-Time Engine, a free program that gives full
to text files, etc. support for viewing and executing remote front panels in web
This software version allows reading only the designated
Fig. 6. Graphical User Interface (GUI) of the LabVIEW application Fig. 7. Block diagram of the LabVIEW application
software for temperature monitoring. software for temperature monitoring.
17
pages, is required on client PCs [17], [18]. REFERENCES
IV. SYSTEM OPERATION [1] A. González, N. Leone, M. Murdoch, P. Mazzara, and J. Oreggioni, “A
wireless sensor network implementation for an industrial environment”,
The system operation was proven to be reliable and Argentine School of Micro-Nanoelectronics Technology and
straightforward. Regarding the I2C communication distance, Applications (EAMTA), Montevideo, Uruguay, 2010, pp.82-86.
[2] S.L. Huang and J.Z. Cui, “The Design of Measurement System Based
we connected a TMP75-based measurement node at the end on Digital Temperature Sensors”, Advanced Materials Research, vol.
of a 94-meter long CAT 5 cable, as shown in Fig. 8, and then 1022, pp. 139-142, November 2014.
we placed this cable in different electromagnetic [3] M.J. Darr and L. Zhao, “A wireless data acquisition system for
monitoring temperature variations in swine barns”, Livestock
environments within the building of our faculty. During the Environment VIII Symposium, Iguassu Falls, Brazil, 2008, pp. 987-
tests, we measured a communication speed around 47 kHz, 994.
which is high enough compared to the minimum operating [4] A. Agnihotri, “Human Body Respiration Measurement Using Digital
Temperature Sensor with I2C Interface”, International Journal of
frequency for SCL, 1 kHz [16]. Longer distances are Scientific and Research Publications, vol. 3, no. 3, pp. 1-8, March
probably possible, but a point to watch is the signal 2013.
attenuation caused by the DC resistance of the wires. [5] Z. Qishen, Z. Dongmei, and S. Xunwen, “Distributed remote
temperature monitoring and acquisition system based on CAN bus”,
V. CONCLUSIONS Prognostics and Health Management Conference (PHM ’10), Macao,
2010, pp. 1-4.
This study demonstrated that, using low-cost digital sensor [6] Z. Huang, Z. Huang, X. Cui, and S. Han, “Intelligent network
ICs and LabVIEW programming, it is possible to implement temperature and humidity measuring system based on USB interface”,
TELKOMNIKA Indonesian Journal of Electrical Engineering, vol. 12,
powerful temperature monitoring solutions, with minimum of no. 5, pp. 3805-3810, 2014.
hardware and time invested in software development. [7] J.K. Nath, S. Nath, and K.C. Sarmah, “Microcontroller Based High
However, since the I2C Driver API for LabVIEW will Resolution Temperature Monitoring Data Acquisition System with
Graphical User Interface, International Journal of Recent Development
theoretically work with any other digital sensor with I2C in Engineering and Technology, vol. 2, no. 4, pp. 85-89, April 2014.
interface, it is also possible to integrate different sensor types [8] R. Singh and S. Mishra, “Temperature monitoring in wireless sensor
(temperature, humidity, light, gas, proximity, etc.) into a network using Zigbee transceiver module”, 2010 International
unique network system having a similar architecture, but Conference on Power, Control and Embedded Systems (ICPCES 2010),
Allahabad, India, 2010, pp. 1-4.
adapted to various requirements and necessities. [9] E. Lunca, S. Ursache, and O. Neacsu, “Graphical Programming Tools
for Electrical Engineering Higher Education”, International Journal of
ACKNOWLEDGMENT Online Engineering (iJOE), vol. 7, no. 1, pp. 19-24, 2011.
[10] E. Lunca, S. Ursache, and A. Salceanu, “LabVIEW Interactive
The authors thank Texas Instruments for offering of the Simulations for Electromagnetic Compatibility”, International Journal
TMP75 and P82B715 integrated circuits used in this work, as of Online Engineering (iJOE), vol. 8, no. 2, pp. 11-14, 2012.
well as for their support in previous educational and research [11] E. Lunca and A. Salceanu, “Virtual Instrumentation Approach for
Teaching EMC Concepts”, Electronics and Electrical Engineering, vol.
projects. 117, no. 1, pp. 75-80, 2012.
[12] Texas Instruments, “P82B715 I2C Bus Extender”, Datasheet, Rev. A,
2008, [Online: http://www.ti.com/lit/ds/symlink/p82b715.pdf].
[13] E. Lunca, A. Salceanu, and M. Cretu, “Implementing the I2C
Communication Protocol in LabVIEW”, 15th IMEKO TC4 International
Symposium on Novelties in Electrical Measurements and
Instrumentation, Iasi, Romania, 2007, pp. 514-517.
[14] E. Lunca, C. Damian, and F. Mariut, “Simplifying the Communication
with I2C Devices Using LabVIEW and the PC’s Parallel Port”, 9th
27.000 °C International Conference on Remote Engineering and Virtual
Instrumentation (REV 2012), Bilbao, Spain, 2012, pp. 187-190.
[15] B. Vasquez, “How to Use a PC’s Parallel Port to Communicate with 2-
Wire Devices”, Application Note 3230, Maxim Integrated Products,
26.9 °C June 15, 2004, [Online: http://www.maximintegrated.com/en/app-
notes/index.mvp/id/3230].
[16] Texas Instruments, “TMP175/TMP75 Digital Temperature Sensor with
Two-Wire Interface”, Datasheet, Rev. K, 2015, [Online:
http://www.ti.com/lit/ds/symlink/tmp75.pdf].
[17] National Instruments, “Remote Panels in LabVIEW - Distributed
Application Development”, Tutorial, Feb. 13, 2013, [Online:
http://www.ni.com/tutorial/4791/].
[18] E. Lunca and A. Salceanu, “Using the New LXI Instruments in Remote
Laboratory Applications”, 7th International Conference on Management
Fig. 8. System components connected by a long cable. Comparison of Technological Changes (MTC 2011), Alexandroupolis, Greece,
to a commercial temperature data logger. 2011, pp. 381-384.
18