In a previous post (Proof of Concept: Automated Pump Control ) we discussed how a pair of aquarium pumps are to be used to move the water in our ebb-and-flow Aquaponics system. This week more components arrived including our temperature sensors and a relay board. The proof of concept for the pump control worked well so it was time to add in the relay board. Initially, all that was done was to hook up the control side of the relay (the coil) in series with an LED to ensure that each relay was working properly. The next step was to attach a load, a Red LED in this case, to the controlled side of the relay. The logic is quite simple, when the DPST switch is in position 1, the first relay coil is energized (Green LED is ON) and the action of the relay is to close its NORMALLY OPEN contacts, thus lighting the Red LED. When the DPST switch is moved to position 2, the first relay is de-energized (both its Green and Red LED’s are turned OFF), and the second relay is turned ON, demonstrated by the second Green and Red LED’s being ON as well.
It stands to reason that we cannot have a person standing by the Aquarium at all times, waiting for a pump to fail (when it may work fine the entire time.) The next part of our control system design involves removing our simple “spoof” switch and replacing it with some form of sensor that detects when a given pump is operating. As I said, ultimately there will be an in-line flow sensor attached to each pump that will provide a signal that correlates to how much water is moving through it. All we will have to do is determine a minimum threshold and enter that into the program. If the flow sensor signal falls BELOW the minimum threshold, the Arduino controller will assume that the pump has failed and will place the second pump in operation, looking for a proper signal from its flow sensor. It is important to note that we could do this with a flow switch instead of a dynamic sensor, but, in the event we decide to do something that requires input based on AMOUNT of water flow, we would need a sensor. Might as well start there. If we determine that a switch is more effective, we can always add it later and it will require a minimum amount of program re-writing.