I need help in creating the program of an automatic irrigation system with lcd

I have a curiosity, the humidity level could be displayed in percentages, 30%, 35% etc
If it is hard to do, it is very good and as it is now :slight_smile:

I have an idea, if instead of moisture, lcd displays’ soil dryness lvl , 'dryness lvl, or ‘dry land lvl’, then in fact it will tell you how dry the land is, so the values ​​displayed will be good :slight_smile:
Higher values ​​equals more dry land and lower values ​​less dry land
This can replace the lcd percent display, if it is easier to do :slight_smile: The percent display would be nice, and will also fit “dryness lvl”, but I don’t want to exaggerate :)I apologize for the many requests, I hope I didn’t upset my friend
I think if i replace in the code where it writes moisture with dryness lvl will work ,ok?

1 Like

You’re not upsetting me buddy - I was just absolutely exhausted last night.

I would encourage you to try make changes to the code, particularly to text inside quotes. You can always replace it with the code from GitHub and start again.

My plan with the three buttons was to use them as

  1. Menu
  2. Yes
  3. No
    And with that you could control some things manually. Imagine:
  • Press menu -> Water now?

There’s obviously more you can do and that’s down to your/our imagination. But it’s not necessary really so if you want you can remove them from the circuit.

Will the humidity sensor be necessary? I imagine the moisture/dryness of the soil would be enough to determine whether to add water. Will you be able to test this at home for a week or so before installing for your grandmother?

Ok, i think that the three buttons are not really necessary(but i would love to have them😜). About the air humidity, the sensor is necessary because i wanna see the air humidity level so we can install a fan to lower the humidity when necessary. Maybe our display is too small for all these ? And I will test the system before install it to my grandmother.

I’m going to assume you have a DHT22/11 Humidity and Temperature Sensor. Please let me know if you have a different sensor. I’ll add the button menu and humidity readings on the LCD. With the humidity sensor, the circuito circuit looks like this now:

https://www.circuito.io/app?components=97,97,97,9088,9442,10167,11021,13322,417986,3061987

The difference is that I’m assuming you’ll put the DHT sensor on pin 6 to avoid having to rewire all the other components. It might be better if we stick to the diagram in circuito to avoid confusion though. Would you be okay moving the connections to the Arduino to different pins?

1 Like

When you get a chance, could you write out how you want the menu to work? For example, given these three buttons:

image

Pressing the Menu button without anything else would cycle through these options:

  • Pause?
  • Water?
  • Test?
  • Restart?

Pressing the Select button selects whichever option is showing on the LCD.

Pressing the Close button closes the menu if it’s open.

Hi, i have a dht11 sensor, it looks like the one in the circuit :slight_smile: but it is not identical I think it is dht11, not dht22 / 11. But I think it does the same thing
I will do the circuit, mount the sensor and copy the new code to see if the DHT sensor works and I will tell you what happened. Regarding the menu, I think it’s perfect as you proposed to work :slight_smile:

the dht11 sensor I have, only has 3 feet, not 4 as the dht22. Do you think it will work, or should any changes be made in the code
I think i have a module DHT11 sensor
Anyway i will try with him and see what happens :slight_smile:

I will buy a DHT22 sensor in a few days,I saw on youtube that it is much more efficient than DHT11

I think the relay is at the arduino 5 and the button at the arduino 6, not as on the curcuito diagram
If I do the scheme as in the circuito, the relay does not work.
I read in the code this line:#define RELAYMODULE_PIN_SIGNAL 5,and so I suspected that the relay should be put on the arduino 5.I have also fitted the dht 11(i think is a module DHT11 )that I have, but if it doesn’t work, the days that follow as I said above, I will buy the dht22. Thank you very much my friend, I can’t wait to see the project 100 percent functional:)

I was not able to make appear on the LCD dryness lvl instead of moisture, it was not as easy as I thought :slight_smile: Can you give me a clue, to know how to do it?

relay to arduino5 pushbutton to arduino 2 and dht to arduino 6,is ok?

The DHT22 has arrived :slight_smile: image

I’m so sorry I’ve been so busy at work I’ve just not had the energy left for this. I’ll try tonight after work.

Hi, it’s not a rush. When you have time.Anyway I am thankful for everything :slight_smile:

Hi Cosmin

I’ve finally got a few minutes free! \o/

I’m assuming from now on that we’ll be using the circuit defined above (I need help in creating the program of an automatic irrigation system with lcd) which is https://www.circuito.io/app?components=97,97,97,9088,9442,10167,11021,13322,417986,3061987

If I’ve added the code correctly, you should see the humidity and temperature on the serial monitor (not on the LCD yet). If you could run this code for a while and let me know what humidity or temperature you’d like to trigger watering, then I’ll add that code. We’ll probably need to check the moisture levels as well to avoid over watering on dry days. So we’ll need a maximum and minimum moisture level to limit watering.

The link again for reference: https://github.com/bernhard-hofmann/circuito.io-4045/blob/master/AutoWater.ino

Note that adding the DHT has also added (DHT.cpp, DHT.h, and DHT_license.txt) that you’ll need as well. You can find them in the main code folder: https://github.com/bernhard-hofmann/circuito.io-4045

1 Like

Hello my friend :slight_smile:
I ve added the new code in the arduino but it has a error
DHT dht(DHT_PIN_DATA);
no matching function for call to ‘DHT: : DHT(int)’

Did you add the dht files as well?. At least the .CPP and .H files are needed.

hello friend, you were right, now it goes :slight_smile:

Displays the temperature and humidity on the serial monitor :slight_smile: But I would like not to water but to start a fan when the temperature exceeds 25.5 degrees and when the air humidity is higher than 50 percent and it will be perfect :slight_smile: