Arduino, Ten Turn Precision Potentiometer and MAX7219 Interface

Introduction: Arduino, Ten Turn Precision Potentiometer and MAX7219 Interface


The ten turn rotary wire wound potentiometer and turns-counting dial is used for custom panel design. The precision potentiometer is connected with the Arduino ADC. Software will read the ADC value, displayed on the connected MAX7219 seven segment display, also prints via the serial port for further analysis.

Parts and components

Arduino Uno board = 1 No

10K Ohm Ten Turn Rotary Wire Wound Resistor = 1 No

Turns-Counting dial = 1 No

MAX7219 Seven Segment Display Module = 1 No

Step 1: Schematic

The multi turn potentiometer is a three terminal resistor with rotating contact that forms an adjustable voltage divider, which is connected to the ADC analog pin of the Arduino for measuring the divided voltage.

The high precision rotary potentiometer is used for position measurements. It can also be used be used for controlling the audio, video and system parameters values, precisely.

The potentiometer variable terminal is connected to the analog IO pin (A0) of Arduino.

The adjustable terminal of potentiometer, varies between 0 Volt to 5 Volt.

The MAX7219 display module provides a 3-wire serial (SPI) interface to drive 7-segment LED displays (common-cathode type) up to 8 digits.

The on-chip includes a BCD decoder, multiplex scan circuitry, segment and digit drivers, and an 8×8 static RAM to store the digit values.

The DIN, LOAD and CLOCK pins of MAX7219 is connected with 7,5 and 6 digital IO pins of Arduino.

Step 2: Software

The Arduino LedControl library is used for displaying digits on MAX7219.

Arduino Uno provides 10 bit ADC.

Software will read the ADC at every one second interval and scales to the 0.0 to 10.00 range.

The scaled value, will be displayed on MAX7219 and printed on serial port for every change in count.

//Demonstrates the use of MAX7219 and 10 Turn Potentiometer

// The Arduino circuit connection for 7219: // MAX7219 DIN pin to digital pin 7 // MAX7219 LOAD pin to digital pin 5 // MAX7219 CLOCK pin to digital pin 6

// The Arduino circuit connection for 10 Turn Potiometer // Center pin of Potentiometer to Analog pin A0

// Name:- M.Pugazhendi // Date:- 18thAug2016 // Version:- V0.1 // e-mail:-

//Serial debug #define SERIAL_DEBUG

//Potentio meter to Analog IO pin #define ADC1 A0

//MAX7219 digital IO Pins #define DIN 7 #define CLOCK 6 #define LOAD 5

#include <LedControl.h>

// inputs: DIN pin, CLK pin, LOAD pin. number of chips LedControl mydisplay = LedControl(DIN,CLOCK,LOAD,1);

unsigned int val = 0;

void setup() { mydisplay.shutdown(0, false); // turns on display mydisplay.setIntensity(0, 15); // 15 = brightest mydisplay.setDigit(0, 0, 9, false); mydisplay.setDigit(0, 1, 8, false); mydisplay.setDigit(0, 2, 7, false); mydisplay.setDigit(0, 3, 6, false); mydisplay.setDigit(0, 4, 5, true); mydisplay.setDigit(0, 5, 4, false); mydisplay.setDigit(0, 6, 3, false); mydisplay.setDigit(0, 7, 2, false); #ifdef SERIAL_DEBUG Serial.begin(9600); Serial.print("Ten turn potetiometer Test"); #endif

//2 Second delay delay(2000); } unsigned int num,one,ten,hundred=0; void loop() { // read the Ten turn potentiometer input pin val = analogRead(ADC1);

float converted = fmap(val, 0, 1023, 0.0, 10.00); #ifdef SERIAL_DEBUG Serial.println(converted); #endif //Clear display mydisplay.clearDisplay(0); //Display the ADC value on MAX7219 if(converted>=0.0 && converted<=9.99) // for printing decimal values { num = converted * 100; one=num%10; ten=(num/10)%10; hundred=(num/100)%10; mydisplay.setDigit(0,0,(byte)one,0); // mydisplay.setDigit(addr , digits , value , dp); mydisplay.setDigit(0,1,(byte)ten,0); mydisplay.setDigit(0,2,(byte)hundred,1); }

//1000mS delay delay(1000); }

//Float interpolation function, for mapping the ADC reading//Float interpolation function, for mapping the ADC reading float fmap(float x, float in_min, float in_max, float out_min, float out_max) { return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; }

Step 3: Conclusion

The project is successfully completed with Arduino UNO, Ten turn potentiometer and Max7219 Seven segment display module.

The ADC value read by Arduino, after scaling to 0 to 10.0 scale is send to the serial port, and the screen log is given below.

The scaled ADC value, which is displayed at MAX7219, is same as turns-counting dial indication.

Be the First to Share


    • Paint Challenge

      Paint Challenge
    • Hide It Challenge

      Hide It Challenge
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge



    9 months ago

    Why would you make a tutorial and not make a detailed schematic? Where are the closeup images of wire connections?


    2 years ago

    i made it but display not constant not show permanently its fluctuate how to stay display with only current value, i mean i not want show in_min or in_max, or out_max ,out min


    3 years ago

    Thanks for the tutorial. I found it while looking for help about multi turn potentiometers. I do know they are supposed to work the same as the standard ones, but the three I bought (for a flight sim) just give me random values, equal zero far from the first turn and when I go all the way up, my arduino board shuts off, and restarts immediately when I turn back.
    I am kinda lost debugging this...
    Any thoughts?


    4 years ago


    Thanks for your project. I need some help about this project. After point I need to read turn value 3 steps. ( for example ; 9.595 ) and can i use smaller display. Thank you


    5 years ago

    Hi Dan.

    CS (Chip select) and LOAD, both are same. Try connecting as given. It should work.


    5 years ago

    Thanks for your instructable. I managed to make it work through the serial monitor, however I cannot get the 7-segment display to work. I bought the MAX7291 module off e-bay and the pin-outs are printed different than the one you have in your instuctable. Your module in printed as VCC, DIN, LOAD, CLK and GND down the left side of the display. The module that I received is printed as VCC, GND, DIN, CS, and CLK. I tried my best to make it work but it does not. I checked ebay for a module printed as yours is but could not find one. I would be grateful if you could advise me on this. Thanks, Dan