Tuesday, November 15, 2016

Increasement of Thermal Flow Sensor Resolution
by Oversampling with Lower Bit ADCs

Xiang Zheng Tu

 

As shown in the above figure, a thermal flow sensor provided by POSIFA Microsystems Company consists of a heater and two thermopiles. The sensor is heated above ambient temperature by passing a PWM output of a microcontroller through the heater and the sensor flow-dependent heat loss causes temperature changes which are converted by the thermopiles into an electrical signal. This signal is then periodically sampled and digitized by the analog-to-digital converter (ADC) of the microcontroller.

When considering the resolution required for an A/D converter (ADC) integrated in a microcontroller, embedded systems designers must balance cost and performance. Higher ADC resolution implies higher-cost microcontroller, but in some cases you can use other features in the microcontroller to enhance the ADC performance via software. That approach lets you achieve higher resolution using an inexpensive integrated ADC.

Oversampling is a process of sampling a signal with a sampling frequency significantly higher than the Nyquist rate. Theoretically a bandwidth-limited signal can be perfectly reconstructed if sampled above the Nyquist rate, which is twice the highest frequency in the signal. Oversampling improves resolution, reduces noise and help avoid aliasing and phase distortion by relaxing anti-aliasing filter performance requirements.

In our case, to implement a 12-bit converter, it is sufficient to use a 16-bit converter that can run at 256 times the target sampling rate. Combining 256 consecutive 12-bit samples can increase the signal-to-noise ratio at the voltage level by a factor of 16 (the square root of the number of samples averaged), effectively adding 4 bits to the resolution and producing a single sample with 16-bit resolution. To get the best possible representation of the analog input signal, it is necessary to oversample the signal this much, because a larger amount of samples will give a better representation of the input signal, when averaged.

Criterias for using oversampling technique are:
·       The sensor signal being measured should vary at very low frequency. Furthermore to obtain very accurate information about the dynamics of the signal, multiple harmonic components of the signal are acquired, resulting in the need to process signal bandwidths much wider than the actual signal.
·       The signal-component of interest should not vary significantly during a conversion. There should be some noise present in the signal. The amplitude of the noise should be at least 1 LSB.

Fortunately, the bandwidth of the thermal flow sensor is rather small, typically ranging from a few Hertz to a few kilohertz, high oversampling ratios can be readily employed.
Normally there are some noises present during an analog-to-digital conversion. These noises include thermal noise, noise from the CPU core, switching of I/O-ports, variation in the power supply and others, which are enough to make this method work. Another approach for satisfying the criteria is to use a method similar to a Delta-Sigma modulator, by adding a triangular wave to the input signal.

Digital Signal Processing software is required for oversampling and average. This software can be divided into five major blocks:
·       Peripheral Initialization
·       Triangular Signal Generation
·       Data Acquisition
·       Digital Filter Decimation
·       Interrupt Service Routine


A PWM output and an analog low pass filter can be used to generate a triangular signal as an additional noise signal. Reference to the above figure another PWM output of the microcontroller is used to heat the thermal flow sensor. It should be understand that the thermal inertia of the flow sensor can be modeled as a low-pass filter in the thermal domain. This may limit the response time of the flow sensor, but also remove the peak noise from the PWM output signal.

No comments:

Post a Comment