MPX5500DP என்பது ஒரு Pressure Sensor ஆகும்.Pressure-ன் Unit Pascal (Pa) ஆகும். MPX5500DP ஆனது 6 Pin-களை கொண்ட Package ஆகும். இதில் 3 Pin-களை மட்டுமே பயன்படுத்த முடியும். மற்ற 3 Pin-கள் (No Connection) பயன்படுத்ததேவைல்லை, Support-க்காக கொடுக்கப்பட்டிருக்கும்.
MPX5500DP-ன் Pascal range (Pa) is 0 to 500kPa ஆகும்.
MPX5500DP-ன் Pound per square inch (psi) is 0 to 72.5 psi ஆகும். 1 Pascal (Pa) = 0.000145038 Pound per square inch(psi)
MPX5500DP-ன் Output analog voltage range is 0.2 to 4.7V ஆகும்.
Pinout:
Pin1= Output
Pin2= Ground
Pin3= Power Supply
const int analogInPin = A0; // Analog input pin that the Vout Pressure Sensor is attached to
int sensorValue = 0; // value read from the Pressure Sensor
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
// convert the reading to voltage
float sensorVoltage = sensorValue * (5.0 / 1023.0);
// convert the reading to it’s PSI equivilant [(Vout = Vs*(0.0018*P+0.04)), (Vs = 5.0Vdc)]
// thus: P= (-V+0.2)/0.009 (kPa)
float kPa = (sensorVoltage – 0.2) / 0.009;
// convert to psi
float PSI = kPa * (0.145037738);
// print the results to the serial monitor:
Serial.print(“Pressure Output Voltage = ” );
Serial.print(sensorVoltage);
Serial.print(” / “);
Serial.print(kPa);
Serial.print(” kPa (“);
Serial.print(PSI);
Serial.println(” PSI)”);
// wait 2 milliseconds before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
delay(2);
}
Best Pressure Sensor
ReplyDeletearduino code error
ReplyDeletefloat kPa = (sensorVoltage – 0.2) / 0.009;
// convert to psi
float PSI = kPa * (0.145037738);
//this not error
Deleteconst int analogInPin = A0; // Analog input pin that the Vout Pressure Sensor is attached to
int Value = 0; // value read from the Pressure Sensor
void setup() {
Serial.begin(9600);
}
void loop() {
Value = analogRead(analogInPin);
float sensor = Value * (5.0 /1023.0);
float Pa = (sensor - 0.2)/(0.009);
float PSI = Pa*(0.145037738);
Serial.println("");
delay(2);
}
code didn't work
ReplyDelete5.0 /1023.0);
ReplyDeletefloat Pa = (sensor - 0,2)/(0,009);
float PSI = Pa*(0.145037738);
Serial.println("");
penundaan (2);
}
Rumus ini untuk menghitung apa kak ketinggan level cairan yah?