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 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


                          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