From f8af27dd6b778a170f1f4311e7e7259eaadc4add 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 16:50:47 +0100 Subject: [PATCH] Tune some values --- Servomatic.ino | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Servomatic.ino b/Servomatic.ino index 164e930..0d8363a 100644 --- a/Servomatic.ino +++ b/Servomatic.ino @@ -15,20 +15,21 @@ static constexpr int CELL_VALVE_PIN = 10; static constexpr int PRESSURE_SENSOR_VALVE_PIN = 11; static constexpr int VACUUM_VALVE_PIN = 12; -static constexpr unsigned long CELL_BARELY_OPEN_EQUILIBRATION_MS = 30000; +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; static constexpr unsigned int THREEWAY_TURNS_TO_FILL = 1; static constexpr float MEASUREMENT_UPPER_LIMIT = 8; -static constexpr float MEASUREMENT_LOWER_LIMIT = 0.5; +static constexpr float MEASUREMENT_LOWER_LIMIT = 0.1; void threeway_fill(Valve &threeway_valve, unsigned int count) { while (count > 0) { threeway_valve.open_barely(); + delay(500); threeway_valve.open(); --count; } @@ -45,7 +46,7 @@ void main_loop() //PressureSensor sensor_3{PRESSURE_SENSOR3_PIN, 10, 241}; Measurement measurement{sensor_1}; Valve vacuum_valve{VACUUM_VALVE_PIN, 2295, 1494, 802}; - Valve cell_valve{CELL_VALVE_PIN, 2000, 1535, 1276}; + Valve cell_valve{CELL_VALVE_PIN, 2000, 1605, 1230}; Valve gas_threeway_valve{GAS_VALVE_PIN, 1301, 2036, 1641}; vacuum_valve.close(); @@ -103,6 +104,7 @@ void main_loop() delay(CELL_BARELY_OPEN_EQUILIBRATION_MS); cell_valve.open(); delay(10000); + cell_valve.close(); vacuum_valve.close(); signal_going_to_sleep(); while (digitalRead(SWITCH_PIN) == LOW) -- 2.30.2