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 67.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.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #151

    1 Amp is definitely a lot. I think it can't be a correct reading

    1 Reply Last reply
    0
    • F FatBeard

      @sundberg84 Thanks Sunberg, pretty much sorted now. It was the sensor, i changed libraries and it solved my problem. In theory i was using the forced read with both, but only the sparkfun bme280 library worked in reducing the power. To the best of my knowledge, i'm now running at 6ua most of the time with a 60ms (i timed from beginning to end of the loop method) jump to 1amp every three minutes to get a reading. It's difficult for me to capture the amps properly as when i put my uni-t digital multimeter into the circuit, the nrf stops working. Any thoughts on why that might be?

      sundberg84S Offline
      sundberg84S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by
      #152

      @FatBeard - as @gohan said - 1A can not be correct. Something is wrong.
      If the radio does not work, and the sensors if fishy... I would disconnect it and run the radio/atmega only and fake a sensor value to send and see what happens.

      F 1 Reply Last reply
      0
      • sundberg84S sundberg84

        @FatBeard - as @gohan said - 1A can not be correct. Something is wrong.
        If the radio does not work, and the sensors if fishy... I would disconnect it and run the radio/atmega only and fake a sensor value to send and see what happens.

        F Offline
        F Offline
        FatBeard
        wrote on last edited by
        #153

        @sundberg84 @gohan. Apologies , that's a typo on my part. It jumps to 1ma do 60ms from 6ua. Which I'm happy with I think. My question was more how I can measure it properly. The multimeter seems to be effecting the circuit.

        sundberg84S gohanG 2 Replies Last reply
        0
        • F FatBeard

          @sundberg84 @gohan. Apologies , that's a typo on my part. It jumps to 1ma do 60ms from 6ua. Which I'm happy with I think. My question was more how I can measure it properly. The multimeter seems to be effecting the circuit.

          sundberg84S Offline
          sundberg84S Offline
          sundberg84
          Hardware Contributor
          wrote on last edited by
          #154
          This post is deleted!
          1 Reply Last reply
          0
          • F FatBeard

            @sundberg84 @gohan. Apologies , that's a typo on my part. It jumps to 1ma do 60ms from 6ua. Which I'm happy with I think. My question was more how I can measure it properly. The multimeter seems to be effecting the circuit.

            gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #155

            @FatBeard actually what you really need to measure is the sleep current as it is the state where the node will be spending all of its time. Where are you connecting the multimeter for measuring current?

            F 1 Reply Last reply
            0
            • gohanG gohan

              @FatBeard actually what you really need to measure is the sleep current as it is the state where the node will be spending all of its time. Where are you connecting the multimeter for measuring current?

              F Offline
              F Offline
              FatBeard
              wrote on last edited by
              #156

              @gohan between positive end of one of the two aa batteries and where it enters circuit. If I start off by having battery connected, the release it slowly with the multimeter attached and without breaking circuit I get my 6ua. However after the timer runs out and the radio comes back on I'm stuck at 1ma. The radio at that point doesn't want to work and it doesn't return to 6ua

              YveauxY 1 Reply Last reply
              0
              • F FatBeard

                @gohan between positive end of one of the two aa batteries and where it enters circuit. If I start off by having battery connected, the release it slowly with the multimeter attached and without breaking circuit I get my 6ua. However after the timer runs out and the radio comes back on I'm stuck at 1ma. The radio at that point doesn't want to work and it doesn't return to 6ua

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

                @FatBeard the burden voltage of your multimeter might be too large, which would reduce the voltage to the atmega below its working level.
                You're measuring current, so the meter must be in series with the power supply. It's not clear to me how you can remove the multimeter without breaking power to the atmega.

                http://yveaux.blogspot.nl

                1 Reply Last reply
                0
                • gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #158

                  You could try to add a booster to power the Arduino or change the multimeter ๐Ÿ˜€

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    sineverba
                    Hardware Contributor
                    wrote on last edited by
                    #159

                    Hi to all!
                    I have a issue reading of voltage on pin A0 of an ATMEGA 328 barebone mounted on a breadboard.

                    This is the image

                    alt text

                    The purple pin goes to A0.

                    The rail on the bottom coming direct from batteries, with a multimeter I read that they have 2.73V. On monitor serial, % of battery is about 1-2% and voltage reading is about... 0.004 and floating about 0.004 - 0.010 ....

                    Can I imagine an issue with pin A0 itself? I have about 10 Atmega spares :) and I will test another one... but thinking about this issue.

                    I did try also removing the 0.1uF cap, without any change.

                    The reading function is the same of this sketch.

                    Thank you very much!

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      iahim67
                      wrote on last edited by
                      #160

                      Hi guys, if your Arduino is equipped with an ATMega 328P then it could go down to 1.8V at lower frequencies like 1MHz (8MHz internal RC oscillator / 8 by default).
                      Or you can use the internal low power 128KHz RC osc eventually ...
                      It means you could power both the Arduino and the radio directly from the battery string and consume even less current.
                      Just wondering if anyone tried these cases so far?

                      1 Reply Last reply
                      0
                      • gohanG Offline
                        gohanG Offline
                        gohan
                        Mod
                        wrote on last edited by
                        #161

                        There have been some users that went that way but personally I am preferring to use a single AA LiFePo4 battery with standard voltages and clocks

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          MagnusF
                          wrote on last edited by
                          #162

                          I am a newbie and have some thoughts about the battery level that I did not find in this forum.
                          The 8MHz 3.3V Arduino Pro Mini can handle down to roughly 2.8V.
                          If I have understood the calculations in the sketch correctly then the analog value of A0 is 1023 at 3.44V and 0 at 0V.
                          This means that at 2.8V the value is about 830 = 83% and under this, the Arduino stops working. Is this right?
                          If this is correct, I wonder if someone has changed the calculation in the sketch so that the battery percentage becomes 0 at 2.8V?
                          This would mean that the battery percentage becomes a more real value on the battery level.

                          rozpruwaczR 1 Reply Last reply
                          0
                          • gohanG Offline
                            gohanG Offline
                            gohan
                            Mod
                            wrote on last edited by
                            #163

                            It's a simple percentage calculation that you can do it in the code

                            M 1 Reply Last reply
                            0
                            • gohanG gohan

                              It's a simple percentage calculation that you can do it in the code

                              M Offline
                              M Offline
                              MagnusF
                              wrote on last edited by
                              #164

                              @gohan Thanks for your reply, you can show me how the code should look.

                              1 Reply Last reply
                              0
                              • gohanG Offline
                                gohanG Offline
                                gohan
                                Mod
                                wrote on last edited by
                                #165
                                void batM() //The battery calculations
                                {
                                  delay(500);
                                  // Battery monitoring reading
                                  int sensorValue = analogRead(BATTERY_SENSE_PIN);
                                  delay(500);
                                
                                  // Calculate the battery in %
                                  float Vbat = sensorValue * VBAT_PER_BITS;
                                  send(msgVBat.set(Vbat, 3));
                                  int batteryPcnt = static_cast<int>(((Vbat - VMIN) / (VMAX - VMIN))*100.);
                                  Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %");
                                
                                  // Add it to array so we get an average of 3 (3x20min)
                                  batArray[batLoop] = batteryPcnt;
                                
                                  if (batLoop > 2) {
                                    batteryPcnt = (batArray[0] + batArray[1] + batArray[2] + batArray[3]);
                                    batteryPcnt = batteryPcnt / 3;
                                
                                    if (batteryPcnt > 100) {
                                      batteryPcnt = 100;
                                    }
                                
                                    Serial.print("Battery Average (Send): "); Serial.print(batteryPcnt); Serial.println(" %");
                                    sendBatteryLevel(batteryPcnt);
                                    batLoop = 0;
                                  }
                                  else
                                  {
                                    batLoop++;
                                  }
                                }
                                

                                This is the function I use, I just define the VMAX and VMIN in the beginning of sketch. The function calculates an average of 3 measurements before sending the value

                                tonnerre33T 1 Reply Last reply
                                0
                                • gohanG gohan
                                  void batM() //The battery calculations
                                  {
                                    delay(500);
                                    // Battery monitoring reading
                                    int sensorValue = analogRead(BATTERY_SENSE_PIN);
                                    delay(500);
                                  
                                    // Calculate the battery in %
                                    float Vbat = sensorValue * VBAT_PER_BITS;
                                    send(msgVBat.set(Vbat, 3));
                                    int batteryPcnt = static_cast<int>(((Vbat - VMIN) / (VMAX - VMIN))*100.);
                                    Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %");
                                  
                                    // Add it to array so we get an average of 3 (3x20min)
                                    batArray[batLoop] = batteryPcnt;
                                  
                                    if (batLoop > 2) {
                                      batteryPcnt = (batArray[0] + batArray[1] + batArray[2] + batArray[3]);
                                      batteryPcnt = batteryPcnt / 3;
                                  
                                      if (batteryPcnt > 100) {
                                        batteryPcnt = 100;
                                      }
                                  
                                      Serial.print("Battery Average (Send): "); Serial.print(batteryPcnt); Serial.println(" %");
                                      sendBatteryLevel(batteryPcnt);
                                      batLoop = 0;
                                    }
                                    else
                                    {
                                      batLoop++;
                                    }
                                  }
                                  

                                  This is the function I use, I just define the VMAX and VMIN in the beginning of sketch. The function calculates an average of 3 measurements before sending the value

                                  tonnerre33T Offline
                                  tonnerre33T Offline
                                  tonnerre33
                                  Hardware Contributor
                                  wrote on last edited by
                                  #166

                                  @gohan said in ๐Ÿ’ฌ Battery Powered Sensors:
                                  Hello, i didn't know why you add 4 measures (batarray) and you divide by 3 the sum .

                                  mfalkviddM 1 Reply Last reply
                                  1
                                  • tonnerre33T tonnerre33

                                    @gohan said in ๐Ÿ’ฌ Battery Powered Sensors:
                                    Hello, i didn't know why you add 4 measures (batarray) and you divide by 3 the sum .

                                    mfalkviddM Online
                                    mfalkviddM Online
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by
                                    #167

                                    @tonnerre33 good catch! maybe it's an optimistic value :)

                                    1 Reply Last reply
                                    0
                                    • gohanG Offline
                                      gohanG Offline
                                      gohan
                                      Mod
                                      wrote on last edited by
                                      #168

                                      I actually didn't look much at battery percentage, but I prefer looking at the voltage that gives me a better idea of how the battery is doing since I can log the values on a graph

                                      1 Reply Last reply
                                      1
                                      • M MagnusF

                                        I am a newbie and have some thoughts about the battery level that I did not find in this forum.
                                        The 8MHz 3.3V Arduino Pro Mini can handle down to roughly 2.8V.
                                        If I have understood the calculations in the sketch correctly then the analog value of A0 is 1023 at 3.44V and 0 at 0V.
                                        This means that at 2.8V the value is about 830 = 83% and under this, the Arduino stops working. Is this right?
                                        If this is correct, I wonder if someone has changed the calculation in the sketch so that the battery percentage becomes 0 at 2.8V?
                                        This would mean that the battery percentage becomes a more real value on the battery level.

                                        rozpruwaczR Offline
                                        rozpruwaczR Offline
                                        rozpruwacz
                                        wrote on last edited by
                                        #169

                                        @magnusf It is important to know that the battery voltage is non linear in respect to how much juice left. Just search for "battery discharge curve" to see how much it depends on battery type, current and temperature. So calculating the percentage is actually meaningless unless You exactly know how much current your board sucks at what temperature and what type of battery You use.

                                        1 Reply Last reply
                                        1
                                        • I Offline
                                          I Offline
                                          Inso
                                          wrote on last edited by
                                          #170

                                          Instead of using "DC-DC Step Up Boost Module 5V" for a HBS, wouldnยดt it make sense to just use 2 AA batteries for the nano and 2 additional batteries (i.e. four in a row) for the HBS?

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


                                          7

                                          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