Air Supply System Manual
Please read over this document carefully!
Last updated
Please read over this document carefully!
Last updated
For further questions, please email
Air Supply Github repo:
Arduino 2 IDE:
UART drivers (for communicating between the microcontroller and the computer):
MATLAB:
Make sure to download and install all the software above!
After that, open Arduino IDE, and (here is a that may help). Then install the following libraries () by looking them up in the Library Manager:
Adafruit INA219
LiquidCrystal I2C
When you complete the above steps, you are good to go!
The linear valve works by opening its valve according to the amount of current passing through. In total, there shouldn't be above 1.8 W of power going through the valve.
The valve is rated for 0-10 VDC control, and its electrical resistance is about 54 ohms. Generally, when the control signal is above 5V, air will start to flow.
A 0.2 A inline electrical fuse is implemented in the system, so if the valve ever stops working, please inspect the fuse.
It is calibrated to 50 psi inlet pressure and 0 psi back pressure, meaning that we assume that the operating pressure at the inlet is 50 psi. Starting Page 3 in the pdf above, there are images showing the relationship between flow rates and currents under various pressures. Note that the linear valve in our application uses [10 Volt] and .40" orifice.
You CAN NOT feed any pressure higher than the calibrated pressure (50 psi)!
Feeding lower inlet pressure is fine (we tried 25 psi, and it worked), though less airflow than the amount produced by 50 psi inlet pressure is expected.
The operation procedure after phase 3 will be different than the following.
Plug in the air source. Adjust the regulator so that at least 25 PSI of pressure is fed into the linear valve.
Turn on the linear valve, and adjust it to the desired airflow by typing in a number between 0-255 (the number range may change).
When powering down the system, first unplug the power cable and turn off the air source. Then proceed to disassemble the system.
All the calibration code is published in this folder:
Edit the Calibration.ino. Change #define CALIBRATION_CASE
to 0 or 1 depending on whether you are trying to calibrate PT or flow sensor.
Flash the .ino file into the microcontroller using Arduino IDE.
Only proceed if everything looks good!
Open SensorCalibrator.m
in MATLAB.
Change the filenName
and folderName
to something you can identify. Also, change testDevice
to either 'PT' or 'FM'.
Once you start the calibration sequence, you should not change either the fileName
or folderName
. The machine automatically puts new data in the same spreadsheet.
Click the Run button on the top, and choose the correct COM port when the machine prompts you.
Now adjust the hardware to the pressure or flow rate you want. When the result on either the pressure gauge or flow meter settles, wait for several seconds more, then click stop.
Now the machine will prompt you for a value. Type in the result you read from the previous step and click enter. Then a graph will pop up.
You need at least two data points (run the file two times) to establish a line. So don't panic if you only see one point on the graph. Keep running the file again and again.
Repeat Steps 7-9 multiple times. Each time you can see the linear relationship being approximated. The devices we use should have great linear responses, meaning that if you see the data points are really off the regression line, something is not right.
Made a mistake somewhere, but you already have other data points that are too good to be dumped? Open the data file with Microsoft Excel, delete the row, save, then close the spreadsheet. Repeat Steps 7-9 like usual.
When you are happy with the result, open the data file (either click on it in MATLAB or open it with spreadsheet editors like Excel). You should see a column of data points. Row 2 is the value you plug into a, and row 3 is the value you plug into b. These values will be inserted into the system operation program.
If you want to calibrate multiple devices at the same time, simply change the output in Arduino file to the format of data1 data2 data3 ...
In the MATLAB file, change dataLength
to the number of output you have.
SensorCalibrator.m is the MATLAB file that will read the output from Calibration.ino Arduino program, interpret it, and approximate a linear relationship between the raw values and the real values. In English,.
Ensure you have downloaded and/or installed all the above!
Test its output (it should be just a number on every line) in the .