How to set a flush program to end in sensing state

I am having some trouble setting the manifold/sensor flush program such that when the program ends, the manifold remains in a sensing state. What happens now is the manifold will flush with city water, then close all valves so that it is sensing the flush water (city) instead of tank water (hydroponic). The program then uses this flush water readings to dose the tank, missing the target EC/pH targets. Last test I ran dosed to 2 mS target, but ended at 4 mS target because it was reading the low EC of flush water instead of the reached target EC of the tank water.
I am thinking that the valves can be paired together so that the city water flush/drain are open/closed together, and the tank in/out to manifold are open/closed together. The issue I have with this setup is that once per day I would also like to sense and then flush from another tank that is set up to use the manifold sensors. Then I need to pair those sensors as well with the flush/drain valves.

Google Photos
(as a new user, I cannot upload images. Here is a link to the flow map for the tanks.)

Hi Gregory,

To reduce complexity, I like to separate irrigation functions (water to/from plants) from fertigation functions (adding nutrients, balancing pH, filling, draining).

Your question is about fertigation, so let’s focus on the top portion of your drawing - the fertigation component.

This lets us focus on the fertigation card aka the Nutrient Panel card.

Nutrient Panel Card


On the back of the card, the diagram would be configured as follows:

  • Under Water Tanks you specify tank 1 with V1 and V7 as the from tank / to tank valves, then tank 4 with V2 and V8 as the from tank / to tank valves.
  • Under Circulation you specify V3 as the fill valve and V4 as the drain valve
  • Under Nutrients you specify your Acid, Stock A and Stock B, pointing to the correct peristaltic pumps.

The two pumps listed in your diagram are irrigation pumps. Can you describe how the water circulates through the sensor manifold when sensing and dosing tanks 1 & 4?

There’s usually a common circulation pump before V7 and V8, or a pump associated with each valve in order to cause water circulation from the tank and through the sensing panel.

Once the plumbing is understood and connected properly, there should be no problem adding a 3rd, 4th, or any number of tanks to this configuration.

The two pumps listed in your diagram are irrigation pumps. Can you describe how the water circulates through the sensor manifold when sensing and dosing tanks 1 & 4?
The water is constantly circulating through the tanks via pumps (one in each tank) that T off, one end back into the tank (circular water flow) and one to the manifold. The sumps are always on, so there’s always pressure to the manifold if the valve is open. The water goes through a disc filter (tank 1 ONLY), through the sensors, and back to the tank. Only the acid doses into the manifold, so that we can pH adjust both tanks 1 and 4, but the stock solutions A and B does directly into tank 1.

There’s usually a common circulation pump before V7 and V8, or a pump associated with each valve in order to cause water circulation from the tank and through the sensing panel.
If the valves are open, they will have water coming from the tanks via the internal sump pump that circulates water within each tank.

Gotcha. Water circulation is provided by the sump pumps - one in each tank - with pressure always on the V1 and V2 input valves.

Also - while pH is balanced through the manifold, the stock A/B peristaltic pumps go directly to Tank 1 vs. through the manifold.

You seem pretty well set up from a plumbing perspective, even for future expansion to another tank to run through the manifold for sensing - as long as it matches the existing tanks.

EC and pH dosing tasks follow a similar pattern. Choose the tank (Tank 1 for example) and the EC or pH levels. The program does the following:

  1. Open the input valve from the specified tank
  2. Open the output valve to the specified tank
  3. Turn on any circulation pump (not needed in your case)
  4. Wait the specified period to allow good circulation to that tank
  5. Measure the EC (or pH)
  6. Issue ONE dose of EC or pH (up or down) based on that measurement
  7. Repeat until EC or pH is correct, or max doses have been issued
  8. Turn off the circulation pump (not needed in your case)
  9. Close the To/From valves to the tank
  10. Issue a flush by opening city water to drain valves for a specified period

At the end, city water will be in the manifold, and the manifold is in a quiescent state (no water movement).

If you are dosing EC or balancing pH, there should be no situation where steps 1-5 aren’t complete before dosing.

Your email mentions a situation where dosing (step 6) was occurring with city water in the manifold. Can you describe the program you were using to perform this EC dosing, and have you observed the above steps in normal operation?

Yes, the system was set up in this fashion to allow future expansion/alterations that would increase our options for managing multiple tanks simultaneously using multiple water sources - aquaponics, hydroponics, concentrated fertilizer, etc.

If you can see the pictures, it appears that the dosing was occurring when the system was in a rest state - with city water running through or sitting in the manifold. When the program started up again, the EC was significantly higher, as the system had been dosing the Stock A/B into the tank, but not into the manifold (or there would have been a spike in EC when the dosing occurred, or it would have gone down the drain with the flush program).

We do not have a normal operation as of yet, as the program we were trying to use was to test the accuracy of the EC and pH targets by analysis of the feed tanks after dosing. The previously used program on this tank does not function, as the final step is to close all the valves which prevents the sensing of the tank to initiate another dose. Since the final step is to close everything, it is not sitting in a sensing state but instead with city water in the manifold. It will only open the valves again to start another repeat of the cycle (if I have a repeated pH balance or EC balance program running), but if program is dosing multiple times to hit the target, such as when we try to balance pH then EC of a tank full of city water, it queues up the program, and stops dosing if it senses the EC is above target - but proceeds to flush and leave that city water in the manifold when the program ends.

How do we set the normal operation to be in a sensing state, with a dosage of acid or stock when the sensors read out of range?

It does appear that during this time the EC rose during the time that fresh water was in the manifold.

Is your Nutrient Panel control card set up with any manual overrides (manual card connections)?

Can you select the “Run Man” on that card and view the last time it ran the “Add Nutrients” task? Check out the task details, and see if the dates/times are right, and if the process flow looks right to you, or if it did something like add EC before opening a valve.

If all that looks good, manually run another “Add Nutrients” task, and watch the current task. When it says it’s turning on a valve, measuring, dosing, etc, is it doing what it says it’s doing?

I can run manually, and it will function as desired. I have previously tested and will do so again, observing each valve and order of operations. However, the issue occurs when I run the program through time, as it queues up and malfunctions. See below:

I have attached the pictures for one of the instances. Here is what I found:
The flush program was on frequently, pairing the valves appropriately.
When it went to a dosing state, it closed the flush valves but only opened the valve from the tank to the sensors, it did not open the valve from the sensors. So, the city water was sitting in the manifold, sensing, with the valve pushing from the tank, but there was nowhere for the water to go.
Thus, the program dosed Stock A and B 10 times into the tank but didn’t detect a change in EC in the manifold.
Then, when it started the program over again (it was on repeat), it sensed that the EC was too high, and stopped the program… until it did another flush…? This process occurred several times, and it appears to be caused by the valve from the sensors not opening during dosing.
However, it looks like it did a dose successfully, and then failed on a subsequent dosing regime. It also didn’t register that Stock A dosed, when it did on the other graph.

What could cause the valve to open successfully, and then fail later? or is it a part of the programing?
Should I rebuild the cards for nutrient dosing and only put in the connections I need at the time, and try again?

I ran an acid dosing program this morning:
Dose acid to 5.9-6.1 pH,
Measure nutrients for 5 minutes.

At the end of both programs, the final step is to flush (close all valves, open city water and drain, then close all valves) and at the end of the flush program, everything is closed again. This occurs for both dosing acid and sensing nutrients - the final step is to close all valves. This prevents the accurate measurement or dosing of the tanks, because if the program is not currently running then the measurements are only taken on the city water sitting in the manifold.

However, if we set it up to constantly run a dosing program, so that its always in a sensing state (because when it runs the program, it does open the proper valves), it will close all valves after each successful dose to target during flushing, ruining all subsequent programs.

Please advise.

A task runs without understanding of tasks run before or after. All fertigation tasks end with the manifold flushed, and all valves closed. That is the quiescent state of the manifold.

With multiple tanks and one sensing panel, sensor readings are only recorded to a tank when the panel knows fluid from that tank is running through the sensors. During the quiescent state, there are no measurements sent to any of the tanks. If there were, it wouldn’t know which tank to send measurements to, and they wouldn’t be correct as it’s measuring city water.

…the final step is to close all valves . This prevents the accurate measurement or dosing of the tanks, because if the program is not currently running then the measurements are only taken on the city water sitting in the manifold.

Measurement and dosing only happen during measurement and dosing tasks, and readings during those tasks are based on water flow from the tanks specified in the task - not city water.

There should be no way to get it into a state where either sensing or dosing for a particular tank occurs based on city water readings. Is this happening during the above two runs?

We are still researching the event that occurred on November 30th above where dosing occurred with the output valve closed. That situation should not have happened, and we are trying to reproduce it in the lab to see how it got into this state.

As to the November 30th event, we have a theory and are attempting to prove it in the lab. Our theory is the repeat rate is set too low, causing tasks to queue up and eventually leading to a full queue and unexpected behavior.

In the following example, there are 4 tasks starting at 5:00am and the repeat is set every 10 minutes.

Screenshot 2023-12-13 at 9.57.40 AM

If it takes longer than 10 minutes for the above tasks to complete, they will start queueing and eventually overflow the queue.

Do you think your automation card has a repeat rate that is lower than the maximum time it takes to run all tasks?

It makes sense that the tasks run independently.

Regarding the tasks being too close together: in the one picture, with the rapid flushing; that was the program running through the tasks. As each task finished the system would flush. And so the queued up tasks on become queued when it starts dosing, as that takes a while.

But several times the program kept the return to tank from manifold valves closed when they should have been open to sense.
I’ll run similar programing dosing with acid, to see if the same thing occurs. It will be a partial test for now because the acid does dose directly into the manifold, so the pH will change if the valve stays closed. But that should error the probe and we’ll get a notification.
Since the Stock A and B dose into the tank; when the return valve is closed, there is no change in EC during the dosing stage.

I’ll update shortly.

Since you’re only dosing into one of your two tanks, you could set up a command/response alert that says “When my dosing pump turns on, send an alert if my tank 1 output valve is in the closed state”.