Ideal Sensor read interval

  • Hello MySensors friends,

    I have built a weather station (with two nodes) with a rain sensor, a rain meter, a BME280, a Lux sensor, a UV sensor and a general (dallas) temperature sensor (this was already in the used housing).

    I have everything working now, installed it in the garden yesterday, I just wondered what the ideal measurement intervals are for the sensors.

    In the example sketches, both 30 seconds and 60 seconds were used.

    I had the following in mind:

    BME280 sensor; 5 minutes
    Temperature sensor 5 minutes
    Lux sensor; 1 minute
    UV sensor; 1 minute (although I also think of 5 minutes)
    Rain sensor; at change (use a text as a message instead of a value)
    Ground moisture; 15 minutes

    (this is the list that I use now, but perhaps it can still be supplemented)

    I will only use the value of the lux sensor for steering (garden lighting), I also use the soil moisture, but that is not so critical.

    The other sensors is purely for registration (because it is possible).

    Thanks for contributing ideas!


  • Mod

    @dzjr it all depends on the expected rate of change and accuracy with which you want to record changes.
    I simply have my weather station report its data once every minute, including counts from the rain gauge.

  • It depends on type of your radio module too. With 868Mhz modules you can transmit for example only 1 percent of time per hour. ( In our country )
    So if you send every minute, your transmit time can be max 0.6 sec.

  • Mod

    @kimot said in Ideal Sensor read interval:

    if you send every minute, your transmit time can be max 0.6 sec.

    Well, a lot can be transfered in 0.6 sec 😉

  • @yveaux @kimot

    Thank you for your responses,

    I use RS-485 instead of RF, I already had to bring power to the node, and then also just a data pair.

    The log does not have to generate real-time data, but it also does not have to have large intervals.

    Increasing the readout time was therefore mainly to avoid generating too much data about the gateway (ethernet).

    One minute seems like a good time for the sensors, but only for soil moisture do I make it 15 minutes, because I only put voltage on it when reading to increase the life span.

    Thanks again!


  • @yveaux
    Today it is raining \0/, so I could really test the rain meter "Live", only in domoticz I only get an update every hour, I read that you get an update every minute, I wondered how you set that up.

    I use Domoticz as a controller, and used the sketch from @TheoL as the basis of the sketch.

  • Mod

    @dzjr I simply have a one minute update loop that sends the amount of times the bucket tipped. The sketch from Theo seems to be designed to send on change. No idea why it would only update every hour in your case.

  • Hi @dzjr
    Some things to consider:
    If the sensor is battery operated, the more you sleep, the better of course.

    Air pressure normally changes slowly so 5 min. is OK. Same with temperature.
    Ground moisture is probably OK with 15 min.

    If you use the lux sensor to control garden lighting, you may see the lamps go on and off every minute if you set a simple rule like if lux < 300, switch on lights. So to avoid driving neighbours crazy you may want to consider a longer time there. I use 2 minutes but the lights are indoors and it gives a nice hysteresis when clouds pass.

    To make programming easy you could set all time intervals the same. 5 or 10 min?

    If you plan to display graphs, 2 to 5 minutes will give you smooth curves without big jumps.

  • @yveaux

    Thank You,

    i will try to adjust the sketch!

  • Hi @bgunnarb

    Thank you for the reply, I use a directly fed (RS485) sensor (network), partly because I use a 24VDC power supply for the heater on the rain sensor (the rain evaporates faster)

    So I don't need to increase the interval to save batteries, but I will definitely take your tip about the smooth curves with you.

    I want to create a script in the controller for the LUX value for controlling the garden lighting, for example turning on the light at a lux value <300, and turning it off again at a lux value> 500 or something like that.

    in the sketch I have now made a separate time interval for each sensor, which is actually because I am still searching for the ideal values of the rain sensor.

Log in to reply

Suggested Topics

  • 97
  • 53
  • 1
  • 182
  • 10
  • 15
  • 10
  • 4