Code Monkey home page Code Monkey logo

zigbee-plant-sensor's Introduction

banner

Zigbee Plant Sensor for Zigbee2MQTT

An open source Zigbee plant sensor project developed with the nRF Connect SDK (Zephyr RTOS). It is designed for the b-parasite hardware, however due to the flexibility of Zephyr it should be easy to port it to other hardware containing a capacitive soil moisture sensor.

Features

  • Works with Zigbee2MQTT
  • Soil moisture measurements
  • Illuminance measurements
  • Temperature and humidity measurements
  • Battery voltage measurements and alarms
  • Developed with the nRF Connect SDK (Zephyr RTOS)

Hardware

Plant Photos

B-Parasite

The software is designed for the open source hardware b-parasite. Rbaron did a great job designing a soil moisture sensor, however his software is only made for BLE. Fortunately, the hardware contains a nRF52840 chip which is also compatible with Zigbee. The only problem is that it does not have a button which might be useful for factory reset. There are however less ideal workarounds that do not require a button.

Complete hardware kit

I am developing my own hardware that is smal and suited for Zigbee (With a reset button). I am willing to sell completely assembled hardware if there is enough interest. If you're interested please fill in the form below. You will receive a email once they become available. Thank you.

https://forms.gle/8Rz8CJUTZ9Qqvgi77

Guides

Coating

Straight from the factory PCBs are not coated on de sides. This might affect the reading in the future as water seeps inside. Therefore it is a good idea to make it water resistant with some coating. I have used Kontakt 70, but I am still researching other alternatives. Let me know if you have better coating ideas.

The only problem with coating is that you probably need to recalibrate the sensor.

Battery life

By default, data is reported every two minutes. In the worst case scenario, all attributes are updated and transmitted. The picture below shows the power consumption of two minuuts in this worse case scenario.

power measurements

The measurements shows that the average power consumption is $14.53\text{uA}$. If we consider a CR2032 battery with a capacity of $210\text{mAh}$ we get $210/0.01453 = 14453$ hours or $602$ days! Even if the measurements are a bit off, we still have more than a year of battery life.

3D printed case

Check the link below for an easy to 3D print case. It is designed for threaded inserts with a outer radius of 4 mm and 3 mm bolts. It is not yet optimized for the temperature and light sensor as it still blocks most of the light.

https://www.printables.com/model/305842-zigbee-plant-sensor-for-b-parasite

Known issues

  • Battery voltage and alarms are not reported correctly. You can read them using the dev console in Zigbee2MQTT, but somehow the automatic reporting does not work with the Zigbee power config cluster.
  • The hardware does not have a button therefore it cannot be factory reset. The overcome this, the joining process is done when the battery is insert. If the sensor has not joined a network yet or it cannot find a known network, it scans for other networks. In this way it is still possible to join a new network even if it is not factory reset.
  • Not tested with ZHA from Home assistant yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.