Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Get periodical sensor readings from children 1 & 2 while sensor on child 3 is interrupt driven.

Get periodical sensor readings from children 1 & 2 while sensor on child 3 is interrupt driven.

Scheduled Pinned Locked Moved Development
2 Posts 2 Posters 379 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jimmy loyens
    wrote on last edited by
    #1

    Hello,
    I have a bunch of sensornodes that measure battery level, humidity, temperature and lightlevel. The lightlevel measurement is interrupt driven. If the lightlevel differs more than a given amount from the last reading (for x integration times) the interrupt triggers and the lightlevel value is transmitted. Now here comes the problem, there are times the lightmeasurement triggers so often that the other sensor readings dont get transmitted (or even measured). Say sleep value is 10 min (every 10 min report battery voltage, humidity and temperature) and the light measurement triggers every 5min (this is not a constant) by interrupt. This meanes the code arrives at sleep for 10 min everytime the light interrupt is triggered and so never doing the measurement for battery level, humidity and temperature. Does anyone have an idea how to solve this? I know the millis counter doesn't run while in sleep so this is not an option. What i did for now is send all sensorvalues when light interrupt is triggered but this is a waste of battery since battery level, humidity and temperature dont change that fast. I guess it is allso possible to trigger these three measurements from the controller every 10 min or use a RTC on the node but i would really like to find a sollution in firmware only, since i have about 50 pcb's left for this node (so i cant go adding RTC).

    Any ideas are welcome

    mfalkviddM 1 Reply Last reply
    0
    • J jimmy loyens

      Hello,
      I have a bunch of sensornodes that measure battery level, humidity, temperature and lightlevel. The lightlevel measurement is interrupt driven. If the lightlevel differs more than a given amount from the last reading (for x integration times) the interrupt triggers and the lightlevel value is transmitted. Now here comes the problem, there are times the lightmeasurement triggers so often that the other sensor readings dont get transmitted (or even measured). Say sleep value is 10 min (every 10 min report battery voltage, humidity and temperature) and the light measurement triggers every 5min (this is not a constant) by interrupt. This meanes the code arrives at sleep for 10 min everytime the light interrupt is triggered and so never doing the measurement for battery level, humidity and temperature. Does anyone have an idea how to solve this? I know the millis counter doesn't run while in sleep so this is not an option. What i did for now is send all sensorvalues when light interrupt is triggered but this is a waste of battery since battery level, humidity and temperature dont change that fast. I guess it is allso possible to trigger these three measurements from the controller every 10 min or use a RTC on the node but i would really like to find a sollution in firmware only, since i have about 50 pcb's left for this node (so i cant go adding RTC).

      Any ideas are welcome

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      @jimmy-loyens I would test if sending all values every time really has a large impact on battery life. I don't think it has.

      An alternative is to keep a counter of how many times only lightlevel has been sent and transmit every n times. This solution doesn't adapt to varying interrupt times though.

      tekka is working on possibility to get the approximate amount of time left when woken up by interrupt. Your use case could be perfect for this new feature.

      1 Reply Last reply
      1
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      18

      Online

      11.7k

      Users

      11.2k

      Topics

      113.0k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular