February 22, 2017 at 8:26 am #45450
I’ve been running a couple open sprinkler units to control irrigation in my greenhouses basing irrigation off time. I am wondering what it would take to add light sensor to an opensprinkler unit then run irrigation based on accumulated light. The problem is at this point I’m guessing each morning how many of the daily programs to enable based on the weather, mostly how much sun.
My programming and electronics ability is limited to a class on in BASIC and some limited experience tinkering.March 15, 2017 at 9:05 am #45568
The firmware currently supports the following:
– using a sensor (such as rain sensor, water level sensor) to ‘stop’ watering
– using a program switch (such as a push button) to ‘start’ a particular program.
You mentioned you want to use accumulated light, but do you want to use accumulated light to control the duration of the water time, or to trigger a program as soon as the accumulated light exceeds some predefined threshold?March 15, 2017 at 12:12 pm #45587
Could you explain the accumulated light logic a bit? Like what exactly are you looking for, the hours of sunlight till now? Or how many hours total during the day? Would cloud cover effect this drastically or would a simple cloud cover percentage adjustment work?
The reason I ask is this could likely be done by modifying the weather program and not needing an additional sensor at all. However, if it is for an indoor setup with artificial light obviously that idea would not necessarily work.
Another approach would be to have light accumulation act like a flow sensor of sorts and then the program could be adjusted based on that. What it comes down to though is exactly what you are trying to do.
So do this for me and I can probably bang out a quick modification to the firmware for you: Explain your setup, what you want to do, what you are measuring, and what you expect to happen.
For example, I have and indoor setup with artificial light that needs to be watered. I would like to water once the plants have been exposed to about 4 hours of light. I am measuring the time the lights are turned on. I want the water to only run every four hours of light exposure, even though it changes daily.
Or my outdoor greenhouse needs water whenever the sun has been shining on it for x number of hours. Clouds would change the measurement a little but estimating total exposure would be fine.March 18, 2017 at 8:53 am #45625
I’m currently growing tomatoes, peppers, and tomatoes in coir slabs in fairly small greenhouses. The water amount required varies considerably day to day based mostly on light (other variables are mostly controlled or dependent on light).
Add a light meter, and every time it accumulate a set amount of “lux” a irrigation event is triggered. The lux is light intensity per amount of time. When the sum of this reaches whatever the set threshold is, it triggers a 1-2 minute irrigation event.
I think you would add a number every time the controller reads the light sensor. When that number reaches a set number it triggers an irrigation event and resets to zero
This would be a large improvement as the irrigation controller is responding to conditions the plants are facing. On a sunny day it may need to water 5-10x per hour and a cloudy day 2-5x times per hour.
This needs to based on a local light sensor, because it has to respond to intensity of light. The amount of clouds vary so much over a couple miles or few minutes.March 18, 2017 at 12:57 pm #45626
Perfect explanation of what’s going on and how you’d like it to work. I am almost certain this could be accomplished by sort of modifying the current flow sensor functions. For that approach I would need to know a couple of things about your sensor and how you would like to approach the “when it needs water” problem.
First can the sensor be set to output a signal once a certain threshold of light is met? Say I reach the 10k lux limit to trigger watering does your sensor send 10k or a digital 1? If it sends 10k does it send thousands of pulses until it reaches that amount or does it figure the total and send only the total?
My assumptions are the sensor is sending an analog voltage value for the current lux, so we may need an analog to digital conversion because the standard sensor input for the OS is digital only. Then it is as simple as setting a threshold to water and counting pulses until the threshold is reached.
If that is correct the next thing we need to know is how important is it to accumulate light levels during a watering event? Should we stop measuring the light while watering and then start again? Or should we keep accumulating during a watering event? If we do it the second way what happens if it triggers again while watering? Do we only focus on the current water needed, should we add to the water needed, or do we stop where we are and start again very quickly with the new information?
Okay that seems like enough questions to get the info needed to make it work for you. If I’ve missed what you are looking to do entirely don’t be afraid to let me know. I’d much rather do this right once than have to tweak everything 1000 times. Thanks again for your patience and I’ll definitely get this going for you once I know I’m looking at the problem correctly.
If you already have a light sensor you wish to use or are currently using, could you send me the model number? Then I can look up the data sheet and actually answer pretty much everything I would need to know about the sensor.March 18, 2017 at 4:25 pm #45628
1. I don’t have a particular sensor in mind, as long as it measures visible light it will work. I’ve looked at a few different options something like this https://www.amazon.com/Adafruit-Digital-Light-Luminosity-sensor/dp/B00K9M6PZ8 . At this point I’m more concerned a reliable program and sensor. If you know of a better solution, run with it. The cost is not a huge factor.
2. For control I need to be able to easily adjust the trigger variable. The plants grow through the season and their demands change. I will base number based excess water running out of the trough.
3. At the hottest part of a summer, during the middle of the day it should not be running less than every 10 mins for 2 min irrigation events. So it would be alright to start counting again immediately after an irrigation event is triggered. However, in the event an event is triggered during an watering event, starting again would not be a problem.
BTW when we get a running prototype. I will be willing to send you something for your time. We are a small business, there is value in this running properly.March 20, 2017 at 12:19 pm #45641
Okay sounds like enough to run with, I actually didn’t disappear sorry just got busy yesterday and never got back on here. I did however research a few different options for sensor just so I have a good idea of what is cost effective and will actually not die the first week in action. I do like the adafruit sensor package as they have worked well for me in the past and seem to take more abuse than designed for virtually every time. I’ll get started on programming tonight and should have something working pretty quickly. Ray and Samer have done a great job of keeping things organized well enough to work with easily.
As always this project is an open-source project and I am a huge proponent of never requesting a fee of any sort, I do appreciate mention if you like to do that kind of thing but honestly I would prefer you keep attention and support going to the guys that really made this idea possible. Without them I’d simply be bored and spending the time on some other money sink. Full disclosure Ray has also been very generous to developers with getting test rigs and other assistance so please do not in any way feel obligated to ever send anything other than a well meaning thanks. I do this in my free time so you are honestly saving me tons of money giving me focus on something to do.
I actually have the exact sensor you mentioned so let me dig it up and get going. Thanks for the opportunity to help someone else in the community.March 22, 2017 at 2:22 pm #45659
Alright so I was working out how to do some of the conversion from I2C data to a simple digital threshold signal for triggering the sensor port on the OS. Then I took apart the unit and low and behold it has an accessible I2C interface right above the LCD. This seems to exist on all of the units, according to documentation from Ray.
How handy are you with a soldering iron? It would literally be a 10 min addition to the unit if you could add pins to the SDA and SCL ports.
I’ll keep plugging ahead with both ways, but honestly if you were able to add some pins to those ports it open up a ton of other sensors to use as well. I2C is just a highspeed serial like interface if you aren’t super familiar.
Anywho I learned something so that’s fun, and I have what I would call a very hackish method working right now, so maybe another day to clean up code and figure out how to make it smaller so it fits on the OS for all the HW versions.
Let me know if you can solder or would be willing to send it to me and I’ll do it and send it back. I’m super interested in seeing this working for real. It works on my test unit, but I have the DC version 2.3March 22, 2017 at 8:36 pm #45663
I’ve replaces a few capacitors and repaired a few electronics over the years, so I should be able to handle adding pins.
Was going to ask which unit you were working on. I have two of the standard AC units running in a couple locations.
Really looking forward to adding this capability to the open sprinkler units running greenhouses. This capability is going to make me even stronger proponent of OpenSprinkler on some of the vegetable and grower forums and groups that I’m involved in. This really fills a capability gap for small greenhouse vegetable growers.March 23, 2017 at 12:56 pm #45667
I have both the 2.1 AC and 2.3 DC versions, but I can also simulate the hardware for firmware testing on my old Linux box. So as long as it runs on the old box it’ll go on any of the hardware versions.
Knowing that you are more than capable of putting in a couple of pins I should have something ready and tested on my end for you by Monday. I’m currently using the TLS2561 (the same sensor Ada fruit sells without the breakout) as the sensor. Right now I’m working out a nighttime accumulation problem. The sensor has such a great range it picks up my landscape lighting and triggers watering overnight. I would guess this isn’t a serious problem for once or twice type of triggers, but as the system scales it would run the potential for wasting a lot of water. That and the promotion of fungus growth could mean a real significant loss for small growers.
Pretty sure I can just work out a lower boundary and get it to stop, or use weather data from a connected system to get sunset time and stop watering.
Okay back to the fun that pays the bills, I’ll get back at this stuff after I’m off.
- You must be logged in to reply to this topic.