Introduction: Smart Garden "SmartHorta"

Hello guys,
This instructable will present the college project of an intelligent vegetable garden that provides automatic plant watering and can be controlled by a mobile app. The goal of this project is to serve customers who want to plant at home, but do not have time to care and water at appropriate times every day. We call "SmartHorta" because horta means vegetable garden in Portuguese.

The development of this project was carried out to be approved in the discipline of Integration Project at the Federal Technological University of Parana (UTFPR). The objective was to combine the several areas of Mechatronics such as Mechanics, Electronics and Control Engineering.

My personal thanks to the professors at UTFPR Sérgio Stebel and Gilson Sato. And also to my four classmates (Augusto, Felipe, Mikael and Rebeca) who helped to build this project.

The product has protection against bad weather, offering protection against pests, wind and heavy rain. It needs to be fed by a water tank through a hose. The proposed design is a prototype to suit three plants, but it can expand to more vases.

Three manufacturing technologies were used in it: laser cutting, CNC milling and 3D printing. For the automation part the Arduino was used as controller. A bluetooth module was used for communication and an Android application was created through MIT App Inventor.

We all passed with a grade close to 9.0 and are very happy with the work. Something that is very funny is that everyone thinks of planting weed on this device, I don't know why.

Step 1: Conceptual Design and Component Modeling

Before assembling, all the components were designed and modeled in CAD using SolidWorks to ensure that everything fitted perfectly. The goal was also to fit the whole project inside the trunk of a car. Therefore its dimensions were defined as 500mm at max. The manufacture of these components used laser cutting, CNC milling and 3D printing technologies. Some parts in wood and pipes were cut in saw.

Step 2: Laser Cutting

The laser cut was made on a 1mm thick galvanized AISI 1020 steel sheet, 600mm x 600mm and then folded into 100mm tabs. The base has the function of housing the vessels and the hydraulic part. Their holes are used to pass the support pipes, sensor and solenoid cables, and to fit the doors hinges. Also laser cut was an L-shaped plate that serves to fit the pipes into the roof.

Step 3: CNC Milling Machine

The servomotor mount was manufactured using a CNC milling machine. Two pieces of wood were machined, then glued and coated with wood putty. A small aluminum plate was also machined to fit the motor in the wood support. A robust structure was chosen to withstand the servo torque. That's why the wood is so thick.

Step 4: 3D Printing

In an effort to correctly water the plants and to have a better control of the soil humidity, it was designed a structure to direct the water from the supply pipe on the base to the sprayer. By using it, the sprayer was positioned facing always the soil (with a 20º inclination downwards) instead of the plants’ leaves. It was printed on two parts on translucent yellow PLA and then assembled with nuts and bolts.

Step 5: Handsaw

The wooden roof structure, doors and PVC pipes were cut manually in the handsaw.
The wooden roof structure was hacked, sanded, drilled and then assembled with wood screws.

The roof is a translucent fiberglass sheet of eternit and was cut with a specific fiber cutting guillotine, then drilled and fitted into the wood with screws.

The wooden doors were hacked, sanded, drilled, assembled with wood screws, coated with wood mass, and then a mosquito net with stapler was placed to prevent damage to the plants by heavy rain or insects.

The PVC pipes were simply cut into the handsaw.

Step 6: Hydraulic and Mechanical Components and Assembly

After manufacturing the roof, the base, the head and the doors, we proceed to the assembly of the structural part.

First we mount the conduit clamps on the base and plate L with nut and bolt, after that just fit the four PVC pipe in the clamps. After you must screw the roof to the sheets L. Then just screw the doors and handles with nuts and bolts. Lastly you must assemble the hydraulic part.

But pay attention, we should be concerned with sealing the hydraulic part so that there is no water leakage. All connections should be hermetically sealed with thread sealant or PVC glue.

Several mechanical and hydraulic components were purchased. Listed below are the components:

- Irrigation Set

- 2x handles

- 8x hinges

- 2x 1/2" PVC knee

- 16x 1/2" conduit clamps

- 3x knee 90º 15mm

- 1m hose

- 1x 1/2" blue weldable sleeve

- 1x 1/2" blue weldable knee

- 1x threadable nipple

- 3x vessels

- 20x wood screw 3.5x40mm

- 40x 5/32" bolt and nut

- 1m mosquito screen

- pvc pipe 1/2"

Step 7: Electrical and Electronic Components and Assembly

For the assembly of electrical and electronic parts we must worry about the correct connection of the wires. If a wrong connection or short-circuit occurs, one can lose expensive parts that take time to replace.

To make mounting and accessing the Arduino easier, we should manufacture a shield with a universal board, so it is easier to remove and download a new code on the Arduino Uno, and also avoid having many wires scattered.

For the solenoid valve a plate with optoisolated protection must be made for the relay drive, to spare ourselves of the danger of burning the Arduino inputs/outputs and other components. Care should be taken when actuating the solenoid valve: it should not be turned on when no water pressure is present (otherwise it can burn).

Three humidity sensors are essential, but you can add more for signal redundancy.

Several electrical and electronic components were purchased. Listed below are the components:

- 1x Arduino Uno

- 6x soil moisture sensors

- 1x 1/2" Solenoid Valve 127V

- 1x servomotor

- 1x 5v 3A source

- 1x 5v 1A source

- 1x bluetooth module hc-06

- 1x Real Time Clock RTC DS1307

- 1x relay 5v 127v

- 1x 4n25 tilting optocoupler

-1x thyristor bc547

- 1x diode n4007

- 1x resistance 470 ohms

- 1x resistance 10k ohms

- 2x universal plate

- 1x power strip with 3 sockets

- 2x male socket

- 1x plug p4

- 10m 2 way cable

- 2m internet cable

Step 8: C Programming With Arduino

Arduino programming is basically to perform soil moisture control of “n” vases. For this it needs to meet the solenoid valve actuation requirements, as well as the servo motor positioning and the reading of the process variables.

You can modify the amount of vessels

#define QUANTIDADE 3 //Quantidade de plantas

You can modify the time the valve will be open

#define TEMPO_V 2000 // Tempo que a válvula ficará aberta

You can modify the Wait Time for the soil to moisten.

#define TEMPO 5000 // Tempo de esperar para o solo umidecer. <br>

You can modify the delay of the servant.

#define TEMPO_S 30 // Delay do servo.

For each soil moisture sensor there is a different voltage range for dry soil and fully moist soil, so you should test this value here.

umidade[0] = map(umidade[0], 0, 1023, 100, 0);

Step 9: Mobile App

The app was developed on the MIT App Inventor website to perform project supervision and configuration functions. After the connection between the mobile phone and controller, the application shows in real time the humidity (0 to 100%) in each of the three vases and the operation that is being performed at the moment: either in standby mode, moving the servomotor to the correct position or watering one of the vases. The configuration of the type of plant in each vase is also made on the app, and the configurations are now ready for nine plant species (lettuce, mint, basil, chives, rosemary, broccoli, spinach, watercress, strawberry). Alternatively, you can manually enter watering settings for plants not in the list. The plants on the list were chosen because they are easy to grow in small pots like those on our prototype.

To download the app you must first download the MIT App Inventor app on your mobile phone, turn on wifi. Then on your computer you should log into the MIT website to login, import the SmartHorta2.aia project, and then connect your mobile phone via QR code.

To connect the arduino to the smartphone you must turn on bluetooth on your phone, turn on the arduino and then pair the device. That’s it, you are already connected to SmartHorta!

Planter Challenge

Participated in the
Planter Challenge