Difference between revisions of "JacobSpringsFarm:Managewater"

From RAWiki
Jump to: navigation, search
Line 10: Line 10:
  
 
Water height:
 
Water height:
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="http://api.thingspeak.com/channels/54556/charts/6?width=450&height=260&results=60&dynamic=true"  
+
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="http://api.thingspeak.com/channels/54556/charts/6?width=450&height=260&results=60&dynamic=true" ></iframe>
  
  

Revision as of 11:53, 11 September 2015

Configure water tank management:

The water tanks can hold a maximum of 5 feet of water. This form can be used to configure the settings for turning on and off the pump, and for manually turning the pump on or off.


Configure water tank management:

The water tanks can hold a maximum of 5 feet of water. This form can be used to configure the settings for turning on and off the pump, and for manually turning the pump on or off.

Water height: <iframe width="450" height="260" style="border: 1px solid #cccccc;" src="http://api.thingspeak.com/channels/54556/charts/6?width=450&height=260&results=60&dynamic=true" ></iframe>


<form action="https://api.thingspeak.com/update" method="get" enctype="text/plain">

api key for changing settings:

<input type="text" name="key">

Water minimum height in feet (AC pump will turn on after going below this height):

<input type="text" name="field1" value="2">

Water maximum height in feet (AC pump will turn off after going below this height):

<input type="text" name="field2" value="4" size="50">

Maximum number of hours pump is allowed to be on without stopping for a 5 min break:

<input type="text" name="field3" value="1">

<input type="submit" value="Save settings">

</form>

Run pump manually:

<form action="https://api.thingspeak.com/update" method="get" enctype="text/plain">

api key for turning on pump (same as above):

<input type="text" name="key">

minutes to turn pump on:

<input type="hidden" name="field4" value="1">

<input type="text" name="field5" value="15">

<input type="submit" value="Turn on pump">

</form>

Stop pump:

<form action="https://api.thingspeak.com/update" method="get" enctype="text/plain">

api key for turning off pump (same as above):

<input type="text" name="key">

<input type="hidden" name="field6" value="1">

<input type="submit" value="Turn off pump">

</form>

Data channel links

<a href="https://thingspeak.com/channels/55384">pump settings</a> <a href="https://thingspeak.com/channels/55118">pump status</a> <a href="https://thingspeak.com/channels/54556">pump settings</a>

Creating the devices

I used 2 ESP8266-based nodemcu <a href="https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=nodemcu+devkit&safe=off&tbm=shop">devkits</a> as the microcontrollers/wifi connections. The code is <a href="https://github.com/wordsforthewise/esp8266-water-sensor">here</a>.
I measured water level with 2 wires and 2 resistors, following <a href="https://harizanov.com/2012/08/diy-soil-moisture-project/">this example</a>. I put the wires into a pvc pipe with holes drilled every foot. Then I connected the wires to the microcontroller, did some programming with the open source nodemcu firmware (writing in lua), and pushed and pulled the data to and from thingspeak, using another github library I wrote