7. General operation
An easy way of measuring a duty cycle is to use a microcontroller. It is only necessary
to connect the sensors output to one of the microcontrollers inputs. With help of a small
program it is possible to sense that input wether it is high or low. The speed of this
sampling is limited due to the instruction time of the controller. So to achieve the
wished accuracy it is necessary to sample over more than one sensor period. This way
of working has also the advantage to filter noise. From the theory of signal processing it
can be derived that there is a fixed ratio between the sensors signal frequency, the
sampling rate and the sampling noise. This sampling noise limits the accuracy and
amounts to:
Terror= 200 * ts /sqrt(6*tm*tp)
Terror = measurement error (= standard deviation of the sampling noise)
ts
= microcontrollers sampling rate
= total measurement time
tm
tp
= output signal periodicity of the sensor
Microcontrollers can sample at a high frequency so with a small program it is possible
to measure the sensor's duty cycle within 50 ms and a resolution of .01 °C.
NOTE:
The above mentioned error has in principle nothing to do with the accuracy of the
sensor; it gives only an impression of the accuracy of measuring duty cycles with
microcontrollers (standard deviation).
For more information how to measure duty cycles with microcontrollers we refer to our
application notes.
For additional information and/or samples, please contact:
page - 9 -