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

                                What's the hbs?

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

                                  Same as on the motion example - HC-SR501, 4.5V- 12V.

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

                                    Maybe only a third Battery, as the HBS only needs 4.5V..

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

                                      To answer my own question: yes, it seems to work. Searched around and read a while, found this:
                                      https://forum.mysensors.org/topic/6511/hc-sr501-3-3v-randomly-sends-tripped-when-radio-is-on/22
                                      Best addition imho ,no need for step up / down. :D

                                      1 Reply Last reply
                                      0
                                      • R Offline
                                        R Offline
                                        ricorico94
                                        wrote on last edited by
                                        #175

                                        Hi,
                                        I'm trying to build a Soil Moisture sensor with NiMh battery and solar panel as in another post. I use a stepup converter to 3.3V connected on the VCC of a pro-mini 3.3V. The sensor seems working when connected to FTDI USB device, ut once I remove the power from FTDI, no more communication. I measured the voltage on the output of the stepup which indicates 3.26V. Is it norml or a defective step-up ? And should I remove the regulator of the pro-mini as suggested above or not ? (in article above, it states the regulator is not necessary, but it doesn't say if pro-mini would still work if regulator remains there).
                                        Thanks for your support

                                        mfalkviddM 1 Reply Last reply
                                        0
                                        • R ricorico94

                                          Hi,
                                          I'm trying to build a Soil Moisture sensor with NiMh battery and solar panel as in another post. I use a stepup converter to 3.3V connected on the VCC of a pro-mini 3.3V. The sensor seems working when connected to FTDI USB device, ut once I remove the power from FTDI, no more communication. I measured the voltage on the output of the stepup which indicates 3.26V. Is it norml or a defective step-up ? And should I remove the regulator of the pro-mini as suggested above or not ? (in article above, it states the regulator is not necessary, but it doesn't say if pro-mini would still work if regulator remains there).
                                          Thanks for your support

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

                                          @ricorico94 what does the debug output from the node and the gateway say?

                                          What regulator are you using? Most regulators produce power that is too noisy to be usable by the nrf24 radio (you didn't state which radio you're using so I'm just guessing here, based on the most common problems). What capacitor(s) are you using after the regulator?

                                          See https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help/ for the most common problems and how to diagnose them.

                                          Also see https://www.mysensors.org/build/battery for more information about battery powered sensors.

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


                                          2

                                          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