<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rebecca on Medium]]></title>
        <description><![CDATA[Stories by Rebecca on Medium]]></description>
        <link>https://medium.com/@rebecca_21181?source=rss-4c6870614608------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Hk8gia5YFO8xok6j</url>
            <title>Stories by Rebecca on Medium</title>
            <link>https://medium.com/@rebecca_21181?source=rss-4c6870614608------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 02:03:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rebecca_21181/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Dipping a toe into PlantTech]]></title>
            <link>https://medium.com/@rebecca_21181/dipping-a-toe-in-planttech-13b15e3aa836?source=rss-4c6870614608------2</link>
            <guid isPermaLink="false">https://medium.com/p/13b15e3aa836</guid>
            <category><![CDATA[plants]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[agritech]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Rebecca]]></dc:creator>
            <pubDate>Sat, 30 Sep 2023 13:32:08 GMT</pubDate>
            <atom:updated>2023-10-02T07:17:36.184Z</atom:updated>
            <content:encoded><![CDATA[<p>Since a love of gardening that started in my early 20s and joining a tech company in 2016 I have dreamed of combining these two worlds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v0xQ2sI4rP2i8sb0PbuuPg.jpeg" /><figcaption>COVID carrots</figcaption></figure><p>Moving into a development role in early 2022, combined with attending DevConf 2023 in Cape Town this year and listening to <a href="https://explorationspace.co.za/2023/05/29/devconf-2023-create-the-sustainable-home-farm-of-your-dreams/">Allan Pead’s talk</a> on “Create the sustainable home farm of your dreams” finally gave me the confidence to kick this off.</p><p>But where to start?</p><p>I knew I wanted to write a program, and needed a development board to run the code, then recalled seeing an <a href="https://github.com/OfferZen-Community/plant_tech_ams/tree/main">OfferZen makers project</a> from COVID days that included a moisture sensor and water pump and this felt like the perfect entry project.</p><h3>Step 1: Buy the components</h3><p>Every time I start a new hobby (there have been many) I get very excited to delve into a new world. Turns out there are two electronics shops in Cape Town within easy reach for me:</p><ul><li><a href="https://www.fort777.co.za/">Yebo Electronics</a> in Plumstead</li><li><a href="https://www.communica.co.za/">Communica</a> in Paarden Eiland</li></ul><p>Riding the wave of the new found hobby-excitement I quickly discovered I needed to visit both as Yebo had the transistor and Communica the rest:</p><ul><li>HKD ESP8266 NODEMCU WIFI BOARD</li><li>15cm Female to Female jumper leads</li><li>Mini DC 3–6V Water pump</li><li>TIP31C Transistor</li><li>Moisture Sensor and detecting board (<a href="https://www.communica.co.za/products/bmt-soil-moisture-sensor-kit">LM393</a>)*</li><li>6–8mm silicone pipe</li><li>USB-USB mini A cable</li></ul><p><em>*I initially bought the FC-50 relay module with moisure sensor by accident. This has NO/C/NC ports opposed to the needed Analog and Digital pins on the LM393.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DA-2vdGVFxrdxGMT_1eNZg.jpeg" /><figcaption>The beginning (with the wrong part)</figcaption></figure><h3>Step 2: Get the Arduino set up</h3><p><a href="https://github.com/OfferZen-Community/plant_tech_ams/blob/main/prep-arduino-cli.md">OfferZen’s maker guide</a> has all the detail required to get this project kicked off including step-by-step instructions to install the <a href="https://arduino.github.io/arduino-cli/0.33/installation/">Ardunino CLI</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VBhZezXShdDFYzvRi07HMg.png" /></figure><p>Followed by adding the basic <a href="https://github.com/RLain/plant-tech-moisture-sensor/blob/main/BlinkESP/BlinkESP.ino">BlinkESP</a> program to check the code has correctly compiled and uploaded to the Arduino. The joy I felt when I saw the light turned on was hard to put into words:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*-NLvrPz8kTi2g29cNn_tCQ.jpeg" /><figcaption>Blink once if happy.</figcaption></figure><h3>Step 3: Test the moisture sensor</h3><p>At this point, still firmly in the brand-new-Arduino-and-C++ head space, I opted to copy the example <a href="https://github.com/OfferZen-Community/plant_tech_ams/blob/main/arduino/MoistureSensor/MoistureSensor.ino">MoistureSensor</a> program OfferZen provided to get comfortable with the CLI commands:</p><h4>arduino-cli commands</h4><p>1. Create a sketch: $ `arduino-cli sketch new nameOfSketch`</p><p>2. $cd into the Sketch directory then update the new `.ino` file using $ nano</p><p>3. Compile the sketch: $ `arduino-cli compile — fqbn esp8266:esp8266:nodemcuv2 nameOfSketch`</p><p>4. Locate the port of the Arduino (make sure plugged in): $ `arduino-cli board list`</p><p>5. Update compiled code onto the Arduino: $ `arduino-cli upload -p /dev/cu.usbserial-0001 — fqbn esp8266:esp8266:nodemcuv2 nameOfSketch`</p><p>To monitor the Arduino whilst plugged in $ `arduino-cli monitor -p /dev/cu.usbserial-0001 -c baudrate=115200`. Change the baudrate depending on the baurd used by the sketch. e.g on MoistureSensor.ino `Serial.begin(115200);` is defined.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f1pAT0KqM66h2eiI03yybg.jpeg" /><figcaption>Putting parts together. Green and red lights coming on also produced a lot of joy.</figcaption></figure><p>This quickly exposed I was using the wrong relay module as the outputs didn’t make sense. After a few hours of googling FC-50 components, unpacking NO/C/NC and trawling through electronics forums I came to the realisation I had the wrong part. No amount of hoping was going to give me Analog and Digital outputs as I had no way to connect to the appropriate ESP8266 pins (AO and D5 respectively).</p><ul><li>Wrong part: <a href="https://www.communica.co.za/products/cmu-moisture-sensor-with-relay?variant=40204733055049">FC-50 relay module</a></li><li>Right part: <a href="https://www.communica.co.za/products/bmt-soil-moisture-sensor-kit?variant=31667841237065">LM393 detecting board</a></li></ul><p>This felt like a great early learning in this new world of electronics.</p><h3>Step 4: Test the moisture sensor — part 2</h3><p>With the program already set up, the arduino-cli command steps becoming familiar, and picking apart the commands being used in the code using the <a href="https://www.arduino.cc/reference/en/language">Arduino Language reference</a> &amp; <a href="https://emeritus.org/blog/coding-arduino-programming-language">Emeritus blog</a>…</p><blockquote>Turning the Sensor on allows the Arduino to get a reading`. This is controlled by `digitalWrite(SENSOR, HIGH);`. We can then get a reading by using a read command e.g. Analog reading = `analogValue = analogRead(ANA);` with ANA being the Arduino port defined. Once we have the reading, then we can turn the sensor off using `digitalWrite(SENSOR, LOW);</blockquote><p>…along with my new LM393 board, getting correct readings from the Moisture sensor was now quick:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J_CmJ2KROGByNDyVvJyrZg.png" /><figcaption>Playing around</figcaption></figure><p>I also came across two very useful guides from previous people making this kit who shared some moisture sensor intel:</p><ol><li><a href="https://www.instructables.com/Soil-Moisture-Measurement-With-Arduino">Soil-Moisture-Measurement-With-Arduino</a></li><li><a href="https://lastminuteengineers.com/soil-moisture-sensor-arduino-tutorial/">How Soil Moisture Sensor Works and Interface it with Arduino</a></li></ol><h3>Step 5: Adding the water pump</h3><p>With a quick review of the <a href="https://github.com/OfferZen-Community/plant_tech_ams/tree/main#part-3---mini-water-pump-%EF%B8%8F">OfferZen guide</a> and taking note of the following, water pump addition was ready to go:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ldTgbD31Gy6ZkZwxQXcEfw.png" /></figure><p>As a start, I just wanted to hear the pump come on and turn off. Created a <a href="https://github.com/RLain/plant-tech-moisture-sensor/blob/main/Pump/PumpTesting.ino">new sketch</a> leveraging off the previous code, compiled, uploaded and after some faffing the pump rhythmically came alive and turned itself off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mQAO-sXJatM_mV5XVlAxVA.jpeg" /><figcaption>We have pump-off (and on).</figcaption></figure><h3>Step 6: Linking the moisture sensor and pump</h3><p>The last step was to combine the two core components; moisture sensor readings, and the water pump.</p><p>Leveraging off <a href="https://github.com/OfferZen-Community/plant_tech_ams/blob/main/arduino/plant_watering_system/plant_watering_system.ino">OfferZen</a>, <a href="https://lastminuteengineers.com/soil-moisture-sensor-arduino-tutorial/">LastMinuteEngineers</a> and some ChatGPT discussions…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qd-WawMRz0nuFIXkA_mDSw.png" /><figcaption>ChatGPT giving some helpful interval syntax</figcaption></figure><p>… and figuring out that getting the timing right was going to be critical otherwise the pump may stay on! Six iterations later, I finally had a working watering system:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xK7wMlVdO1vhyF1qWsICpQ.jpeg" /><figcaption>Future note, when adding pipe move to table away from laptop</figcaption></figure><p>After sending videos to everyone I know with much excitement, I set the kit up in the kitchen with the four hour sensor check time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gsHGrp_h7k0ExXJNrCIhqw.jpeg" /></figure><h3>Conclusion</h3><p>This was an extremely fun project, have given me a lot more confidence to play around with development boards and visit electronics shops.</p><p>Find my repo here: <a href="https://github.com/RLain/plant-tech-moisture-sensor/">https://github.com/RLain/plant-tech-moisture-sensor</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z0lm_ZIVjPLtvTWQ0SOfRw.png" /></figure><p>Next steps is to add the WiFi connection to the dev board and send messages when the sensor runs!</p><p>And look into new moisture sensors that may be more rust resistant.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13b15e3aa836" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>