There is a variety of applications where a mechanical potentiometer is part of a user control interface. These mechanical potentiometers can be changed to more updated and reliable encoder-controlled elements and digital rheostats, being components that change the electrical parameters of the signal.

In this article, we used GreenPAK™ SLG47004. It is a great choice for this project as this circuit combines two digital rheostats and configurable logic to process the encoder information. This combination allows the implementation of many designs: a regulated power supply, an amplifier with a tunable gain, and others. In addition, the presence of digital logic allows determining the speed of rotation of the encoder. This approach is shown in Figure 1.

1. System Overview

Figure 2 shows the internal circuit design based on the SLG47004.

The complete design file created in free GUI-based software – GreenPAK Designer – can be found here.

An incremental encoder generates its A and B output signals which are used to change digital rheostats resistance. Rheostats form the potentiometer and allow the implementation of the adjustable voltage divider to regulate an output voltage.

At any time, the phase difference between the A and B signals will be positive or negative depending on the encoder’s direction of movement.

A speed determination function is built from Frequency Detectors, One-Shots, and Multiplexers.

In this article, the EC11 encoder was used. The encoder produces noisy output oscillations due to a switch bounce. To eliminate that noise, 2 mS delays were used. Please note that this delay is adjusted for the EC11 encoder (according to its datasheet). For other encoders, the delay value should be assessed accordingly.

2. Functional Block Architecture

2.2. Digital Logic Description

2.1.1. Determining The Encoder Direction

At first, Delay macrocells delay both edges of the encoder output signals for 2 mS. Delay macrocells work like a deglitch filter to eliminate switch bouncing. Delayed signal B appears on DLY inputs of One-Shots and Frequency Detectors, and CLK input of DFF. Delayed signal A appears on the D input of DFF.  When the encoder disk is rotating in a clockwise direction signal A leads signal B and DFF output is High, and when the disk is rotating in a counterclockwise direction signal B leads signal A and DFF output is Low. So DFF can determine the direction of rotation.  High or Low signal on Rheostat Up/Down input determines if internal counter’s value increases or decreases for each pulse at CLK input.


About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.