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. Announcements
  3. 💬 Battery Powered Sensors

💬 Battery Powered Sensors

Scheduled Pinned Locked Moved Announcements
battery
347 Posts 55 Posters 68.0k Views 53 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.
  • skywatchS skywatch

    @Gilles-BILLARD You remembered to connect the nrf before going to sleep?

    G Offline
    G Offline
    Gilles BILLARD
    wrote on last edited by Gilles BILLARD
    #330

    skywatch: You remembered to connect the nrf before going to sleep?
    @skywatch Yes, of course;
    I'm 67, retired, and after 9 days (part time) on this issue, I give up !
    I am therefore torn between crushing all that stuff between between a big hammer and my anvil or to discard everything to the trash can.
    These sensors are useless if consuming 20mA H24-7/7 because they they should normally be used outside (in my greenhouses) powered by a battery 18650 + a solar cell.

    skywatchS 1 Reply Last reply
    0
    • G Offline
      G Offline
      Gilles BILLARD
      wrote on last edited by Gilles BILLARD
      #331

      Can anyone let me know if he sees something wrong in that log after a Min-Core bootloader burn in a Pro-Mini 3.3v
      (I do not!)
      I ask because it not the same file as the 1st one (the 1st was including the nb "115200" (bauds?) and now it is "38400" )
      NOTA: Directory is this one:

      C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1\bootloaders\optiboot_flash\bootloaders\atmega328p\8000000L
      
      
      avrdude: Version 6.3-20201216
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2014 Joerg Wunsch
      
               System wide configuration file is "C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/avrdude.conf"
      
               Using Port                    : COM8
               Using Programmer              : stk500v1
               Overriding Baud Rate          : 19200
               AVR Part                      : ATmega328P
               Chip Erase delay              : 9000 us
               PAGEL                         : PD7
               BS2                           : PC2
               RESET disposition             : dedicated
               RETRY pulse                   : SCK
               serial program mode           : yes
               parallel program mode         : yes
               Timeout                       : 200
               StabDelay                     : 100
               CmdexeDelay                   : 25
               SyncLoops                     : 32
               ByteDelay                     : 0
               PollIndex                     : 3
               PollValue                     : 0x53
               Memory Detail                 :
      
                                        Block Poll               Page                       Polled
                 Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                 eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                 flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                 lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                 signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
      
               Programmer Type : STK500
               Description     : Atmel STK500 Version 1.x firmware
               Hardware Version: 2
               Firmware Version: 1.18
               Topcard         : Unknown
               Vtarget         : 0.0 V
               Varef           : 0.0 V
               Oscillator      : Off
               SCK period      : 0.1 us
      
      avrdude: AVR device initialized and ready to accept instructions
      
      Reading | ################################################## | 100% 0.04s
      
      avrdude: Device signature = 0x1e950f (probably m328p)
      avrdude: erasing chip
      avrdude: reading input file "0x3f"
      avrdude: writing lock (1 bytes):
      
      Writing | ################################################## | 100% 0.02s
      
      avrdude: 1 bytes of lock written
      avrdude: verifying lock memory against 0x3f:
      avrdude: load data lock data from input file 0x3f:
      avrdude: input file 0x3f contains 1 bytes
      avrdude: reading on-chip lock data:
      
      Reading | ################################################## | 100% 0.02s
      
      avrdude: verifying ...
      avrdude: 1 bytes of lock verified
      avrdude: reading input file "0b11111111"
      avrdude: writing efuse (1 bytes):
      
      Writing | ################################################## | 100% 0.02s
      
      avrdude: 1 bytes of efuse written
      avrdude: verifying efuse memory against 0b11111111:
      avrdude: load data efuse data from input file 0b11111111:
      avrdude: input file 0b11111111 contains 1 bytes
      avrdude: reading on-chip efuse data:
      
      Reading | ################################################## | 100% 0.02s
      
      avrdude: verifying ...
      avrdude: 1 bytes of efuse verified
      avrdude: reading input file "0b11011110"
      avrdude: writing hfuse (1 bytes):
      
      Writing | ################################################## | 100% 0.02s
      
      avrdude: 1 bytes of hfuse written
      avrdude: verifying hfuse memory against 0b11011110:
      avrdude: load data hfuse data from input file 0b11011110:
      avrdude: input file 0b11011110 contains 1 bytes
      avrdude: reading on-chip hfuse data:
      
      Reading | ################################################## | 100% 0.02s
      
      avrdude: verifying ...
      avrdude: 1 bytes of hfuse verified
      avrdude: reading input file "0xe2"
      avrdude: writing lfuse (1 bytes):
      
      Writing | ################################################## | 100% 0.02s
      
      avrdude: 1 bytes of lfuse written
      avrdude: verifying lfuse memory against 0xe2:
      avrdude: load data lfuse data from input file 0xe2:
      avrdude: input file 0xe2 contains 1 bytes
      avrdude: reading on-chip lfuse data:
      
      Reading | ################################################## | 100% 0.01s
      
      avrdude: verifying ...
      avrdude: 1 bytes of lfuse verified
      
      avrdude done.  Thank you.
      
      
      avrdude: Version 6.3-20201216
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2014 Joerg Wunsch
      
               System wide configuration file is "C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/avrdude.conf"
      
               Using Port                    : COM8
               Using Programmer              : stk500v1
               Overriding Baud Rate          : 19200
               AVR Part                      : ATmega328P
               Chip Erase delay              : 9000 us
               PAGEL                         : PD7
               BS2                           : PC2
               RESET disposition             : dedicated
               RETRY pulse                   : SCK
               serial program mode           : yes
               parallel program mode         : yes
               Timeout                       : 200
               StabDelay                     : 100
               CmdexeDelay                   : 25
               SyncLoops                     : 32
               ByteDelay                     : 0
               PollIndex                     : 3
               PollValue                     : 0x53
               Memory Detail                 :
      
                                        Block Poll               Page                       Polled
                 Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                 eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                 flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                 lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                 signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
      
               Programmer Type : STK500
               Description     : Atmel STK500 Version 1.x firmware
               Hardware Version: 2
               Firmware Version: 1.18
               Topcard         : Unknown
               Vtarget         : 0.0 V
               Varef           : 0.0 V
               Oscillator      : Off
               SCK period      : 0.1 us
      
      avrdude: AVR device initialized and ready to accept instructions
      
      Reading | ################################################## | 100% 0.05s
      
      avrdude: Device signature = 0x1e950f (probably m328p)
      avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
               To disable this feature, specify the -D option.
      avrdude: erasing chip
      avrdude: reading input file "C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex"
      avrdude: writing flash (32768 bytes):
      
      Writing | ################################################## | 100% 0.00s
      
      avrdude: 32768 bytes of flash written
      avrdude: verifying flash memory against C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
      avrdude: load data flash data from input file C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
      avrdude: input file C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex contains 32768 bytes
      avrdude: reading on-chip flash data:
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: verifying ...
      avrdude: 32768 bytes of flash verified
      avrdude: reading input file "0x0f"
      avrdude: writing lock (1 bytes):
      
      Writing | ################################################## | 100% 0.05s
      
      avrdude: 1 bytes of lock written
      avrdude: verifying lock memory against 0x0f:
      avrdude: load data lock data from input file 0x0f:
      avrdude: input file 0x0f contains 1 bytes
      avrdude: reading on-chip lock data:
      
      Reading | ################################################## | 100% 0.02s
      
      avrdude: verifying ...
      avrdude: 1 bytes of lock verified
      
      avrdude done.  Thank you.
      
      
      1 Reply Last reply
      0
      • G Gilles BILLARD

        skywatch: You remembered to connect the nrf before going to sleep?
        @skywatch Yes, of course;
        I'm 67, retired, and after 9 days (part time) on this issue, I give up !
        I am therefore torn between crushing all that stuff between between a big hammer and my anvil or to discard everything to the trash can.
        These sensors are useless if consuming 20mA H24-7/7 because they they should normally be used outside (in my greenhouses) powered by a battery 18650 + a solar cell.

        skywatchS Offline
        skywatchS Offline
        skywatch
        wrote on last edited by skywatch
        #332

        @Gilles-BILLARD I understnad your frustration - I have been there myself.

        I suggest s simple node to test with, something like the door/window sensor with just one switch.

        Take your promini, remove leds and power regulator (or cut tracks) then burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

        Then add the radio module (you can try another if you have it - what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you). Load your sketch and try again.

        You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

        G 2 Replies Last reply
        0
        • skywatchS skywatch

          @Gilles-BILLARD I understnad your frustration - I have been there myself.

          I suggest s simple node to test with, something like the door/window sensor with just one switch.

          Take your promini, remove leds and power regulator (or cut tracks) then burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

          Then add the radio module (you can try another if you have it - what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you). Load your sketch and try again.

          You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

          G Offline
          G Offline
          Gilles BILLARD
          wrote on last edited by Gilles BILLARD
          #333

          @skywatch said in 💬 Battery Powered Sensors:

          I suggest s simple node to test with, something like the door/window sensor with just one switch.

          I'll do that, but for my thermal sensor the test cannot be more simple

          ......burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

          I don't have the choice for the baud rate; Where is it located ?

          Then add the radio module (you can try another if you have it

          I swaped everything I could. (The radio modules that was connected to the single functionning sensor included)

          what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you).

          Bought from Aliexpress;

          Load your sketch and try again.

          I have done the whole process hundreds and hundreds of time

          You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

          Yes I'll do that...

          skywatchS 2 Replies Last reply
          0
          • G Gilles BILLARD

            @skywatch said in 💬 Battery Powered Sensors:

            I suggest s simple node to test with, something like the door/window sensor with just one switch.

            I'll do that, but for my thermal sensor the test cannot be more simple

            ......burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

            I don't have the choice for the baud rate; Where is it located ?

            Then add the radio module (you can try another if you have it

            I swaped everything I could. (The radio modules that was connected to the single functionning sensor included)

            what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you).

            Bought from Aliexpress;

            Load your sketch and try again.

            I have done the whole process hundreds and hundreds of time

            You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

            Yes I'll do that...

            skywatchS Offline
            skywatchS Offline
            skywatch
            wrote on last edited by
            #334

            @Gilles-BILLARD It's in the sketch when you start serial interface. As an aside have you checked the baud rate the pro mini or uno you are using as a programmer - maybe it is 115200 and that is optimistic for a 3.3V board. Make sure the programmer is using 19200 just to be safe.

            For inof I am using arduino ide 1.8.13 and musensors 2.3.2 with a £2 aliexpress serial prgrammer and have only encountered warnings about sck (which can safely be ignored)....

            G 2 Replies Last reply
            0
            • G Gilles BILLARD

              @skywatch said in 💬 Battery Powered Sensors:

              I suggest s simple node to test with, something like the door/window sensor with just one switch.

              I'll do that, but for my thermal sensor the test cannot be more simple

              ......burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

              I don't have the choice for the baud rate; Where is it located ?

              Then add the radio module (you can try another if you have it

              I swaped everything I could. (The radio modules that was connected to the single functionning sensor included)

              what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you).

              Bought from Aliexpress;

              Load your sketch and try again.

              I have done the whole process hundreds and hundreds of time

              You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

              Yes I'll do that...

              skywatchS Offline
              skywatchS Offline
              skywatch
              wrote on last edited by
              #335

              @Gilles-BILLARD said in 💬 Battery Powered Sensors:

              Bought from Aliexpress;

              That is not much help.

              G 1 Reply Last reply
              0
              • skywatchS skywatch

                @Gilles-BILLARD It's in the sketch when you start serial interface. As an aside have you checked the baud rate the pro mini or uno you are using as a programmer - maybe it is 115200 and that is optimistic for a 3.3V board. Make sure the programmer is using 19200 just to be safe.

                For inof I am using arduino ide 1.8.13 and musensors 2.3.2 with a £2 aliexpress serial prgrammer and have only encountered warnings about sck (which can safely be ignored)....

                G Offline
                G Offline
                Gilles BILLARD
                wrote on last edited by Gilles BILLARD
                #336

                @skywatch said in 💬 Battery Powered Sensors:

                @Gilles-BILLARD It's in the sketch when you start serial interface. As an aside have you checked the baud rate the pro mini or uno you are using as a programmer - maybe it is 115200 and that is optimistic for a 3.3V board. Make sure the programmer is using 19200 just to be safe.

                For inof I am using arduino ide 1.8.13 and musensors 2.3.2 with a £2 aliexpress serial prgrammer and have only encountered warnings about sck (which can safely be ignored)....

                Ha, OKay; I've aslo supposed a pb from that, so I removed the sérial monitor and baud rate config.
                And after the bootlaoder burning, the log is OKay.. the MEGA328P ID is also the good one and always the same for all 328

                1 Reply Last reply
                0
                • skywatchS skywatch

                  @Gilles-BILLARD said in 💬 Battery Powered Sensors:

                  Bought from Aliexpress;

                  That is not much help.

                  G Offline
                  G Offline
                  Gilles BILLARD
                  wrote on last edited by
                  #337

                  @skywatch
                  1 board
                  Radio : https://www.amazon.fr/NRF24L01-antenne-module-emetteur-recepteur-sans/dp/B01FLVTY3G/ref=sr_1_21?dchild=1&hvadid=80470576921758&hvbmt=be&hvdev=c&hvqmt=e&keywords=nrf2401&qid=1618066959&sr=8-21

                  1 Reply Last reply
                  0
                  • skywatchS skywatch

                    @Gilles-BILLARD It's in the sketch when you start serial interface. As an aside have you checked the baud rate the pro mini or uno you are using as a programmer - maybe it is 115200 and that is optimistic for a 3.3V board. Make sure the programmer is using 19200 just to be safe.

                    For inof I am using arduino ide 1.8.13 and musensors 2.3.2 with a £2 aliexpress serial prgrammer and have only encountered warnings about sck (which can safely be ignored)....

                    G Offline
                    G Offline
                    Gilles BILLARD
                    wrote on last edited by
                    #338

                    @skywatch said in 💬 Battery Powered Sensors:

                    ...........have you checked the baud rate the pro mini or uno you are using as a programmer - maybe it is 115200 and that is optimistic for a 3.3V board.

                    The programmer is loaded with standard Arduino ISP sketch (19200 default baud rate)

                    1 Reply Last reply
                    0
                    • skywatchS skywatch

                      @Gilles-BILLARD I understnad your frustration - I have been there myself.

                      I suggest s simple node to test with, something like the door/window sensor with just one switch.

                      Take your promini, remove leds and power regulator (or cut tracks) then burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

                      Then add the radio module (you can try another if you have it - what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you). Load your sketch and try again.

                      You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

                      G Offline
                      G Offline
                      Gilles BILLARD
                      wrote on last edited by Gilles BILLARD
                      #339

                      @skywatch said in 💬 Battery Powered Sensors:

                      @Gilles-BILLARD I understnad your frustration - I have been there myself.

                      I suggest s simple node to test with, something like the door/window sensor with just one switch.

                      I did that right away and the result is....
                      All's OKay without sleep(xxx):

                      2021-04-10 17:38:22.898 Status: MySensors: Node: 52, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:38:22.899 Status: MySensors: Node: 52, Sketch Version: GB.3.0
                      2021-04-10 17:40:25.515 (GiBi-Home) Light/Switch (Security Sensor)
                      2021-04-10 17:40:31.277 (GiBi-Home) Light/Switch (Security Sensor)
                      

                      Présentation then 2 minutes until I change the input twice

                      But with sleep() included...

                      2021-04-10 17:34:12.251 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:34:12.251 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                      2021-04-10 17:34:22.491 (GiBi-Home) Light/Switch (Security Sensor)
                      2021-04-10 17:34:22.486 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:34:22.486 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                      2021-04-10 17:34:32.561 (GiBi-Home) Light/Switch (Security Sensor)
                      2021-04-10 17:34:32.556 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:34:32.556 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                      2021-04-10 17:34:42.631 (GiBi-Home) Light/Switch (Security Sensor)
                      2021-04-10 17:34:42.626 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:34:42.626 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                      2021-04-10 17:34:52.701 (GiBi-Home) Light/Switch (Security Sensor)
                      2021-04-10 17:34:52.696 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:34:52.696 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                      2021-04-10 17:35:02.772 (GiBi-Home) Light/Switch (Security Sensor)
                      2021-04-10 17:35:02.767 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:35:02.767 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                      2021-04-10 17:35:12.842 (GiBi-Home) Light/Switch (Security Sensor)
                      2021-04-10 17:35:12.837 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:35:12.837 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                      2021-04-10 17:35:22.913 (GiBi-Home) Light/Switch (Security Sensor)
                      2021-04-10 17:35:22.908 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:35:22.908 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                      2021-04-10 17:35:32.984 (GiBi-Home) Light/Switch (Security Sensor)
                      2021-04-10 17:35:32.979 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                      2021-04-10 17:35:32.980 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                      2021-04-10 17:35:43.055 (GiBi-Home) Light/Switch (Security Sensor)
                      

                      The same kind of reboot up to présentation()

                      So sad !
                      NOTA: The sketch is the one provided as an example in BinarySwitchSensor.ino sketch
                      I've just added sleep( 10000) a the very end.

                      skywatchS 1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        Gilles BILLARD
                        wrote on last edited by
                        #340

                        Please, have a look at the time stamps:
                        Tests vs sleep time
                        More or less 10 seconds if sleep time >= 10 000 ms
                        Only a little more than 3 sec if sleep time = 2 000 ms
                        Could it help ?

                        YveauxY 1 Reply Last reply
                        0
                        • G Gilles BILLARD

                          @skywatch said in 💬 Battery Powered Sensors:

                          @Gilles-BILLARD I understnad your frustration - I have been there myself.

                          I suggest s simple node to test with, something like the door/window sensor with just one switch.

                          I did that right away and the result is....
                          All's OKay without sleep(xxx):

                          2021-04-10 17:38:22.898 Status: MySensors: Node: 52, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:38:22.899 Status: MySensors: Node: 52, Sketch Version: GB.3.0
                          2021-04-10 17:40:25.515 (GiBi-Home) Light/Switch (Security Sensor)
                          2021-04-10 17:40:31.277 (GiBi-Home) Light/Switch (Security Sensor)
                          

                          Présentation then 2 minutes until I change the input twice

                          But with sleep() included...

                          2021-04-10 17:34:12.251 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:34:12.251 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                          2021-04-10 17:34:22.491 (GiBi-Home) Light/Switch (Security Sensor)
                          2021-04-10 17:34:22.486 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:34:22.486 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                          2021-04-10 17:34:32.561 (GiBi-Home) Light/Switch (Security Sensor)
                          2021-04-10 17:34:32.556 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:34:32.556 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                          2021-04-10 17:34:42.631 (GiBi-Home) Light/Switch (Security Sensor)
                          2021-04-10 17:34:42.626 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:34:42.626 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                          2021-04-10 17:34:52.701 (GiBi-Home) Light/Switch (Security Sensor)
                          2021-04-10 17:34:52.696 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:34:52.696 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                          2021-04-10 17:35:02.772 (GiBi-Home) Light/Switch (Security Sensor)
                          2021-04-10 17:35:02.767 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:35:02.767 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                          2021-04-10 17:35:12.842 (GiBi-Home) Light/Switch (Security Sensor)
                          2021-04-10 17:35:12.837 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:35:12.837 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                          2021-04-10 17:35:22.913 (GiBi-Home) Light/Switch (Security Sensor)
                          2021-04-10 17:35:22.908 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:35:22.908 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                          2021-04-10 17:35:32.984 (GiBi-Home) Light/Switch (Security Sensor)
                          2021-04-10 17:35:32.979 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
                          2021-04-10 17:35:32.980 Status: MySensors: Node: 51, Sketch Version: GB.3.0
                          2021-04-10 17:35:43.055 (GiBi-Home) Light/Switch (Security Sensor)
                          

                          The same kind of reboot up to présentation()

                          So sad !
                          NOTA: The sketch is the one provided as an example in BinarySwitchSensor.ino sketch
                          I've just added sleep( 10000) a the very end.

                          skywatchS Offline
                          skywatchS Offline
                          skywatch
                          wrote on last edited by skywatch
                          #341

                          @Gilles-BILLARD Inoticed the following in the sketch you posted above...

                            // ************Sleeping test ***************
                              #ifdef MY_DEBUG 
                                  delay(10000); // 10 secondes
                              #else
                                  sleep(10000);
                              #endif    
                          }
                          

                          Delay should be replaced by Wait in mysensors code to avoid blocking.

                          I always went by the old saying that when you are in a hole, stop digging. I have not seen the behaviour you show before. I can only suggest that you run the EEPROMclear sketch (file>examples>mysensors>cleareepromconfig) and try again. Check the voltage to the promini is stable and the radio has the recommended capacitor. You might be surprised at the difference a good clean power supply can make.

                          #is the gateway running on the same power supply? IS GW receiving messages? Please provide the FULL debug output on the serial monitor. That snippet doesn't help much.

                          1 Reply Last reply
                          0
                          • G Gilles BILLARD

                            Please, have a look at the time stamps:
                            Tests vs sleep time
                            More or less 10 seconds if sleep time >= 10 000 ms
                            Only a little more than 3 sec if sleep time = 2 000 ms
                            Could it help ?

                            YveauxY Offline
                            YveauxY Offline
                            Yveaux
                            Mod
                            wrote on last edited by
                            #342

                            @Gilles-BILLARD I would like to think along to help, but lost you many posts back...
                            All was ok, so what did you change (and why) and what is the real issue right now?
                            And as @skywatch indicates, post the full log, sketch and everything. Don't try to filter information yourself, you might miss something.

                            http://yveaux.blogspot.nl

                            G 1 Reply Last reply
                            1
                            • G Offline
                              G Offline
                              Gilles BILLARD
                              wrote on last edited by Gilles BILLARD
                              #343

                              Finally, I found it….
                              A big thank you to all those who helped;
                              Here's my report in case it could be usefull to others (so, they will not waste as much time as I did)
                              All began with my FTDI refusing to work with the MiniCore library, returning this classic error code: "avrdude: error: could not find USB device with vid-0x16c0 pid-0x5dc vendor'www.fischl.de' product'USBasp' when I wanted to reprogram a ProMini.
                              So I opted for programming via another ProMini (Arduino as ISP)
                              The first ProMini was able to receive the MiniCore bootloader and then my sketch without any problem, but the followings did’nt....No error message was reported; I spent 9 days trying hundreds of times changing only one thing at a time... unsuccessfully.
                              But this morning I tried again using version 2.0.0 of Arduino’s IDE, and here I received an error message; "Impossible to recognize the Arduino as ISP" !!!!
                              Eureka.... I had the idea to inject the MiniCore BootLoader + the “Arduino ISP” sketch in the 2nd via the IDE Arduino 1.8.13 and then use this very 2nd one to program others; At that moment, everything became normal; The tests were ok and went to "sleep" so I loaded my sketch and everything is good now.
                              So: If you try to use Arduino as ISP with MiniCore Both Arduinos sould have been burnt with MiniCore BootLoader
                              Thank you again.

                              PS: Could the admin delete all my useless posts ?

                              1 Reply Last reply
                              0
                              • YveauxY Yveaux

                                @Gilles-BILLARD I would like to think along to help, but lost you many posts back...
                                All was ok, so what did you change (and why) and what is the real issue right now?
                                And as @skywatch indicates, post the full log, sketch and everything. Don't try to filter information yourself, you might miss something.

                                G Offline
                                G Offline
                                Gilles BILLARD
                                wrote on last edited by
                                #344

                                @Yveaux said in 💬 Battery Powered Sensors:

                                .... All was ok, so what did you change (and why)

                                A the very beginning, hesitating with the procedure, I've probably burnt the Minicore bootloader in the programming ProMini without noticing it... That's the only explanation I see.

                                1 Reply Last reply
                                0
                                • skywatchS Offline
                                  skywatchS Offline
                                  skywatch
                                  wrote on last edited by
                                  #345

                                  Just completed 1 year of operation of a PIR sensor in the house that trigger 100-200 times a day. It is powered by 2xAA batteries and here is a graph of battery level over the year.

                                  graph.jpg

                                  N 1 Reply Last reply
                                  1
                                  • skywatchS skywatch

                                    Just completed 1 year of operation of a PIR sensor in the house that trigger 100-200 times a day. It is powered by 2xAA batteries and here is a graph of battery level over the year.

                                    graph.jpg

                                    N Offline
                                    N Offline
                                    nekitoss
                                    wrote on last edited by
                                    #346

                                    @skywatch If your project is free and open, where i can look at it? At the moment i need to solve same problem. On your graph what will be 0% ? For mine devices it is minimum 1.9v, for few it is 2.2v

                                    skywatchS 1 Reply Last reply
                                    0
                                    • N nekitoss

                                      @skywatch If your project is free and open, where i can look at it? At the moment i need to solve same problem. On your graph what will be 0% ? For mine devices it is minimum 1.9v, for few it is 2.2v

                                      skywatchS Offline
                                      skywatchS Offline
                                      skywatch
                                      wrote on last edited by skywatch
                                      #347

                                      @nekitoss
                                      I used 3.3V pro mini with regulator removed and powered by Vin pin. Also removed leds from the pro mini.

                                      I used minicore bootloader.

                                      I used the small pir sensors and again removed the regulator to power directly from the pro mini outputs.

                                      After that sleep the node and trigger on interrupt.

                                      Send battery level once a day.

                                      Use inbuilt battery level monitor and not external components that constantly drain power to get battery level.

                                      1.8V is 0% on the graph (not visible yet!) but I have had nodes working below 1.7V It's a matter of luck with that it seems.

                                      Hope this helps you on the right track. I'll try and help if you want.

                                      1ed.jpg

                                      This is the latest image and still going strong after 18 months. Voltage is at 2.903V

                                      Here is photo of the test example - I need to make a case and produce more of them over winter.....

                                      20231016_095845.jpg

                                      Here is the same build/code of a window sensor. Similar time frame but hardly triggered.....

                                      2ed.jpg

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


                                      13

                                      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