Two approaches to Measuring Acceleration

The measurement of acceleration or one of its derivative properties such as vibration, shock, or tilt has become very commonplace in a wide range of products. At first you might think of seismic activity or machinery performance monitoring, but would automotive airbags, sports training products, or computer peripherals come to mind as well? The technology behind certain accelerometers has advanced to such a degree that many are now very cost effective and user friendly for the consumer market (joysticks, for example, and running shoes).

Photo 1. The PIC16C774 8-bit microcontroller features a 10-channel, 12-bit (±1 lsb) A/D converter--the most advanced analog peripheral incorporated into an 8-bit OTP microcontroller. With 4 K by 14 bits of OTP program memory and a variety of onboard sophisticated analog peripherals, the microcontroller reduces discrete logic components, related circuitry, and overall system cost.

The types of sensor used to measure acceleration, shock, or tilt include piezo film, electromechanical servo, piezoelectric, liquid tilt, bulk micromachined piezoresistive, capacitive, and surface micromachined capacitive. Each has distinct characteristics in output signal, development cost, and type of operating environment in which it best functions. This article focuses on two technologies:

* Piezoelectric, which has been around for many years

* Surface micromachined capacitive, which is relatively new

The Piezoelectric Accelerometer

Among the desirable features of the piezoelectric (PE) accelerometer are accuracy, durability, large dynamic range, ease of installation, and long life span. Although these devices cost more than other types, in many situations their benefits outweigh the higher price. To provide useful data, PE accelerometers require proper signal conditioning circuitry. We will briefly review the important characteristics of a PE accelerometer and circuit techniques for signal conditioning. In particular, we will examine an interface that will allow the accelerometer output's magnitude and frequency to be measured by a microcontroller unit (MCU).

Photo 2. The PIC16F84A 8-bit, 8-pin microcontroller features 1 K by 14 bits of flash program memory and 64 bytes of integrated onboard high-endurance EEPROM data memory for a total system resolution.

The PE accelerometer uses an internal PE element coupled with a loading mass to form a single-degree-of-freedom "mass-spring" system. The accelerometer is a charge-sensitive device; an instantaneous change in stress on the internal PE element produces a charge at the accelerometer's output terminals that is proportional to the applied acceleration. For interfacing purposes, the PE accelerometer can be modeled as a voltage generator, Eg, in series with an internal capacitance, Ci. The internal capacitance is an important characteristic because it can have a significant effect on overall system sensitivity. A typical PE accelerometer's sensitivity is specified in picocoulombs per g (pC/g). Typical sensitivities are 0.5–1000 pC/g.

PE accelerometers can be applied to measure vibration levels ranging from 10–4 g to >104 g. The useful measurement range of a given unit is often limited only by its signal conditioning and measurement systems.

The accelerometers can be used to measure very low frequencies. In practice, the low-frequency response is usually limited by the signal conditioning electronics in order to eliminate noise from sources such as thermal effects, strain on the accelerometer base, and triboelectric noise generated in the connecting cable. The low-frequency cutoff is typically set around 2 Hz, but may be set higher if the lowest frequencies are not of interest to the user.

The accelerometer's useful upper frequency limit is dependent on its resonance frequency. The device will exhibit a sharp peak in its electrical output at the resonance frequency that must be compensated for. The upper resonance frequency is a function of the unit's mechanical characteristics and the way it is attached to the test object. As a general rule, the output sensitivity and upper resonance frequency of a PE accelerometer are dependent on the size (mass) of the accelerometer. For example, a larger accelerometer will have increased output sensitivity but a lower resonance frequency.

An Interface Example

PE accelerometers are commonly used to monitor machinery status. For our purposes here, we use as an example a Microchip Technology PIC16C774 MCU (see Photo 1) to monitor an AC synchronous motor. The vibration induced by a typical such motor will have specific frequency components determined by the power line frequency and the synchronous speed of the motor. For a typical 1750 rpm motor and a 60 Hz power source, the principal vibration components will be near 30, 60, 125, and 250 Hz.

Figure 1. In this schematic of the complete analog signal conditioning circuit for a piezoelectric accelerometer, the function of each section of the circuit is indicated.

Two peripheral features of the MCU that are useful for this application are the 12-bit multichannel A/D converter and the 16-bit capture/compare module. These peripherals will be used to measure the amplitude and frequency of the motor vibration. The sensing element will be an Endevco 2217E accelerometer with the specifications given in Table 1.

A complete schematic of the accelerometer signal-conditioning circuit that will be required for this application is shown in Figure 1.

TABLE 1
Accelerometer Specs
Dynamic charge sensitivity 40 pC/g (±20%)
Frequency response 3–6000 Hz (±5%)
Mounted resonance frequency 27 kHz (±15%)
Transducer capacitance 350 pF (±20%)

The first and most important element in the signal conditioning circuit is the charge amplifier. The accelerometer output should be connected to this component to prevent shunt capacitance from affecting the output sensitivity (see Figure 2). The value of the shunt capacitance, Cs, will be dependent on the cable's physical characteristics. Referring to Figure 2, the reduction in sensitivity at the end of the cable will be given by Equation 1:

____________________________________(1)

where:

Eo = output voltage at cable output

Eg = accelerometer open-circuit output voltage

Ci = accelerometer internal capacitance

Cs = cable shunt capacitance

It may also be shown that the accelerometer's low-frequency response will be affected when the output is connected to a finite load resistance. Even values of load resistance $1 M(omega) will cause a dramatic change in low-frequency response.

This problem may be reduced by adding shunt capacitance across the accelerometer and accepting the resulting loss in output sensitivity. Op-amp U1 in Figure 1 and its associated components constitute a charge amplifier that avoids these problems. By using capacitor Cf in the feedback loop, the expression for the output voltage Eo becomes:

_______________________________(2)

where:

qa = charge sensitivity of the accelerometer

A = open-loop gain of the op amp

Assuming A is very large, Ci and Cs become negligible. Equation 2 can be reduced to:

________________________________________(3)

R1, R2, and R3 provide a DC feedback path to stabilize the op amp. A high feedback resistance is required so that the low-frequency cutoff is not compromised. The use of a "T" network in the feedback path provides an effective resistance that is much higher than the values of the individual resistors.

It is given by:

___________________________(4)

The low-frequency cutoff of the charge amplifier is given by:

__________________________________(5)

Using the component values given in Figure 1, the charge amplifier will have a gain of 2.56 mV/pC and the low-frequency cutoff will be ~4 Hz. In conjunction with the Endevco 2217E, the charge amplifier will produce a 102 mV/g output. A low-noise op amp such as the Analog Devices AD743 should be used for the charge amplifier.

Figure 2. The electrical model of a piezoelectric accelerometer and cable is shown in a schematic, where Eo is the output voltage at the end of the cable; Cs is the cable capacitance; Ci is the internal capacitance of the accelerometer; and Eg is the accelerometer open-circuit voltage.

Op amp U2A is configured as an inverting amplifier with adjustable gain to scale the accelerometer output to the voltage level required by the A/D converter. Op amp U2B is configured as a Sallen and Key second-order low-pass filter. The component values indicated provide a maximally flat response with a cutoff frequency of ~500 Hz. To eliminate the need for additional filtering, the cutoff frequency is selected far below the accelerometer's resonance frequency. Op amp U2C and its associated components implement a precision full-wave rectifier that converts the AC accelerometer output into a DC signal. Op-amp U2D is used to implement a time-weighting filter for the DC output. It is assumed that the A/D converter will sample the vibration amplitude once per second in this application. The indicated values of R12 and C3 provide a 2 s time constant to satisfy Nyquist sample rate criteria. If the designer desires a true rms output, one of the many available ICs may be substituted for the peak detector circuit.

Comparator U3 and its associated components form a zero-crossing detector. The capture/compare peripheral of the PIC16C774 can use the output of U3 to measure the frequency of the motor vibration.

The signal conditioning circuit must be calibrated, preferably by calibrating it and the transducer as a system. This is accomplished by mounting the accelerometer on a shaker table that produces a known level of vibration at a specific frequency. The gain of the signal circuit is then adjusted to produce the required output scaling. If no shaker table is available, the system may be calibrated using a voltage injection method. This method of calibration makes assumptions about the accelerometer output level, but it does verify all of the system connections. The accelerometer remains connected to the system and a signal generator is connected across a resistor in series with the accelerometer ground connection. The signal generator output voltage is set to a level that is known to be produced by the accelerometer at a given acceleration input and is passively coupled into the signal conditioning circuit by the accelerometer.

The theoretical minimum resolution that can be measured will be determined by the upper scale limit set by the user and the bits of resolution of the A/D converter. If a 1 g scale maximum is used with a 12-bit A/D converter providing 4096 output steps, a theoretical minimum resolution of 244 mg will be obtained. In practice, the minimum resolution may be limited by other factors, including the A/D converter's accuracy and any extraneous noise that is coupled into the input.

Surface Micromachined Accelerometers

In recent years, silicon micromachined sensors have made tremendous advances in terms of cost and level of onchip integration for measurements such as acceleration and/or vibration. These products provide the sensor and the signal conditioning circuitry on chip, and require only a few external components. Some manufacturers have taken this approach one step further by converting the analog output of the analog signal conditioning to a digital format such as duty cycle. This method not only lifts the burden of designing fairly complex analog circuitry for the sensor, but also reduces cost and board area. Micromachined accelerometers are now being incorporated into products such as joysticks and airbags, applications that were previously impossible due to sensor price and/or size.

The following discussion relates to the ADXL202/210 series of two-axis accelerometers from Analog Devices (see Figure 3). These sensors provide a ±2 g or ±10 g measurement range with a duty cycle output and a resolution down to 5 mg.

A surface micromachined device consists of springs, masses, and motion-sensing components. These sensors are made with the standard IC processing techniques used in wafer fabrication facilities. After layers of oxide and polysilicon, IC photolithography and selective etching are used to create the sensor as a 3D structure suspended above the substrate to allow free movement in all directions. The core of the sensor is a surface micromachined polysilicon structure or mass suspended above the substrate with "springs." These springs hold the mass and provide resistance to movement due to acceleration forces.

Both the mass and the wafer have fixed plates that form a differential capacitor in which the fixed plates on the wafer are driven 180° out of phase. Any movement of the mass unbalances the capacitor, resulting in a square wave output with the amplitude proportional to the acceleration. Each axis has a demodulator that rectifies the signal and determines the direction of acceleration. This output is fed to a duty cycle modulator (DCM) that incorporates external capacitors to set the bandwidth of each axis. The DCM filters the analog signal and converts it to a duty cycle output whose period is set by an external resistor. A 0 g acceleration produces a 50% duty cycle output. A low-cost microcontroller can be used to measure acceleration by timing both the duty cycle and the period of each axis as shown in Figure 3.

Figure 3. A very simple circuit can be used to measure acceleration. The ADXL202 accelerometer, combined with two capacitors and one resistor form the acceleration sensor and the PIC16F84A 8-bit MCU with two capacitors, crystal, and resistor complete the circuit.

The design procedure is somewhat iterative since the bandwidth, period, and microcontroller counter resolution play important roles in the minimum resolution of the measurement. Analog Devices has simplified the design procedure by providing an Excel spreadsheet, "The XL202 Interactive Designer," that can be downloaded off its Web site at www.analog.com. There are nine steps.

Step 1. The designer enters the supply voltage, which should be between 3.0 V and 5.25 V.

Step 2. The bandwidth is entered, and the values for the external capacitors are calculated. Because the bandwidth directly determines the noise floor and resolution of the accelerometer, it may have to be adjusted to provide the desired results based on calculations later in the spreadsheet.

Step 3. The spreadsheet calculates the rms and peak-to-peak (p-p) noise of the acceleration measurements. The designer must estimate the amount of time the actual signal will be above the p-p noise estimation because this noise determines the smallest acceleration resolution the accelerometer can have. If this noise estimation is not acceptable, then the bandwidth must be lowered to reduce the p-p noise.

The next few steps set the period of the duty cycle output and the measurement resolution due to the counter on the microcontroller. The counter is used to time the incoming pulse width modulation (PWM) signal from each axis of the accelerometer. The frequency with which this counter is clocked by the microcontroller sets the number of counts per PWM cycle, or resolution.

Step 4. Both the sample rate per channel and the percent of the time the ADXL202 will be powered are entered. The designer also enters the time required to calculate the acceleration for two channels and the spreadsheet, and then calculates the period of the duty cycle output and the corresponding external resistor.

Step 5. The counter rate of the microcontroller is used to calculate the measurement resolution in g's and degrees of tilt. The spreadsheet also determines the size of the counter on the microcontroller to prevent an overflow. The designer must again determine if this resolution is acceptable. To increase the resolution, either increase the counter rate (Step 5) or decrease the number of samples per second (Step 4).

Step 6. This step checks for aliasing errors attributable to the sample rate. Nyquest requirements specify that the sample rate needs to be faster than the bandwidth by a factor of 2. Analog Devices recommends the use of a factor of at least 100 to minimize dynamic errors from the PWM sampling technique. If the spreadsheet calculates that the ratio is low, the designer must increase the sample rate in Step 4 or decrease the bandwidth in Step 2.

Step 7. The results are in! The spreadsheet calculates the minimum resolution of the acceleration measurement due to rms p-p noise and resolution of the counter. The rms noise is a factor of the bandwidth set by the capacitors chosen in Step 2 and noise induced by the PWM stage. The level of noise from these two sources can greatly affect the measurement resolution. This step also provides a minimum resolution of a tilt measurement. If this resolution is not acceptable, then the bandwidth (Step 2), acquisition rate (Step 4), or counter rate (Step 5) must be adjusted to reduce noise.

Step 8. The spreadsheet also offers the designer the option to explore how oversampling the PWM signal affects noise at the expense of sacrificing bandwidth. If the noise or resolution is not within the design specifications, oversampling the PWM inputs can increase the resolution but reduce the bandwidth.

Step 9. This step provides an additional means to estimate the drift of the 0 g point. Through the use of this iterative process, the designer can determine the external component values and the noise and resolution of the acceleration measurement without having to prototype a single circuit.

Analog Devices and Microchip Technology both offer source code that interfaces the ADXL202 to a midrange PIC MCU. Analog Devices uses the PIC16C62A; Microchip supports the PIC16F84A 8-bit MCU (see Photo 2). The latter is an ideal companion to the ADXL202 because calibration parameters for the sensor can be stored in onchip data EEPROM memory for retrieval and use in later calculations. Using the ADXL202 in conjunction with a PICmicro device reduces not only the time-to-market for the product but also overall system cost and power consumption.

Summary

Two methods of measuring acceleration have been presented here. The analog design engineer will appreciate the PE accelerometer design that provides significant control over the signal conditioning portion of the measurement. Other engineers will appreciate the "digital" method using the ADXL sensors from Analog Devices that practically design themselves. The specific circuit design will ultimately be dictated by the application requirements of the system. The use of a microcontroller gives the designer a more integrated, lower cost solution for the data measurement application.