Skip to content
  • 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
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

💬 Battery Powered Sensors

Scheduled Pinned Locked Moved Announcements
battery
347 Posts 55 Posters 66.9k 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.
  • T Offline
    T Offline
    tssk
    wrote on last edited by tssk
    #291

    I hope I am measuring it correctly.

    It shows 12.5 when in sleep and up to 90 when transmitting/measuring.

    Any one can interpret that for me please? :)

    IMG_20210225_151612.jpeg

    skywatchS 1 Reply Last reply
    0
    • T tssk

      I hope I am measuring it correctly.

      It shows 12.5 when in sleep and up to 90 when transmitting/measuring.

      Any one can interpret that for me please? :)

      IMG_20210225_151612.jpeg

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

      @tssk That is 12.5mA (12500uA) in sleep and up to 90mA (90000uA) in transmit mode. Compare that to my door/window sensor which is <5uA sleep and about 15uA transmit with nrf24l01+). Your current draw is too high for most 'normal' batteries to last very long as you have found out.

      Minicore info and install instructions is here -- https://github.com/MCUdude/MiniCore.

      Pull-up resistors are on the pcb and connect between data and Vcc as well as clock to Vcc. You won't gain a lot tampering with those with the figures you have posted so I would forget about those at the moment and concentrate on more productive things to get a lower current.

      here is the bit of code to only send sensor variable when it has changed.....

      if (int != oldint) {
          send(msgInt.set(int));
          oldint = int;
        }
      

      This is used in my door sensor and can be used with any sensor variable name.

      ALso of help would be to re-flash the node with MY_DEBUG to see how often your node is measuring and sending data. It shows if your prog is working as your expected it to (or not).

      Anoother thought is that the sleep interval does not have to be fixed. You can vary it so that some times of day it is 20-30mins between read/send and at others you can reduce it if you think you need to.

      mfalkviddM 1 Reply Last reply
      0
      • skywatchS skywatch

        @tssk That is 12.5mA (12500uA) in sleep and up to 90mA (90000uA) in transmit mode. Compare that to my door/window sensor which is <5uA sleep and about 15uA transmit with nrf24l01+). Your current draw is too high for most 'normal' batteries to last very long as you have found out.

        Minicore info and install instructions is here -- https://github.com/MCUdude/MiniCore.

        Pull-up resistors are on the pcb and connect between data and Vcc as well as clock to Vcc. You won't gain a lot tampering with those with the figures you have posted so I would forget about those at the moment and concentrate on more productive things to get a lower current.

        here is the bit of code to only send sensor variable when it has changed.....

        if (int != oldint) {
            send(msgInt.set(int));
            oldint = int;
          }
        

        This is used in my door sensor and can be used with any sensor variable name.

        ALso of help would be to re-flash the node with MY_DEBUG to see how often your node is measuring and sending data. It shows if your prog is working as your expected it to (or not).

        Anoother thought is that the sleep interval does not have to be fixed. You can vary it so that some times of day it is 20-30mins between read/send and at others you can reduce it if you think you need to.

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

        @skywatch said in 💬 Battery Powered Sensors:

        @tssk That is 12.5mA (12500uA) in sleep and up to 90mA (90000uA) in transmit mode. Compare that to my door/window sensor which is <5uA sleep and about 15uA transmit with nrf24l01+

        You mean 15mA transmit, right?

        skywatchS 1 Reply Last reply
        1
        • T Offline
          T Offline
          tssk
          wrote on last edited by
          #294

          I removed the step up booster connected + directly to VCC but the node stopped working - only the arduino onboard led is constantly on.

          I also tried to measure the step up booster alone and it is showing 0.05 at 20mA on multimeter settings.

          I am now really confused and I am not sure what to conclude from that...

          T 1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @skywatch said in 💬 Battery Powered Sensors:

            @tssk That is 12.5mA (12500uA) in sleep and up to 90mA (90000uA) in transmit mode. Compare that to my door/window sensor which is <5uA sleep and about 15uA transmit with nrf24l01+

            You mean 15mA transmit, right?

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

            @mfalkvidd Yes - you got me ;)

            I was confusing it with the battery pir which is 15-16uA in trigger mode. But yes, 15mA in Tx mode with a nrf24 module.

            Maybe it is time for me to hibernate for a few months after all .....

            1 Reply Last reply
            0
            • T tssk

              I removed the step up booster connected + directly to VCC but the node stopped working - only the arduino onboard led is constantly on.

              I also tried to measure the step up booster alone and it is showing 0.05 at 20mA on multimeter settings.

              I am now really confused and I am not sure what to conclude from that...

              T Offline
              T Offline
              tssk
              wrote on last edited by tssk
              #296

              @tssk said in 💬 Battery Powered Sensors:

              I removed the step up booster connected + directly to VCC but the node stopped working - only the arduino onboard led is constantly on.

              The problem was that the batteries I used were not completely fresh. I googled that Arduino pro mini need at least 2.7V to operate. Using fresh batteries the node is working. And it shows 6.0mA in sleep and 25.4mA when transmitting.

              So using the stepup booster adds 6.5mA in sleep and 65mA when transmitting to consumption?

              I also found LowPower library (https://github.com/rocketscream/Low-Power) but it seems to interfere with mysensors library (https://github.com/rocketscream/Low-Power/issues/80). Any experience?

              skywatchS 1 Reply Last reply
              0
              • T tssk

                @tssk said in 💬 Battery Powered Sensors:

                I removed the step up booster connected + directly to VCC but the node stopped working - only the arduino onboard led is constantly on.

                The problem was that the batteries I used were not completely fresh. I googled that Arduino pro mini need at least 2.7V to operate. Using fresh batteries the node is working. And it shows 6.0mA in sleep and 25.4mA when transmitting.

                So using the stepup booster adds 6.5mA in sleep and 65mA when transmitting to consumption?

                I also found LowPower library (https://github.com/rocketscream/Low-Power) but it seems to interfere with mysensors library (https://github.com/rocketscream/Low-Power/issues/80). Any experience?

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

                @tssk

                The 2.7V is set in the fuses, you can go a lot lower if you disable Bod completely. I tested one with nrf24 and it worked down to 1.64V.

                I think you will find that all the 'good stuff' from the low power library is included in mysensors sleep function anyway.

                I suggest using minicore (it is easy to install and all works from within the arduino IDE you are used to) and set internal oscillator and disable BoD. You will need a programmer (a few dollars) or you can use another arduino as programmer. but that is more time consuming to set up and easier to mess up as well!

                Good that you got rid of the booster!

                T 1 Reply Last reply
                0
                • skywatchS skywatch

                  @tssk

                  The 2.7V is set in the fuses, you can go a lot lower if you disable Bod completely. I tested one with nrf24 and it worked down to 1.64V.

                  I think you will find that all the 'good stuff' from the low power library is included in mysensors sleep function anyway.

                  I suggest using minicore (it is easy to install and all works from within the arduino IDE you are used to) and set internal oscillator and disable BoD. You will need a programmer (a few dollars) or you can use another arduino as programmer. but that is more time consuming to set up and easier to mess up as well!

                  Good that you got rid of the booster!

                  T Offline
                  T Offline
                  tssk
                  wrote on last edited by
                  #298

                  @skywatch said in 💬 Battery Powered Sensors:

                  I think you will find that all the 'good stuff' from the low power library is included in mysensors sleep function anyway.

                  So when I use sleep() mysensors library overloads the generic arduino sleep?

                  I suggest using minicore (it is easy to install and all works from within the arduino IDE you are used to) and set internal oscillator and disable BoD. You will need a programmer (a few dollars) or you can use another arduino as programmer. but that is more time consuming to set up and easier to mess up as well!

                  I look at the git repo and I more confused now. I thought it is some kind of bootloader/firmware I flash. What is Arduino core? I never heard that term.

                  Good that you got rid of the booster!

                  I wonder why the booster is recommended here https://www.mysensors.org/build/battery ? Or did I misinterpreted?

                  mfalkviddM E 2 Replies Last reply
                  0
                  • T tssk

                    @skywatch said in 💬 Battery Powered Sensors:

                    I think you will find that all the 'good stuff' from the low power library is included in mysensors sleep function anyway.

                    So when I use sleep() mysensors library overloads the generic arduino sleep?

                    I suggest using minicore (it is easy to install and all works from within the arduino IDE you are used to) and set internal oscillator and disable BoD. You will need a programmer (a few dollars) or you can use another arduino as programmer. but that is more time consuming to set up and easier to mess up as well!

                    I look at the git repo and I more confused now. I thought it is some kind of bootloader/firmware I flash. What is Arduino core? I never heard that term.

                    Good that you got rid of the booster!

                    I wonder why the booster is recommended here https://www.mysensors.org/build/battery ? Or did I misinterpreted?

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

                    @tssk said in 💬 Battery Powered Sensors:

                    I wonder why the booster is recommended here https://www.mysensors.org/build/battery ? Or did I misinterpreted?

                    If you interpreted

                    Note that a booster can be a bit noisy (and disturb the radio). The booster is also less than 100% efficient, so boosting can be less efficient than just powering the Arduino directly from the batteries and change batteries when they hit 2.8V.

                    as a recommendation, I would say that you did a slight misinterpretation. But it depends on what sensors you use and how much the device will be sleeping.

                    1 Reply Last reply
                    0
                    • T tssk

                      @skywatch said in 💬 Battery Powered Sensors:

                      I think you will find that all the 'good stuff' from the low power library is included in mysensors sleep function anyway.

                      So when I use sleep() mysensors library overloads the generic arduino sleep?

                      I suggest using minicore (it is easy to install and all works from within the arduino IDE you are used to) and set internal oscillator and disable BoD. You will need a programmer (a few dollars) or you can use another arduino as programmer. but that is more time consuming to set up and easier to mess up as well!

                      I look at the git repo and I more confused now. I thought it is some kind of bootloader/firmware I flash. What is Arduino core? I never heard that term.

                      Good that you got rid of the booster!

                      I wonder why the booster is recommended here https://www.mysensors.org/build/battery ? Or did I misinterpreted?

                      E Offline
                      E Offline
                      evb
                      wrote on last edited by evb
                      #300

                      @tssk In following post I have described my adventures in building a battery powered door node : https://forum.mysensors.org/topic/11499/checking-mechanical-locked-doors-by-a-battery-based-windows-door-sensor-node?_=1614421889744
                      Search for the section : The battery-based windows/door sensor node : software
                      I explain there the use of the minicore package.
                      See also the section References at the end for more information about battery powered nodes

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        tssk
                        wrote on last edited by
                        #301

                        So I ordered Arduino Uno for programming my Pro Minis. And going to experiment with 2xAA or 3xAA setup without step up booster (they are whining anyway so I will be happy if I get rid of it :)

                        Thank everyone for help!

                        1 Reply Last reply
                        1
                        • N Offline
                          N Offline
                          nekitoss
                          wrote on last edited by
                          #302

                          I have a problem: when batteries go around 2.7V radio will stop transmitting. Board still take current, but no messages.
                          I'm using own board with barebone 328p (8mHz internal) and SMD/mini nrf24l01 (pretty shure china)
                          Did anyone had same issues?

                          I've checked programmaticaly (yes, it is possible!) my fuse bits: Low=0xE2, High=0xD2, Extended=0xFE (0x06)
                          (BOD = 1.8V)
                          I've have three same boards (water leak) and used other not-yet-installed with specially made low-voltage regulated source (with 2200 uF capacitor and resistor load to eliminate voltage drop at transmission) to test - same result.
                          Sometimes i can go lower to 2.5V but not guaranteed, sometimes even corrupted messages (i.e. node id 168 instead 8).
                          Tests were without UART, only MYSController to monitor messages flooding each 5sec to approve life.

                          Did anyone had same problems with nrf24l01 modules? All i see people say the can go to around 2.0 V.

                          According to article https://www.gammon.com.au/power (and datasheet)
                          at 8mHz i'm safe down to 2.4V (something like that i also measured)
                          nrf should go down to 1.9...

                          Also it would be great to add into advanced section possible voltages and problems with NiMh, china modules & 2.7V(if not only me), [not]possible currents from coin cells and metioned article.

                          1 Reply Last reply
                          0
                          • zboblamontZ zboblamont

                            @nekitoss Not sure where you got your information but my Gas Node is on it's second year running on the same two Varta AA alkalines and been down to -20 on more than a few occasions last winter, typically 4 months below -10... Currently the temperature is -3 and headed to -8 overnight, voltage is 2.98, will probably need to replace them in autumn 2019...

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

                            @nekitoss said in 💬 Battery Powered Sensors:

                            It would be great to add to this arctle that if you want to be battery powered outdoors with temperature below zero - you have to use lithium batteries (FR6 for AA) (yes, batteries, not li-ion accumulators!) (for example ultimate lithium energizer, also could be found lithium batteries from other vendors), because Alkaline (LR6 for AA) will be frozen and loose their capacity heavily. If i remember it is >50% at -10 C and death at -20 C. Same problem for li-ion accumulators - when liquid is frozen - electrons are stucked...
                            Also would be great to add some link about battery/accumulator types, advanteges and disadvantages, but i have no links in english, easy-to-read and in one place...

                            But i have very great link about battery-powering that really should be added here, but in advanced section:
                            http://www.gammon.com.au/power

                            @zboblamont how your alkaline batteries experience after 2 years(temperatures, lasting time)? my freshly installed (yes, it was long develop and test...) Lithium AA - when few weeks ago it was -20 .. stopped transmitting! Fixed resetting power when it become little warmer. Possibly same problem with 2.7V or exactly there may be wrong BOD...

                            skywatchS zboblamontZ 2 Replies Last reply
                            0
                            • N nekitoss

                              @nekitoss said in 💬 Battery Powered Sensors:

                              It would be great to add to this arctle that if you want to be battery powered outdoors with temperature below zero - you have to use lithium batteries (FR6 for AA) (yes, batteries, not li-ion accumulators!) (for example ultimate lithium energizer, also could be found lithium batteries from other vendors), because Alkaline (LR6 for AA) will be frozen and loose their capacity heavily. If i remember it is >50% at -10 C and death at -20 C. Same problem for li-ion accumulators - when liquid is frozen - electrons are stucked...
                              Also would be great to add some link about battery/accumulator types, advanteges and disadvantages, but i have no links in english, easy-to-read and in one place...

                              But i have very great link about battery-powering that really should be added here, but in advanced section:
                              http://www.gammon.com.au/power

                              @zboblamont how your alkaline batteries experience after 2 years(temperatures, lasting time)? my freshly installed (yes, it was long develop and test...) Lithium AA - when few weeks ago it was -20 .. stopped transmitting! Fixed resetting power when it become little warmer. Possibly same problem with 2.7V or exactly there may be wrong BOD...

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

                              @nekitoss If I were you I;d reflash the bootloader and chec again. I got my pro mini with ebyte nrf24 to work and register with the gateway all the way down to 1.63V, so somethingi is wrong if you are loosing it at 2.7V (which is also as it happens, a BoD setting for atmel 328p). For the test I used minicore bootloader iwth Bod disabled and 2MHz clock. Bench power supply for the voltage variation.

                              N 1 Reply Last reply
                              0
                              • N nekitoss

                                @nekitoss said in 💬 Battery Powered Sensors:

                                It would be great to add to this arctle that if you want to be battery powered outdoors with temperature below zero - you have to use lithium batteries (FR6 for AA) (yes, batteries, not li-ion accumulators!) (for example ultimate lithium energizer, also could be found lithium batteries from other vendors), because Alkaline (LR6 for AA) will be frozen and loose their capacity heavily. If i remember it is >50% at -10 C and death at -20 C. Same problem for li-ion accumulators - when liquid is frozen - electrons are stucked...
                                Also would be great to add some link about battery/accumulator types, advanteges and disadvantages, but i have no links in english, easy-to-read and in one place...

                                But i have very great link about battery-powering that really should be added here, but in advanced section:
                                http://www.gammon.com.au/power

                                @zboblamont how your alkaline batteries experience after 2 years(temperatures, lasting time)? my freshly installed (yes, it was long develop and test...) Lithium AA - when few weeks ago it was -20 .. stopped transmitting! Fixed resetting power when it become little warmer. Possibly same problem with 2.7V or exactly there may be wrong BOD...

                                zboblamontZ Offline
                                zboblamontZ Offline
                                zboblamont
                                wrote on last edited by
                                #305

                                @nekitoss No problems with alkaline power, 6 - 18 months now on 2xAA down to ca -15c, battery voltage reported ca 2 or 3 times per day.
                                I vaguely recall reading an article on lithium and alkaline battery behaviour in extreme cold weather, the alkalines were the better performers.

                                Note that the pro-minis here use onboard booster and LDO which provide stable 3.3v all the way down to ca 1.8v battery death, so battery voltage is unrelated to system voltage unlike your setup. They also use rfm69s (433MHz) which are better able to penetrate structural obstacles.
                                Bear in mind that if you have comms problems this can substantially reduce battery life as it does not quickly waken, perform the task and go back to deep sleep

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

                                  @mfalkvidd

                                  Nice job on updating the infor BTW :)

                                  1 Reply Last reply
                                  0
                                  • Puneit ThukralP Offline
                                    Puneit ThukralP Offline
                                    Puneit Thukral
                                    wrote on last edited by
                                    #307

                                    Adding on to this.. If we use a map function to convert the battery level like this, then it shows up as an attribute in HomeAssistant and Homekit

                                    Map function works and not the percent. The percent always shows as zero in Homekit.
                                    Hope this helps someone!

                                    void battery()
                                    {
                                      long batteryMillivolts = hwCPUVoltage();
                                      int batteryV =batteryMillivolts /1000 + 0.5;
                                      auto batteryLevel = map(batteryV,EMPTY_BATTERY, FULL_BATTERY, 0, 100);
                                      if (batteryLevel > 100) 
                                      {batteryLevel=100;}
                                    
                                    #ifdef MY_DEBUG
                                      Serial.print("Battery voltage: ");
                                      Serial.print(batteryMillivolts / 1000.0);
                                      Serial.println("V");
                                      Serial.print("Battery Level ");
                                      Serial.print(batteryLevel);
                                      Serial.println(" %");
                                    #endif
                                    
                                      if (oldBatteryLevel != batteryLevel) {
                                        sendBatteryLevel(batteryLevel);
                                        send(msgV.set(batteryV,2));
                                        oldBatteryLevel = batteryLevel;
                                      }
                                    }
                                    

                                    ![Home Assistant](812c9e02-8b21-44dc-ab8d-04559bf38462-image.png image url)

                                    IHomeKit

                                    1 Reply Last reply
                                    1
                                    • skywatchS skywatch

                                      @nekitoss If I were you I;d reflash the bootloader and chec again. I got my pro mini with ebyte nrf24 to work and register with the gateway all the way down to 1.63V, so somethingi is wrong if you are loosing it at 2.7V (which is also as it happens, a BoD setting for atmel 328p). For the test I used minicore bootloader iwth Bod disabled and 2MHz clock. Bench power supply for the voltage variation.

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

                                      @skywatch Thank you very much! Your advice helped. Not shure what it was on BOTH devices - my mistake or some corruption of fuses/program.
                                      On first device (where i found problem) - there were different fuse bits (but according to my eyes BOD was even disabed, but not shure). On the second (where i tested) fuses were checked and were correct. I tried to play with fuses and erase chip... and something strange happened - or chip memory was broken or i can't verify program when box "erase flash and eeprom" is checked... so i took fresh nano, programmed it and resoldered MCU into the second device.
                                      So both devices now are fixed and tested - both work till ~1.9V.
                                      Thanks, you saved my brains!

                                      skywatchS 1 Reply Last reply
                                      1
                                      • N nekitoss

                                        @skywatch Thank you very much! Your advice helped. Not shure what it was on BOTH devices - my mistake or some corruption of fuses/program.
                                        On first device (where i found problem) - there were different fuse bits (but according to my eyes BOD was even disabed, but not shure). On the second (where i tested) fuses were checked and were correct. I tried to play with fuses and erase chip... and something strange happened - or chip memory was broken or i can't verify program when box "erase flash and eeprom" is checked... so i took fresh nano, programmed it and resoldered MCU into the second device.
                                        So both devices now are fixed and tested - both work till ~1.9V.
                                        Thanks, you saved my brains!

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

                                        @nekitoss Yay! :)

                                        Well done on getting it working!

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

                                          Hi from France;
                                          I've tried everything I could and no way to put My temp. sensor to deep sleep.
                                          so I went back to the very beginning with a bare Pro-Min 3.3v and I tryed this:


                                          #include <LowPower.h>
                                          void setup() {
                                          pinMode(13, OUTPUT);
                                          }
                                          void loop() {
                                          LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
                                          digitalWrite(13, HIGH);
                                          delay(1000);
                                          digitalWrite(13, LOW);
                                          }


                                          My boad is going to sleep;
                                          YEEEESSS ! the pb is NOT comming from the board itself....eating a bunch ou micro amp;
                                          Then I've added the minimum requested to make a MySensor extension and I tried this:


                                          #define MY_RADIO_NRF24 // Choix du module radio
                                          #define MY_RF24_PA_LEVEL (RF24_PA_HIGH) //CHOIX: RF24_PA_MIN; RF24_PA_LOW; RF24_PA_HIGH; RF24_PA_MAX
                                          #define RF24_CHANNEL 76
                                          #define RF24_DATARATE RF24_250KBPS
                                          #include <MySensors.h>
                                          #include <LowPower.h>
                                          void setup() {
                                          pinMode(13, OUTPUT);
                                          }
                                          void loop() {
                                          LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
                                          digitalWrite(13, HIGH);
                                          delay(1000);
                                          digitalWrite(13, LOW);
                                          }


                                          The boad stays awaken (4 mA current)
                                          So may be the problem is comming from LowPower library...
                                          I tried this minimal prgm recommended in a tutorial, using MySensors library and SLEEP function:


                                          // Enable and select radio type attached
                                          #define MY_RADIO_RF24
                                          #include <MySensors.h>
                                          uint32_t SLEEP_TIME = 900000; // sleep time between reads (in seconds * 1000 )
                                          int oldBatteryPcnt = 0;
                                          #define FULL_BATTERY 3 // 3V for 2xAA alkaline. Adjust if you use a different battery setup.
                                          void setup()
                                          {
                                          }
                                          void presentation()
                                          {
                                          // Send the sketch version information to the gateway and Controller
                                          sendSketchInfo("Battery Meter", "1.0");
                                          }
                                          void loop()
                                          {
                                          // get the battery Voltage
                                          long batteryMillivolts = hwCPUVoltage();
                                          int batteryPcnt = batteryMillivolts / FULL_BATTERY / 1000.0 * 100 + 0.5;
                                          if (oldBatteryPcnt != batteryPcnt) {
                                          sendBatteryLevel(batteryPcnt);
                                          oldBatteryPcnt = batteryPcnt;
                                          }
                                          sleep(SLEEP_TIME);
                                          }


                                          NO WAY AGAIN; The board is still eating 4mA all the way long.
                                          I'm lost !!!! Please HELP ME ....

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


                                          3

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular