Summary of ENCODER-CONTROLLED POTENTIOMETER
There is demand to replace mechanical potentiometers with encoder-controlled digital rheostats. This project uses the GreenPAK SLG47004 to combine two digital rheostats with configurable logic to process an incremental encoder (EC11). The design debounces encoder A/B with 2 ms delays, uses a D flip-flop to detect rotation direction, and employs frequency detectors, one-shots, and multiplexers to determine speed and update rheostat up/down counts, enabling adjustable voltage-divider applications like tunable supplies or amplifier gain control.
Parts used in the Encoder-Controlled Potentiometer:
- GreenPAK SLG47004
- EC11 incremental rotary encoder
- Delay macrocells (within SLG47004)
- D flip-flop (DFF) macrocell (within SLG47004)
- One-Shot macrocells (within SLG47004)
- Frequency Detector macrocells (within SLG47004)
- Multiplexer macrocells (within SLG47004)
- Digital rheostat macrocells (two, within SLG47004)
Introduction
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.
Source: ENCODER-CONTROLLED POTENTIOMETER
- What IC is used to implement the encoder-controlled potentiometer?
The GreenPAK SLG47004 is used to combine digital rheostats and configurable logic for this project. - Which encoder was used in the project?
The EC11 incremental rotary encoder was used in the article. - How is encoder switch bounce handled?
Delay macrocells introduce a 2 ms delay to deglitch the encoder outputs and eliminate switch bouncing for the EC11 encoder. - How is rotation direction determined?
A D flip-flop compares delayed A and B signals; if A leads B the DFF output is High (clockwise), if B leads A the output is Low (counterclockwise). - What components determine encoder rotation speed?
Frequency Detectors, One-Shots, and Multiplexers are used together to determine rotation speed. - What do the digital rheostats control in the system?
The two digital rheostats form an adjustable voltage divider to regulate an output voltage. - Is the 2 ms debounce delay universal for all encoders?
No, the 2 ms delay is chosen for the EC11 per its datasheet; other encoders may require different delay values.