Mam do Was takie pytanie. Co sądzicie o tym czujniku (przetworniku) ciśnienia?
https://www.dfrobot.com/product-1675.html#comment-4088894098
Zakupiłem go i próbuję podłączyć do Arduino . Producent jednak zaleca wstępną kalibrację przy ciśnieniu atmosferycznym na poniższym kodzie.
/************************************************************
Water pressure sensor demo(Computer serial port)
- Obtain the water pressure through the output voltage
of the sensor.
**************************************************************/
/************************************************************
Water Sensor Key Parameter
- Parts No.:KY-3-5
- Sensing range: 0 - 1.6 MPa
- Input Voltage: 5VDC
- Output Voltage: 0.5 - 4.5 VDC
(Linearly corresponding to 0 - 1.6 MPa)
- Accuary: 0.5% - 1% FS
**************************************************************/
/************************************************************
Water Sensor Calibration
The output voltage offset of the sensor is 0.5V (norminal).
However, due to the zero-drifting of the internal circuit, the
no-load output voltage is not exactly 0.5V. Calibration needs to
be carried out as follow.
Calibration: connect the 3 pin wire to the Arduio UNO (VCC, GND and Signal)
without connecting the sensor to the water pipe and run the program
for once. Mark down the LOWEST voltage value through the serial
monitor and revise the "OffSet" value to complete the calibration.
After the calibration the sensor is ready for measuring!
**************************************************************/
const float OffSet = 0.483 ;
float V, P;
void setup()
{
Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
Serial.println("/** Water pressure sensor demo **/");
}
void loop()
{
//Connect sensor to Analog 0
V = analogRead(0) * 5.00 / 1024; //Sensor output voltage
P = (V - OffSet) * 400; //Calculate water pressure
Serial.print("Voltage:");
Serial.print(V, 3);
Serial.println("V");
Serial.print(" Pressure:");
Serial.print(P, 1);
Serial.println(" KPa");
Serial.println();
delay(500);
}
Wyniki które dostaje nie są jednak stabilne. Skaczą samoistnie o kilkadziesiąt kilo-paskali nawet. Sporo pomogła zmiana zasilania arduino ale nadal wynik nie jest stabilny.
Zauważyłem też że podobny produkt został wycofany ze sklepu z którym współpracuje to forum. Botland.com. Nie wiem czy to ten sam czujnik ale jeśli tak to może ktoś zna przyczynę wycofania? Tu więcej danych na temat tego czujnika.
https://wiki.dfrobot.com/Gravity__Water_Pressure_Sensor_SKU__SEN0257
Za wszelkie opinie, wskazówki, naprowadzenia lub sprostowania będę bardzo wdzięczny.