- The Hydrosystem hardware is based on the raspberry pi3 and raspberry zero W.
- The user interface is based on web server hosted on the raspberry itself. Wifi is mandatory for the system to work.
- Hardware can be equipped to have an hardware Clock, Temperature, humidity sensors etc. These sensors are not mandatory but it is recommended to include at least the DHT22 for humidity and temperature measurement.
- Electrical Relay are required to manage the actuators. In my implementation I used only 12V actuators as valves, pumps etc.
- The project is designed to be cheap, save money as much as possible and still reach the target.
- The SW is open source hopefully everybody can contribute to it.
- For the remote access, there is no external server, connection is made directly to the raspberry server.
Minimal hardware Setting
- To test the hydrosystem you only require the raspberry pi3 (or the raspberry pi zero W)
- With the minimal hardware configuration you can have a look at the interface and evaluate the Software.
- If you have a Usb webcam, then try to connect to the USB of RPI.
Full hardware Setting
In the following paragraphs the hardware and schematics that can be connected to the system are illustrated. This hardware setting will use all the system capabilities, anyway this is not mandatory for the system to work.
Below the list of features supported by full hardware implementation:
- Precise irrigation timing (order of seconds), Monthly irrigation scheduling, conditional irrigation based on the temperature and humidity
- Control up to 16 irrigation line
- Possibility to schedule fertilization cycles using liquid fertilizer
- Sensor data collection:
- Air Humidity
- Atmospheric pressure
- Light intensity
- Soil moisture (up to 6 independent probes)
- Remote access to the system via Wifi connection and internet connection
- Email notifications and alerts
- Connection to webcam (up to 4 USB camera) + raspicam to remotely check your plants, schedule of daily pictures.
- Support for servo motor to be used together with webcam to control the webcam/raspicam direction.
- Steaming video
After all the connections are made, the final assembly looks like this:
In the following chapters, the details about connections will be presented.
Humidity and temperature sensors
The Hydrosystem SW is designed to be compatible with the DHT22 sensor, this sensor is quite inexpensive and provides good accurancy for both temperature and Humidity. Below the connection schema:
External Hardware Clock
The Hardware clock is important if the RPI does not have a stable IP connection or the Hydrosystem works offline. This is because the RPI does not have an internal clock protected by a battery and in case of power outage the time will be lost. The Real time Clock RTC based on the DS3231 chipset is inexpensive (less than 3 eur) and is sold together with battery.
Relays are used as switches for the actuator. This particular relay works with 5V and can be directly connected with RPI GPIO because their imputs are isolated by optocouplers which are the integrated highlighted in the picture below by a red circle. The 8 relays board can be found for less than 10 eur. If 8 relays are not necessary, then also board of 4 or 2 relays are available. Up to 2 boards with 8 relays each can be connected to the system.
It is recommended for the actuators to work at low voltage e.g 12V DC.
Connect the webCam
The system is able to take pictures and stream video, both with Rasicam of standard usb webcam, You can insert as much webcam as the USB available.
Raspberry Camera is also supported
Athmospheric pressure and light sensors
If you are interested in monitoring the barometric pressure and the light intensity, it is possible to include two sensors that are supported by the hydrosys4 SW: the BH1750 for light and the BMP180 for the pressure. Both of them have the I2C interface and can be connected in parallel with other i2C devices. The below schema do not show the VCC and GND which should be connected to 5V supply.
The system is designed to measure the moisture of soil by applying tension to two plates in the soil and measuring the resistance. For this purpose an Analog digital converter MCP3008 was requires, as the raspberry does not have analog inputs.
Below the connection schema:
To reduce the corrosion of the plates in the soil the plates are under tension only when the reading is made every 15 minutes, the tension is applied only few seconds before and after the measurement. For this purpose a specific circuit has been built.
For the switching part, the component AP2192 is used, which is an high side switch. It also provided quite stable performances.
In the below schema, two switches controls 3 probes each.
The PIN GPIO 07 and 25 are used to enable the tension over the plates. The tension is measured over the ADC (in this example channel 0,1,2,4,5,6).
Probe option 1) Graphite
This are the graphite contact of the brushed electric motors
Below the final probe after some handicraft work.
Probe option 2) Stainless steel
The probes are made with stainless steel screws (6×80 mm) and a power cord extension (Europe standard) according to below procedure:
- Cut the head of the screw
- Insert three screws in the plug holes
- Seal with hot glue
- Cut the cable on the other end, connect together Blue and Brown which are at both ends of the plug, the yellow and green cable is connected to the center of the plug.
Below a picture of the setup:
Servo Motor connection
the system SW is able to manage one servo motor connected to the pin GPIO21 (pin40).
This servo can be used to move the camera in different angles.
Hydrosystem Power setting
One very important aspect of the project is the power supply. I found all required water valve and pumps working at 12vdc. For safety reason I choose the 12V for the actuators and 5vdc for raspberry, sensors and relay. Below the setup:
Hydrosystem Power items
Power is supplied to the system using a 12V-5a adapter and a 12V to 5V DC-DC converter 3A.
The adapter cost less than 10 eur
The DC-DC converter less than 5 eur
Electrovalve 12V DC
Below the 12v DC evectrovalve I have used in my setup. Cost no more than 10 eur each
Stepper Motor Connection
The Stepper Motor shield that supports I2C is used to connect up to 2 stepper motors (around 5 Eur). Below the connection schema
Stepper motors are used to open and close windows according to temperature levels.
The stepper motor used is the Nema17 (Around 8 eur).
Automatic Fertilizer dosing
To mix the water with fertilizer the water pipe pass through a sealed tank. The water pipe has smalls holes to mix the water with fertilizer. The fertilizer is moved to the sealed tank with mini pumps when the water irrigation valve is closed. The on time of the mini pump define the quantity of the fertilizer.
Below the implementation:
Connecting the Hardware
After use of several prototype board I decided to create a specific PCB to make the work more neat.
Below the PCB made for this specific project:
Revision2 with SMD componenets
Below a picture of the System with all the components connected.
For the final configuration I have used an electric box 240x190x90 cm where all the components have been fitted,
here the result,
the raspicam has been mounted on the Servo motor, here a close up:
a larger view including also the valves,
Got Nice pictures of my balcony, the red fruits are red abanero chili pepper