Zibb
Subscribe to Control Engineering
FirstLight
Ask Charlie   


Link This | Email this | Blog This | Comments (3)


How can I use a PC to measure voltage and current?
March 2, 2007

The technology for measuring virtually any physical quantity using a computer is called data acquisition (DAQ) and is very mature, despite the number of engineers who feel unfamiliar with it. In fact, every engineer uses it regularly for taking measurements because virtually every digital measuring instrument is based on DAQ principles. Oscilloscopes, digital multimeters, SCADA systems, PLCs and anything else that takes analog input and provides digital output uses DAQ architecture. For most of these applications, however, the DAQ architecture is hidden away inside a box to make it look like a specialized piece of equipment.

DAQ architecture began to appear in the 1970s when minicomputers appeared that were inexpensive enough for individual laboratories to have them dedicated to helping researchers collect data. Engineers who were comfortable working with both instrumentation amplifiers and digital electronics built modules that took voltage signals put out by analog instruments of the day, and converted them to digital signals that they could “poke” directly into memory locations in the minicomputer’s random access memories.

In 1982, when IBM introduced its version of the personal computer (PC), which had expansion slots and open bus architecture, enterprising instrument makers were ready and able to build DAQ boards to fit into those expansion slots. A DAQ board has one or more analog input ports leading into analog-to-digital converter (ADC) circuits, which then fed the resulting digital words directly to an ISA bus driver. Since the analog signals varied with time, the DAQ boards had to update the digital values on a regular basis, leading to the idea of sampling periodically at a sampling frequency. The DAQ board looked to the computer like any other peripheral hanging off the ISA bus.

Of course the computer couldn’t do anything with the signals coming down the bus without software, so the DAQ board vendors had to write software to collect the little signals coming along the ISA bus and put them into the computer’s RAM. These software routines were (and still are) called “instrument drivers,” and you need the right driver for every DAQ board. The instrument driver controls the board, telling it things like what sample frequency to use, when to start acquiring data, and so forth, and it collects the data, telling the computer where to put it.

Beyond instrument drivers, you need more software to pick the data up out of memory locations and do something useful with it. This higher level software, called the application program, can be written in almost any high-level language, such as Fortran, C++, Python, etc., but DAQ vendors have developed sophisticated programming “environments” to make the job easier. Perhaps the best known of these is LabView, from National Instruments, which allows engineers to create application software using simple icon-like “virtual instruments” (VIs) that represent real hardware capabilities. Since VIs can be combined into larger VIs, LabView programs can make the hardware do anything the hardware is capable of doing, no matter how imaginative.

Today, instead of plugging ISA expansion boards into the back of your computer, you plug a USB module into the one of the computer’s USB ports (you could also use IEEE 1394, Ethernet or other peripheral communication standards). At the business end of the module, you still have to use point-to-point wiring to collect signals from your application equipment.

So, performing the simple task of having a PC measure voltage or current requires having a computer with suitable peripheral communication capabilities, a DAQ module that communicates to the computer, an instrument driver to link that instrument with that computer, and application software to tell the computer what to do with the data once it arrives.

The DAQ module manufacturer will provide the driver software along with the module, along with directions for installing it on the particular computer. Most DAQ module vendors also supply simple canned application programs that will at least get the data archived somewhere safe so you can do something with it. For beginners, creating an Excel spreadsheet is the best option. You can then analyze the data six ways from Sunday at your leisure.

If you’re more ambitious, purchase a more sophisticated application-programming environment and make the investment to learn how to use it. When I got serious about using DAQ instrumentation, I went out and purchased a multifunction DAQ card with about 16 analog input channels and (as I remember) 32 digital I/O channels along with the LabView programming environment. I also acquired a copy of National Instruments’ introductory LabView programming course on CD and a fat book on how to program in LabView. After a few hours of study, I started writing simple grab-a-measurement-and-stick-it-in-memory application programs, then graduated to ever more complex programs until I felt confident that I could produce code to do just about anything the equipment could do.

That’s the way I did it. You don’t have to go to NI for the hardware or software. There are plenty of other vendors out there as well. A good place to start looking for the components you need is Omega Engineering. The company distributes a range of DAQ hardware and software from simple and inexpensive to top of the line. (Or use our online buyer’s guide at www.cesuppliersearch.com.)

The bottom line is that there is no shortcut. To get a PC to make a voltage or current measurement, you need all the hardware and software pieces. If you try to do it yourself, you’ll have to create all of the pieces yourself. A lot of very smart people have already spent 30+ years figuring out how to do it. For a little cash and a little time, you can have the benefit of all that experience. Trying to do it yourself will cost more and take more time—and produce an inferior result.

C.G. Masi, Control Engineering senior editor, charlie.masi@reedbusiness.com

For more information about computer based measurements, visit the Control Engineering website at http://www.controleng.com.

For additional information, visit these Websites:http://en.wikipedia.org/wiki/Data_acquisition
http://www.ni.com/labview
http://www.omega.com

Posted by Charlie Masi on March 2, 2007 | Comments (3)


February 6, 2008
In response to: How can I use a PC to measure voltage and current?
sepideh shahi commented:

Job title: Industrial designer email: sepidar62@yahoo.com Question: I need to transmit volatge from fusebox to a receiver in 5m distance. What kind of transmitter and receiver do I need? Thanks





POST A COMMENT
Display Name or Registered Users Login Here.

Before submitting this form, please type the characters displayed above:


Advertisement



Advertisements



About Us   |   Advertising Info   |   Site Map   |   Contact Us   |   Useful Sites   |   FREE Subscription   |   RSS
© 2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy
Please visit these other Reed Business sites