Close
0%
0%

GrowNode - Plant Growing platform

GrowNode is a vertical framework to build IoT devices targeted to growing plants in a controlled environment.

Similar projects worth following
It's now possible to build systems capable of growing and harvesting your food at your home, with an home made system capable of automating growing parameters. And it's possible to build them at your home with tools you can buy easily.

Grownode provides functionalities that lets you kickstart your projects in minutes:

- SoftAP/Bluetooth Provisioning to join and change your wireless network without any hardcode configuration through a mobile app
-High level device configuration through makefile
-Firmware update Over The Air
-NTP clock sync
-Persistent storage of parameters
-Sensor and Actuators configuration abstracting the hardware level
-Transparent networking protocol (presentation, keepalive, logging)
-Client/Server and Client/Client parameter retrieval and update through MQTT, having in mind highly distributed environment (mesh networks, cloud communication)
-Ready made examples with schematics and guides

(taken from https://ogghst.github.io/grown

The Idea

The goals I wanted to reach were:

Not just a software library, but a vertical platform

Automating plant growing is not only a matter of writing code. You need to design the system, build it, wire everything together, and keep the environment suitable for your plants. Therefore, the project must contain not only code, but schematics, design documents, 3d prints.. An user will need to access and modify all of them. A potential community has to exchange not only new versions of a software library but also new DYI projects, recipes, sugestions. Lot of skills are involved and GrowNode will have to speak a lot of languages.

Focus on system architecture, not functionalities

Whoever has to work with this project, has to start with simple things. Custom code written has to be limited to defining what sensors are present in the system, and how they have to interact between each other. Schematics, 3D prints, instructions should be avaialable to give to users the physical building blocks that matches software components

Decoupled, scalable system

The environment where GrowNode systems has to operate will be distributed, scalable, etherogeneous. System boundaries can change as we increase the size of our farm, we add features, or entire new systems. A farming project could interact with his environment, e.g. opening a rollershutter to give the plants light.

If you want to play hard, you can

Simple systems should be ready in minutes, but you will find your own personal needs soon. Each plant has his own need. Every house or garden has his own climate. Technology advance at the speed of lights and every month there is something new to experiment. There's no one size fits all here. Users shall have the possibility to design their own components and architectures, and the GrowNode platform shall provide the access to the raw code and schematics when it's time to.

GrowNode aims to use most common development tools. Actual release is composed by:

Hardware

  • ESP32 and above microcontrollers
  • Various displays tested (ILI9341) with touch screen (tested XPT2046) capabilities
  • Common sensors and actuators (relay, PWM output, temperature probes, capacitance sensors..) with any esp-idf compatible libraries

Software Components

  • ESP-IDF (release 4.4) programming environment
  • MQTT as a messaging system
  • LVGL as display library

  • Hydroboard2 ready!

    ogghst01/17/2022 at 02:28 0 comments

    Second attempt to release a Water Tower system. this time I've added some MOSFETs to drive:

    • 4 12VDC PWM output (I personally used them for water pump, peltier pump, peltier fan, environmental fan)
    • 4 12VDC Relay output (Lights 1, Lights2, Peltier cell Hot and Cold mode)
    • 2 temperature sensors (using DB18B20)
    • 1 temperature/humidity/pressure sensor (using BME280)
    • 1 capacitive water level sensor

    It has an onboard logic to keep the reservoir at desired temperature prior to water it (thus keeping the system on an acceptable temperature range through all the year)

    The board is powered with 220V - 12V 10A power adaptor so it can manage quite a lot of power consumption.

    see project website

View project log

  • 1
    Install your grownode environment

    (see website for details)

    This page describes the steps needed to have a working development environment on your PC.

    Set up your environment

    ESP-IDF

    ESP-IDF is the development environment provided by the ESP32 chipmaker. It lets you design applications using the full chipset capabilities. I've decided to use it instead of higher level solutions like Arduino in order to achieve maximum flexibility and control.
    Note: actual grownode library is made over esp-idf release 4.4. make sure to download the appropriate version

    IDE

    • Latest Windows ESP-IDF installations are including an Eclipse development environment that is already configured to run an ESP-IDF project.
    • If you want to install your own IDE, prepare your favorite development environment (Anyway, I am personally using eclipse with ESP-IDF plugin. You should install the 'Eclipse for C/C++ developers').

    Obtain GrowNode

    • Open an IDF shell (in Windows you should find in in your Windows start menu - it is called ESP-IDF 4.4 CMD), change dir where you want to install grownode
    Note: if you have installed Eclipse, I recommend to start a new workspace, then open a shell to the workspace directory
    • Clone GrowNode repository using GIT command git clone --recurse-submodules https://github.com/ogghst/grownode.git
    Note: if you have installed Eclipse, you can now import the project using Import projects... -> Espressif -> Existing IDF project and select the grownode directory created with git clone command

    Check everything works

    Via ESP-IDF command prompt

    • Open an IDF shell (you should find it in your Windows start menu - it is called ESP-IDF 4.4 CMD), change dir where you have downloaded the grownode git folder, run idf.py build. It will compile for few minutes.
    Note: in Eclipse, select an esp32 target and build the grownode project
    • If everything runs well, you should see something like Project build complete
    • Plug your ESP32 into your USB port, take note of the COM port you are attached, and run idf.py -p (PORT) flash
    Note: Some boards requires a lower communication speed. In this case, you should use the command idf.py -p (PORT) -b 115200 flash

    Via Eclipse IDE

    • Open Eclipse IDE
    • Import the project you have downloaded using Project -> Import -> Existing IDF Project
    • Press Ctrl+B to build the project
    • If everything runs well, you should see something like Project build complete
    • Plug your ESP32 into your USB port, create a new launch target with the COM port of the board, and run using Ctrl + F11

    launch target

    new target

    With default installation, you will see something like:

     code" style="-webkit-tap-highlight-color: transparent; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; font-family: inherit; font-size: inherit; padding: 0px; border-radius: 0.1rem; height: 1.5em; outline: none; outline-offset: 0.1rem; position: absolute; right: 0.5em; top: 0.5em; transition: color 0.25s ease 0s; width: 1.5em; z-index: 1;">...
    I (0) cpu_start: App cpu up.
    I (141) cpu_start: Pro cpu start user code
    I (141) cpu_start: cpu freq: 160000000
    I (141) cpu_start: Application information:
    I (146) cpu_start: Project name:     grownode
    I (151) cpu_start: App version:      v0.3.0-21-g3184a68-dirty
    I (157) cpu_start: Compile time:     Jan  9 2022 08:53:43
    I (163) cpu_start: ELF file SHA256:  b0acca75d147e901...
    I (169) cpu_start: ESP-IDF:          v4.4-beta1-275-g214d62b9ad
    I (176) heap_init: Initializing. RAM available for dynamic allocation:
    I (183) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
    I (189) heap_init: At 3FFB2D90 len 0002D270 (180 KiB): DRAM
    I (196) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
    I (202) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
    I (208) heap_init: At 4008C058 len 00013FA8 (79 KiB): IRAM
    I (216) spi_flash: detected chip: generic
    I (219) spi_flash: flash io: dio
    I (224) cpu_start: Starting scheduler on PRO CPU.
    I (0) cpu_start: Starting scheduler on APP CPU.
    I (254) grownode: grownode startup sequence completed!
    I (264) grownode: _gn_start_leaf blink
    I (364) grownode: _gn_start_leaf blink completed
    I (5264) gn_blink: blinking - 0
    I (10264) gn_blink: blinking - 1
    ...
    

    Network Startup

    If you want to add network connectivity to your board, you need to input the wifi credentials into your board. This process is called provisioning.

    First you need to modify your sdkconfig file via the command idf.py menuconfig and select under Grownode component the enable networking checkbox. Then it's time to configure the network parameters. Modify the main.c file with your MQTT server address:

     code" style="-webkit-tap-highlight-color: transparent; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; font-family: inherit; font-size: inherit; padding: 0px; border-radius: 0.1rem; height: 1.5em; outline: none; outline-offset: 0.1rem; position: absolute; right: 0.5em; top: 0.5em; transition: color 0.25s ease 0s; width: 1.5em; z-index: 1;">    gn_config_init_param_t config_init = {        ...        .server_url = "mqtt://grownode",        ...    };
    

    Then you need to recompile and flash again the board to upload the firmware with network capabilities.

    Once the new firmware is uploadeed, you will see in the console:

     code" style="-webkit-tap-highlight-color: transparent; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; font-family: inherit; font-size: inherit; padding: 0px; border-radius: 0.1rem; height: 1.5em; outline: none; outline-offset: 0.1rem; position: absolute; right: 0.5em; top: 0.5em; transition: color 0.25s ease 0s; width: 1.5em; z-index: 1;">...
    I (558) wifi:wifi driver task: 3ffc2d98, prio:23, stack:6656, core=0
    I (558) system_api: Base MAC address is not set
    I (558) system_api: read default base MAC address from EFUSE
    I (568) wifi:wifi firmware version: 5c3d3bf
    I (568) wifi:wifi certification version: v7.0
    I (568) wifi:config NVS flash: enabled
    I (568) wifi:config nano formating: disabled
    I (578) wifi:Init data frame dynamic rx buffer num: 32
    I (578) wifi:Init management frame dynamic rx buffer num: 32
    I (588) wifi:Init management short buffer num: 32
    I (588) wifi:Init dynamic tx buffer num: 32
    I (598) wifi:Init static rx buffer size: 1600
    I (598) wifi:Init static rx buffer num: 10
    I (598) wifi:Init dynamic rx buffer num: 32
    I (608) wifi_init: rx ba win: 6
    I (608) wifi_init: tcpip mbox: 32
    I (618) wifi_init: udp mbox: 6
    I (618) wifi_init: tcp mbox: 6
    I (618) wifi_init: tcp tx win: 5744
    I (628) wifi_init: tcp rx win: 5744
    I (628) wifi_init: tcp mss: 1440
    I (638) wifi_init: WiFi IRAM OP enabled
    I (638) wifi_init: WiFi RX IRAM OP enabled
    I (648) gn_network: Starting provisioning
    I (648) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
    I (758) wifi:mode : sta (84:cc:a8:5e:60:48)
    I (758) wifi:enable tsf
    I (758) wifi:mode : sta (84:cc:a8:5e:60:48) + softAP (84:cc:a8:5e:60:49)
    I (768) wifi:Total power save buffer number: 16
    I (768) wifi:Init max length of beacon: 752/752
    I (768) wifi:Init max length of beacon: 752/752
    I (778) wifi:Total power save buffer number: 16
    W (778) wifi_prov_scheme_softap: Error adding mDNS service! Check if mDNS is running
    I (788) wifi_prov_mgr: Provisioning started with service name : GROWNODE_5E6048 I (788) gn_network: Provisioning Started
    ...
    

    Now, you need to download the app:

    Android: Google PlayStore iOS: Apple App Store

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates