Advertisement
Advertisement

EDN Access--05.08.97 Digital position encoder does away with ADC

-May 08, 1997


 
May 8, 1997

Digital position encoder does away with ADC
Jose Carlos Cossio, Santander, Spain

The position encoder in Figure 1 is a simple yet powerful circuit that converts the change in resistance of a potentiometer into a digital value without using an expensive A/D converter. The working principle is a resistance-to-PWM converter built around the common 555 timer IC. A change in the potentiometer's resistance causes a proportional change in the duty cycle of the timer's output, which essentially encodes the resistance values as a PWM signal. Additionally, a 50% duty cycle results when the potentiometer is in the middle of its full scale, thanks to the diode that is responsible for the fact that T(HIGH)=T(LOW) when RA=RB.

The other part of the circuit comprises an independent RC oscillator, which drives an 8-bit counter at a frequency equal to 256 times the PWM frequency. A low output from the 555 timer keeps the counter in its reset state. When the PWM output goes high, the counter triggers, and counting begins. When the PWM output goes low again, the counter latches the count value, which is immediately available at the output. This output is an 8-bit digital equivalent of the value of the potentiometer's position. At this point, the counter again goes to its reset state, waiting for another rising edge to update the previous measure.

For smooth operation and a fast response, choose the component values accordingly. For example, for the 555 timer, a 100-kilohms potentiometer and a 100-nF capacitor result in a PWM frequency of 143.8 Hz. Thus, if you fix the capacitor value at 10 nF and take into account that the RC oscillator's output frequency must be equal to 256 times the PWM frequency, you need to adjust the 5-kilohms potentiometer to get an oscillator frequency of about 36.8 kHz. (DI #2017)

Figure 1
A 555-timer based resistance-to-PWM converter and an independent RC oscillator work together to make a simple digital potentiometer-position encoder.



| EDN Access | Feedback | Table of Contents |

Copyright c 1997 EDN Magazine, EDN Access . EDN is a registered trademark of Reed Properties Inc, used under license. EDN is published by Cahners Publishing Company , a unit of Reed Elsevier Inc.

Loading comments...

Write a Comment

To comment please Log In

FEATURED RESOURCES