Arduino irrigation control via time based on weather
The article highlights the way in which I created control over irrigation over the internet, which works by time and weather.
I would like to introduce you to the project that I realized during this year during the holidays. I created a web-based system for horticulture that specializes in the sale and cultivation of various kinds of plants, trees, flowers ...
Web-based system has been designed to meet the following requirements:
Arduino Mega 2560 (1280 would be enough too) was used as the control microcontroller, as Uno was on the edge with memory and was severely jammed. Arduino Mega was a great choice thanks to a sufficient number of pins and especially great memory for a program with a larger RAM memory.
Arduino sends temperature and rain data to the Web via the Wiznet W5100 Ethernet Shield. The temperature is read out digitally from the DS18B20 sensor and the rain reading through an analogue value. After submitting the datasheet, the PHP logic script will start, updating all outputs.
The board then only downloads the ON / OFF states for each output it is applying. There is no operation on the microcontroller side to load the board. Total system response is within 6 seconds. The temperature sensor is in the glass where it is necessary to keep the temperature. During hot summer days, it is cooled to the set temperature with an optional hysteresis, during the winter months it is scorched with a set temperature and hysteresis. The heating / cooling selection must be done manually in the system. It is also possible to manually cool / heat (ON / OFF) for an indefinite period of time.
Irrigation circuit Management consists of four physical circuits that are governed by the time of selecting the days of the week when to pay these times. If this mode is not selected, the output is still off and switched on to request the user from the site for a set time in minutes. If it rains during the call, the system shuts down and will not turn on. However, if the automatic mode is set to time and during this time it starts to rain, the circuit switches off and, if it stops running before the end of the built-in interval, switches itself on again.
Watchdog was implemented in Arduino for trouble-free operation, when Arduino is restarted if he gets stuck. In the event of an internet dropout or site unavailability, for example due to maintenance, the heating and cooling relay circuits are automatically switched off after two minutes to establish a connection to the web. After rebooting Arduina, all outputs are off. The logs fail to log on to the interface (bad name or password) with the IP address of the client who attempted the connection. Logs record the data on the invalid data from the sensor DS18B20 85.00, or -127.00, which are typical sensor failure due to bad wiring, CRC errors.
The system also includes graphs where it is possible to view the temperature development in 24 hours from the moment of chart loading and 7 days back, as well as circuit activity and cooling / heating activity. Activities are recorded every minute and temperature once every 5 minutes into the database (not related to working with real-time data). All the inputs / outputs with which the system operates can be called by themselves for clarity where the irrigation circuit is used. As the outputs to the elmg relay used in the system, it is possible to use solenoids, pumps with a total power of 2.3 kW per relay, i. 230V 10A. Alternatively, OMRON SSR relays can also be used to control low power outputs, which are also sold with modules directly to Arduino.
The whole system is hidden behind login, which can also be changed from the web interface.
The system is practical, functional and helps gardening in regular irrigation.
Web-based system has been designed to meet the following requirements:
- Temperature record, rain level, output activity record
- Heating / cooling control based on temperature
- Irrigation management at set times or on demand with weather condition counting
- statistics
- Remote restart boards
- Logs
- Login system
Arduino Mega 2560 (1280 would be enough too) was used as the control microcontroller, as Uno was on the edge with memory and was severely jammed. Arduino Mega was a great choice thanks to a sufficient number of pins and especially great memory for a program with a larger RAM memory.
Arduino sends temperature and rain data to the Web via the Wiznet W5100 Ethernet Shield. The temperature is read out digitally from the DS18B20 sensor and the rain reading through an analogue value. After submitting the datasheet, the PHP logic script will start, updating all outputs.
The board then only downloads the ON / OFF states for each output it is applying. There is no operation on the microcontroller side to load the board. Total system response is within 6 seconds. The temperature sensor is in the glass where it is necessary to keep the temperature. During hot summer days, it is cooled to the set temperature with an optional hysteresis, during the winter months it is scorched with a set temperature and hysteresis. The heating / cooling selection must be done manually in the system. It is also possible to manually cool / heat (ON / OFF) for an indefinite period of time.
Irrigation circuit Management consists of four physical circuits that are governed by the time of selecting the days of the week when to pay these times. If this mode is not selected, the output is still off and switched on to request the user from the site for a set time in minutes. If it rains during the call, the system shuts down and will not turn on. However, if the automatic mode is set to time and during this time it starts to rain, the circuit switches off and, if it stops running before the end of the built-in interval, switches itself on again.
Watchdog was implemented in Arduino for trouble-free operation, when Arduino is restarted if he gets stuck. In the event of an internet dropout or site unavailability, for example due to maintenance, the heating and cooling relay circuits are automatically switched off after two minutes to establish a connection to the web. After rebooting Arduina, all outputs are off. The logs fail to log on to the interface (bad name or password) with the IP address of the client who attempted the connection. Logs record the data on the invalid data from the sensor DS18B20 85.00, or -127.00, which are typical sensor failure due to bad wiring, CRC errors.
The system also includes graphs where it is possible to view the temperature development in 24 hours from the moment of chart loading and 7 days back, as well as circuit activity and cooling / heating activity. Activities are recorded every minute and temperature once every 5 minutes into the database (not related to working with real-time data). All the inputs / outputs with which the system operates can be called by themselves for clarity where the irrigation circuit is used. As the outputs to the elmg relay used in the system, it is possible to use solenoids, pumps with a total power of 2.3 kW per relay, i. 230V 10A. Alternatively, OMRON SSR relays can also be used to control low power outputs, which are also sold with modules directly to Arduino.
The whole system is hidden behind login, which can also be changed from the web interface.
The system is practical, functional and helps gardening in regular irrigation.
Discussion (2 commentaire(s))