Interfacing with a 200 mV Panel Meter

Copyright, Towanda L. Malone and Peter H. Anderson
Department of Electrical Engineering
Morgan State University, Baltimore, MD 21239
August 27, 96

Introduction.

200 mV panel meters are easy to find and they are inexpensive. One can easily find them at ham fests and BG Micro always seems to have at least one model for sale. A typical advertisement is shown in Figure #1.

These panel meters are simply voltmeters capable of measuring voltages in the range of 0.000 to 0.200 Volts. The decimal point is selected using either a switch or strap on the meter itself. Thus, 74.6 mV may be displayed as either 746, 74.6, 7.46 or .7 46.

This provides sufficient latitude for meaningful interpretation in most cases. For example, such a panel meter might be used display a temperature value in degrees Fahrenheit. If the highest value is less than 200 degrees F, it makes sense to do a simpl e mapping from degrees F to millivolts. For example, map 98.6 degrees F to 98.6 millivolts. However, if the highest temperature is above 200 degrees, e.g., 212 degrees F, the capability of the meter is exceeded and a better mapping might be degrees F to 0.1 millivolts. That is, a temperature of 212 degrees F would be mapped to 21.2 mV, and the display would be appropriately strapped to display the decimal point in the correct position.

Why Use a Panel Meter?

The question might arise; with a full CRT available for display of all kinds of fancy graphics and text, why would anyone want a wimpy display capable of displaying only four digits plus a decimal point.

Two answers.

First, as a remote display. The PC may be a data collector, but the information is read by a human several thousand feet away. All that is required at the remote site is a few resistors, a power source; e.g., a 9 Volt battery and the panel meter and all that is required between the PC and the remote is a twisted pair. (We are not at all sure we would want to even try to run a VGA cable out several thousand feet to a remote display).

Second. This discussion centers on the use of the printer port in controlling devices and acquiring data and our reasons for selecting this platform is that it is one which is within reach of virtually anyone; its cheap and its painless and it works well for us in the educational field and we offer that it is a convenient development platform for many applications. The ultimate product may be a 68HC11 or PIC platform where there is no CRT. The integrated development environment offered by such C packag es as Borland's TurboC makes initial debugging on a PC mighty attractive. Develop using the printer port and then map over to the final platform where the panel meter may be the only human interface. Digi

Digital tp Analog Conversion.

Assume, we desire to display temperatures in the range of 0 to 100 degrees C. This is simply a matter of converting each temperature to the corresponding voltage in mV; e.g; 23.6 degrees C would be converted to 23 mV. Of course, the panel meter would be strapped such that the decimal point were positioned to show the as 23.6.

This can be done using a digital to analog converter as shown in Figure #2. Note that;

V_o = V_ref * R_f / R_14 (d7/2 +d6/4 + d5/8 + d4/16 + ... d0/256)

If V_ref = 0.200 Volts, R_f = R_14 = 10.0 K, then;

v_o = 0.200 * band / 256

where band is a level in the range of 0 to 255.

Knowing the temperature, the appropriate band is easily calculated and output of the digital to analog converter via the Data port with the following C code;

     int band;
     float V_T_c, band_float;

     ...

     V_T_c = T_c / 1000.0;    /* T_c converted to a voltage */
     band_float  = V_T_c / 0.2 * 256.0;
     band = (int)(band_float *2.0)/2; /* round to closest integer */
     outportb(DATA, band);

Note that in the second statement, there are 256 bands spanning the range of 0.0 to 0.200 Volts. Thus, the band is determined by simply taking the ratio of V_t_c to 0.200 and multiplying by the 256 total bands. For example, a temperature of 100 correspo nds to a desired voltage of 0.100 which would correspond to band 128. In the case of 23 degrees C, the band is 29.

Note that there is some rounding error. For example in the case of 23 degrees C;

V_T_c / 0.2 * 256.0 = 29.44

With the rounding error, the band is 29. Thus, the actual V_o is 0.200 * band / 256 = 22.6 mV. With suitable strapping of the decimal point, this would appear on the panel meter as 22.6

Gain.

Of course, a V_ref of 0.200 Volts is ridiculous. This results in small voltages; e.g., 0.023 Volts, which are small enough that offset voltages associated with the D/A and the operational amplifier have the potential for introducing a significant error.

However, if we were to use a V_ref of 5.0 Volts, the actual output of the D/A circuit would be 25 times higher (5.0 / 0.200). Thus, the temperature of 23 degrees C would translate to 0.023 * 25 = 0.575 Volts.

Of course, if we introduce a gain of 25 at the "sender", we must similarly introduce a gain of 1/25 at the "receiver", in this case, the panel meter. This is easily accomplished by using a voltage divider as shown in Figure #4.

The resistors may be mounted on the panel meter itself as shown in Figure #5.

Design Considerations.

Calibration.

In Figure #3, we have shown two techniques which might be used to provide an effective V_ref of 5.0 Volts and use this as a pivot to discuss some design points. Fielding a working product is critical. However, the goal of an electrical engineer is not s imply to field a working product, but to minimize the costs.

In Figure #3A, a non precise source of 5.0 VDC is used. A potentiometer is then used to correct for any inaccuracies. The premise of this approach is that the initial value of the 5.0 Volt source may be somewhat inaccurate, but it is stable over time an d over the temperature range over which the product must function. In the example, we assumed the accuracy of the +5 Volt reference was 5 percent. Thus, the circuit was designed such that the feedback resistor may assume values in the range of 9.57 K to 10.57 K, or nominally 10.0 K +/- 5 percent.

A potentiometer may well be the way to go if you are doing a "one of a kind" design, or even a limited production of 100. However, there are some inherent disadvantages in using a pot.

Over time the contact between the resistive material and the wiper corrodes and the resistance changes. I'm sure, all readers are familiar with a "scratchy pot" where you squirt a little contact cleaner and become your mother's hero. In fact, an argumen t may be made, that the proper place for a pot is in an application where it is turned, providing a wiping action which tends to clean the contact. In this particular application the pot is set once and thus there is no such wiping action.

Another disadvantage of potentiometers is that people like to fool with adjustments. At AT&T Bell Labs, we tried to avoid pots, but when we did use them, they were well hidden from probing fingers or were sealed with wax.

An alternative to the potentiometer is a binary chain as illustrated in Figure #6. Note that all resistors in the chain are initially shorted with straps the final tester may cut. The manufacturing testing procedure might be to exert 255 on the digital input and the tester then measures the voltage at the output of the op amp. The tester then consults a table you have given him as to which straps to cut. Note that it is a lot easier to cut straps than insert straps or resistors.

However, try to avoid factory calibration whether it be a potentiometer or a binary chain. A manufacturing facility is a very confusing place where different workers are working on different jobs. Such a procedure works if 10,000 units all come down th e line at once and the final tester has his voltmeter and screw driver or cutters at the ready. But, assume 50 units fail. These units are returned for troubleshooting and correction and three days later they come down the line to another tester. The t ester must learn the procedure, set up the voltmeter and adjust the pot or cut straps. In the confusion, the final calibration may well be overlooked.

Of course if the +5 Volt reference is not stable with time, all bets are off on the circuit shown in Figure #3A, with or without a binary chain.

The circuit in Figure #3B uses a precision 2.5 V reference diode (LM336). Note that R_feedback is 10K and R_14 is 5.0K. Thus, the circuit is functionally the same as that shown in Figure #3A. Note that the accuracy depends on the ratio of R_feedback an d R_14. However, if all of the 10K resistors are packaged in the same SIP or DIP network, the ratios track one another very closely. This is the reason, the 5K resistor is implemented by using two parallel 10K resistors. Thus, in my mind, the circuit o f #3B is preferable to that of #3A, particularly on large production runs. Indeed, the LM336 costs $0.79, but all of the many problems associated with the potentiometer or the binary chain are eliminated and the manufacturing testing is reduced to a "go- no go" voltage reading.

The receiver consists of the 200 mV panel meter and the external resistor network. The panel meter contains a potentiometer which in our case provided 8 percent of adjustment. That is, with 180 mV applied directly to the panel meter, the reading could b e adjusted from 161 to 191 mV. Thus, on the receiver side, one is forced to use the "adjust the potentiometer" approach. On the flip side, the resistors in the external network may be 5 percent tolerance as the pot is capable of mopping up the error. I don't want to beat a dead horse, but as a designer, don't overlook the possibility of having the customer do your work for you. That is, instructing them to wire the sender (the D/A) to the distant receiver (the panel meter and resistors) and adjusting the meter to read some value. You just may save any factory calibration altogether. Perhaps, that pot on the receiver may be capable of mopping up errors at both the sender and at the receiver

. Perhaps you are confused with all of the options. Welcome to the real world. My advice to any electrical engineering student when they get on the job is to learn the entire process. As a designer, you are a part of the process, but other parts are manu facturing, manufacturing testing and the end user. Don't isolate yourself and assume the merit of a design is simply the sum total of the component costs. By understanding the manufacturing process, you may well save your company a lot of money by addin g a few extra components. Life is not simple. That is why electrical engineers are paid.

Power Supplies.

Consider the circuit of Figure #3A or #3B in terms of the number of voltage potentials that are required. We have +5, +12 and -12. It sure is easy to write +12, -12 and +5, but ultimately, it is your job as a designer to implement these supplies. I enc ourage you to reach a working design, but to then go back and examine each potential as to whether it can be changed to another value or whether it is really needed.

Certainly +5V is required on the D/A for the TTL interface. The question then becomes, could we do away with +12 and -12. We could have used an LM324 operational amplifier and powered it with +5V and ground. The output of the op amp would then be limit ed to lower and upper swings of 20 mV to 3.3 Volts, respectively. Rather than using a gain of 25 over the 200 mV reference, we could well have backed off to a gain of 15 which would limit the output of the operational amplifier to 3.0 Volts. If we are n ot concerned with very low values where the output of the LM324 is limited to 20 mV, the use of ground certainly is a lot less expensive than -12.

But, then, the accuracy of the +5V may be important. Recall that TTL should be 5.0 V with tolerance of less than 5 percent. If we are using a plug in transformer, we can't get that kind of accuracy. Thus, we are faced with a regulator. So, perhaps we should retain the +12 which permits us to stay with the gain of 25 over 200 mV. If we are not interested in values close to zero we can forget the negative potential. Thus, a workable arrangement might be to use +12V from a plug in transformer along wit h a regulator to derive +5. I would be inclined in this direction.

However, in any event, the negative potential need not be -12V. Minus 1.0 would work. Certainly -5.0 would work.

In Figure #7 we have shown the full power circuitry. The entire circuit is powered using +12. Note the diode on the input to guard against accidental power reversals. (They happen). The +5V potential is derived using a 7805 voltage regulator. The -5 V potential is derived from the +5 using a Harris ICL7660 CMOS Voltage Converter.

The ICL7660 is available from Jameco (Jameco Part #51174) for $1.39 in quantities of one. The theory is quite simple. The 47 uFd capacitor is switched by the 7660 such that it is connected across the input (+5 and ground). It is then switched such that the +5V side is connected to ground and the ground side to the -5V output. Note carefully the polarity of the electrolytic capacitor on the output. Data sheets for the 7660 are available on the WWW.

Plug in Power Modules.

At Morgan State University we try to design all projects for a single +12V supply and then use a plug-in transformer supply.

Be sure you measure the output of these plug-in supplies. Our experience has been that a unit marked as +12V is usually closer to +16 volts. Thus, an additional 7812 up-front regulator as illustrated in Figure #8 might be used in those situations where V_in exceeds +14.6 V which is the minimum voltage required for the 7812 to maintain line regulation. Other options are to use reverse biased zeners or forward biased diodes.

A bit of history on the plug-in supplies.

About 25 years ago, AT&T marketed a Princess Phone which had a cute little lamp on it. I guess the princesses were afraid of the dark! AT&T did not want to power it from the telephone line as the telephone network is a mighty expensive method of distrib uting power. Thus, they developed a plug in transformer power supply for both the Princess phone and for modems which permitted the customer to power these units from commercial power.

The plug in transformer alleviated the need for running 120 VAC and incorporating a step down transformer in the units. It also lessened potential for electrocution by princesses using the telephone in the shower. It was a winner.

A good amount of engineering went into these plug in units. AT&T, as with any responsible corporation, was very concerned with the possibility of fires in the modules, the units shorting and all kinds of toxic chemicals leaking out or with the units expl oding. Product liability was a concern then and it is a larger concern today, and any company which fails to pay attention to this is doomed.

The end result is a unit which has withstood the test of time for several decades. Plug in supplies are cheap. By getting the power supply out of the unit, the package is more compact and there are no lethal voltages running to the unit or in the unit i tself. This last point is particularly important in avoiding lawsuits.