I do the test in my room and it says that the humidity is 45 percent and it’s 26 degrees
Great. Nice and warm there.
How would you like the program to behave given certain temperatures or humidity readings? I imagine when it gets very dry or hot, you’d like it to apply water even if the moisture hasn’t dropped below the level that means the soil needs water? But there must be some moisture threshold that prevents us watering every time the humidity/temperature reaches a certain level to prevent over watering.
How do you see this working?
Yes in Romania this year was not winter, temperatures are 11-16 degrees plus. Atypical weather, it should have been minus 7-14 degrees,My grandmother came to the city for some analysis and she is always cold, I gave the apartment more heat. She is old(91) and i do all she needs to stay helthy
The watering part is already done and I am satisfied ,thank you :). Wat i want is to turn on a fan when it is over 50 percent humidity in the air or the heat exceeds 26 degrees celsius so we can lower the air humidity or heat:) can it be done?When is more than 26 degrees the fan to start and turn of when the air cooldown to25 degrees,and the same fan to start when the air humiditi is over 50 percent and to stop when it drops to 45 percent.
I think we need another relay for the fan,no?
It will be a dream come true, thank you very much my friend
Ohhh. So we’ll need another relay in the circuit trip control the fan. It’s time to get up for work but I’ll think about this before I’m home tonight.
Updated circuito project (with the second relay) is here: https://www.circuito.io/app?components=97,97,97,9088,9442,10167,11021,13322,417986,3061987,3061987
I’ll work on this a little later; I’ve got to change clothes, speak to my wife a little, have dinner…
Thank you very much friend, it’s not a rush ,when you have time
The fan relay module has been added with it’s signal pin attached to pin 7.
I’ve added three more operating parameters and I’ve commented them all for future reference:
#define FAN_ON_TEMP_C 26 // Temperatures above this value will switch the fan on.
#define FAN_ON_HUMIDITY_PC 50 // Humidity levels above this value will switch the fan on.
#define MIN_FAN_ON_TIME_MS 10000 // The minimum duration the fan should stay on for (prevents thrashing the relay when the conditions waver between on and off values.
relayModule
has been renamed to WaterRelayModule
and there’s a FanRelayModule
now to make things more obvious.
I removed the menu stuff because that’s not doing anything yet. With more thought I’m considering making one of the buttons a PAUSE button so that the system can be halted if it’s going nuts. I guess switching off the power would work as well. hehe
I’ve added the “F” macro on the fixed strings to save RAM.
I’ve added the DHT readings to the diagnostics so you’ll see the temperature and humidity shown there as well.
I put all of the fan control logic in a function called FanControl. There you’ll find the logic that controls how long the fan stays on for once switched on.
I hope it all works; I’m coding blind here without an Arduino or the components you have. I’d love to see it if you’re able to share some photos or a video. I get quite excited but I never see the end result of all the time I put into these projects.
Details on the fan control logic if you’re interested:
Without a real time clock (RTC) we’re just using the millis function to ask the Arduino how long it’s been (in milliseconds) since it was powered on. Because this overflows back to zero after approximately 50 days (the number can’t keep going up forever), there’s logic in there that will check the temperature and switch the fan on/off if the time mark for:
- When the time the fan was switched on is zero (which it is at program start and whenever we turn it off) and;
- if the millis now is after the time it was turned on plus the minimum on time, or;
- if the millis now is less than the fan on time (i.e. it overflowed to zero since we turned the fan on).
All that’s saying is that there can be times when the fan is on for less than the minimum on time. This can happen if the fan is turned on just before the millis overflows to zero. As soon as it overflows to zero we check the fan again and reset the on time.
The ino file is here for reference again: https://github.com/bernhard-hofmann/circuito.io-4045/blob/master/AutoWater.ino
Yes my friend,it work s
I have tested it and I think it is wonderful, I am very happy but we need a bigger lcd that can display all the values:) What larger lcd fits?
Or, we could add a new button, press it once the lcd to show the ldr and moisture press it again to show the temperature and humidity of the air, but a larger lcd will probably look better.I don’t know if i told you, but in the meantime i also bought a real time clock , i thought maybe it will be needed, so if it helps we can use it :).However something strange happens, it always irrigates, I put the sensor in the moisture gives values slightly higher than in dry land.
And the value is much higher than before. Before in moisture, the maximum value was max 680, now the value reaches 980.I think lcd does not display the temperature,humidity is displayed in percent only on serial monitor and not on lcd.
Please do not be mad at me
I’m not angry
There is a larger LCD option (20x4 rather than this 16x2 one) but I’d suggest you watch this video to see a selection of displays and choose one you like. The Nokia display might be best because it’s easy to read in direct sunlight, but you decide.
I’m so glad this is working and you’re so excited.
I remounted the wires again and copied the code again from github and now the irrigation works normally
And yes the Nokia display i think will be best i have already ordered the Nokia lcd(the blue one from the video:)
The display has arrived When you have time we can continue:)I think the menue must have a reset button too
I wish you a great day!
I’ve not done a reset button yet - one step at a time or it gets really confusing when things stop working. I’ve changed the code to support the 4 line LCD. I hope it works!
thank you very much my friend,i will test it immediately
I do not see the scheme, to do it with the circuito? Nothing bad can happen, right?
I can’t circuito change the location of the wires if I delete the old lcd and add the new one. I don’t know what to do
It works