[ Log In ]
10K timmer potentiometer

10K Trimmer Potentiometer (Through Hole)

20k trimmer potentiometer

20K Through Hole Trimmer Potentiometer

Top view of 50k Trimmer variable resistor potentiometer

50K Trimmer Through Hole

50K Potentiometer Panel Mount

50K Potentiometer Panel Mount (Non Trimmer)

Small red knob for potentiometer

Small Knob for Potentiometer - Black with Red Cap

Potentiometer with adjustable knob.

50K Potentiometer Panel Mount (Non Trimmer) With Knob

A 5K Rotary Potentiometer shown with a pencil for scale.

5K Potentiometer - Rotary


16x2 LCD (Liquid Crystal Display)

16x2 LCD (Liquid Crystal Display)

Flex Sensor - Sensing Bending and Displacement

55.37mm (2.18 Inch) Flex Sensor


Using the Slope Intercept Formula to Adjust the ADC Value for Trimmer Potentiometers Showing on the LCD

The trimmer potentiometers are used to adjust the high and low thresholds for the pressure sensor circuit. The adjustment needs to read between 0 and 33 rather than the ADC result of 0 and 1023, so the slope intercept formula is a good formula to use in this case.
y = mx + b

f(x) = y or f(x) = mx + b

f(0) = 0
f(1023) = 33

m = rise / run = ?y/?x
= (0 - 33) / (0 - 1023)
= -33 / -1023
= 0.0323

To find b (plug in x and y values, the easiest values in this case would be 0,0):

y = mx + b
0 = 0.0323(0) + b
0 = 0 + b

b = 0

So the formula is:

y = 0.0323(x)

x = ADC value
y = the value to be displayed on the LCD

Comments and Additional Information

Have some code to share? Or additional information? Respond here:

You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.


Code (optional):