Global TMW:
Login  |  Register          Free Newsletter Subscription
Subscribe
Email
Print
Reprint
Learn RSS

Vision System Helps Calibrate Analog Speedometers

The location of fiducial marks and the speedometer needle guides calibration.

Ganesh Devaraj, S.B. Rajnarayanan, and Abdulla Ghouse,          Soliton Automation, Coimbatore, India -- Test & Measurement World, 2/15/2000

Pricol, a large manufacturer of automotive dashboard instruments in India, wanted a system to automatically calibrate analog (needle-based) speedometers during production. The company needed a machine-vision system to “read” the analog meters, and it needed an integrated closed-loop controller to calibrate them. Calibration involves controlling a demagnetizer and driving a DC servomotor. We determined that a PC-based system combined with commercial hardware and software would meet the user’s requirements.

Figure 1. The test stand provides a camera, a computer, and a monitor on which an operator can watch a calibration run and its results. The operator places a speedometer in the test stand and starts a calibration.

The most challenging part of the system involved developing the image-analysis software. To simplify development, we used LabView along with IMAQ vision software from National Instruments (Austin, TX). We concentrated our efforts on developing application-specific algorithms. These algorithms had to find a meter needle in an image and determine the value it pointed to. The algorithm had to be flexible enough to handle many types of meters, and it had to correct for slight rotations in the meter’s position as well as small vibrations caused during calibration. Figure 1 shows a complete test stand.

Our system contains two main software modules, one that configures the system and another that calibrates speed-ometers. Prior to calibrating meters, an operator must supply information to the system about the type of meters undergoing calibration. Then the system acquires an image of a meter so the software can locate fiducial marks, or reference points, locate the pivot point of the meter needle, and find the start and end points of the speed scale.

To begin a calibration, an operator
1. Mounts the speedometer in the test stand.
2. Selects the proper configuration file from a menu.
3. Presses the “Calibrate” button.

When the computer detects the pressed button, the software
1. Controls a servomotor that simulates the mechanical input to the meter’s input shaft.
2. Acquires an image.
3. Finds the fiducial marks in the image and uses them to locate the center of the needle and the start and end points on the speed scale.
4. Performs operations, if selected during setup, to improve the needle-to-background contrast.
5. Locates the needle position (angle) on the dial.
6. Uses the angle to properly calibrate the magnet in the meter movement.

During a calibration run, the software must find the fiducial marks, even if the image appears rotated or offset slightly from the reference image used during the system-configuration steps. Thus, the software must correct for slight rotations and shifts caused by vibrations during image acquisition. The algorithm we developed corrects for ±4° of rotation and 4 mm (20 pixels) offset on average. The actual values corrected for depend on the layout and size of the meter’s dial. Typically, a calibration system will find the speedometers are misaligned by less than half these values.

The vibrations and offsets occur due to manufacturing tolerances and clearances that we cannot precisely control. As a result, the meter is slightly loose in the calibration jig. Holding the meter more firmly may arrest the vibrations, but from calibration to calibration, the position of the meters still may vary slightly.

Operators Set Up Parameters

While setting up the calibration system for a specific type of speedometer, an operator moves a slider control to adjust the contrast in the acquired image of a meter. He or she watches the effect of changing the contrast and then selects the best contrast level for the tests. Different types of meters offer differing contrast between the meter face and the needle, so operators must adjust contrast manually to find the best setting for image processing.

Our software includes two needle-detection algorithms that we adapted from example software and a demonstration program in LabView. We enhanced the algorithms so they would ignore background features that might otherwise trick the software into misidentifying the needle.

An operator can try both algorithms during setup to see which one performs better. If need be, an operator can choose to use both algorithms, in which case the system averages the results to improve accuracy. We are currently developing a rule of thumb that will guide the operator’s selection.

The calibration software includes a polynomial curve-fitting utility that converts the needle positions—measured in degrees of rotation—to units such as mph or km/h. Many types of meters have nonlinear scales, especially near the end points. So the software required a polynomial curve fitting routine to accurately convert degrees of rotation into a speed.

Trade Speed for Accuracy

During a calibration run, an operator can trade processing speed for calibration accuracy, depending on time constraints. The system displays the time taken to process an image and obtain a calibration reading. Then, the operator can adjust the scan resolution to increase or decrease the time needed to process an image. The processing time depends on the speed of the PC used in the test system. For a typical meter, a 266-MHz Pentium-II computer with 64 MBytes of RAM can process an image with an accuracy of better than 1° in less than 50 ms.

TMW00_0202F4fig2.gif (33429 bytes)
Figure 2. One of the calibration setup displays lets an operator tailor calibrations to specific speedometers. Operators can choose equation coefficients and other parameters for use during a calibration.
TMW00_0202F4fig3.gif (31450 bytes)
Figure 3. The display seen by a production operator shows basic information about calibration status and results. No operator intervention is required during testing.

A graphical user interface simplifies the configuration process. Figure 2 shows one of the screens used to calibrate the test system, and Figure 3 shows the screen an operator sees while calibrating speedometers. The figures show two different types of speedometers, which the software accommodates easily.

We use an image-acquisition board and a monochrome camera in our system. We evaluated whether color images would be helpful, but we determined that monochrome images provided sufficient contrast information. And an 8-bit monochrome image takes less time to process than a 24-bit color image.

After an operator finishes setting up the system to acquire and process speedometer images, it is time for the calibration to begin. (See, “How Does a Speedometer Work?”) Analog speedometers use no electrical components during operation, but they employ a permanent magnet.

The calibration jig includes a demagnetizing coil that the system positions close to the permanent magnet in the speedometer. During calibration, our system passes a controlled AC current through the coil to slightly demagnetize the permanent magnet.

The magnet is purposely manufactured in an over-magnetized state so it can be demagnetized to the right level during calibration. But during calibration, the system can only demagnetize the magnet. It cannot re-magnetize the magnet.

Therefore, before calibration, the meter’s needle will indicate a higher-than-expected speed for a specific rate of rotation on the speedometer’s input shaft. For example, when a speedometer’s shaft rotates at 400 rpm, it should indicate 60 mph.

Instead, it points to about 100 mph. The calibration system applies demagnetizing pulses to the meter so the needle will drop to 90 mph, then to 80 mph, and so on until the meter indicates 60 ±1 mph. Then, the calibration system turns off the pulses.

As noted earlier, the image-processing software must correct for slight vibrations in the meter. Some of those vibrations arise from the electromagnetic forces that act on the magnet during calibration.

Fuzzy Logic Controls Calibration

Because the response of different types of speedometers to the demagnetization field varies, we implemented the control algorithm using fuzzy logic to mimic a skilled operator. We used repeated trial and error to understand all the relevant inputs to the fuzzy-logic controller. We first used fuzzy-logic controls, then fuzzy-logic PID (proportional, integral, derivative) controls, and then went back to using fuzzy-logic control with more inputs and a different control parameter.

Our objective was to make the process fast, but without overshooting the magnet’s calibration point. Table 1 shows the results of the automated calibration vs. calibration by a trained worker. These figures vary slightly from one type of speedometer to another, but they show that the automated system both saves time and reduces calibration errors.

Table 1. Comparison of automated and manual calibration methods
Performance Parameter Manual System Automated System
Accuracy ±2.5 km/h ±1 km/h
Time for calibration 16 to 40 s 18 to 22 s
Calibration error* 3% of meters <1% of meters
 
*Note: Calibration error due to excess demagnetization results in scrapped meters.

We are extending the system so it can work on electronic speedometers in which an EEPROM contains the calibration information. The excitation signals for the electronic speedometers originate in the controlling PC, so all the electronic components, with the exception of the camera, reside within a PC. We have upgraded the software so it can read multiple gauges in an instrument cluster and inspect turn-signal, brake, and other indicators. We use optical character-recognition algorithms to inspect information from LCD modules. T&MW

Ganesh Devaraj is the managing director of Soliton Automation. His areas of expertise include virtual instrumentation and automotive engines. He graduated from the University of Michigan with a Ph.D. in physics.

S. B. Rajnarayanan works as a senior project engineer at Soliton Automation. His project work includes PC-based instrumentation and vision systems. He graduated from Bharathiyar University (Coimbatore, India) in 1998 with an M.E. in applied electronics.

Abdulla Ghouse also works as a senior project engineer at Soliton. He received a B.Sc. in Applied Science with Computer Technology from Bharathiyar University in 1994. He is persuing a postgraduate diploma in Computer Science. He works on PC-based industrial automation and instrument drivers.

ACKNOWLEDGEMENT

The authors would like to thank Johan Gustafsson, V. Kamalesh, and A. Senthilnathan for their valuable contributions to this project.

How Does a Speedometer Work?
TMW0002I5F4S1.gif (13931 bytes)
A flexible shaft links the speedometer’s rotating magnet to a vehicle’s transmission. As the magnet rotates, it exerts a force on the metallic, nonmagnetic drag cup. The cup moves a spring-loaded shaft that indicates the vehicle’s speed.
 

A speedometer translates the high-speed rotation of a permanent magnet into the slow, damped motion of a spring-loaded shaft (see the figure). A needle on this shaft indicates speed in mph or km/h. The magnet turns within a movable drag cup made of a nonmagnetic metal. As the magnet rotates, it exerts a magnetic force on the movable cup that tends to turn it against the restraint of a spiral spring. As the magnet rotates faster, the pull on the cup increases so the needle indicates a higher speed.
  In the speedometers we calibrate, an electrical coil—an electromagnet—surrounds the speedometer. We apply an AC voltage of 80–140 Vrms to the coil to generate a magnetic field with a sinusoidally varying amplitude. The permanent magnet in the speedometer rotates in this field. Because the external field continuously varies in direction, the net effect is to reduce the permanent magnet’s magnetization. Note that to increase the magnetization, we would have to apply an external field in the direction of the present magnetization. If the field exists in any other direction, it will reduce the magnetization. Thus, when the magnet rotates inside the electromagnet powered by an AC source, there is more of a tendency to demagnetize than to magnetize, and the net effect is demagnetization.
  We determined the duration of the AC signal, 150–250 ms, based on the difference between a known input-shaft rate and the target speed, and on the difference between the speed shown on the meter before and after the previous pulse.—Ganesh Devaraj, S.B. Rajnarayanan, and Abdulla Ghouse.

Email
Print
Reprint
Learn RSS

Talkback

We would love your feedback!

Post a comment

» VIEW ALL TALKBACK THREADS

Related Content

Related Content

 

By This Author

There are no other articles written by this author.

Sponsored Links



 
Advertisement
SPONSORED LINKS

More Content

  • Blogs
  • Podcasts

Blogs

  • Martin Rowe
    Rowe's and Columns

    November 5, 2008
    Technical articles retain value
    I'm always amazed, and pleased, when I hear from readers who still find value in old T&MW articl...
    More
  • Martin Rowe
    Rowe's and Columns

    October 31, 2008
    Measurement proverbs
    The other day, I received some measurement proverbs that I'd like to share. The proverbs come from K...
    More
  • » VIEW ALL BLOGS RSS

Podcasts

Advertisements





NEWSLETTERS
Click on a title below to learn more.

Test Industry News (3 Times Per Month)
Machine-Vision & Inspection (Monthly)
Communications Test (Monthly)
Design, Test & Yield (Monthly)
Automotive, Aerospace & Defense (Monthly)
Instrumentation (Monthly)
Resource Center E-Alert (Monthly)
©2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy
Please visit these other Reed Business sites