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.
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
It may be easier to feed the cables through the case when testing the board to avoid re-wiring everything after testing:
- Connect the battery interface to the “PWRN” port [red = +, black = -]
- Connect the water pump to the “Solenoid Valve” port [brown = +, blue = -]
- Connect the soil moisture sensor to the A2 pins, make sure the back cable is closer to the board.
- Connect the humidity sensor to the A2 pins, make sure the back cable is closer to the board.
- Optional, Sure the board to the case using the 4 included screws
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.
- Download the Arduino IDE if you don’t already have it from https://www.microsoft.com/en-au/p/arduino-ide/9nblggh4rsd8
- Connect the EcoDunio board into a USB 2 port
- Remove any batteries you may have connected to the board.
- Clone the following repository: https://github.com/thezaza101/Arduino-Code-Snippets
- Navigate to this directory: Arduino-Code-Snippets/EcoDuino/v1/TestValueDisplay/
- Open TestValueDisplay.ino sketch in the Arduino IDE
- Download the DHT library:
- Sketch > Include Library > Manage Libraries…
- Search for “DHT Sensor library” by Adafruit, install the library.
- Set the correct board
- Tools > Board > Ardunio Leonardo
- Verify the sketch
- 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.
- Upload the sketch
- Sketch > Upload (or right arrow icon on toolbar)
- 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.
In part 2, I will explain the code, test the pump and put everything together.