Difference between revisions of "Water control project"

From Wiki2
Line 16: Line 16:
http://sitebuilt.net/images/water-control_TRUTH.JPG
http://sitebuilt.net/images/water-control_TRUTH.JPG
=====how this circuit works=====
=====how this circuit works=====
The bottom sensor comparator is wired to the D and through a NOT gate to <math>\overline{pre}</math>. <math>\overline{pre}</math> forces Q HI when it is LO which only happens when the water level is below the low sensor. The HI turns the pump on.
loop
 
:The bottom sensor comparator is wired to the D and through a NOT gate to <math>\overline{pre}</math>. <math>\overline{pre}</math> forces Q HI when it is LO which only happens when the water level is below the low sensor. The HI turns the pump on.
Otherwise when the water rises sufficiently so the high sensor is immersed, it goes HI and sends a rising pulse to the clock which puts what's on the D input on the Q output. In this case that is a LO since the lower sensor is immersed. So the output goes LO and the pump goes off.  
======rising water======
 
:Once the water reaches the lower sensor and forces it LO that LO on D just hangs there waiting to be transferred by a rising clock pulse. That doesn't happen
When the water falls below the high limit sensor the pump stays off since when the high limit opens it sends the clock LO on a falling pulse which does not change Q. So the pump stays off until it falls past the lower sensor.
until the water rises sufficiently so the high sensor is immersed. Then it sends a rising pulse to the clock which puts what's on the D input on the Q output. In this case that is a LO. So the output goes LO and the pump goes off.  
======falling water======
:When the water falls below the high limit sensor the pump stays off since when the high limit opens it sends the clock LO on a falling pulse which does not change Q (only a rising pulse does). So the pump stays off until it falls past the lower sensor. LOOP
loop


====todo====
====todo====

Revision as of 01:19, 8 January 2013

back to electronics

water control project

Automatically control the level of the pond by using a lawn sprinkler relay to inject water into the pond when it falls below a critical level. Water gets added while the pumps are on until it reaches the max level then it goes off. If you turn on the pumps again it doesn't continue filling but waits to inject water til the water falls to the low water sensor.

basic control

water-control_circuit.JPG

comparators - LM324N quad op amp
flip flop - 74HC74AP dual D flip flop pin-out

The water level sensors are just thermostat wire. When immersed the resistance decreases to about 50K. Each sensor goes to a comparator. The low level comparator goes HI when out of water and the high water sensor goes HI when immersed. The output of the low level comparator goes to the D input and the output of the high level comparator drives the clock. When the D flip flop output Q is HI the pump goes on.


D-flipflop74HC74AP_truth.PNG

how the flip flop works

The flip flop was setup with <math>\overline{clr}</math> set to HI. Then, whenever a clock pulse goes HI, whatever is on the D input gets transferred to 'memory' and shows up on the Q output, EXCEPT, if <math>\overline{pre}</math> goes LO, it forces Q HI no matter what.

water-control_TRUTH.JPG

how this circuit works

loop

The bottom sensor comparator is wired to the D and through a NOT gate to <math>\overline{pre}</math>. <math>\overline{pre}</math> forces Q HI when it is LO which only happens when the water level is below the low sensor. The HI turns the pump on.
rising water
Once the water reaches the lower sensor and forces it LO that LO on D just hangs there waiting to be transferred by a rising clock pulse. That doesn't happen

until the water rises sufficiently so the high sensor is immersed. Then it sends a rising pulse to the clock which puts what's on the D input on the Q output. In this case that is a LO. So the output goes LO and the pump goes off.

falling water
When the water falls below the high limit sensor the pump stays off since when the high limit opens it sends the clock LO on a falling pulse which does not change Q (only a rising pulse does). So the pump stays off until it falls past the lower sensor. LOOP

loop

todo

Pick up my phone, go to a web site, have there be a series of buttons on, off, 10, 20, 30, 60.

The buttons could be from a client side jquery-mobile page. Timing would seem suited to the server. Server would send an on message and start a timer. After the time elapsed it would send an off message. Client would poll server to see what the status is and the time remaining.

version 1

Basic control is working in an outdoor circuit box mounted on the bridge next to the lawn sprinkler relay.

version 2

Click the button pump goes on in pond.

  • send '1' to arduino, to tun on relay
  • send '0' to arduino to turn off device

Arduino-Ethernet-Shield-Tutorial