I am looking to build a float sensor for a tank and automating the motor based on sensor input. I am looking to execute this without using a microcontroller.
Below is my intended sensor setup in the tank. This is a magnetic float sensor which acts like a simple switch which closes when the water reaches its level in the tank.
The circuit uses two float sensors. One should be fixed at the top of tank (top float sensor or TFS) to detect when the tank is full to signal the motor OFF and another sensor (bottom float sensor or BFS) at the bottom of tank to signal the motor ON when the water level goes to the lowest point of tank.
There are 4 scenarios this circuit needs to meet:
- When water level is full activating TFS, the BFS will be in activated state as well. In this case motor should be turned OFF.
- Water consumed it drops down but still over the BFS, in this case the motor should be still in OFF state
- Water gets consumed further and it drops down below BFS, in this case motor should be turned ON to fill the tank
- Water fills up the tank and it crosses the BFS level but still below TFS, in this case the motor should continue to run and fill the water until it reaches the TFS.
From the above scenarios I have plotted a small logic table that needs to be achieved.
I have designed a circuit using D Flip Flop and 3 input NOR gate. This circuit meets the need for first 3 scenarios or meets the first three logic in the above table however I cannot figure how to meet the 4 scenario. I am stuck with this for a day now, any help or tip is highly appreciated.