Automatic watering system – Part 1: EcoDuino setup (2020, Win10)

The EcoDunio kit by DFRobot is a sets up an automatic watering system for people who want a more hands off approach to growing plants. While this setup is possible with an Arduino and associated sensors, the EcoDunio kit packages it up with an Atmega32U4 microcontroller and all the components you will need to get a system up and running smoothly.

Unfortunately, the kit’s documentation and code seems to have been neglected and need to be updated for clarity and compatibility. In this guide I will run through how to get the EcoDunio up and running.

IMG_60111

You will need:

  • 1 x EcoDunio kit
  • 1 x PC with a USB 2 port (using windows 10 in this guide)
  • 1 x Jar/container (more details in part 2)
  • 1 x Plant to water (more details in part 2)

The kit contains:

  • 1 x EcoDuino board (Atmega32U4, Bootloader: Leonardo)
  • 1 x 6AA Battery holder
  • 1 x interface for battery holder
  • 1 x water pump
  • 1 x flexible water pipe
  • 1 x humidity sensor
  • 1 x soil moisture sensor
  • 1 x case parts
  • 4 x small screws
  • 1 x micro USB to USB A cable
  • 2 x screw drivers

Wiring up

It may be easier to feed the cables through the case when testing the board to avoid re-wiring everything after testing:

  1. Connect the battery interface to the “PWRN” port [red = +, black = -]
  2. Connect the water pump to the “Solenoid Valve” port [brown = +, blue = -]
  3. Connect the soil moisture sensor to the A2 pins, make sure the back cable is closer to the board.
  4. Connect the humidity sensor to the A2 pins, make sure the back cable is closer to the board.
  5. Optional, Sure the board to the case using the 4 included screws

IMG_59851

Connecting and testing the board

This guide is done on windows 10 as it highlights a issue with the current EcoDunio board, or any other Atmega32U4 based boards (such as the Arduino Leonardo). In Windows 10, the boards are not recognised if it is connected to a USB 3 port. Currently the only workaround is to connect the EcoDunio to the PC via a USB 2 port.

  1. Download the Arduino IDE if you don’t already have it from https://www.microsoft.com/en-au/p/arduino-ide/9nblggh4rsd8
  2. Connect the EcoDunio board into a USB 2 port
    1. Remove any batteries you may have connected to the board.
  3. Clone the following repository: https://github.com/thezaza101/Arduino-Code-Snippets
    1. Navigate to this directory: Arduino-Code-Snippets/EcoDuino/v1/TestValueDisplay/
    2. Open TestValueDisplay.ino sketch in the Arduino IDE
  4. Download the DHT library:
    1. Sketch > Include Library > Manage Libraries…
    2. Search for “DHT Sensor library” by Adafruit, install the library.
  5. Set the correct board
    1. Tools > Board > Ardunio Leonardo
  6. Verify the sketch
    1. Sketch > Verify/Compile (or tick icon on toolbar), I had the following output:


Sketch uses 6738 bytes (23%) of program storage space. Maximum is 28672 bytes.
Global variables use 224 bytes (8%) of dynamic memory, leaving 2336 bytes for local variables. Maximum is 2560 bytes.

  1. Upload the sketch
    • Sketch > Upload (or right arrow icon on toolbar)
  2. Open the Serial Monitor
    • Tools > Serial Monitor

You should now see sensor outputs for air humidity, air temperature, and soil humidity. Make sure air humidity and air temperature is greater than 0. Press the gold legs of the soil humidity sensor between your fingers, the soil humidity sensor should now also report a number greater than 0. If your numbers don’t go above zero then double check your wiring.

IMG_59871

In part 2, I will explain the code, test the pump and put everything together.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: