Devices & Components
Arduino Uno Rev3
MPX5050dp
MAX6675
Software & Tools
Arduino IDE
MICROSOFT EXCEL
Project description
Code
SENSOR_ORIFICE_PLATE.ino
c_cpp
This code show you the pression and temperature values. Then with excel, you can compute the flow through the Numerical analysis.
1 2#include <MemoryFree.h> 3 4#include "max6675.h" 5 6 //variables initialization 7float Vs = 5.1; 8 9 10float T_1=0; 11 12 // START Thermocouple 13int thermo1DO = 3; 14int thermo1CS = 4; 15int thermo1CLK = 2; 16MAX6675 ktc1(thermo1CLK, thermo1CS, thermo1DO); 17 18// START MPX5050 19int PIN_P1 = A0; 20float Analog_P1 = 0; 21float Vout_P1 = 0; 22int P_1 = 0; 23 24//SETUP 25 26void setup() { 27 Serial.begin(9600); // START serial communication 28 29} 30 31 // LOOP 32void loop() { 33 34 // read the thermocouple 35T_1 = ktc1.readCelsius(); 36 37 38// read the pressure sensor 39Analog_P1 = analogRead(PIN_P1); 40Vout_P1 = ((Analog_P1 * 0.00369) + 0.04); 41P_1 = (Vs * Vout_P1); 42delay(1000); 43 44 45 // print data 46 Serial.print("T="); 47 Serial.print(T_1); 48 Serial.print("C"); 49 Serial.print("\ 50"); 51 Serial.print("P = "); 52 Serial.print(P_1,1); 53 Serial.print("Kpa"); 54Serial.print("\ 55"); 56} 57
SENSOR_ORIFICE_PLATE.ino
c_cpp
This code show you the pression and temperature values. Then with excel, you can compute the flow through the Numerical analysis.
1 2#include <MemoryFree.h> 3 4#include "max6675.h" 5 6 //variables 7 initialization 8float Vs = 5.1; 9 10 11float T_1=0; 12 13 // START Thermocouple 14int 15 thermo1DO = 3; 16int thermo1CS = 4; 17int thermo1CLK = 2; 18MAX6675 ktc1(thermo1CLK, 19 thermo1CS, thermo1DO); 20 21// START MPX5050 22int PIN_P1 = A0; 23float 24 Analog_P1 = 0; 25float Vout_P1 = 0; 26int P_1 = 0; 27 28//SETUP 29 30void 31 setup() { 32 Serial.begin(9600); // START serial communication 33 34} 35 36 37 // LOOP 38void loop() { 39 40 // read the thermocouple 41T_1 = ktc1.readCelsius(); 42 43 44// 45 read the pressure sensor 46Analog_P1 = analogRead(PIN_P1); 47Vout_P1 = ((Analog_P1 48 * 0.00369) + 0.04); 49P_1 = (Vs * Vout_P1); 50delay(1000); 51 52 53 // print 54 data 55 Serial.print("T="); 56 Serial.print(T_1); 57 Serial.print("C"); 58 59 Serial.print("\ 60"); 61 Serial.print("P = "); 62 Serial.print(P_1,1); 63 64 Serial.print("Kpa"); 65Serial.print("\ 66"); 67} 68
Downloadable files
connections
connections

connections (2)
connections (2)

connections
connections

Documentation
DRAWING
DRAWING
DRAWING
DRAWING
Comments
Only logged in users can leave comments