Automating Speedometer Calibration

But officer, I couldn’t have been going that fast.” If you’ve ever uttered that statement, you know just how important the speedometer in your vehicle is. So, for a variety of obvious reasons, the speedometer is the most often viewed gauge in the dashboard instrument cluster, and it is critical that it be calibrated correctly.

Despite the increasing use of digital electronic systems in automobiles, dashboard instruments continue to be predominantly needle-based gauges with mechanical movements. Not only are they aesthetically appealing, but a large needle-based gauge also is easier to read than a large digital indicator, especially during acceleration. In addition, mechanical movements remain necessary until it is possible to economically display the entire instrument cluster on high-resolution electronic displays.

Automating the calibration of these needle-based gauges poses special challenges since a robust machine vision system is required to read the gauge or the needle position during the process. Also, the development of a controller that performs the calibration in the shortest possible time is nontrivial. But recent advances in computer-based tools for automation and quantum increases in computing power contribute to the development of a powerful and robust system for speedometer calibration that can accommodate any type of gauge.

For example, a major manufacturer of automotive dashboard instruments needed a system to automate the calibration of analog speedometers in its assembly lines. Soliton Automation, a developer of test and measurement and industrial automation solutions, was hired to design the system. The manufacturer made a wide variety of speedometers and consequently had some demanding requirements regarding system flexibility.

Types of Speedometers

Speedometers are classified as mechanical or electronic. A cable containing a rotating, flexible shaft attaches to mechanical speedometers to provide the input signal. The rotating shaft is coupled with a permanent magnet in the speedometer that rotates at a speed proportional to that of the vehicle. Electromagnetic forces produce the torque to deflect the needle. During calibration, the magnetization of the permanent magnet in the meter is changed until the correct deflection is obtained.

The input signal to the electronic speedometer typically is a pulse train whose frequency is proportional to the speed of the car. An embedded processor in the speedometer senses this frequency and generates a proportional current that produces the necessary torque for the needle to deflect.

Some minor modification is needed for the relationship between the input frequency and current to account for variations in the values of the spring constant and other passive electrical components in the meter. This is achieved by writing one or more calibration factors into the nonvolatile memory of the meter. The processor in the meter uses the calibration factors to recompute the mapping between input frequency and torque-producing current.

Automated Calibration System Requirements

An automated speedometer calibration system contains a calibrated source to generate input signals for the speedometer, a sensing system to precisely determine the deflection of the needle, and a control system to adjust parameters that control the torque that causes the needle to deflect. The most sophisticated component in the application is the sensing system that reads needle deflection.

The most widely used sensing system for this application is a camera, an image acquisition board, and image processing software that searches the image for the needle. The system provides an output in terms of the angle of deflection from the start point or directly as speed in miles per hour (mph) or kilometers per hour (kmph).

Soliton’s customer wanted a machine vision system that would work with the more than 100 types of speedometers it presently manufactures plus future models. The speedometers vary in shape, types of graduations, needle designs, dial background designs, and nonlinear dial graduations. As a result, mapping between the deflection angle and the corresponding speed is not linear.

The mechanical speedometers vibrate in the fixture when subjected to significant electromagnetic forces during calibration. Consequently, the second major requirement was to create image-processing software that tolerated rotations and offsets in the meter image due to relative movements between the meter and the camera.

In some of the assembly lines, the manufacturer frequently runs small batch jobs where different speedometer models are produced in the same day. This means that the time to switch the system from one type of meter setup to another must be negligible. The calibration stations also needed to be networked so calibration data can be transferred to a central database for online statistical process control (SPC) analysis.

System Solution

Off-the-shelf stand-alone machine vision systems reviewed by the manufacturer did not meet these requirements. Soliton determined that a computer-based system was the right solution to provide the required features and flexibility.

The most challenging part was developing the image-analysis algorithm that could read any gauge and correct for rotations and offsets. Soliton needed a development platform that allowed quick prototyping and access to a large image-processing library.

The company chose LabVIEW™ and the IMAQ™ Vision Image Processing Toolkit from National Instruments to build the system. After extensive designing and testing, Soliton developed GaugeVIEW, which met all the customer’s requirements.

GaugeVIEW

After studying numerous speedometer types and analyzing the images using various algorithms, Soliton came up with the solution involving a five-step configuration process. Once configured, GaugeVIEW could read the speedometer and give the output in terms of speed (mph or kmph), even if the meters tested subsequently were not imaged under the identical conditions present during configuration.

GaugeVIEW can read the gauge as long as the image contains the complete gauge and is true, meaning the camera axis should be perpendicular to the plane of the dial surface. It correctly processes the image even if the meter is imaged upside down.

The algorithm tolerates variations in lighting, and the trade-off between insensitivity to lighting and accuracy can be selected during the configuration process. Other trade-offs between the speed of processing and accuracy also can be decided during the configuration.

A combination of pattern matching and reference pattern identification is used to determine the position and orientation of the meter in the image accurately. The needle pivot point (center) and the start position of the needle are identified on the image. Then some details about the needle are provided to the software, such as size and color (dark or light with respect to the background).

The needle-detection algorithm searches for the needle and gives its angle of deflection. The final step maps the degrees of deflection to speed, where the user simply clicks on the screen with a mouse to identify where 10 mph, 20 mph, 40 mph, etc. lie.

GaugeVIEW records the angle against the speed and automatically generates a polynomial to map the deflection angle to the speed. There is complete flexibility to specify the speed units (or any engineering units), and the user has control over the order of the polynomial, if he/she chooses to modify the default values.

The complete configuration process is presented via user-friendly screens, and a new gauge can be fully configured in about five minutes. Depending upon the demands of the application, the user can modify any of the default settings, such as scan resolution which will determine the trade-off between the speed of processing and accuracy.

On a Pentium III processor running at 700 MHz with 128 MB of RAM, Windows 2000, and LabVIEW 6i, a typical speedometer image is processed in 70 ms with a scan resolution of 1/3 degree. On typical speedometers, this translates to an accuracy better than 1/3 mph in the reading.

Calibration Control System

For a mechanical speedometer, the speedometer cable is driven by a DC servomotor whose speed can be fixed with an accuracy of better than ±1 rpm. A demagnetizer present in the fixture brings the permanent magnet in the meter to the required magnetization level from its initial overmagnetized state.

Soliton developed a fuzzy logic-based calibration system to control the demagnetizer. First, the DC servomotor is set to a specified rpm, and then a closed-loop control system, developed in LabVIEW, takes over. The controller reads the needle position through GaugeVIEW and applies current pulses to the demagnetizer until the needle deflection is brought to the right amount for the given input rpm.

In the case of an electronic speedometer, the mechanical input is replaced by a frequency input, which is generated using a counter/timer card in the PC. The input frequency is adjusted until the needle deflection is brought to the right level. Then a signal is given to the processor on the speedometer, which uses this information to calculate the internal calibration factors that it stores in its internal nonvolatile memory.

Conclusion

The automated calibration system that Soliton developed for both mechanical and electronic speedometers was more accurate than manual calibration and increased throughput on the line. The development of GaugeVIEW, a general-purpose, user-friendly machine vision system that reads any analog gauge (not just speedometers), has opened up whole sets of new applications, such as calibration or inspection of gauges used in automotive, aviation, marine, and industrial applications. Due to the robustness of the algorithm, GaugeVIEW also can be used in in-vehicle applications where the camera would be subjected to vibrations.

About the Author

The four authors are employed by Soliton Automation Private Limited in India. Ganesh Devaraj is the managing director and a graduate of the University of Michigan with a Ph.D. in physics and an M.S. in electrical engineering. Previously, he worked as a project scientist at VI Engineering.
S.B. Rajnarayanan is a project leader and has an M.E. in applied electronics from Bharathiar University. A. Senthilnathan, also a graduate of Bharathiar University and a project engineer, holds a B.E. in mechanical engineering. S.R. Anand, a project engineer, has a B.E. in instrumentation and controls engineering from Madurai Kamaraj University.

Published by EE-Evaluation Engineering
All contents © 2000 Nelson Publishing Inc.
No reprint, distribution, or reuse in any medium is permitted
without the express written consent of the publisher.

November 2000

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!