[ Log In ]
Modular 2/5 amp stepping motor driver

2.5 Stepper Motor Driver (Modular unit)

$45.00
Qty:
Flex Sensor - Sensing Bending and Displacement

55.37mm (2.18 Inch) Flex Sensor

$8.50
Qty:
USB 2.0 Cable 10 Foot Type A Male to Type B Male

USB 2.0 Cable Type A Male to Type B Male - 10 FT

$4.80
Qty:
Multimeter Security Banana Plug To Test Hook Clip Probe Lead Cable 500V

Multimeter Security Banana Plug To Test Hook Clip Probe Lead Cable 500V

$8.99
Qty:
3 Foot USB Cable Type A to USB Cable Type A

USB Cable Type A Male to USB Type A Male - 3 FT

$2.65
Qty:
84 oz-in NEMA 17 Stepping motors (also called stepper motor)
Image of the Atmega324p

Atmega324P

$8.50
Qty:

10K timmer potentiometer

10K Trimmer Potentiometer (Through Hole)

$0.85
Qty:
16x2 LCD (Liquid Crystal Display)

16x2 LCD (Liquid Crystal Display)

$12.50
Qty:

Converting the ADC Result to a Number that Represents a Unit of Measurement (Inches of Mercury)

In this case, the ADC result will be converted to Inches of Mercury (Hg). The pressure sensor provides us with a voltage between .2v and 4.6v. Since this is not the 0v to 5v which represents 0-1023 as ADC output, the actual result will need to be known.
The new ADC range is:

LowEnd = 1024 / ( 5v / lowVoltage)
= 1024 / (5v / .2v)
= 40.96
= 41

HighEnd = 1024 - (1024 / (5v / (5v - highVoltage)))
= 1024 - (1024 / (5v / (5v - 4.6v)))
= 1024 - (1024 / (5v / .4v))
= 1024 - (1024 / 12.5)
= 1024 - 81.92
= 942.08
= 942

The ADC range is 41 - 942, to convert this number to inches of Hg a formula will be created.

The 41 represents the high vacuum and the 942 represents the low or no vacuum. This is why the LCD was showing 942 without any suction. The high vacuum is -115 KPa which is 33.96 inches of Hg.

942 = 0 inches of Hg
41 = 33.96 inches of Hg

The slope intercept formula will be used to determine the conversion:

y = mx + b
m = rise/run = ?y/?x

x values are 942, 41
y values are 0, 33.96

?x = 942-41 = 901
?y = 0-33.96 = -33.96

m = -33.96/901 = -0.0377

So far, we have:

y = -0.0377x + b

To find b, we simple plug in a y and x value from the top:

0 = -0.0377(942) + b
0 = -35.5134 + b
Add 35.5134 to both sides:
(35.5134) + 0 = -35.5134 + (35.5124) + b

35.5134 = b

So the formula is:

y = -0.0377x + 35.5134

inches of HG = -0.0377(ADC_Value) + 35.5134

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):