<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Water the Garden]]></title><description><![CDATA[<p dir="auto">I'd like to water the garden controlled by Onion Omega 2+.</p>
<p dir="auto">The plan is to control solenoid valves to water different areas with necessary quantity.</p>
<p dir="auto"><strong>Currently</strong>, I'm able to control 8 relays via the Omega console, which means I could control the valves.<br />
Next, I'm going to write a Python script to switch the relays. At first, I'll just schedule it using a cron-job.</p>
<p dir="auto"><strong>Question:</strong> Should I put 1kOhm resistors between Omegas GPIO's and the relay control inputs to protect the Omega against current peaks?</p>
<p dir="auto">Up to now it has been 2 hours of great fun!</p>
<p dir="auto"><strong>Here is my plan:</strong></p>
<p dir="auto">Step 1</p>
<ul>
<li>water 5 different zones on a fixed schedule</li>
</ul>
<p dir="auto">Step 2</p>
<ul>
<li>let Omega decide to skip watering based on weather API current conditions  and today's rain probability</li>
</ul>
<p dir="auto">Step 3</p>
<ul>
<li>read cistern water level and switch to tap water if needed</li>
</ul>
<p dir="auto">Step 4</p>
<ul>
<li>delay watering if it is likely to rain tomorrow and cistern level is below a threshold</li>
</ul>
<p dir="auto">Step 5</p>
<ul>
<li>Build a nice mobile web frontend with <a href="https://angularjs.org/" rel="nofollow">AngularJS</a> with stats and manual-watering-button [water now!]</li>
</ul>
<p dir="auto">Further steps</p>
<ul>
<li>refine decision model, like to check if it actually rained as forecasted, via API</li>
<li>add an earth moisture sensor</li>
<li>learning function for cistern size</li>
<li>learn watering frequency and quantity based on manual oversteer or user feedback - let's see</li>
</ul>
<p dir="auto"><strong>Hardware available</strong></p>
<ul>
<li>Omega 2+ and <a href="https://onion.io/store/power-dock/" rel="nofollow">Power Dock</a></li>
<li><a href="http://www.hobbytronics.co.uk/8-channel-relay-board" rel="nofollow">8-Channel 5V Relay Module with Opto Isolated inputs</a></li>
<li><a href="http://www.gardena.com/int/products/watering/water-controls/24-v-irrigation-valve/900904101/" rel="nofollow">Gardena solenoid valves</a> (24V AC)</li>
<li>24V DC power supply unit</li>
<li>24V to 5V voltage converter with micro USB</li>
<li>cistern (4,5m³) to collect rain water</li>
<li>a bunch of water tubes and wires</li>
<li>Gardena lawn sprinklers and <a href="http://www.gardena.com/int/products/watering/micro-drip/extension-below-and-above-ground-drip-irrigation-line-13-7-mm/900915301/" rel="nofollow">underground drippers</a></li>
<li><a href="https://community.onion.io/topic/2167/how-to-connect-ultrasonic-sensor-hc-sr04" rel="nofollow">Ultrasonic Sensor HC-SR04</a> to get water level in cistern</li>
</ul>
<p dir="auto"><strong>Hardware considered</strong></p>
<ul>
<li>flowmeter (any recommendations? I don't want leakage underground, should be frost-resisting, accuracy isn't important)</li>
<li><a href="https://onion.io/store/arduino-dock-r2/" rel="nofollow">Arduino Dock</a> to read Ultrasonic sensor</li>
<li>Moisture sensor</li>
</ul>
<p dir="auto">Photos will follow!</p>
]]></description><link>http://community.onion.io/topic/2169/water-the-garden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 13:54:14 GMT</lastBuildDate><atom:link href="http://community.onion.io/topic/2169.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jun 2017 08:01:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Water the Garden on Wed, 28 Jun 2017 08:01:54 GMT]]></title><description><![CDATA[<p dir="auto">I'd like to water the garden controlled by Onion Omega 2+.</p>
<p dir="auto">The plan is to control solenoid valves to water different areas with necessary quantity.</p>
<p dir="auto"><strong>Currently</strong>, I'm able to control 8 relays via the Omega console, which means I could control the valves.<br />
Next, I'm going to write a Python script to switch the relays. At first, I'll just schedule it using a cron-job.</p>
<p dir="auto"><strong>Question:</strong> Should I put 1kOhm resistors between Omegas GPIO's and the relay control inputs to protect the Omega against current peaks?</p>
<p dir="auto">Up to now it has been 2 hours of great fun!</p>
<p dir="auto"><strong>Here is my plan:</strong></p>
<p dir="auto">Step 1</p>
<ul>
<li>water 5 different zones on a fixed schedule</li>
</ul>
<p dir="auto">Step 2</p>
<ul>
<li>let Omega decide to skip watering based on weather API current conditions  and today's rain probability</li>
</ul>
<p dir="auto">Step 3</p>
<ul>
<li>read cistern water level and switch to tap water if needed</li>
</ul>
<p dir="auto">Step 4</p>
<ul>
<li>delay watering if it is likely to rain tomorrow and cistern level is below a threshold</li>
</ul>
<p dir="auto">Step 5</p>
<ul>
<li>Build a nice mobile web frontend with <a href="https://angularjs.org/" rel="nofollow">AngularJS</a> with stats and manual-watering-button [water now!]</li>
</ul>
<p dir="auto">Further steps</p>
<ul>
<li>refine decision model, like to check if it actually rained as forecasted, via API</li>
<li>add an earth moisture sensor</li>
<li>learning function for cistern size</li>
<li>learn watering frequency and quantity based on manual oversteer or user feedback - let's see</li>
</ul>
<p dir="auto"><strong>Hardware available</strong></p>
<ul>
<li>Omega 2+ and <a href="https://onion.io/store/power-dock/" rel="nofollow">Power Dock</a></li>
<li><a href="http://www.hobbytronics.co.uk/8-channel-relay-board" rel="nofollow">8-Channel 5V Relay Module with Opto Isolated inputs</a></li>
<li><a href="http://www.gardena.com/int/products/watering/water-controls/24-v-irrigation-valve/900904101/" rel="nofollow">Gardena solenoid valves</a> (24V AC)</li>
<li>24V DC power supply unit</li>
<li>24V to 5V voltage converter with micro USB</li>
<li>cistern (4,5m³) to collect rain water</li>
<li>a bunch of water tubes and wires</li>
<li>Gardena lawn sprinklers and <a href="http://www.gardena.com/int/products/watering/micro-drip/extension-below-and-above-ground-drip-irrigation-line-13-7-mm/900915301/" rel="nofollow">underground drippers</a></li>
<li><a href="https://community.onion.io/topic/2167/how-to-connect-ultrasonic-sensor-hc-sr04" rel="nofollow">Ultrasonic Sensor HC-SR04</a> to get water level in cistern</li>
</ul>
<p dir="auto"><strong>Hardware considered</strong></p>
<ul>
<li>flowmeter (any recommendations? I don't want leakage underground, should be frost-resisting, accuracy isn't important)</li>
<li><a href="https://onion.io/store/arduino-dock-r2/" rel="nofollow">Arduino Dock</a> to read Ultrasonic sensor</li>
<li>Moisture sensor</li>
</ul>
<p dir="auto">Photos will follow!</p>
]]></description><link>http://community.onion.io/post/13607</link><guid isPermaLink="true">http://community.onion.io/post/13607</guid><dc:creator><![CDATA[freizeitnerd]]></dc:creator><pubDate>Wed, 28 Jun 2017 08:01:54 GMT</pubDate></item><item><title><![CDATA[Reply to Water the Garden on Thu, 29 Jun 2017 10:15:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/4143">@freizeitnerd</a><br />
I'm using the DIGITEN G1" Water Flow Hall Effect Sensor Switch Flow Meter Flowmeter Counter 1-60L/min from Amazon for $10.99.  Threads aren't exactly NPT, but if you need NPT, you can cut them easily by cutting channels in a female NPT connector and threading it on.  You can get accurate flow by measuring time between pulses and accurate measure by counting pulses.  It needs 5V to operate but doesn't output 5V.  It might be a could idea to use a diode to protect the Omega input, although it probably isn't needed.</p>
]]></description><link>http://community.onion.io/post/13619</link><guid isPermaLink="true">http://community.onion.io/post/13619</guid><dc:creator><![CDATA[Wayne Holloway]]></dc:creator><pubDate>Thu, 29 Jun 2017 10:15:49 GMT</pubDate></item><item><title><![CDATA[Reply to Water the Garden on Sat, 01 Jul 2017 06:42:52 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Wayne! I ordered two <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":-)" alt="🙂" /></p>
<p dir="auto">I switched to the Arduino Dock. Do I get the documentation right, that most of the GPIOs aren't available because they are used to communicate with the "Arduino"?</p>
<p dir="auto">"By default, the Serial, SPI, and I2C pins implement these communication protocols and cannot be used as GPIOs. Similarly, the I2S and PWM pins are set to GPIO mode by default." <a href="https://docs.onion.io/omega2-docs/arduino-dock-2.html#the-expansion-header-2" rel="nofollow">Source</a></p>
<p dir="auto">Which results in 6 GPIO left, right? 0,1,2,3,11,18</p>
<p dir="auto"><img src="http://media.jugend-technik.com/ee/arduino-dock-expansion-header-pinout.png" alt="GSIP Pin Out" class="img-responsive img-markdown" /></p>
]]></description><link>http://community.onion.io/post/13625</link><guid isPermaLink="true">http://community.onion.io/post/13625</guid><dc:creator><![CDATA[freizeitnerd]]></dc:creator><pubDate>Sat, 01 Jul 2017 06:42:52 GMT</pubDate></item><item><title><![CDATA[Reply to Water the Garden on Sat, 01 Jul 2017 10:01:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/4143">@freizeitnerd</a> said in <a href="/post/13625">Water the Garden</a>:</p>
<blockquote>
<p dir="auto">I switched to the Arduino Dock. Do I get the documentation right, that most of the GPIOs aren't available because they are used to communicate with the "Arduino"?</p>
<p dir="auto">"By default, the Serial, SPI, and I2C pins implement these communication protocols and cannot be used as GPIOs. Similarly, the I2S and PWM pins are set to GPIO mode by default." <a href="https://docs.onion.io/omega2-docs/arduino-dock-2.html#the-expansion-header-2" rel="nofollow">Source</a></p>
<p dir="auto">Which results in 6 GPIO left, right? 0,1,2,3,11,18</p>
</blockquote>
<p dir="auto">Almost right.</p>
<p dir="auto">Omega2(+) is acessing the inside flash via the hardware SPI pins, these pins are not used by the Arduino Dock 2 (the on board ATmega328P).</p>
<hr />
<p dir="auto">If you do not want to communicate serially with Arduino via UART1 then RX1 and TX1 are free.<br />
The GPIO15, GPIO16 and GPIO17 pins are in use only if Omega2(+) programms (ie uploads a sketch) the ATmega328P.<br />
So you could use these pins via the on board bidirectional level shifter <strong>at 5V logic level</strong> on the Arduino Dock 2.</p>
<p dir="auto"><a href="https://community.onion.io/topic/1601/unofficial-omega-arduino-dock-2-schematic-diagram/3" rel="nofollow">Unofficial Arduino Dock 2 schematic</a></p>
]]></description><link>http://community.onion.io/post/13626</link><guid isPermaLink="true">http://community.onion.io/post/13626</guid><dc:creator><![CDATA[György Farkas]]></dc:creator><pubDate>Sat, 01 Jul 2017 10:01:17 GMT</pubDate></item><item><title><![CDATA[Reply to Water the Garden on Sat, 08 Jul 2017 22:09:56 GMT]]></title><description><![CDATA[<p dir="auto">I got little further, see <a href="https://github.com/freizeitnerd/sprinkler/tree/master" rel="nofollow">Github Repo</a>.</p>
<p dir="auto">Wrote <a href="https://github.com/freizeitnerd/sprinkler/blob/master/root/sprinkler/setup.sh" rel="nofollow">setup.sh</a> to setup <a href="https://docs.onion.io/omega2-docs/using-gpios.html#using-gpios-multiplexing" rel="nofollow">multiplexed GPIOs</a>. Which is a little bit a shoot in the dark. I find it difficult to turn from GPIO Groups to GPIO Numbers to use.</p>
<p dir="auto">Thanks, György I also use GPIO 45 and 46 now.<br />
<strong>Problem</strong>: Omega 2+ won't boot if a relay control pin is connected to GPIO 1.<br />
Currently connected GPIOs to the relais: 0 2 3 11 18 45 46</p>
<p dir="auto">Wrote a <a href="https://github.com/freizeitnerd/sprinkler/blob/master/root/sprinkler/valve.py" rel="nofollow">Valve class</a> to control the relay (and open the valves) and a <a href="https://github.com/freizeitnerd/sprinkler/blob/master/root/sprinkler/main.py" rel="nofollow">little script</a> to test/play with the relais.</p>
<p dir="auto">I'd love to get comments!</p>
<p dir="auto">PS: How to add code with highlighting and indention here?</p>
]]></description><link>http://community.onion.io/post/13686</link><guid isPermaLink="true">http://community.onion.io/post/13686</guid><dc:creator><![CDATA[freizeitnerd]]></dc:creator><pubDate>Sat, 08 Jul 2017 22:09:56 GMT</pubDate></item><item><title><![CDATA[Reply to Water the Garden on Sun, 09 Jul 2017 00:16:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/4143">@freizeitnerd</a> said in <a href="/post/13686">Water the Garden</a>:</p>
<blockquote>
<p dir="auto">PS: How to add code with highlighting and indention here?</p>
</blockquote>
<p dir="auto">Blocks of code are fenced by lines with three back-ticks <code> ```</code> in Markdown.<br />
See also the <code>COMPOSE</code> button at the top right corner of the edit frame please <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--wink" title=";-)" alt="😉" /></p>
]]></description><link>http://community.onion.io/post/13687</link><guid isPermaLink="true">http://community.onion.io/post/13687</guid><dc:creator><![CDATA[György Farkas]]></dc:creator><pubDate>Sun, 09 Jul 2017 00:16:19 GMT</pubDate></item><item><title><![CDATA[Reply to Water the Garden on Tue, 18 Jul 2017 18:24:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/4143">@freizeitnerd</a> Updated the documentation to indicate which GPIOs need to be floating for a successful boot: <a href="https://docs.onion.io/omega2-docs/using-gpios.html#important-special-gpios" rel="nofollow">https://docs.onion.io/omega2-docs/using-gpios.html#important-special-gpios</a></p>
]]></description><link>http://community.onion.io/post/13786</link><guid isPermaLink="true">http://community.onion.io/post/13786</guid><dc:creator><![CDATA[Lazar Demin]]></dc:creator><pubDate>Tue, 18 Jul 2017 18:24:10 GMT</pubDate></item><item><title><![CDATA[Reply to Water the Garden on Sat, 22 Jul 2017 22:38:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/95">@Lazar-Demin</a> thanks! That helps!</p>
<p dir="auto">btw. is there any project going on to write a Ruby wrapper for GPIO interaction?</p>
<p dir="auto">Still not watering anything, but ...<br />
I went ahead in Ruby and found myself writing a 'wrapper' to switch my valves (basically GPIO's). I could contribute if there is any project.</p>
<p dir="auto"><a href="https://github.com/freizeitnerd/sprinkler/blob/development/app/lib/valve_class.rb" rel="nofollow">See GitHub Repo</a></p>
<pre><code>      stdin, stdout, stderr = Open3.popen3("fast-gpio set #{@gpio_number} #{v}")
      if stderr.gets
        raise(OnionGpioWrapperError, stderr.gets)
      end
</code></pre>
]]></description><link>http://community.onion.io/post/13855</link><guid isPermaLink="true">http://community.onion.io/post/13855</guid><dc:creator><![CDATA[freizeitnerd]]></dc:creator><pubDate>Sat, 22 Jul 2017 22:38:30 GMT</pubDate></item><item><title><![CDATA[Reply to Water the Garden on Sun, 27 May 2018 17:03:11 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/4053">@Wayne-Holloway</a> ! Can you read the water flow directly in omega GPIO or you need to connect them to the arduino dock ? I can't correctly read my sensor because I don't know how to do this by omega GPIO interrupts. Best regards!</p>
]]></description><link>http://community.onion.io/post/16925</link><guid isPermaLink="true">http://community.onion.io/post/16925</guid><dc:creator><![CDATA[Alexandre Arruda]]></dc:creator><pubDate>Sun, 27 May 2018 17:03:11 GMT</pubDate></item></channel></rss>