Page 151 - Understanding Automotive Electronics
P. 151

2735 | CH 4  Page 138  Tuesday, March 10, 1998  11:06 AM



                4                     MICROCOMPUTER INSTRUMENTATION AND CONTROL




                                      The level at that point will change as fuel is consumed, but it also will change as
                                      the car slows, accelerates, turns corners, and hits bumps. The sensor’s output
                                      voltage varies widely because of fuel slosh even though the amount of fuel in
                                      the tank changes slowly. If that voltage is sent directly to the fuel gauge, the
                                      resulting variable indication will fluctuate too rapidly to be read.
                                          The measurement can be made more readable and more meaningful by
                                      using a low-pass filter to smooth out the signal fluctuations to reduce the
                                      effects of sloshing. The low-pass filter can be implemented in a
                                      microcomputer by programming the computer to average the sensor signal
                                      over several seconds before sending it to the display. For instance, if the fuel
                                      level sensor signal is sampled once every second and it is desirable to average
                                      the signal over a period of 60 seconds, the computer saves only the latest 60
                                      samples, averages them, and displays the average. When a new sample is
                                      taken, the oldest sample is discarded so that only the 60 latest samples are
                                      kept. A new average can be computed and displayed each time a new sample
                                      is taken.
                Digital filters are imple-  Digital filtering (averaging) can be performed by a computer under the
                mented completely     control of the software. Sometimes the section of code that performs the
                through the use of soft-  filtering task is simply called “the filter.’’ Digital signal processing is very
                ware, thus their charac-  attractive because the same computer can be used to process several different
                teristics can be easily   signals. Also, since digital filters require no extra hardware, the filters can be
                changed. Because digital   made much more complex with relatively little increase in cost. In addition, the
                filters require no extra   characteristics of the digital filter can be changed by changing the software.
                hardware, they are low   Changing the characteristics of an analog filter usually requires changing the
                in cost.              hardware components. Another feature of digital filters (true for digital signal
                                      processing in general) is that they don’t change with age or temperature, unlike
                                      analog filters.
                                          There are limitations to the use of digital filters, however. The frequency
                                      range of digital filters is determined by the speed of the processor. The
                                      microcomputer must be able to sample each signal at or above the rate required
                                      by the Nyquist sampling theorem. It must also be fast enough to perform all of
                                      the averaging and linearization for each signal before the next sample is taken.
                                      This is an important limitation, and the system designer must be certain that
                                      the computer is not overloaded by trying to make it do too many things too
                                      quickly.

                                      MICROCOMPUTERS IN CONTROL SYSTEMS
                Computers can also be     Microcomputers are able to handle inputs and outputs that are either
                used in control applica-  digital or converted analog signals. With the proper software, they are capable
                tions.                of making decisions about those signals and can react to them quickly and
                                      precisely. These features make microcomputers ideal for controlling other
                                      digital or analog systems, as discussed in the following sections.





                138                   UNDERSTANDING AUTOMOTIVE ELECTRONICS
   146   147   148   149   150   151   152   153   154   155   156