Hi
I´m buiding a water dispenser machine with 8 buttons, 1 water flow sensor, 5 relays, PH, TDS and water opacity sensors, all controlled by an Arduino MKR GSM 1400 that will send data to a database.
Right now i'm struggling with the stability of the system. When i press 1 button to fill up a water bottle everithink works ok. However in the end oj the job of button 1, the arduino board freezes and stop working.
The water flow sensors and the relays uses the 5v pin to power them up and the control pins connected to a logic level converter because the mkr 1400 only supports 3.3v.
The buttons and sensors are conected using the vcc (3.3v).
Could it be something relatted with the interrupts of the water flow sensor? I put the sketch in an attatchment because is to long to post it. Thanks in advance.
sketch (3).txt (10.5 KB)