Low Power Plant Sensor

Overview

An ULP (Ultra Low Power) plant sensor design aiming to keep plants healthy by measuring and reporting key environmental factors such as temperature, relative humidity, ambient light and soil moisture of the plant. The sensor transmits the data over to the USB board for integration with Home Assistant and Node-RED. The sensor is powered by a rechargeable Li-on cell and charges over USB type C.

Objective

To create an efficient plant monitoring system that requires little to no user interaction and provides real-time data to assist with the care of multiple plants and provide insight on their status.

Tools and Parts

Platform 1

Version 0

 

Microcontroller: ESP32 - S3

Sensors:

    Temperature / Humidity: SHTC3

    Ambient Light: ALS-PT19

    Soil moisture sensor: 8 X External Capacitive

Programming Languages: C / C++

Communication Protocols: I2C, UART, USB, WiFi

Power Supply: Rechargeable Li-Ion Battery.

Version 1

Microcontroller: ESP32 - S3

Sensors:

    Temperature / Humidity: SHTC3

    Ambient Light: ALS-PT19

    Soil moisture sensor: 8 X External Capacitive

Programming Languages: C / C++

Communication Protocols: I2C, UART, USB, WiFi

Power Supply: Rechargeable 18650 Li-Ion Battery.

Platform 2

Version 2

 

Receiver Microcontroller: CC1310

Transmitter Microcontroller: CC1310

Sensors:

    Temperature / Humidity: SHTC3

    Ambient Light: ALS-PT19

    Soil moisture sensor: PCB - Capacitive

Programming Languages: C / C++

Communication Protocols: I2C, UART, USB, Sub-GHz RF

Power Supply: CR2032 Li-Ion coin cell battery

Version 2.1 and 2.2

Transmitter Microcontroller: CC1310
Receiver Microcontroller: CC1310
Sensors:
    Ambient Light: VEML7700
    Temperature / Humidity Sensor:  SHTC3 / GXHTC3
    Soil moisture sensor: Capacitive - PCB
Programming Languages: C/C++
Protocols: I2C, UART, USB, Sub-GHz RF

Version 2.1:

Power Supply: CR2032 Li-Ion coin cell battery

Version 2.2:

Power Supply: Rechargeable Li-Ion Battery

Process

Version 0

Operation / Features

The initial version of the project aimed to measure soil moisture using 8 external capacitive probes. The ESP32-S3 is a robust WiFi-compatible MCU that was able to poll the sensors and transmit the data over WiFi using the MQTT communication protocol. The MCU woke up and transmitted the data every 8 hours to conserve power.

  • 8-hour polling - transmit rate

  • Support for up to 8 capacitive sensors

  • Configurable battery capacity

  • Adjustable charging current

  • Precise measurement using the embedded 12-bit ADC of the ESP32-S3

 

Flaws / Shortcomings

After a few test cycles, a few points of improvement became apparent

  • The precision/repeatability of the 12-bit ADC would become a problem for accurate measurements with smaller increments.

  • The ESP32-S3 was overkill for this application in terms of its dual-core design and processing abilities.

  • The achievable sleep state using the ESP32-S3's internal RTC would not yield the battery life the project aimed for.

  • The sleep current draw of the ESP32-S3 was higher compared to other microcontrollers of the ESP32 line.

  • The footprint of the PCB even though small made it hard to work with / mount to support 8 probes.

Version 1

Operation / Features

The updated version of the sensor aimed to address the shortcomings of Version 0 while integrating the rechargeable battery on the PCB using an 18650 holder.  The ESP32-C3 was chosen for the MCU due to it's lower sleep current consumption. The method of operation would remain the same as would the number of allowed sensor probes. Two ADS1115 16-bit ADCs were integrated into the design to read the analog sensor values of the capacitive probes. In addition, the PCF8523 was added to allow the ESP32-C3 to get into a deeper sleep state waking up using the interrupt produced from the RTC.

 

Flaws / Shortcomings

The updated version performed better due to the lower sleep current consumption and higher reading precision. Still, some major issues remained.

  • WiFi modems consume a lot of power even when transmitting for a short time frame of ~300 mA.

  • The external capacitive sensors were not optimized for low power drawing a lot of current during polling ~8 mA/sensor, and around 1 mA during sleep.

  • The ESP32-C3 would consume a lot of power even during its short wake time of ~12 mA.

  • The addition of operation LEDs further hurt power consumption even when limiting the current / brightness.

Version 2

Operation / Features

Considering the shortcomings of the previous version, a revamp of the whole architecture of the project was decided as the way forward. WiFi being power expensive would not be suitable for the goal that was set for the project upon its conception. In addition, Due to the capacitive sensors outputting an analogue signal, the plants needed to be close to the main controller. This would be impractical to implement if plants were in different rooms. These major changes led to the creation of a new platform/version featuring a different communication protocol and deployment method. Finally, load switches were added to completely isolate power from the peripheral devices when the MCU was in sleep mode. The new platform featured:

  • The CC1310 Sub-GHz replaced the ESP32-C3 as the main microcontroller.

  • A capacitive soil moisture sensor was designed onto the PCB

  •  The LM324 Amplifier was used to amplify the signal from the capacitive sensor.

  •  The MAX871 was used to inject the inverted PWM pulse into the LM324 opamp to create the negative of the PWM signal injected into the capacitive plate for the comparator to output the measurement.

 

Flaws / Shortcomings / Improvements

Even though moving to a new platform resolved the major issues of deploying the sensors and their power consumption, still a few parts of the circuit could be improved.

 

  • Capacitive measurement circuitry and sensor

    The measurement circuit for the capacitive sensor was quite complicated to the point where the gains of the amplification outweighed the extra space required to fit all the parts that comprised it. The LM324 even though could be found in a small package, was still occupying valuable board space. In addition, the injection of the inverted pulse from the MAX871 into the amplifier did not work as expected with the sensor design.     Instead of getting the expected amplified signal, the output of the opamp was noisy and unstable. Thus the decision was made to start from scratch with a simple sensor design.

  • The ALS-PT19 even though a great method for detecting ambient light needed to be replaced as well. Besides the biasing circuit needing to be adjusted to keep the power consumption to a minimum, the sensitivity and resolution of the sensor were not able to satisfy the requirements of the project.
  • Finally, the QFN48 package of the CC1310 used in this version of the board was unnecessarily big and offered more GPIO pins than were required for the project.
Version 2.1

 

Operation / Features

The new version of the board, aimed to improve the ambient light sensor used and simplify the capacitive sensor circuitry.

  • The LM324 OpAmp and MAX871 voltage inverter were removed.

  • The ALS-PT19 ambient light sensor was replaced with the VEML7700.

 

Flaws / Shortcomings / Improvements

Having simplified and improved the sensor circuitry of the board, a power supply issue arose since the CR2032 coin cell battery used in the design was not able to fulfill the required specifications for battery life set at the beginning of the project.

  •  CR2032 cell was not adequate to provide the specified battery life.

Version 2.2 - Current version


Operation / Features

Since battery life was the main hurdle, the board was redesigned to accommodate a rechargeable Li-Ion Cell. 

  • Added battery protection circuitry

  •  Added Li-Ion charging

  •  Added a DC-DC converter optimized to operate at its most efficient point while providing the code with 2.8V for more efficient operation.

 

Additional PCBs

 

To recieve and process the data of the second platform design, a dedicated receiver PCB had to be designed. The board features a CC1310 for the receiver and a USB to Serial converter IC to translate the UART data transmitted from the sensors over to the host computer, in this case a Raspberry Pi.