The Entrepreneur Forum | Startups | Entrepreneurship | Starting a Business | Motivation | Success

EXECUTION Idea: Remote controlled automatic plant watering

Remove ads while supporting the Unscripted philosophy...become an INSIDER.

Lyinx

Bronze Contributor
FASTLANE INSIDER
I've Read UNSCRIPTED
Speedway Pass
Oct 28, 2019
358
433
194
Lancaster County, PA
Setting it up the way you envision (full remote control outside the home) is definitely possible to do, for an embedded system it might be easier to code another device (ESP32 or another low power chip with wifi capability) other than a raspberry pi due to the OS complicating things. However if you choose not to go that way and focus on only controlling one device when you're nearby then BlueTooth is probably your best bet. There are other methods such as Zigbee which could allow you to do mesh networking (to control multiple seperated devices at once) which would really help you market it as a modular solution to fit any type of garden. The chips are pretty cheap too.
As for market need, if it was fully automated so I could set and forget, then I for one would definitely be willing to pay for an effective, reliable and easy to use solution.
as long as I'm confident I'll get an email (if) there ever is a problem... such as the electric going out to that outlet (bad wiring?) or the water stopping on that line... or the hose breaking and water never reaching the plants... there's a million ways that it can go wrong, and then my precious plants die....

Questions:
what happens when electric goes out?
what happens when water goes out?
what happens when pi gets fried by lightning and can no longer function? do I get a note there is a problem?
what happens if water pump fails (pi still sends signal, but no water comes out)
what happens if pump works, but no water reaches plants (hose broke)?
what happens if plants get infected with bugs and die, but you keep putting water on it, but it doesn't get used... does it automatically send less water?
what happens when the plant grows and needs more water?

I love finding problems/ solutions.... the above are questions that any serious customer wants to have covered, but a lot of them won't think about asking.
 

Don't like ads? Remove them while supporting the forum. Subscribe.

jackBruh

New Contributor
FASTLANE INSIDER
Read Millionaire Fastlane
I've Read UNSCRIPTED
Jul 14, 2020
13
16
20
Australia
as long as I'm confident I'll get an email (if) there ever is a problem... such as the electric going out to that outlet (bad wiring?) or the water stopping on that line... or the hose breaking and water never reaching the plants... there's a million ways that it can go wrong, and then my precious plants die....

Questions:
what happens when electric goes out?
what happens when water goes out?
what happens when pi gets fried by lightning and can no longer function? do I get a note there is a problem?
what happens if water pump fails (pi still sends signal, but no water comes out)
what happens if pump works, but no water reaches plants (hose broke)?
what happens if plants get infected with bugs and die, but you keep putting water on it, but it doesn't get used... does it automatically send less water?
what happens when the plant grows and needs more water?

I love finding problems/ solutions.... the above are questions that any serious customer wants to have covered, but a lot of them won't think about asking.

Those are definitely good points and the final product would require a proper failure and risk analysis to find and mitigate those types of problems. To address your points...
1. Easy enough to have a small cell battery in case of blackouts to operate the microcontroller. Or a low battery notification if its a wireless setup (no power leads) to notify you to change/charge the battery.
2, 4, 5, 6, 7. Would all be solved by having a closed loop control system. This means simply that there would be a moisture sensor(or multiple) in the soil providing feedback to the controller (closing the loop). If the moisture goes out of bounds (either too high or low (if the pump dies per se)) then a notification can be sent.
3. Lightning is incredibly unlikely with a wireless setup. There is a *very small* chance of static buildup in the pipes from flowing water, however the risk of that actually causing damage to the pump (assuming its properly designed then it'd be made to handle it) or microcontroller (physically and electrically isolated from the pipes) is negligible.
 

Rabby

Platinum Contributor
FASTLANE INSIDER
Read Millionaire Fastlane
I've Read UNSCRIPTED
Summit Attendee
Speedway Pass
Aug 26, 2018
1,382
3,993
878
Florida
Hi,

okay, this isn't really something new, but during this summer vacation I felt a need for the following item that I would actually buy:

It would be really nice having a cheap automatic plant watering, where there is also the opportunity to control it from remote. I have a lot of sunflowers on my balcony which are quite thirsty in the summer months, needing watering every day.

The idea would be something like I lie somewhere at the beach, open an app on my phone, take a look at my plants through a camera and switch on my watering, or, alternatively, switch to an automatic program.

Out of curiosity and as a first shot I built an ad-hoc plant watering on my balcony (see video and pic), without any remote control so far.

View: https://youtu.be/nuq1i-I2zDA


View attachment 34658

The thing is very primitive as you might recognize at the first glance. It just consists of a small pump, a float switch, a small box which separates pump circuitry and float switch circuitry (via relay), a clock timer and wiring. Plus, of course, the mechanical parts (hoses and a valve).

The advantage: It was cheap (around 20€ for the electrical parts excluding the power supply, around 10€ for the mechanical parts), and I was able to build it quickly with recycled parts in under 1h.

As we are discussing ideas and basic concepts I would appreciate basic feedback for the idea of further developing such a watering device. As mentioned, I want to implement a remote control via android app, and on the mechanical level it would be cool having rather a kit with different-sized hoses, valves and hydraulic distributions.

With a Raspberry Pi for instance, one is able to devise a remote control via a couple of lines python code (Input/Output ports) that can be activated via app, and also to connect a camera (but I have not much experience with a Raspberry Pi so far). Of course that cannot be the actual solution if I want to scale this (?) since a Raspberry Pi costs between 80€ and 100€. Nobody would buy a plant watering for >100€ I guess.

Goal would be of course as always, developing something low-priced that fulfills an actual need.

Before I created this post I made some mandatory quick research of course, but I wasn't able to find something in this context that I would actually buy. If you have something like a link, I would really appreciate it.

This thread on the FLF was quite funny to read: Why did this product fail?

But anyway, thanks in advance.

I love this kind of thing. Automating daily, easy to forget tasks. I haven't read the rest of the posts yet, so I'm just responding to the initial post.

What I do for automatic watering (other than the lawn, which has in-ground irrigation), is use hose timers. I have one for the herb garden, one for two trees that need more water than the irrigation system delivers, and one to refill the water for our chickens. It's nice that I never have to think about watering, but of course there's no smartphone app or remote control.

A while back I wrote some code for an irrigation system that interfaced with "Control4", which is a home automation system. There are several of these home automation companies, and a whole set of contractors who install and maintain them. It might be worth looking at how they do business, and who their customers are - your business might be similar or different, and your customers might be similar or different. Could be worth knowing.
 

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
as long as I'm confident I'll get an email (if) there ever is a problem... such as the electric going out to that outlet (bad wiring?) or the water stopping on that line... or the hose breaking and water never reaching the plants... there's a million ways that it can go wrong, and then my precious plants die....

Questions:
what happens when electric goes out?
what happens when water goes out?
what happens when pi gets fried by lightning and can no longer function? do I get a note there is a problem?
what happens if water pump fails (pi still sends signal, but no water comes out)
what happens if pump works, but no water reaches plants (hose broke)?
what happens if plants get infected with bugs and die, but you keep putting water on it, but it doesn't get used... does it automatically send less water?
what happens when the plant grows and needs more water?

I love finding problems/ solutions.... the above are questions that any serious customer wants to have covered, but a lot of them won't think about asking.


This is a very good post. Btw I am very grateful for the replies and the interest in this thread so far. Is an indicator of sorts that this might be a project with potential.

I've implemented one of your suggestions in my circuit board. When the Raspy is disconnected accidentally, the pump gets switched off (realized it via relay). That was not the case with my previous design.

View: https://youtu.be/3cpkWOvXh4U


But there is still the problem if individual wires are disconnected by accident.

Needs some brainwork still. Needs plenty of brainwork. It's easy to build something that kinda works, but this device must be fail-safe to a great extent (beside the actual function that must be provided of course).

Getting your garden flooded or your plants killed would be absolute worst case scenarios.

Will be a very long development process. Just the possible options for the electronic realization are almost overwhelming for me (Raspy, arduino, Control4, etc. etc. ???).
 

Attachments

  • IMG_20200924_141851.jpg
    IMG_20200924_141851.jpg
    290.8 KB · Views: 2
Last edited:

jackBruh

New Contributor
FASTLANE INSIDER
Read Millionaire Fastlane
I've Read UNSCRIPTED
Jul 14, 2020
13
16
20
Australia
But there is still the problem if individual wires are disconnected by accident.
If you're worried about the sensor wires or wires you've got hooked up to the GPIO, don't be. They'd all be part of an IC (integrated circuitboard) when you manufacture it. If it's more complicated then that I'd be happy to look over a circuit diagram or the system in more detail if you'd like, I've got some experience with these types of embedded systems.
 

Lyinx

Bronze Contributor
FASTLANE INSIDER
I've Read UNSCRIPTED
Speedway Pass
Oct 28, 2019
358
433
194
Lancaster County, PA
This is a very good post. Btw I am very grateful for the replies and the interest in this thread so far. Is an indicator of sorts that this might be a project with potential.

can you test potential with teaser videos on certain facebook groups (gardening maybe?) and get responses from these people? or some other groups?

Will be a very long development process. Just the possible options for the electronic realization are almost overwhelming for me (Raspy, arduino, Control4, etc. etc. ???).
add one more to the list: custom module board, custom made for your project...

another use - can you use this in any kind of industrial application?
 

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
So I solved the VPN issue today. Can control my Raspy respectively my watering device from everywhere in the world. It is really remote controlled now.

It was not so difficult as expected after doing some research about cryptic abbreviations like DNS, DHCP and IPv6.

For the case someone is interested: I use an OpenVPN app on my Android smartphone and the Pi VPN bash script on my Raspy.

I had to customize my router heavily to make it work. I don't want to do that again. I must find a way that the average user (my potential customer) don't has to make this preliminary work by himself.

Even mentioning stuff like "IP-adresses" will put many people off, when one wants just something time-saving and convenient for his garden/mini-farm.

can you test potential with teaser videos on certain facebook groups (gardening maybe?) and get responses from these people? or some other groups?


add one more to the list: custom module board, custom made for your project...

another use - can you use this in any kind of industrial application?

Yes, at this stage my device/electronic is kinda generic and basic.

Currently it controls a pump. But it could be used to control a valve, other circuit boards, etc.
 

Attachments

  • VPN_RaspberryPi.jpg
    VPN_RaspberryPi.jpg
    76.6 KB · Views: 3
Last edited:

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
The idea would be something like I lie somewhere at the beach, open an app on my phone, take a look at my plants through a camera and switch on my watering, or, alternatively, switch to an automatic program.

Want to make a first short summary here, since I was able to realize the idea from my first post into a functioning first prototype. Remote control is now possible.

I created a small graphic to illustrate it.

The next step would be making a short promo video to present the idea in a fb group etc. and implement further improvements (especially regarding the water supply, hoses, valves etc.).
 

Attachments

  • AutomaticPlantWatering_schematic.JPG
    AutomaticPlantWatering_schematic.JPG
    60.6 KB · Views: 4

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
So in order to hold myself accountable here my next video, this time a little edited.

View: https://www.youtube.com/watch?v=1WZ-Sh3vakM


Hopefully it is not too poorly edited, because my editing skills are almost zero. The next video will surely be better.

The text in this video is in German, since I want to share it in a German FB group. Feedback there gives me hopefully a first glimpse about the general interest for such devices.
 

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
Creating Raspy scripts

I've written my first python code snippet that isn't super trivial and works okay.

So far I am not quite sure if an extra smartphone app is really necessary or first priority. The "RaspControl" App works just fine, and there is a SSH-Shell at my disposal within the app.

So I can create a shell script (simple text file), and then execute the python script with something simple and self-explanatory like "./watering30s" on the command shell.

Executing a shell script demands almost no technical skills, but is of course not as sexy as a graphical button on your smartphone.

Remote access via VPN

So I thought further about the issue with plug&play ability of the device. I think that is not possible to realize 100%. The problem is the router. Everyone has a different one at home.

Port forwarding, static IP-Adresses etc. All this is mandatory to adjust.
But that are not easy matters. Worst thing: one might fabricate unknowingly security leaks by modifying his router.

Yet I could offer something like a service for a potential customer. A full package.

A visit at home, install watering components, HW and SW and he has to do nothing by himself.

If he allows me to have further remote access to his Raspy (easy to realize via further VPN certificate on my smartphone), I can even offer to do a continued service (updates, new and better scripts etc.).

Good idea?

Further thoughts

In the current state, my device is not far superior to a much simpler device that works just by a timer clock.

In addition to the camera (for instance), I need sensors and scripts that allow a fully automated system as well. Cool would be also a control for the water valve (I have to adjust it manually at the moment).

In any case something with distinguishing features which make it really useful and comparatively easy to handle.
 

Attachments

  • Screenshot_20201001_103443.jpg
    Screenshot_20201001_103443.jpg
    396.3 KB · Views: 3

jackBruh

New Contributor
FASTLANE INSIDER
Read Millionaire Fastlane
I've Read UNSCRIPTED
Jul 14, 2020
13
16
20
Australia
Remote access via VPN

It'd probably be better to just send a command to the pi rather than take control of it over the web. ie send it a message instead of logging in. Look up TCP or go on relevant forums to get examples/advice of people doing this. It'll just require the device connecting to their wifi (only password needed) rather than the messing around with a vpn.

In the current state, my device is not far superior to a much simpler device that works just by a timer clock.

In addition to the camera (for instance), I need sensors and scripts that allow a fully automated system as well. Cool would be also a control for the water valve (I have to adjust it manually at the moment).

This is where the control system comes in. It'll take some testing on your end to get a range of values for the sensors. And probably some initial calibration by the end user (probably in the form of "Water the plants till full capacity then press the button to confirm maximum moisture levels"). Your code for the control system would probably look something like the diagram (obviously with more steps and transfer functions and error checking at each stage). I've included it just to show that it doesn't have to be too complicated.
 

Don't like ads? Remove them while supporting the forum. Subscribe.

Attachments

  • Capture.PNG
    Capture.PNG
    22.8 KB · Views: 2

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
It'd probably be better to just send a command to the pi rather than take control of it over the web. ie send it a message instead of logging in. Look up TCP or go on relevant forums to get examples/advice of people doing this. It'll just require the device connecting to their wifi (only password needed) rather than the messing around with a vpn.


Hm, different approach to the task. Much less control for the end user.

Probably better, so nobody can mess up the whole system accidentally.

Tbh I am not really comfortable anyways with the idea that someone running shell scripts on a remote system without having some basic comprehension about how it works.

Thanks for your suggestions.


This is where the control system comes in. It'll take some testing on your end to get a range of values for the sensors. And probably some initial calibration by the end user (probably in the form of "Water the plants till full capacity then press the button to confirm maximum moisture levels"). Your code for the control system would probably look something like the diagram (obviously with more steps and transfer functions and error checking at each stage). I've included it just to show that it doesn't have to be too complicated.

This seems an okay sensor. I'll think it is good enough to make some first basic tests with it. Will report :).

 

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
So I made a first short test with the soil moisture sensors. These kind of sensors are basically resistors, what brings some disadvantages. But they are not very expensive.

Of course there is the problem that these sensors had actually been developed for an Arduino. And an Arduino has an Analog/Digital Converter. The Raspy has none.

Raspy understands just High and Low. A value like 1.5V is of no immediate use here.

Options are either ordering an Analog/Digital converter board (around 8 Euro), or develop some extra circuitry myself that just decides:

Soil wet enough (>threshold) --> switch to 3.3V (High)
Soil not wet enough (<threshold) --> switch to 0.0V (Low)

These conditions can easily be read by the Raspy.

Interesting question. My moisture sensors are rather inaccurate, so a precise resolution by an A/D converter makes not much sense anyway.

The threshold could be implemented by the user, either manually or somehow via SW. Have to think about it.

Sorry for the tech-babble, I can better sort out my thoughts when I write something down :-D .
 

Attachments

  • Soil-moisture-sensor.jpg
    Soil-moisture-sensor.jpg
    224.1 KB · Views: 2
Last edited:

jackBruh

New Contributor
FASTLANE INSIDER
Read Millionaire Fastlane
I've Read UNSCRIPTED
Jul 14, 2020
13
16
20
Australia
Options are either ordering an Analog/Digital converter board (around 8 Euro), or develop some extra circuitry myself that just decides:

Interesting question. My moisture sensors are rather inaccurate, so a precise resolution by an A/D converter makes not much sense anyway.
Definitely go with an ADC. Inaccurate in what way? If its a steady state error than it can easily be compensated for in software
 

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
Definitely go with an ADC. Inaccurate in what way? If its a steady state error than it can easily be compensated for in software

I have no long-term experience with these sensors, but what I've researched is, that resistor-sensors are prone to corrosion and wear. So a value shift over time seems a possible scenario (better would be capacitor-sensors, but they are, you guessed it, more expensive).

And I assume that none of these sensors are identical twins (did you mean that with steady-state error?). So I probably have to adjust every sensor manually in some way. I don't know exactly of course, I must gain some experience first.

But ADC seems the only practical solution. I' ve found one for 7€ (see attachment). Uses the I2C bus (Raspy has one I2C input; not difficult to handle).

This device has 4 inputs for sensors, what might be not enough for the end-product. And 16bit resolution is of course oversized. One bit step is something like 0,00005V, if I use the 3.3V supply.

But 7€ seems acceptable, since there are my self-imposed cost constraints (100€ maximum). I'll order this device and I'll make some tests with it.
 

Attachments

  • AD-Converter.JPG
    AD-Converter.JPG
    92.5 KB · Views: 2

jackBruh

New Contributor
FASTLANE INSIDER
Read Millionaire Fastlane
I've Read UNSCRIPTED
Jul 14, 2020
13
16
20
Australia
I have no long-term experience with these sensors, but what I've researched is, that resistor-sensors are prone to corrosion and wear. So a value shift over time seems a possible scenario (better would be capacitor-sensors, but they are, you guessed it, more expensive).
Damn that's annoying. Not much you can do about that.
And I assume that none of these sensors are identical twins (did you mean that with steady-state error?). So I probably have to adjust every sensor manually in some way. I don't know exactly of course, I must gain some experience first.
Yeah that's pretty much what it is. If the error changed with temperature then it'd be a temperature dependant error. If it was always 2% off then that'd be a steady state error (for example if your speedo was 2km/h fast). The sensors probably will be different, and different soils might give you different readings, so you'll probably have to have a user calibration protocol that they can run to tune it to their soil and garden. That'll save you testing the resistance of each sensor then adjusting the code beforehand.
 

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
I've integrated the AD-Converter now. Here a short demo video:

View: https://youtu.be/AJNGpfgUX2k


What you see here executed is just a rudementary python program, rather for demonstration purposes.

The analog measurement range for the moisture sensor (that is basically just a resistor) is from 0.0V to 3.3V.
That means:
Completely wet approximately 3.3V 1.7V. Completely dry approximately 0.0V. "Half-wet" 1.65V 0.85V (values according to datasheet).
Threshold for pump-activation I set more or less arbitrarily on 1.1V (1/3*3.3V). Needs further calibration of course.

I am "simulating" the water-pump (respectively the electronic amplifier, the pump needs 12V) with the volt-meter since I have presently no plants on my balcony.
That means:
Pump on: 3.3V. Pump off: 0.0V.
 

Attachments

  • AD_Converter.jpg
    AD_Converter.jpg
    212.4 KB · Views: 2
Last edited:

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
For everyone who is still here another progress video :) . Sorry, quality isn't that good but I hadn't much time to edit it properly.

View: https://youtu.be/HDJ8SDvuH48


Implemented in this prototype (i.a.):
  • Remote control via VPN
  • Small python program with a watering sequence
  • Soil moisture sensor(s) + A/D-Converter
  • Floating switch (switches off the pump if water level is low)
  • Camera
  • Relay for switching off the device, in the case of a fault (covers not all faults)

That seems for the most part what I'd originally wanted to develop, respectively implement.

Hm what's a next step? Not really sure about it.

This ad-hoc DIY electronic amplifier must be improved for sure. For proper tests I need a printed circuit board. Fortunately there is a free SW out there (Eagle) where I can design boards and then outsource the manufacturing process itself. Idk about the costs for this so far.

A graphical app with buttons etc. would also be a nice feature. SSH-shell is super-unsexy, and you can cause much trouble in the system unintentionally. Don't know yet how to do this, but can't be rocket science.

And of course I need more long-term experience with the sensors and write some robust control code to automate it entirely (to pick up the suggestion from @jackBruh).

Not even sure if I should stick with the Raspy. Maybe I'll try another system out as well.

Wish everyone a nice weekend.
 
Last edited:

jackBruh

New Contributor
FASTLANE INSIDER
Read Millionaire Fastlane
I've Read UNSCRIPTED
Jul 14, 2020
13
16
20
Australia
Stick with the pi, you're familiar with it at this point. You can always hire a programmer off fiverr to convert it to a different language when you start producing it later.

For learning control, watch the first two videos here (click the link to open the playlist)(there's a surprise for you in the second one)
View: https://www.youtube.com/watch?v=oBc_BHxw78s&list=PLUMWjy5jgHK1NC52DXXrriwihVrYZKqjk&index=1


Then look at this tutorial (I haven't used it personally but it looks like it's got everything you need to know) Build a PID Controller with Python 2019 – Onion
A PID controller is all you would need really.


Hm what's a next step? Not really sure about it.
Get the controller working properly. Then once it can operate in all the conditions you'd like, set it up so it can be controlled without SSH (That's probably the last step in prototyping since its not crucial for operation)
 

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
Ah, I remember my control theory lectures 15 years ago.
Almost every student had a distaste for control theory :) .

But I can recall some theoretical background. I remember a good control has small error value, short settling time and small overshoot.
Transferred to my watering device it that would mean (simply put) no overwatering or no watering at all.

I also remember PID-controller was a kind of universal weapon for most processes, right?

Hm. I am not quite sure, but if I had to model the dry/wet soil incl. plantings mathematically I would guess it is just PT1 behaviour. So a PI-Controller might be better suited ("D"-component causes troubles sometimes, oscillations etc.) - but a couple of practical tests should deliver an answer to these questions.

I'll report back when I generated some results.
 

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
So it gets more into maths now: made first tests with the sensors ("step responses"). The controlled system (soil) shows first order lag element behaviour.
What entails a rather trivial control. A simple P-controller can be a sufficient solution. Question is how to implement that. Just switching on the pump for x seconds isn't yet a P-controller.

What I need are sets of reference inputs, the thresholds for switching on the pump so to speak. Dependent on different kinds of soil, planting etc. So a lot of testing is inevitable.
 

Don't like ads? Remove them while supporting the forum. Subscribe.

Attachments

  • Step-response-moisture-sensor.jpg
    Step-response-moisture-sensor.jpg
    43.6 KB · Views: 3

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
I generated the graphic with the following simple code, and then copy&pasted the output into Excel.

Tricky is here not the code, but where to place to moisture sensor in the soil to get useful results.

import RPi.GPIO as GPIO
import time
import board
import busio
import adafruit_ads1x15.ads1115 as ADS
from adafruit_ads1x15.analog_in import AnalogIn
# Create the I2C bus
i2c = busio.I2C(board.SCL, board.SDA)
# Create the ADC object using the I2C bus
ads = ADS.ADS1115(i2c)
# GPIO.BCM - verwendete Konvention: nicht Pins, sondern GPIO-Nummern
GPIO.setmode(GPIO.BCM)
# Variablen
i=1
# feuchteWert1=0.0
print("*** Ermittlung Sprungantwort Feuchtesensor ***")
# Create single-anded input on channels
chan0 = AnalogIn(ads, ADS.P0)
GPIO. setup(5, GPIO.OUT)
GPIO. output(5, GPIO.LOW)
while i<300:
print(i, "Sens1: ","{:>5.3f}".format(chan0.voltage))
# feuchteWert1=chan0.voltage
time.sleep(0.1)
i=i+1
GPIO. output(5, GPIO.HIGH)
 
Last edited:

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
Here's a short video that summarizes the results with the project so far (the other videos are not longer available).

View: https://www.youtube.com/watch?v=FirQ23VTQU4



Video-editing is a lot of work and I do not know much about it - but I'll try to improve here as well. Btw there are a lot of videos on YT about plant watering and similar topics, and some of them have tens or hundred thousands of clicks (take a look at this video for example).

Anyway, there are a lot of improvements that need to be done:

The automation is anything but trivial. What if someone pulls out the moisture-sensor? The system thinks the soil is dry and starts watering. Therefore I have to implement further safety mechanisms and plausibility checks.

And what if I have three or four sensors? How do I calculate a variable out of that? I don't want to have a complex hydraulic for watering individual plants because they'll make the system expensive. Quality hydraulic is much more expensive than the electronics.

Additionally, there is always a current through the sensors by default, which leads to quick aging of the sensors (that has to do with chemical processes). Therefore I have to invent a logic that switches on the sensors on demand only.

A lot of work, but I don't think I'll post anything for the next weeks, in order to keep this thread concise. To many details will be too tedious I guess.

EDIT: Replaced video with a better edited version
 
Last edited:

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
So I started this thread on August 29, that means it is exactly 2 months old.

With the prototype (that works quite well by now) I made some further improvements:

1. switching on the moisture-sensors solely "on demand" (otherwise they corrode very fast)

The solution was basically very obvious here. I just connected the sensors directly with the GPIO-ports (I just have to take care that the maximum current doesn't exceed 50 mA).

2. second electronic amplifier implemented (for e.g. a second pump, not used yet; a more powerful pump needs usually 12V and 1-2A, the Raspy can only provide 5V maximum)

I attached a schematic, if someone is interested in the practical realization. It is just a basic amplifier that one can find easily in a textbook about electronics. No rocket science or something

The assembly of the electronic board is still DIY (tinkering), as you might recognize on the attached photo (on the right there is the Raspy+camera; the tiny board is the A/D converter).

But there is a (for the most part) free SW available ("Eagle light") with which one can design so-called PCB ("Printed Circuit Boards"). Such boards could be manufactured in small batch series. I already experimented a little with this SW, and my PCB doesn't look that ugly I would say (attached also a picture).

Next steps:
- improve my python-code and get closer to the goal of a partially or full automated system
- make better and digestible videos that presents how this device basically works
- develop a super-convenient GUI for the smartphone (very last step)

Hope it made my thoughts somehow clear :). I'll do an update here in 1-2 weeks I think.
 

Attachments

  • Prototyp_291020.jpg
    Prototyp_291020.jpg
    178.9 KB · Views: 3
  • Prototyp_Schematic.JPG
    Prototyp_Schematic.JPG
    79.6 KB · Views: 3
  • Prototyp_Board.png
    Prototyp_Board.png
    179.2 KB · Views: 3
Last edited:

Lyinx

Bronze Contributor
FASTLANE INSIDER
I've Read UNSCRIPTED
Speedway Pass
Oct 28, 2019
358
433
194
Lancaster County, PA
ran across this company and had to think of you... Super Deluxe Controller - FarmTek
also checkout their other things, if anyone has an industrial version that is close to what you are making, they would be it...
and if they don't have it, they might be interested in a solution for large scale projects and/or for greenhouses to sell to customers
 

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
ran across this company and had to think of you... Super Deluxe Controller - FarmTek
also checkout their other things, if anyone has an industrial version that is close to what you are making, they would be it...
and if they don't have it, they might be interested in a solution for large scale projects and/or for greenhouses to sell to customers

Hm...

Maybe it is my lack of skills with the English language - but if I read solely the manual, it would be really hard for me to tell what the device exactly does.

The design of that HP also looks a little weird. Maybe it's just me, but that page, that small flash video and the video content itself don't make a very convincing impression on me. Doesn't really look like they are offering state-of-the-art products at the first glance.

And then the price of about 250$, I don't know.

Anyway.

I didn't do much with the prototype in the last one and a half weeks - except for ordering some PCBs in China. It is a quite easy thing to do: you just upload the so-called Gerber files (CAM files generated in Eagle) on a HP of a respective manufacturer and they'll do all the work for you. I paid 2$ for five PCB, and 14,80$ for shipping.

I experimented a little with python, but I reached a bit of a dead end tbh. The manual program works okay. I can water, I can request sensor-values (without wearing down the sensors), and I have a couple of safety mechanisms implemented.

But my automatic program is still not superior to a simple timer clock.

Automation with a sophisticated control loop is a tough thing to do, and I am not sure if it is realizable or even desirable.

How to solve e.g. the problem that someone (accidentally) pulls out a sensor (would be interpreted as dry soil and program starts to water). Okay, a solution might be here that the program could label leaps in sensor values as somewhat unplausible and displays a warning message instead of watering.

One would also have to place the sensors in a proper spot in the soil. I mean the spot must really be chosen carefully, otherwise the control loop will work poorly no matter how scrupulous the SW is developed. Can I expect a customer to do such kind of a preliminary work, or to do some test-runs with his device by himself?

I think it's quite obvious that every customer would need a lot of individual customization in the case of a fully automated program.
 
Last edited:

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
So the Hong Kong PCBs arrived today. 2$ for 5 PCB.

The current prototype will now resemble slightly more a finished product and doesn't look like that ugly ad-hoc assembly any more (you can see that on the left in the picture).

I've rewritten entirely my automatic program. Now it does monitor the sensors in a fixed cycle time (5 seconds monitoring, 5 minutes idle time; then start over), and if the soil moisture is below a threshold it will water.
I've also implemented an plausibility check (for e.g. valve is closed, sensor is pulled out etc.). Let's see how this works.

Right now I am doing a several days testrun to see if my program is somehow functional. This test run is also meant as kind of a durability test.

That's all for now.
 

Attachments

  • PCB_prototype.jpg
    PCB_prototype.jpg
    259.4 KB · Views: 4
Last edited:

Bombastik_80

Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Nov 12, 2019
39
45
107
Germany
So here you can see a short summary as I am working since almost three months on this project (green: finished/available; yellow: has to be improved; red: completely missing):
Architecture.JPG
I do not make any practical tests for the time being because of the now freezing temperatures outside.

But I'll do programming for the next weeks.

The python sequences on my RasPi are working fine (have one automatic and one manual program), though (naturally) there is always something that can be improved (especially the control loop, so my check mark isn't green but yellow :) ).

Every python sequence can conveniently be started through the SSH-shell that is provided by a free RasPi App (you just need the "nohup" command for this - otherwise your program gets aborted when you close the RasPi App).

But of course, the SSH-Shell is unsexy. Graphics, Buttons etc. would be cooler.

So I made my very first tries with Android Studio this week. But it is very obvious that my skills are too limited in this case. I spent half a day just barely setting up the developent environment, and didn't write one single line of code so far (my knowledge in Java and Kotlin is zero).

Hence as already suggested in this thread, I very likely outsource this endeavour to a specialist when it is exactly clear what the App should do.

Another thing was that I created a blog article on my HP about this "invention". I have no clue if I can somehow gauge interest via google analytics for these kinds of devices (or get a better idea about certain keywords), but it is worth a try I guess.

That's all for now. Thanks for reading and nice weekend.
 

Sponsored Offers

  • Sticky
MARKETPLACE Fox Web School "Legend" Group Coaching Program 2020
My friend was just looking for this information. Thanks
  • Sticky
MARKETPLACE Lex DeVille's - Advanced Freelance Udemy Courses!
If you read the last message then you know I'm removing my courses from Udemy next month. You...
  • Sticky
MARKETPLACE You Are One Call Away From Living Your Dream Life - LightHouse’s Accountability Program ⚡
This program helped me to triple my revenue over 7 months while also moving to a new city in the...
  • Sticky
MARKETPLACE Grow Your Business With a Book (An Unorthodox Marketing Strategy That Built One of the Largest...
PS. what do you think about the idea of setting up live Busking experiences on Air BNB? I could...
  • Sticky
FEATURED! Introducing... WEALTH EXPO$ED, A Short Story By MJ DeMarco
Hi Mj, I just bought it. And reading it. I think is a great idea to write using the stories to...
  • Sticky
MARKETPLACE Kill Bigger Incubator
@Kak Thanks for the reply. Whats interesting is that I have an idea that's been cooking which...



Forum Sponsor

sponsor

New Topics

Fastlane Insiders

View the forum AD FREE.
Private, unindexed content
Detailed process/execution threads
Monthly conference calls with doers
Ideas needing execution, more!

Join Fastlane Insiders.

Top Bottom