From d2f79e7630cc60f5ccca818b2dddd057e4473a6c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Ji=C5=99i=C5=A1t=C4=9B?= Date: Tue, 10 Dec 2024 17:13:35 +0100 Subject: [PATCH] Add a delay between gas filling and cell opening --- Servomatic.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Servomatic.ino b/Servomatic.ino index 0d8363a..35d3ac4 100644 --- a/Servomatic.ino +++ b/Servomatic.ino @@ -19,6 +19,9 @@ static constexpr unsigned long CELL_BARELY_OPEN_EQUILIBRATION_MS = 60000; static constexpr unsigned long EVACUATION_LONG_MS = 600000; static constexpr unsigned long EVACUATION_MS = 60000; +// to get a reliable value for the pressure before connecting the cell +static constexpr unsigned long FILL_PRESSURE_DELAY_MS = 30000; + static constexpr unsigned int THREEWAY_TURNS_TO_FILL = 1; static constexpr float MEASUREMENT_UPPER_LIMIT = 8; @@ -74,6 +77,7 @@ void main_loop() { // absorption cycle threeway_fill(gas_threeway_valve, THREEWAY_TURNS_TO_FILL); + delay(FILL_PRESSURE_DELAY_MS); cell_valve.open_barely(); delay(CELL_BARELY_OPEN_EQUILIBRATION_MS); cell_valve.open(); -- 2.30.2