» From sites » Specialist »Device for automatic watering plants with their own hands

DIY automatic watering device






In this article, the Wizard will show us how to make a device for automatic watering of plants. This device can be programmed to turn on irrigation any number of times and of any duration. The device is powered via the USB connector. If necessary, you can make power from the solar panel.

Tools and materials:
- Arduino Nano;
- Servo drive;
- Real-time clock Ds3231;
- Quick-detachable connector for a hose - 2 pieces;
- The crane compatible with a quick-detachable connector;
- The wire;
- Nuts and bolts - M3 x 10 - 3 pcs;
- USB cable;
- USB plug;
- 3D printer;
- Computer with software;











Step One: Print 3D Parts
In this homemade There are three parts that need to be printed on a 3D printer: two body parts and a rotary knob. Files for printing can be downloaded below.
3D printing.



Step Two: Servo Connection
The master cuts the plug on the servo. Three wires come from it. Connects wires to Arduino as follows:
Red to 5V Arduino and expansion board Ds3231
Orange to D9 Arduino
Brown to GND Arduino






Step Three: Connect the Ds3231 Expansion Card
Now you need to connect the expansion board Ds3231. This board will control the time. The board has a six-pin connector. This project needs four contacts.

The master cuts four wires of 7 cm each. Connects them as follows:
GND Arduino - GND Boards
5V Arduino - VCC Board
A4 Arduino - SDA boards
A5 Arduino - SCL Boards










Connection diagram can be viewed on this the link.

Step Four: Download Code
We proceed to download the code. The wizard connects Arduino to a computer and opens Arduino IDE.

Installs library DS3231 Simple.
Loads the code at this link.
Before downloading the main project code, you need to set the time on the DS3231. After everything is connected and the DS3231_Simple library is installed, go to "File" >> "Examples" >> "DS3231_Simple" >> "Z1_TimeAndDate" >> "SetDateTime", then follow the instructions in the example to set the date and time to RTC .

In the main loop of the code, two IF commands are written that check the time and then start the watering sequence for a certain period of time. Checking IF commands checks if the hours and minutes correspond to the time that is set. If they match, the "Open Valve" function is started with a subsequent delay.

This delay (set in thousandths of a second) determines how long the watering will take place (the tap will open).You can program as many commands in the code as you need. Just copy and paste them while updating the time and duration of watering (the delay between opening and closing the valve).


Step Five: Build the Device
The servo is supplied with a lever. The wizard installs the servo in the housing and secures it. A lever is mounted on the drive axis. Installs a tap in the holder. Put on the coupling on the crane handle. Turns the crane 90 degrees and, with effort, puts the coupling on the rotary lever of the servo.










The master uses a 10 meter USB cable to power it. One end connects to Arduino, the other to a power outlet with a corresponding connector. Throughout electronics hides inside the case and installs the cover.




Connects the hose on both sides to the tap.

All is ready. Now watering plants will be carried out automatically at specified intervals.



The normal position of the valve is “Closed.” When a command is issued, the servo drive turns the lever and, accordingly, the handle of the crane (seen in the photo).




The whole process of manufacturing such a device can be seen in the video.
5
8
10

Add a comment

    • smilesmilesxaxaokdontknowyahoonea
      bossscratchfoolyesyes-yesaggressivesecret
      sorrydancedance2dance3pardonhelpdrinks
      stopfriendsgoodgoodgoodwhistleswoontongue
      smokeclappingcraydeclarederisivedon-t_mentiondownload
      heatirefullaugh1mdameetingmoskingnegative
      not_ipopcornpunishreadscarescaressearch
      tauntthank_youthisto_clueumnikacuteagree
      badbeeeblack_eyeblum3blushboastboredom
      censoredpleasantrysecret2threatenvictoryyusun_bespectacled
      shokrespektlolprevedwelcomekrutoyya_za
      ya_dobryihelperne_huliganne_othodifludbanclose

We advise you to read:

Hand it for the smartphone ...