Abstract:
A field device having an analog output, i.e., a measuring transducer, for process instrumentation having a 4-20 mA interface as the analog output. For digital-to-analog conversion, a digital value is split into a digital coarse portion and a digital fine portion. Depending on the digital coarse portion, a first analog signal is generated using a pulse width modulator having a downstream mounted low path filter and a signal above the analog output signal, and a second output signal using a pulse width modulator also having a downstream mounted low path filter with a signal below the analog output signal. The analog signals are supplied to a third pulse width modulator controlled with the digital fine portion, where a low-pass filter (TP 3 ) is downstream mounted. As a result, an analog output signal is provided having a high resolution and good dynamic properties. In addition, the field device is provided with a digital-to-analog converter that can be produced having minimal complexity.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This is a U.S. national stage of International Application No. PCT/EP2008/062946, filed on 26 Sep. 2008. Priority is claimed on German Application No. 10 2007 046 560.4, filed on 28 Sep. 2007. 
     
    
     BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The invention relates to a field device having an analog output, and, more particularly, to a measuring transducer for process instrumentation having a 4-20 mA interface as the analog output. 
         [0004]    2. Description of the Related Art 
         [0005]    DE 199 30 661 A1 discloses field devices having analog outputs. In process instrumentation, measuring transducers having a 4-20 mA interface are used in a multiplicity of applications for measuring physical or chemical variables, such as pressure, temperature or a pH value. The transducers typically have a sensor whose sensor signal is amplified, digitized, and subsequently analyzed in a microcontroller to correct the linearity and temperature characteristics. The sensor signal conditioned in this manner is converted in an output circuit comprising a digital/analog converter into an analog output signal, e.g., into an output current in the range of 4-20 mA, and transmitted over a two-wire line to an analyzer device, such as a programmable logic controller in an automation network. 
         [0006]    On the other hand, a programmable logic controller comprising a field device can have an analog output, for example, for passing an actuating variable to a control valve as an actuating element having a corresponding analog input. 
         [0007]    Digital/analog converters having different principles of operation are known for generating the analog output signal. For example, digital/analog converters having an R2R network and implemented as integrated components are available. What is disadvantageous with components of this type, however, are the costs associated therewith, as well as their high electric power consumption. In particular, in cases where field devices are supplied with the energy required for their operation via a 4-20 mA interface, a significant disadvantage is created because the available energy is very limited. A further possibility for digital/analog conversion can be seen in the use of a timer output of the microcontroller for controlling a pulse width modulator to which a high-precision reference voltage is supplied, and downstream of which a low-pass filter is connected for smoothing the output signal. However, this arrangement is problematic in that a compromise must be made between the achievable dynamics and the adjustment precision of the analog signal, because the frequency of the pulse-width-modulated signal, which frequency has a direct impact on the dynamics, results from the bit resolution of the digital/analog conversion and the clock rate of the microcontroller and is proportional to the product of these two variables. The clocking of the microcontroller has a direct effect on its power consumption and cannot be increased at will. On the other hand, the frequency of the pulse-width-modulated signal cannot be arbitrarily reduced in order to achieve a higher bit resolution, because this is a determinant factor in the dynamics of the generated analog output signal. 
       SUMMARY OF THE INVENTION 
       [0008]    It is therefore an object of the invention to provide a field device having an analog output, i.e., a measuring transducer for process instrumentation having a 4-20 mA interface as the analog output, which has a low power consumption and by which a high-resolution analog output signal having a greater dynamic range can be generated. 
         [0009]    This and other objects and advantages are achieved in accordance with the invention by a field device in which the conflict between the dynamics and precision of the analog output signal is resolved by a stage-by-stage digital/analog conversion. For that purpose, two analog signals having lower resolution are initially generated in a first stage, where the signals are above and below the desired analog output signal. In a second stage connected downstream thereof, the signals are used as voltage levels for generating a pulse-width-modulated signal whose pulse-pause ratio only has to be set with a precision that corresponds to the further resolution that is still to be achieved in relation to the coarse resolution. 
         [0010]    In accordance with the invention, each stage handles a part of the resolution. Consequently, substantially higher dynamics can be achieved when a microcontroller is used to generate the time signals for the pulse width modulation at the same clock rate. On the other hand, the microcontroller can now be clocked at a lower frequency to achieve predefined dynamics, with the result that the energy consumption of the microcontroller drops and consequently more energy is available for the actual measurement function of a measuring transducer. This can be used to improve the measurement accuracy of the measuring transducer. 
         [0011]    A microcontroller is already present in the majority of field devices. As a result, a particularly simple implementation of the digital/analog converter can be achieved if the digital/analog converter is suitably programmed to split the digital value into a digital coarse portion and a digital fine portion and generates the time signals required for controlling the pulse width modulators. 
         [0012]    A particularly high level of precision of the digital/analog conversion is advantageously possible if the low-pass filters of the digital/analog converter are implemented using passive components and are dimensioned such that their input resistance is substantially higher in comparison to the output resistance of the pulse width modulators. 
         [0013]    In order to ensure that poor dynamics of one stage do not have an unfavorable effect on the overall dynamics of the digital/analog conversion, the dynamics of the stages should optimally be identical. This can be achieved in a simple manner if the resolution of the coarse portion and the resolution of the fine portion correspond to the same number of bits. This means that the digital coarse portion essentially corresponds to the N most significant bits and the digital fine portion essentially corresponds to the m least significant bits of the digital value and N is approximately equal to m. Noise in the analog output signal can largely be avoided if the coarse portion is generated using hysteresis. 
         [0014]    Other objects and features of the present invention will become apparent from the following detailed description considered in conjunction with the accompanying drawings. It is to be understood, however, that the drawings are designed solely for purposes of illustration and not as a definition of the limits of the invention, for which reference should be made to the appended claims. It should be further understood that the drawings are not necessarily drawn to scale and that, unless otherwise indicated, they are merely intended to conceptually illustrate the structures and procedures described herein. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0015]    The invention and embodiments and advantages are explained in more detail below with reference to the drawings, in which an exemplary embodiment of the invention is depicted and, in which: 
           [0016]      FIG. 1  shows a schematic layout of a measuring transducer; 
           [0017]      FIG. 2  shows a block diagram of a digital/analog converter; 
           [0018]      FIG. 3  shows a timing diagram to explain its principle of operation; and 
           [0019]      FIG. 4  shows a circuit of a digital/analog converter. 
       
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0020]    With reference to  FIG. 1 , a measuring transducer  1  for measuring a physical or chemical variable X of a process has a pickup sensor  2  which converts the variable into a measurement signal  3 . The measurement signal  3  is amplified and digitized in a preprocessing stage  4 . The measurement signal preprocessed in this way is supplied in digital form to a microcontroller  5  which, for example, compensates for non-linearities and temperature effects and calculates the measured value to be output. The digital measured value calculated in the microcontroller  5  is converted in a digital/analog converter  6  into an analog output signal which is output via a 4-20 mA interface  7  for further use in a process engineering plant in which the measuring transducer  1  is used. 
         [0021]    For purposes of digital/analog conversion, a microcontroller μC shown in  FIG. 2  generates three time signals PWM 1 , PWM 2  and PWM 3 . The time signals PWM 1  and PWM 2  are determined in accordance with a coarse portion of the digital value, while the time signal PWM 3  is determined in accordance with a digital fine portion. A buffer BUF 1 , which has the function of a pulse width modulator, generates a pulse-width-modulated signal corresponding to the time signal PWM 1  and whose upper level is a reference voltage V ref  and whose lower level is the reference ground GND. The signal is smoothed in a low-pass filter TP 1  such that a first analog signal V 1  is present which is higher than the desired analog output signal V OUT . A second analog signal V 2  whose level is lower than the desired output signal V OUT  is generated in a similar manner with the aid of the time signal PWM 2 , by a buffer BUF 2  and by a low-pass TP 2 . The time signal PWM 3 , which corresponds to the digital fine portion of the digital value, is used to control a changeover switch SW 1  which therefore also has the function of a pulse width modulator. The first analog signal V 1  and the second analog signal V 2  are supplied to the changeover switch SW 1 . The pulse-width-modulated signal is then smoothed by a low-pass TP 3  which is connected downstream of the changeover switch SW 1 , with the result that the analog output signal V our  is finally present. 
         [0022]    An example of a digital/analog conversion having 17-bit resolution is described below. The coarse and fine portions have a resolution of 9 bits. A resolution of one bit which remains in a summation of the resolutions of coarse and fine portion in relation to the resolution of the digital value is required, as will be explained later, for realizing a hysteresis of the coarse portion. 
         [0023]    The first analog signal V 1  can be calculated according to the formula: 
         [0000]    
       
         
           
             
               V 
               1 
             
             = 
             
               
                 V 
                 ref 
               
                
               
                 
                   
                     N 
                     1 
                   
                   
                     2 
                     9 
                   
                 
                 . 
               
             
           
         
       
     
         [0024]    Here, N 1  essentially corresponds to the most significant bits of the digital value and has a value range of between 0 and 2 9 −1. 
         [0025]    The level of the second analog signal V 2  can be calculated according to the formula: 
         [0000]    
       
         
           
             
               V 
               2 
             
             = 
             
               
                 V 
                 ref 
               
               · 
               
                 
                   
                     N 
                     2 
                   
                   
                     2 
                     9 
                   
                 
                 . 
               
             
           
         
       
     
         [0026]    Here, N 2  likewise corresponds largely to the most significant bits of the digital value and has the same value range as N 1  i.e., 2 9 −1. As explained in more detail below, a hysteresis is used in order to avoid noise in the analog output signal V OUT . For that purpose the following is specified: 
         [0000]        N   1   =N   2 +2. 
         [0027]    In accordance with the time signal PWM 3 , a switch is performed between the first analog signal V 1  and the second analog signal V 2  with the aid of the changeover switch SW 1  The level of the analog output signal V OUT  can be calculated according to the formula: 
         [0000]    
       
         
           
             
               V 
               OUT 
             
             = 
             
               
                 
                   V 
                   ref 
                 
                 
                   2 
                   18 
                 
               
               · 
               
                 
                   ( 
                   
                     
                       m 
                       · 
                       
                         N 
                         1 
                       
                     
                     + 
                     
                       
                         2 
                         9 
                       
                       · 
                       
                         N 
                         2 
                       
                     
                     - 
                     
                       m 
                       · 
                       
                         N 
                         2 
                       
                     
                   
                   ) 
                 
                 . 
               
             
           
         
       
     
         [0028]    Here, the value m corresponds to the fine portion specified with the aid of the microcontroller μC and used to set the timer for generating the time signal PWM 3 . The value m also has a value range of between 0 and 2 9 −1. If N 2 +2 is substituted for N 1  and N for N 2  in the last formula, then the following relationship is obtained for the level of the analog output signal V OUT : 
         [0000]    
       
         
           
             
               V 
               OUT 
             
             = 
             
               
                 
                   V 
                   ref 
                 
                 
                   2 
                   17 
                 
               
               · 
               
                 
                   ( 
                   
                     m 
                     + 
                     
                       
                         2 
                         8 
                       
                       · 
                       N 
                     
                   
                   ) 
                 
                 . 
               
             
           
         
       
     
         [0029]    Thus, the result is a digital/analog conversion having 17-bit resolution, where the value m corresponds to the least significant bits and the value N to the most significant bits. 
         [0030]    The digital values calculated for the coarse portion and the fine portion in the microcontroller μC do not have to correspond exactly at every instant in time to the most significant bits or least significant bits of the digital value, but are set different from these under certain conditions. The analog output voltage is set with the aid of the time signal PWM 2 , which corresponds to the digital fine portion, as a function of the first analog signal V 1  and the second analog signal V 2 . If the value of the nine least significant bits is close to its limits, i.e., close to the value 0 or close to the value 2 9 −1, it could happen if these limits are exceeded in the absence of hysteresis that the digital coarse portion, and hence the two analog signals V 1  and V 2  constantly switch back and forth. As a result, unnecessary noise is created in the analog output signal V OUT . 
         [0031]    In order to prevent the creation of unnecessary noise in the output value V OUT , instead of the values 0 and 2 9 −1 being used as switchover points of the digital fine portion, a value at 12.5% and a value at 87.5% of the overall value range of the digital fine portion is used, e.g., the values 64 and 448, respectively, in a value range of 512. This is explained in more detail below with reference to  FIG. 3 .  FIG. 3  is a timing diagram in which a curve  31  of an analog output signal V OUT , a curve  32  of a first analog signal V 1 , a curve  33  of a second analog signal V 2  and a curve  34 , which corresponds to the respective digital fine portion, are plotted over time. In the left-hand range for times t&lt;t 1 , the digital coarse portion is set to the value N. The value N 2  for setting the time signal PWM 2  is equal to N, while the value N 1  for setting the time signal PWM 1  equals N+2. This setting of the digital coarse portion remains constant as long as the digital fine portion stays within its limits between 12.5% and 87.5% of the value range. At the time t 1 , the digital value drops to such an extent that the digital fine portion falls below the 12.5% limit and accordingly the analog output signal  31  approaches the second analog signal  33 . As a result, the values N 1  and N 2  are decremented by 1 in the switchover point at the time t 1 . At the same time, the digital fine portion is increased by approximately 50% of its value range, such that no switchover jump is detectable in the curve of the analog output signal  31 . The new value m NEW  of the digital fine portion is yielded according to the formula: 
         [0000]        m   NEW   =m   OLD +2 8 . 
         [0032]    Thus, m NEW  amounts to approximately 62.5% and lies below the 87.5% limit at which the values N 1  and N 2  would be increased by 1 again. A hysteresis is therefore realized by which noise at the switchover points is prevented. 
         [0033]    According to the curve  34  the digital fine portion exceeds the 87.5% limit of its value range at the second switchover point t 2 . This is followed immediately by an incrementation of the values N 1  and N 2  by 1 and a reduction in the digital fine portion by 2 8 . Directly following the switchover, the value of the digital fine portion equals approximately 37.5% of its value range. 
         [0034]    The splitting of the digital value corresponding to the analog output signal V OUT  into the digital coarse portion and the digital fine portion with hysteresis of the coarse portion is performed in the microcontroller μC based on its programming. Advantageously, no overhead in terms of additional circuitry is associated therewith. 
         [0035]      FIG. 4  shows a circuit  41  suitable for implementing the digital/analog converter. Here, the microcontroller comprises integrated chipset  42  of the MSP430 type which has three timer outputs  43 ,  44  and  45  that are used for implementing the pulse-width-modulated time signals PWM 1 , PWM 2  and PWM 3 , respectively. The time signals PWM 1  and PWM 2  are supplied to two buffers  46  and  47 , respectively, of the 74LVC04 type which are supplied with a high-precision reference voltage by a diode  48 . Connected downstream of the buffers  46  and  47  there is, respectively, a low-pass stage consisting of a resistor R 1  and a capacitor C 1  and a low-pass stage consisting of a resistor R 2  and a capacitor C 2 . Each of the resistors have an exemplary value of 51 kΩ, each of the capacitors have an exemplary value of 33 nF. The analog signals smoothed in this way are supplied to two inputs of a changeover switch  49  of the 3157 type from Texas Instruments. The time signal PWM 3  serves to actuate the changeover switch  49 . Connected in circuit downstream of the changeover switch  49  is a low-pass stage comprising a resistor R 3  having an exemplary value of 150 kΩ and a capacitor C 3  having an exemplary value of 100 nF. This low-pass stage, finally, provides an analog output signal  50  corresponding to the predefined digital value. Passive RC filters are intentionally used for implementing the low-pass stages, as opposed to circuits having active components, because the filters offer a very high level of precision. Here, it is important that the output resistance of the buffers  46  and  47  and the output resistance of the changeover switch  49  are small in comparison to the input impedance of the downstream-connected low-pass in each case. 
         [0036]    It emerges particularly clearly from the circuit according to  FIG. 4  that the digital/analog converter can be manufactured particularly economically with the circuit  41  shown therein. In spite of the high overall resolution of the digital/analog converter, time signals PWM 1 , PWM 2  and PWM 3  having a comparatively high frequency can be used for generating the analog output signal owing to the sequentially connected stages. This leads to high dynamics of the digital/analog conversion. 
         [0037]    Thus, while there have been shown, described and pointed out fundamental novel features of the invention as applied to a preferred embodiment thereof, it will be understood that various omissions and substitutions and changes in the form and details of the devices illustrated, and in their operation, may be made by those skilled in the art without departing from the spirit of the invention. For example, it is expressly intended that all combinations of those elements and/or method steps which perform substantially the same function in substantially the same way to achieve the same results are within the scope of the invention. Moreover, it should be recognized that structures and/or elements and/or method steps shown and/or described in connection with any disclosed form or embodiment of the invention may be incorporated in any other disclosed or described or suggested form or embodiment as a general matter of design choice. It is the intention, therefore, to be limited only as indicated by the scope of the claims appended hereto.