I have found the code meantime.
But As I see nothing happens with the current in this version, no display no log, no alarm.
Or I just couldn’t find it.
I am planning an alarm condition handling for flow and current faults.
Also I have separated the sensor functions to 3 inputs.
Rain / Program Switch
Soil Moisture Sensor
The system specification and hardware is close to finish. I have some experience in coding, but this job beyond my present knowledge.
The coding should fit into the present logic of the firmware what again is not my level of understanding.
If there is somebody with skills required and interested in this project to complete, I would be happy to work together.
I have studied the ACS712 to use for this purpose. The smallest range is +-5A (10A swing). One valve is around 0,25A, what makes 46 mV change on the output. Because the output is quite noisy I think this would not work well for this job. Moreover there is a half-supply output bias so the amplification would make some pain.
After several circuits tested I have made the 2 OpAmp choice what I have shown in my previous post.
Tested under real environment using max. 4 valves it has been proved to be fine for the project.
And also your solution is fine for fault detection. Solenoids used to break and wires are cut or short. Never seen shorted solenoid. Valves draw 200 – 275mA So the 16mA resolution should be enough.Some autozero routine would make the current measurement more precise avoiding the OpAmp offset errors.