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 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.
  • meanmrgreenM meanmrgreen

    Realy n00b in electronics here but do you need to use those exact values of the resistors when hooking this up?

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

    @meanmrgreen are you reffering to the 470K+1M resistors? (This is a long thread)
    If so, they can be any size but the code will need to be adjusted if the ratio between the resistors is changed.

    Also, less resistance will drain the battery faster.

    1 Reply Last reply
    0
    • meanmrgreenM Offline
      meanmrgreenM Offline
      meanmrgreen
      wrote on last edited by
      #61

      Yes i do.
      This is like going back to school... but fun!

      1 Reply Last reply
      1
      • G Offline
        G Offline
        giovaFr
        wrote on last edited by
        #62

        can someone explains why using analogReference(INTERNAL) ?

        for the moment i only have 5V nano suplyed by a 7.4V lipo (i know, this is not a good choice, but i just have this right now) so with that hardware, 1.1V seems too low.
        I mean that resistance ratio to reach 1.1V max smells a very inacurate result; isn't it?

        tonnerre33T 1 Reply Last reply
        0
        • G giovaFr

          can someone explains why using analogReference(INTERNAL) ?

          for the moment i only have 5V nano suplyed by a 7.4V lipo (i know, this is not a good choice, but i just have this right now) so with that hardware, 1.1V seems too low.
          I mean that resistance ratio to reach 1.1V max smells a very inacurate result; isn't it?

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

          @giovaFr Hello, try to replace 470k(R2) by a 180k ;)

          for obtain this value i did : R2 = R1 / ( Vbatmax - Vref); R2 = 1.1^6 / (7.5 - 1.1) = 172k, i taked a normalized value = 180k.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giovaFr
            wrote on last edited by giovaFr
            #64

            I think i've finnaly understood :
            1.1V is not a reference like an offset it is a reference as a max readable voltage
            Analog Input will always return values between 0 and 1023
            5V / 1023 bits = 0.0048 V per bit
            1.1V /1023 bits = 0.001075 V per bit
            so with 1.1V we are allmost 5 times more accurate. Moreover it seems that 1.1V will stay stable even if battery voltage becomes low. (so understand now why using it)
            And that's what mfalkvidd explained : if we type in code : analogReference(INTERNAL); then voltage must never exceed 1.1V on A0 (it is different on an arduino Mega)

            Now to choose R1 and R2 here what i've made :
            A0maxV = VbattMax * (R2 / (R1+R2)
            for me it means
            1.1V = 8.4V * (R2 / (10^6 Ohms + R2)
            so i use R2 around 150k Ohms

            A0voltage = A0value * 0.001075
            A0Voltage = VBatt * (R2 /(R1+R2))
            A0Voltage = VBatt * rRatio
            VBatt = A0Voltage / rRatio = (A0Value *0.001075 ) /rRatio

            So here the magic formula:
            VBatt = (A0Value *0.001075 ) /rRatio

            Let me know if i'm wrong somewhere.

            tonnerre33T 1 Reply Last reply
            1
            • G giovaFr

              I think i've finnaly understood :
              1.1V is not a reference like an offset it is a reference as a max readable voltage
              Analog Input will always return values between 0 and 1023
              5V / 1023 bits = 0.0048 V per bit
              1.1V /1023 bits = 0.001075 V per bit
              so with 1.1V we are allmost 5 times more accurate. Moreover it seems that 1.1V will stay stable even if battery voltage becomes low. (so understand now why using it)
              And that's what mfalkvidd explained : if we type in code : analogReference(INTERNAL); then voltage must never exceed 1.1V on A0 (it is different on an arduino Mega)

              Now to choose R1 and R2 here what i've made :
              A0maxV = VbattMax * (R2 / (R1+R2)
              for me it means
              1.1V = 8.4V * (R2 / (10^6 Ohms + R2)
              so i use R2 around 150k Ohms

              A0voltage = A0value * 0.001075
              A0Voltage = VBatt * (R2 /(R1+R2))
              A0Voltage = VBatt * rRatio
              VBatt = A0Voltage / rRatio = (A0Value *0.001075 ) /rRatio

              So here the magic formula:
              VBatt = (A0Value *0.001075 ) /rRatio

              Let me know if i'm wrong somewhere.

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

              @giovaFr said in 💬 Battery Powered Sensors:

              A0maxV = VbattMax * (R1 / (R1+R2)

              Are you sure about that ? I think is A0maxV = VbattMax * (R2 / (R1+R2)

              R2 = 150k Ohms for 8.4V with R1 always at 1M Ohms

              1 Reply Last reply
              1
              • G Offline
                G Offline
                giovaFr
                wrote on last edited by giovaFr
                #66

                oops you are right i mixed both :)

                i fixed my error, thanks

                1 Reply Last reply
                1
                • EfflonE Offline
                  EfflonE Offline
                  Efflon
                  wrote on last edited by
                  #67

                  If I power my 3.3V miniPro through VCC, do I still need to remove/cut the voltage regulator?
                  I thought the current moved from vvc-in/raw through the regulator and then to the MCU and VCC :confused: .
                  My battery powered nodes are dying and I suspect I need to change BOD and eventually something more (LED gone )..

                  GertSandersG 1 Reply Last reply
                  0
                  • EfflonE Efflon

                    If I power my 3.3V miniPro through VCC, do I still need to remove/cut the voltage regulator?
                    I thought the current moved from vvc-in/raw through the regulator and then to the MCU and VCC :confused: .
                    My battery powered nodes are dying and I suspect I need to change BOD and eventually something more (LED gone )..

                    GertSandersG Offline
                    GertSandersG Offline
                    GertSanders
                    Hardware Contributor
                    wrote on last edited by
                    #68

                    @Efflon

                    VCC pin is directly connected to the MCU.

                    The RAW or IN pin is connected to the regulator input. Th eregulator output is connected to VCC pin and thus to the MCU power input pin.

                    On a 3V3 promini you can give between 3V3 and 12V (on most promini's, some can handle up to 16V) on the RAW or IN pin. The regulator on the promini will bring that down to 3V3 (which you will be able to measure on the VCC pin).

                    By giving 3V3 on the VCC pin, some power is lost via the output pin of the regulator (through the regulator) towards the GND pin of the regulator. This should be minimal, but on bad regulators it can be enough to drain a battery in weeks. So yes, I would cut the regulator output line when giving power via VCC.

                    Cutting the line of the powerLED (on either side of it, doesn't matter) will make sure that the LED does not drain the battery either. This LED can pull between 5 -15mA depending on the protection resistor that sits in series with it.

                    So VCC pin and RAW pin are NOT the same.

                    EfflonE 1 Reply Last reply
                    3
                    • GertSandersG GertSanders

                      @Efflon

                      VCC pin is directly connected to the MCU.

                      The RAW or IN pin is connected to the regulator input. Th eregulator output is connected to VCC pin and thus to the MCU power input pin.

                      On a 3V3 promini you can give between 3V3 and 12V (on most promini's, some can handle up to 16V) on the RAW or IN pin. The regulator on the promini will bring that down to 3V3 (which you will be able to measure on the VCC pin).

                      By giving 3V3 on the VCC pin, some power is lost via the output pin of the regulator (through the regulator) towards the GND pin of the regulator. This should be minimal, but on bad regulators it can be enough to drain a battery in weeks. So yes, I would cut the regulator output line when giving power via VCC.

                      Cutting the line of the powerLED (on either side of it, doesn't matter) will make sure that the LED does not drain the battery either. This LED can pull between 5 -15mA depending on the protection resistor that sits in series with it.

                      So VCC pin and RAW pin are NOT the same.

                      EfflonE Offline
                      EfflonE Offline
                      Efflon
                      wrote on last edited by
                      #69

                      @GertSanders Thanks for you explanation. I thought vvc on the short end next to rx was going through the voltage regulator just as RAW. Anyhow I have already de-soldered the LED's and are powering through vcc next to A3. Apparently my voltage regulators are bad so I'll cut the lines and give it a try and hope power consumption stays low.

                      1 Reply Last reply
                      1
                      • maghacM Offline
                        maghacM Offline
                        maghac
                        wrote on last edited by
                        #70

                        I've used the Vcc library to read the battery level without voltage divider or any other external components. Is this not a reliable way to measure?

                        1 Reply Last reply
                        0
                        • maghacM Offline
                          maghacM Offline
                          maghac
                          wrote on last edited by
                          #71

                          I'll answer myself - no, the Vcc lib is not realiable :) I had a sensor that died yesterday and it reported 100% battery until the end...

                          AWIA 1 Reply Last reply
                          0
                          • maghacM maghac

                            I'll answer myself - no, the Vcc lib is not realiable :) I had a sensor that died yesterday and it reported 100% battery until the end...

                            AWIA Offline
                            AWIA Offline
                            AWI
                            Hero Member
                            wrote on last edited by
                            #72

                            @maghac The Vcc library is reliable. It uses the internal 1.1 v reference of the MCU to measure the voltage on the Vcc pin. If your sensor keeps reporting 100% I guess you either power the arduino through a regulator (or the raw pin) or missed something in the Vcc initialisation/ calibration.

                            1 Reply Last reply
                            1
                            • maghacM Offline
                              maghacM Offline
                              maghac
                              wrote on last edited by
                              #73

                              @AWI It's possible that I missed something in the code. I am powering the arduino directly on VCC though and I'm not using a regulator.

                              Will have another look tonight.

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                aclertant
                                wrote on last edited by
                                #74

                                Do you think that the use of a piezo electric switch is possible ?
                                I found one that deliver 24v and 0,2A... The goal would be to create wireless switch...

                                AWIA gohanG 2 Replies Last reply
                                0
                                • A aclertant

                                  Do you think that the use of a piezo electric switch is possible ?
                                  I found one that deliver 24v and 0,2A... The goal would be to create wireless switch...

                                  AWIA Offline
                                  AWIA Offline
                                  AWI
                                  Hero Member
                                  wrote on last edited by
                                  #75

                                  @aclertant Interesting idea... Energy harvesting with piezo-electric components is certainly possible. From MySensors point of view the energy (very very little) has to be stored and boosted to power the radio and mcu for message processing. There are a few examples of "harvesting" remotes (i.e. Philips HUE) but I am not sure if these use a piezo element.

                                  1 Reply Last reply
                                  0
                                  • H Offline
                                    H Offline
                                    hiddenuser
                                    wrote on last edited by
                                    #76

                                    I removed the both the LED and the Voltage Regulator of an Arduino pro min 3.3v . The simple sketch on it's own works fine. However when I connect an NRF24L01 it does not communicate back to the gateway.. :(

                                    1 Reply Last reply
                                    0
                                    • A aclertant

                                      Do you think that the use of a piezo electric switch is possible ?
                                      I found one that deliver 24v and 0,2A... The goal would be to create wireless switch...

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

                                      @aclertant
                                      If you look at enocean products there are already commercial energy harversting switches in case you don't find a way to make it.

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        aclertant
                                        wrote on last edited by
                                        #78

                                        @gohan yes it's exactly what I'd like to do ;)

                                        I should forget to use an arduino in fact... just send one command using... a pic ? or something else...

                                        The enocean switch is really cool, but quiet expensive :(

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

                                          Like all commercial products they cost because they have been developed, tested and produced. So it's up to you if you want to spend time tinkering or go with an already working solution :-)

                                          A 1 Reply Last reply
                                          0
                                          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.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
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular