Dimiter Kendri
Published © GPL3+

Garden Sensors Dashboard

Monitor your greenhouse or personal garden environmental variables at a glance with a Linkit enabled sensor Hub.

IntermediateFull instructions providedOver 1 day2,600
Garden Sensors Dashboard

Things used in this project

Hardware components

Jumper wires (generic)
Jumper wires (generic)
×1
3.7 V LiPo Battery
×1
RFM69CW
Any EBAY module
×1
solar panel
solar panel from Alibaba
×1

Software apps and online services

Python Flask
Node.JS

Hand tools and fabrication machines

Tweezers
Hot air rework station
Soldering iron (generic)
Soldering iron (generic)
Solder paste

Story

Read more

Custom parts and enclosures

Step file of the mote

Step file of the energy harvesting mote

Schematics

Board schmatics

PIC MCU schematic

Energy harvester IC

Radio schematic

radio schematic and layout file used on the hub side

Code

Linkit Hub

Arduino
Linkit Duo RFM69CW radio aggregator. Collects sensor data from nodes and send it to linkit duo serial port.
#include "rfm69.h"
#include <SPI.h>

#define SERIAL_BAUD 115200
#define SERIAL_BAUD1 57600

#define NODEID      1
#define NETWORKID   100

char data[32];                      //data buffer for receive mode

  
void setup() {

Serial.begin(SERIAL_BAUD);
Serial1.begin(SERIAL_BAUD);
while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  
Serial.println("RFM69CW LINKITDUO gateway");
Serial.print("=============RFM69CW Test============ \r\n");
Serial1.println("RFM69CW LINKITDUO gateway");
Serial1.print("=============RFM69CW Test============ \r\n");


delay(100);
rfm69_reset();
delay(100);

char ok = rfm69_init();    

   if (!ok) {
        Serial.println("RFM69 init failed!\n");
        Serial1.println("RFM69 init failed!\n");
    } else {
        Serial.println("RFM69 init ok\n");
        Serial1.println("RFM69 init ok\n");
        //rfm69_dumpRegisters();
        
        // init RF module and put it to sleep
        rfm69_sleep();

        // set output power
        rfm69_setPowerDBm(10); // +10 dBm
        // enable CSMA/CA algorithm
        rfm69_setCSMA(false);
        //(void) rfm69_setAESEncryption((void*) "sampleEncryptKey", 16);
        rfm69_setAutoReadRSSI(true);
        rfm69_setPowerLevel(5); // max 31
        
        rfm69_setMode(RFM69_MODE_RX); // Unmodulated carrier
        rfm69_dumpRegisters();

    }
}

void loop() 
        {
            if (rfm69_init()) {

                memset(data, 0, sizeof(data));
                uint8_t len = rfm69_receive(data, sizeof(data));
                if (len > 0) {
                    int rssi = rfm69_getRSSI();
                    Serial.println("Sleep..\r\n");
                    rfm69_sleep();
                    Serial.print("Received number of bytes :");
                    Serial.println(len, DEC);
                    Serial1.print("Received number of bytes :");
                    Serial1.println(len, DEC);
                    
                    for ( int i=0; i<len; i++) 
                    {
                        Serial.println(data[i], DEC);
                        Serial1.println(data[i], DEC);
                    }
                        Serial.print('[');
                        Serial.print(rssi, DEC);
                        Serial.println(']');

                        Serial1.print('[');
                        Serial1.print(rssi, DEC);
                        Serial1.println(']');
						
                }
            }else
            {
               Serial.println("Radio was not initialized properly.\r\n");
               Serial1.println("Radio was not initialized properly.\r\n");
               delay(5000);
            }
        }

Garden sensors dashboard with Linkit DUO

Code and schematics.

Credits

Dimiter Kendri

Dimiter Kendri

23 projects • 159 followers
Robotics and AI

Comments