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. Combined sleepmode

Combined sleepmode

Scheduled Pinned Locked Moved Development
5 Posts 3 Posters 2.3k Views 1 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
    JeJ
    wrote on last edited by
    #1

    Hi,

    I have a battery powered sensor node with motion and temperature.
    The sensor wakes up on interrupt from motion sensor but when there is no motion i would like it to wake up say every minute to send the temperature.

    Can this be done with the sleep library?

    1 Reply Last reply
    0
    • axillentA Offline
      axillentA Offline
      axillent
      Mod
      wrote on last edited by axillent
      #2

      If you will open a datasheet for atmega328p on page 38 you will see all sleep modes http://www.atmel.com/Images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet.pdf
      the most saving mode is power-down. But in this mode you cannot wake from a regular timer but you can wake from a watchdog

      to wake from a regular timer the best option will be power-save

      actually there is no need in any library because power management is just a manipulation of some registers.
      for me the use of the macros defined by #include <avr/sleep.h> is sufficient
      The #include <avr/wdt.h> is sufficient to configure watchdog
      just take into account that not all arduino bootloaders are supporting watchdog, in some cases an upgrade is needed

      all standard includes are described in avrlib user guide http://www.nongnu.org/avr-libc/
      search it for sleep functions and sleep.h usage

      sense and drive

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JeJ
        wrote on last edited by
        #3

        Ok thanks!
        i'll give it a try and see if i can figure it out.

        1 Reply Last reply
        0
        • E Offline
          E Offline
          efimomax
          wrote on last edited by
          #4

          So, did you find out if it possible to combine wake up interrupts (timer and input level)?

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JeJ
            wrote on last edited by
            #5

            No, unfortunately i couldn't get it to work.
            It was to complicated for me.

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


            11

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            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