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. Hardware
  3. Testing battery level with regulator removed
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

Testing battery level with regulator removed

Scheduled Pinned Locked Moved Hardware
battery
6 Posts 4 Posters 50 Views 3 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.
  • 4 Offline
    4 Offline
    4994james
    wrote on last edited by
    #1

    Hi
    Using a clone pro mini + NRF24L01 and HTU21DF sensor.
    I have built a battery powered sensor with the regulator removed to reduce power consumption. When I test the level using the analog read method (split resistors) I always get the same value no matter what supply voltage i use (between 2.8v and 3,2v). Is this because analog read is no longer able to get a fixed reference point? I have also tried using the internal cpu voltage method and I get unpredictable results as well.

    zboblamontZ YveauxY 2 Replies Last reply
    0
    • 4 4994james

      Hi
      Using a clone pro mini + NRF24L01 and HTU21DF sensor.
      I have built a battery powered sensor with the regulator removed to reduce power consumption. When I test the level using the analog read method (split resistors) I always get the same value no matter what supply voltage i use (between 2.8v and 3,2v). Is this because analog read is no longer able to get a fixed reference point? I have also tried using the internal cpu voltage method and I get unpredictable results as well.

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

      @4994james The internal reference is the more stable, but do remember that the ADC sample needs a stable voltage and low noise.
      I've used high M value (prone to noise) resistive dividers with a simple electrolytic capacitor from the ADC pin to ground, no problems, perhaps worth a try.

      1 Reply Last reply
      0
      • 4 Offline
        4 Offline
        4994james
        wrote on last edited by
        #3

        Hi. I have used the divider recommended in https://www.mysensors.org/build/battery and with a 0.1uF electrolytic cap. There is still a ripple on this when i attach the scope. Maybe that's the issue but I get the same value (325 as it happens) from A0 even if I vary the supply voltage.

        Just to confirm you have had this working after the pro mini onboard regulator is removed?

        zboblamontZ 1 Reply Last reply
        0
        • 4 4994james

          Hi. I have used the divider recommended in https://www.mysensors.org/build/battery and with a 0.1uF electrolytic cap. There is still a ripple on this when i attach the scope. Maybe that's the issue but I get the same value (325 as it happens) from A0 even if I vary the supply voltage.

          Just to confirm you have had this working after the pro mini onboard regulator is removed?

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

          @4994james Mine is a non standard Arduino with booster and LDO.
          Possibly something wrong with your divider wiring ?
          If you've got A0 as input and do an ADC read, the value should change with varying voltage.
          I use a 10uF electrolytic as have loads of them, stable as it gets.

          1 Reply Last reply
          0
          • electrikE Offline
            electrikE Offline
            electrik
            wrote on last edited by
            #5

            The ADC needs a fixed reference and usually it uses the vcc for that. Since that is fluctuating, you will get the same value as the value from the resistor divider fluctuates the same.
            To overcome this, you should use the internal 1.1V reference. This does mean that your analog voltage from the divider should be below 1.1V if I remember correctly

            1 Reply Last reply
            0
            • 4 4994james

              Hi
              Using a clone pro mini + NRF24L01 and HTU21DF sensor.
              I have built a battery powered sensor with the regulator removed to reduce power consumption. When I test the level using the analog read method (split resistors) I always get the same value no matter what supply voltage i use (between 2.8v and 3,2v). Is this because analog read is no longer able to get a fixed reference point? I have also tried using the internal cpu voltage method and I get unpredictable results as well.

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

              @4994james or just use internal vcc measurement as described on the same page. That saves you the voltage divider.
              I wrote a convenient library to measure vcc internally : https://github.com/Yveaux/Arduino_Vcc

              http://yveaux.blogspot.nl

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


              9

              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