[ Log In ]
10K timmer potentiometer

10K Trimmer Potentiometer (Through Hole)

$0.85
Qty:
20k trimmer potentiometer

20K Through Hole Trimmer Potentiometer

$0.85
Qty:
Top view of 50k Trimmer variable resistor potentiometer

50K Trimmer Through Hole

$0.85
Qty:
50K Potentiometer Panel Mount

50K Potentiometer Panel Mount (Non Trimmer)

$1.49
Qty:
Small red knob for potentiometer

Small Knob for Potentiometer - Black with Red Cap

$0.94
Qty:
Potentiometer with adjustable knob.

50K Potentiometer Panel Mount (Non Trimmer) With Knob

$2.45
Qty:
A 5K Rotary Potentiometer shown with a pencil for scale.

5K Potentiometer - Rotary

$0.95
Qty:

16x2 LCD (Liquid Crystal Display)

16x2 LCD (Liquid Crystal Display)

$12.50
Qty:
Flex Sensor - Sensing Bending and Displacement

55.37mm (2.18 Inch) Flex Sensor

$8.50
Qty:

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)

where
x = ADC value
and
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.

Description:

Code (optional):