The flower sensor firmware allows you to create a soil moisture sensor with configurable, rich functionality like additional temperature or humidity sensors, a custom reporting interval. The firmware uses a capacitive measurement based on the following free open-source schematics.

⚠️ THIS FEATURE REQUIRES THE PREMIUM VERSION

Schematics

https://github.com/deaxx/ptvo_flower_multisensor

https://modkam.ru/2020/08/03/sensor-vlazhnosti-pochvy-zigbee/

Limitations

The firmware based on the regular PTVO firmware except for the following:

  • The firmware contains a limited set of sensors that are applicable for battery-powered soil moisture sensors.
  • It cannot work as a router.

Unique features

  • It supports various chips (CC2530, CC2652, CC2651).
  • You can disable unused functions.
  • You can create your own schematics.

How it works

While measuring soil moisture, the firmware generates a high-frequency signal of 2 MHz via the “Clock” pin. The schematic transforms it to an analog value that represents a relative soil moisture.

Firmware configuration

  1. Start FirmwareConfigFlower.exe in the program folder.
  2. Select the “PSM” device type.
  3. Add a soil moisture sensor at least.
  4. Add other sensors.
  5. Configure default reporting interval on the “Expert” tab. The firmware will poll all sensors before sending a periodic report. The chips sleeps between periodic reports and consumes minimal energy.
  6. The optional “External wake-up” button on “Input 1” allows you to reset the device (10 seconds long click) or send a periodic report (short click).
Flower sensor firmware configuration
Flower sensor firmware configuration

Additional options

Scale (A), Shift (B) – These parameters allow you to apply a simple formula and adjust the measured value to suit your environment.

Reported_Value = A x Measured_value + B

A – any single precision float value
B – single precision float value in the range from -100 to 100.

The reported value should be within the range of 0 to 100. If the calculated result falls outside this range, it will be adjusted to the nearest boundary.

Power saving (energy consumption)

Energy consumption for CC2652P2 @ RF signal level -5 dBm
Energy consumption for Rf-star CC2652P2 @ RF signal level -5 dBm (for the first schematic)

1-hour statistics

Test duration: 3600 seconds
Number of reports: 1
Current (max, transmitting): 18050 uA
Current (avg, sleep): 1.96 uA
Estimated battery life:
Battery life (1 x CR2032 @ 240 mAHr): ~485 days
Battery life (2 x AAA @ 1200 mAHr): ~2400 days
Note: it is the theoretical calculation. It is important to check a current leakage in your device before using it with a battery and protect electronic components on your device from impact on the environment (high relative humidity, oxidation of contacts, etc.). I recommend using urethane aerosol spray for it.


Comments
Harvey Specter
Posted at 12:12 April 16, 2024
kimpepe
Reply
Author

I’ve already bought several premiums and so far I’ve been happy with the programming, but I’m stuck here. What should the Soil Moisture sensor pin get? Frequency or voltage? I tested several Alliexpress pressure sensors, but Zigbee2mqtt did not give a value. SO

https://www.aliexpress.com/i/1005004284226255.html
https://www.aliexpress.com/item/1005002748929090.html?spm=a2g0o.detail.1000023.10.221fPCqVPCqVwr

Board type: CC2530
Device type: PSM
Update firmware’s timestamp : 2024-04-16
Status LED: P01, Sending reports
Set default reporting interval (s): 6000

Output pins:
P11: Output 1, External sensor power control, Pull-down (Wake-up delay (ms): 2600)
P04: Output 2, Soil moisture sensor
P20: Output 3, External wake-up, External pull-up
P03: Output 4, Source voltage

    Harvey Specter
    Posted at 12:34 April 16, 2024
    Owner
    Reply
    Author

    P04 expects voltage. In the “presets” folder, you can find the corresponding working template.

Leave a Reply