FIELD OF THE INVENTION
The present invention relates generally to voltage to decibel converters, and, more particularly, to multimeters having a voltage to decibel conversion capability.
DESCRIPTION OF THE PRIOR ART
A multimeter is a multipurpose instrument that can measure resistance, voltage, or current of an input. In addition, certain multimeters are able to measure decibels of the input. The decibel may be expressed as a logarithmic function of a ratio of powers of two signals. In particular,
where P1 is the power of a first signal, and P2 is the power of a second signal. It is a common practice to calculate decibels relative to a fixed power level. For instance, the unit "dbm" is a measurement of the power level of a signal (P2) relative to one milliwatt (i.e., P1 equals one milliwatt).
Multimeters that have the capability of converting the voltage of an input signal into dbm have generally adopted one of two approaches. In the first approach, special hardware or a special microprocessor has been employed to perform the calculation of dbm. As this calculation involves a logarithmic function, it is not a trivial operation, and special hardware has been necessary. This hardware generally has added substantial cost to the system and often times has occupied a large portion of the available circuit board space. In addition, this approach has required the calculation of dbm every time that a new input has been received.
In the second approach that has been adopted by conventional multimeters to calculate dbm, a large lookup table of dbm values has been maintained. The lookup table is indexed by the voltage of the input signal. However, given the large number of different values that the input voltage may assume within the specified input range, a large table has been necessary. Furthermore, given that a system may operate over different input voltage ranges, a separate table or portion of a table has been required for each range. As a result, a large amount of memory has been occupied by these tables.
It is, therefore, an object of the present invention to provide a voltage to decibel converter that employs simple and inexpensive components.
It is a further object of the present invention to provide a voltage to decibel converter with minimal memory requirements.
Summary of the Invention
The foregoing and other objects are realized in the present invention which concerns a method of converting an input voltage into decibels. In accordance with the method of the present invention, a table of voltage values is provided wherein each entry is associated with a decibel value. The input voltage is compared with entries in the table to locate a first entry that is larger than the input voltage. Preferably, the first entry is closer in magnitude to the input voltage than any other entry in the table having a higher voltage than the input voltage. Once the first entry is located in the table, a second entry that is smaller than the input voltage is located in the table. Preferably, the second entry is closer in magnitude to the input voltage than any other entry that is lower than the input voltage.
Once the first and second entries are located, a fractional value indicative of where the input voltage lies in the range defined between the first entry and the second entry is determined. A decibel value corresponding with the fractional value is added to a decibel value corresponding to the second entry to produce a decibel value of the input voltage. Preferably, this decibel value for the input voltage is measured in dbm.
A multimeter may include a display which is used to display the decibel value for the input. In such instances, the decibel value corresponding with fractional value may be rounded to one decibel place to ensure easy display of the decibel value for the input.
If the input range of the input voltage exceeds the operational range for the multimeter, it may be necessary to scale down the input voltage into an operational range. The resulting scaled down input voltage is then used to locate the first and second entries. The fractional value is added to the decibel value corresponding the second entry to produce an intermediate decibel value. Then, the decibel value for the input is calculated by compensating for the scaling down. In particular, an offset is added to the intermediate decibel value to produce the decibel value for the input. A second table of decibel values may be provided wherein each entry is a decibel value associated with a low value in an input range. When such second table is employed, the offset is selected to be equal to an entry in the second table that is indexed according to the input range of the input.
BRIEF DESCRIPTION OF THE DRAWINGS
A preferred embodiment of the present invention will now be described with reference to the drawings in which:
FIG. 1 is a block diagram of a multimeter in accordance with a preferred embodiment of the present invention;
FIG. 2 is a block diagram showing what is held in the ROM 20 of FIG. 1;
FIG. 3 is a diagram depicting the LCD 16 of FIG. 1 in more detail;
FIGS. 4a and 4b are a flowchart of the steps performed by the microprocessor in converting an input voltage into an output decibel value.
DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT
A preferred embodiment of the present invention will now be described with reference to FIG. 1.
The preferred embodiment of the present invention is concerned with a multimeter 10 that has the capability of converting a voltage of an input signal into dbm. As shown in FIG. 1, this multimeter 10 includes an ASIC 12, a controller 14 and a liquid crystal display (LCD) 16. The ASIC 12 serves as an interface with the input signals of the multimeter 10. The ASIC 12 may receive either a direct current (DC) input on line 24 or an alternating current (AC) input on line 26. The user of the multimeter specifies whether a DC or AC input is to be received. The input voltage is scaled down to an appropriate range by a voltage divider 22. The ASIC 12 includes an analog to digital converter (ADC) 13 for converting the scaled down input into a digital output. The input is scaled down to have a voltage range properly adapted for the ADC 13. A suitable ASIC is described in copending application No. 07/859,142, filed on Mar. 27, 1992, by Paul T. Schreiber and Douglas R. Curtis for a Single String Resistive Divider Network for a Digital Multimeter.
A data line 34 and a clock line 32 interconnect the ASIC 12 with the controller 14. The clock line 32 is used to carry clock signals, and the data line 34 is used to carry data and control information. The controller 14 includes a microprocessor 18 and a read only memory (ROM) 20 that is used by the microprocessor. The controller 14 is connected to switches 28 and 30 which allow a user of the multimeter 10 to adjust the input range downward or upward, respectively. The controller 14 is additionally coupled to the LCD 16 by a communication path 36. A suitable controller is the M50930.
The multimeter 10 may operate in a number of different modes in a manner analogous to conventional multimeters. For instance, it may operate in a mode where it measures current, in a mode where it measures resistance or in a mode where it measures dbm. When the multimeter 10 is operated in a mode where it measures dbm, the multimeter operates as follows. An input voltage is received over either the DC input line 24 or the AC input line 26. As mentioned above, the operator of the multimeter 10 specifies whether an AC or DC input is received. The operator selects an input range using the switches 28 and 30, or the microprocessor 18 senses the input range automatically. This input range is conveyed by the controller 14 over the data line 34 to the ASIC 12. The ASIC is, thus, aware of the selected input range and configures the voltage divider 22 appropriately so as to divide the input voltage received on line 24 or 26 down to an appropriate operational range for the ADC 13. The ADC 13 converts the input voltage into digital output. The digital output encodes the scaled down voltage level which is sent over the data line 34 to the controller 14, along with a clock signal that is sent over line 32. The microprocessor 18 in the controller 14 then executes a routine for converting the transmitted voltage into dbm. In performing the routine, the microprocessor 18 utilizes the ROM 20 as will be described in more detail below. The resulting dbm value is then sent by the controller 14 over communication path 36 to the LCD 16 wherein the value is displayed in a digital format.
Before discussing the steps performed by the microprocessor 18 in more detail, it is helpful to briefly examine the ROM 20 and the LCD 16 in greater detail. As shown in FIG. 2, the ROM 20 holds two tables, Table 1 and Table 2. In addition, the ROM 20 holds a section of code 40. Each entry in Table 1 is a voltage value corresponding to a respective dbm value. For instance, Table 1 may have entries for each dbm value in the range from -60 dbm to +20 dbm. Hence, there are entries corresponding to the voltage associated with -60 dbm, -59 dbm, -58 dbm, . . . . +20 dbm.
Table 2 holds dbm values associated with the input range that is specified by the user. Like conventional multimeters, the multimeter 10 (FIG. 1) of the present invention operates over selected input ranges. As mentioned above, the voltage value transmitted from the ASIC 12 (FIG. 1) to the controller 14 is a scaled down value. The multimeter 10 must have a means for compensating for this scaling down of the input voltage. Table 2 (FIG. 2) serves this function by providing a base dbm value that is associated with the lowest voltage value in the input range. The use of Table 1 and Table 2 will be described in more detail below.
The code 40 is used to control operation of the microprocessor 18. In particular, the code contains the instructions that are run on the microprocessor 18 to control operation of the multimeter 10. This code may be written in a suitable format, such as assembly language.
An illustrative LCD 16 is shown in FIG. 3. This LCD includes at least three digit display positions: digit 1, digit 2 and digit 3. The LCD is designed with a built in decimal point 36. Digit 3 is configured so that it displays the tenths position of the output value. Digit 2 displays the ones position, and digit 1 displays the tenths position of the output value.
FIGS. 4a and 4b provide a flowchart of the steps performed by the microprocessor 18 (FIG. 1) in converting the input voltage into a dbm value that is displayed on the LCD 16. Once the microprocessor 18 has received the input voltage from the ASIC 12 over data line 34, it looks up values in Table 1 (FIG. 2). Each entry in Table 1 represents a voltage associated with a corresponding dbm value, as was described above. The microprocessor 18 (FIG. 1) finds an entry in Table 1 (FIG. 2) that is the xth entry in the table (denoted as V(x)). This entry is the first entry in Table 1 that is larger than the input voltage (denoted as V.sub.in). In other words, the microprocessor 18 (FIG. 1) finds an entry V(x) such that V(x) is greater than V.sub.in (step 42 in FIGS. 4a and 4b).
The system then determines the difference between the entry V(x) and its predecessor V(x-1), which is less than V.sub.in. The system determines the difference by subtracting V(x-1) from V(x) (step 44). The resulting difference is denoted as V.sub.dif.
Having calculated V.sub.dif, the system divides V.sub.dif by ten to break it down into decimal increments (step 46). The system then rounds (V.sub.dif)/10 to obtain a value V.sub.-- base (step 48).
The system then calculates V.sub.work as the difference between V.sub.in and V(x-1) (step 50). V.sub.work is indicative of the voltage difference between the input voltage and the closest lower voltage in Table 1 (FIG. 2). Once the system has calculate V.sub.work, it proceeds to calculate V.sub.dp as V.sub.work /V.sub.-- base (step 52 in FIG. 4). The subscript dp in V.sub.dp is mnemonic for "decimal place". Since the entries V(x) and V(x-1) are indicative of whole number dbm values, it is known that the analog input voltage V.sub.in lies somewhere between these values. V.sub.dp indicates what fractional position V.sub.in occupies in the range separating V(x) and V(x-1). As such, the system converts V.sub.dp and V(x-1) into their corresponding dbm values and adds the resulting dbm values. By adding together the dbm values associated with V.sub.dp and V(x-1), the system knows the proper dbm value for the scaled down voltage that was sent to the controller 14 (FIG. 1). The microprocessor 18, however, must scale up the dbm value to reflect the actual input voltage.
The upscaling of the dbm value to reflect the input range is performed by initially obtaining the selected range value (step 54 in FIGS. 4a and 4b). As was discussed above, the user selects the input range by using switches 28 and 30 (FIG. 1). Once the range value is known, the base dbm value for that range is looked up in table 2 (FIG. 2) so that it may be used in scaling up the dbm value (step 56 in FIGS. 4a and 4b). The range base is the lowest dbm value for the specified input range. The range base serves as an offset for scaling up the previously determined dbm value. The scaling is performed by adding the range base to V(x-1) to obtain a result (step 58). This dbm value associated with the result is sent to the LCD and displayed in the digit 1 and digit 2 positions (step 60 in FIGS. 4a and 4b). Lastly, the dbm value corresponding to V.sub.dp is sent to the LCD and displayed in the digit 3 (see FIG. 3) position of the LCD (step 62 in FIGS. 4a and 4b).
While the present invention has been described with reference to a preferred embodiment thereof, those skilled in the art will know of various changes in form and detail that may be made without departing from the spirit and scope of the present invention as defined in the appended claims.