Path: EDN Asia >> Design Centre >> Automotive >> Implement stepper motor driver for gauges (Part 1)
Automotive Share print

Implement stepper motor driver for gauges (Part 1)

14 May 2014  | Subbarao Lanka, Shruti Hanumanthaiah

Share this page with your friends

This method of measuring the frequency has the advantage that the answer outputs at the constant sample rate fsample. The equation below gives the accumulated value for the given input and the sample frequencies:


Measuring time for a single cycle
Figure 2 shows the topology for measuring the time of a single input cycle.

Figure 2: Measuring time for a single cycle.


The counter is continuously incremented by a clock frequency fclock and latched by the input signal finput. The double latch enables the old count value to be subtracted from the new count value, resulting in the new accumulated value for each sample period.

This method has the advantage of updating at the rate of the input frequency finput. The equation below gives the accumulated value for the given input and the sample frequencies:



Challenges: Both methods for measuring frequency have their particular advantages. Counting cycles is best for measuring higher frequencies while measuring a cycle's period is better for lower frequencies. Both have the limitation that for any amount of decent resolution (i.e., small relative error), the input frequency range for any particular clock or sample frequencies is limited.

Solution: There are two solutions to tackle the above problem

One traditional solution is to support different ranges; that is, several selectable clocks or sample frequencies. This requires intelligence to determine when it is best to change range or measurement method.

A hybrid method could be used to measure the width of as many cycles that fit in a specified sample period.

Frequencies beyond the acceptable range due to noise

Solution: This can be avoided by adding a band pass filter

Process the measured data: Now that the sensor input is measured, the angle by which the stepper motor should be driven needs to be calculated. The two main aspects in processing the measured signal are

Relationship between angle and input signal: By having the information of the input signal range and the total angle required, an interpolation is done to find out the angle required for a specific input level.

Minimum deviation check: When the difference between the calculated new angle and the previous angle is above a particular threshold, then the stepper motor is driven with the difference between the two angles. This threshold is provided in order to avoid small differences between the new angle and the old angle, which might be due to noise or an error in calculation.


Get direction
If the new angle is greater than the previous angle, the motor should be rotated clockwise to move the gauge pointer in the forward direction and vice versa

In Part 2, we will cover details on motor driving techniques, including how to achieve smooth, noise-free responsiveness.


About the authors
Subbarao Lanka and Shruti Hanumanthaiah contributed this article.


To download the PDF version of this article, click here.


 First Page Previous Page 1 • 2 • 3


Want to more of this to be delivered to you for FREE?

Subscribe to EDN Asia alerts and receive the latest design ideas and product news in your inbox.

Got to make sure you're not a robot. Please enter the code displayed on the right.

Time to activate your subscription - it's easy!

We have sent an activate request to your registerd e-email. Simply click on the link to activate your subscription.

We're doing this to protect your privacy and ensure you successfully receive your e-mail alerts.


Add New Comment
Visitor (To avoid code verification, simply login or register with us. It is fast and free!)
*Verify code:
Tech Impact

Regional Roundup
Control this smart glass with the blink of an eye
K-Glass 2 detects users' eye movements to point the cursor to recognise computer icons or objects in the Internet, and uses winks for commands. The researchers call this interface the "i-Mouse."

GlobalFoundries extends grants to Singapore students
ARM, Tencent Games team up to improve mobile gaming


News | Products | Design Features | Regional Roundup | Tech Impact