A Simple 8-Channel Voltmeter with USB Interface

© Nigel Thompson
Rev. 1.1, May 25, 2004

This article describes a simple, 8-channel digital voltmeter with a USB interface for a PC with associated Windows software. The complete system can be built for less than $100.00 in a day or so. The project is built from only a few easily available components.

[Sadly, I have lost the source code to this project so it remains here solely as a curiosity. Sorry to those of you who have asked for it. In the unlikely event that I find it in my backups, I’ll post it here.]

Using a USB Interface

Over the years, I've built many kinds of devices with a wide variety of computer interfaces. Today, the most common interface for simple devices is USB. Unfortunately, for the amateur constructor, USB is considerably more complex than say an RS232 device or something you might attach to a PC's parallel printer port.

Several vendors sell simple USB interface boards that contain most of what you need to create a basic USB device. This project uses a board from Delcom Engineering. The board costs about $50.00 and forms the heart of the system. The Delcom board provides the complete USB interface; including the cable so that all you need to do is add a small amount of electronics to the board to create the complete device.

USB IO DEMO BRD

The Delcom USB Demo board

The software for this project requires the Delcom device driver that comes on a floppy disk with the board and which can also be downloaded from the Delcom web site.

The original design for this project required the 16-bit version of the Delcom USB device to provide 8 data bus lines and enough control lines to interface to the MAX197 device. This current version of the design has been modified so it can be used with the 12-bit version of the Delcom devices. I did this so that I could use the DIP package option and avoid the need to surface mount the package. The revised design shown here uses port 0 on the Delcom chip as the data bus and 4 bits of Port 1 for the control lines to the MAX197 device.

The Analog to Digital Converter

For this project, I used a Maxim MAX197 8-channel voltage sensing device. This device is designed for robotics and other similar kinds of projects. It has eight, programmable input channels and is very easy to interface to a microprocessor. For this project I used the two 8-bit ports on the Delcom board to simulate the data bus and control lines of an MPU.

Most modern semiconductors come in surface-mount packages and these are very difficult to work with if you are not experienced with SMT techniques. The Maxim MAX197 is available in an SMT package but also as an 18-pin DIP which is what I used. The package is easy to work with and can be fitted directly into the Delcom USB Demo board.

The Maxim device has an interrupt output line which is used to indicate when a data conversion is complete. Using the internal clock, a conversion takes around 15 us which is far shorter than the time it takes to poll the Delcom chip to see if the interrupt line is active. So in the current design I ignore the interrupt line from the Maxim device and just assume conversion is done when I go to read the data.

The Design

The diagram below shows how the MAX197 is wired to the Delcom USB Demo board. Note that apart from three capacitors, no other devices are required. Power comes from the USB connection to the Delcom board.

The Circuit Diagram

Note that Port 0 of the Delcom device is used as the 8-bit data bus to the MAX197 and that the lower 4 bits of Port 1 are used for control lines.  The top 4 bits of Port 1 are not used in this design. The interrupt line on pin 24 of the MAX197 is not connected.

I built the prototype on a Global Specialties board as shown below:

Voltmeter Proto 1.1

The Prototype

The Delcom board is in the upper-right and the MAX197 is the 18-pin device below it. The Delcom board includes a set of LEDs that show the activity of Port 1.

 For testing I wired most of the analog inputs to ground. One was connected to the +5V supply line and one to a potentiometer so I could adjust it and watch the input value change via the software.

NOTE: You must make sure the DIP switch on the Delcom board has all the switches set to off, to avoid interfering with the operation of the circuit.

Construction

At the time of writing, I have not yet built a version directly onto the Delcom board as I need to use it for other work. Construction should be fairly simple. I recommend using a socket for the MAX197 so that you can buzz out the wiring before you plug it in. The MAX197 has on-board protection circuits for the analog inputs, so providing you don't exceed the limits (about +- 16V) you can connect the inputs directly to the circuit you want to measure.

If you want higher impedance inputs or different voltage or current scales, you will need to add some front-end circuitry. I'm working on a version with programmable voltage and current inputs. Watch for another article.

The Software

I decided to make use of Microsoft's .Net framework for this project. I had done a couple of .Net projects before and I very much like using the C# language and the Visual Studio development environment. I do all my current Windows programming using Visual Studio .Net 2003.

The software available for download includes all the source code and is ready to be loaded as a Visual C# solution. I have also included a zip file containing the built modules. To run this application you will need a copy of the Microsoft .Net framework which can be downloaded from the web if you don't already have it.

A full description of the software would take too much space. Essentially, several classes provide the interface to the USB device. One additional class defines the behavior of the MAX197 device and several more classes provide the user interface. The screen shot below shows what it looks like when it's running:

VM1-screenshot-1

A Screenshot of the running software

Operations

The software allows you to see the voltages on all eight analog inputs to the MAX197 simultaneously. You can select four different voltage ranges as supported directly by the MAX197. If you want more range, you'll need to provide your own additional input circuitry. Refer to the MAX197 data sheet for a description of the input circuit to the device and recommended ways to drive it.

References

NADTEC web site: www.nadtec.to

This article: http://www.nadtec.to/doc/articles/simplevm/simplevm.htm

Download the source code: [TBD]

Download the binaries: http://www.nadtec.to/doc/articles/simplevm/vm1.zip

Delcom web site: www.delcom-eng.com

Delcom USB Demo board page: http://www.delcom-eng.com/products_USBIO.asp#DemoBrd

Delcom USB Demo board manual: http://www.delcom-eng.com/downloads/DelcomDLLManual.pdf

Delcom USB Demo board Windows driver files: USBIODS.INF USBIODS.SYS

Maxim web site: http://www.maxim-ic.com

Maxim MAX197 page: http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1042

Maxim MAX197 manual (PDF): http://pdfserv.maxim-ic.com/en/ds/MAX197.pdf

Microsoft .Net Framework Version 1.1 Redistributable Package download: http://www.microsoft.com/downloads/details.aspx?familyid=262d25e3-f589-4842-8157-034d1e7cf3a3&displaylang=en