Skip to content

Custom sensors

The Plant Controller is by default able to be connected to and configured for the DF Robot soil sensor and the STEMMA soil sensor. It is possible though to add new custom sensors to the Plant Controller.

This can be done by adding new drivers for the already existing sensor types (see plant configuration and the source code docs for the sensor modules), but it is also possible to add entirely new nesor hardware to the as long as it adheres to a couple of restrictions.

Custom sensor communication protocol

All new sensors connected to the Plant Controller must either communicate via the MODUS RTU protocol or the I2C protocol.

If communicating over MODBUS RTU, make sure that the new sensor is configured with

  • a baudrate of 9600
  • a bytesize of 8
  • no parity
  • 1 stopbit

If communicating over I2C, make sure that you have the correct cable to connect it to the STEMMA QT port on the greenhouse sensors, and that the new sensors address doesn't conflict with that of the greenhouse light sensor and greenhouse air sensor.

Custom sensor power draw

If MODBUS RTU based sensors need 5V power, either make sure that the total power of all sensors connected to the Plant Controllers 5V power line doesn't exceed 5W OR supply the sensor with power externally.

Coding the custom sensor module

There is a standard API for new sensor modules that should be followed to ensure proper functionality. See the source code doces for sensor modules and the other sensors for API guidance and inspiration, and the source docs for communication procotols for understanding of the communication busses.