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. Hardware
  3. Voltage Divider to measure battery charge

Voltage Divider to measure battery charge

Scheduled Pinned Locked Moved Hardware
3 Posts 3 Posters 73 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.
  • AdamAntA Offline
    AdamAntA Offline
    AdamAnt
    wrote on last edited by
    #1

    I'm currently in the process of designing a custom mysensors board to use with an RFM69 radio and an atmega328p, and I've come unstuck working out the values needed for the resistors for the voltage dividers. The MySensors page on batteries is unfortunately clear as mud on the matter.

    I'm using the internal 1.1v voltage reference of the atmega, so by my understanding I can't measure more than 1.1v on the analog inputs. The atmega & RFM69 board will be powered from 4v - 6v depending on the application, via a 3.3v regulator. Based on these values I've come to the conclusion that resistors of 1M ohm & 200k ohm will be the best bet. Theres also a circuit diagram below of how the circuit is wired. Is this the easiest way to measure the battery?

    b1d70165-4534-4d94-9e72-1685ce4daff6-image.png

    skywatchS 1 Reply Last reply
    0
    • BearWithBeardB Offline
      BearWithBeardB Offline
      BearWithBeard
      wrote on last edited by
      #2

      Looks good to me. Since you're using a voltage source > 5V and provide regulated 3.3V, using the internal 1.1V reference seems to be the easiest way. For 4 to 6V, you should expect a reading of ~620 to 930, which should be good enough to get an idea of the battery voltage

      1 Reply Last reply
      0
      • AdamAntA AdamAnt

        I'm currently in the process of designing a custom mysensors board to use with an RFM69 radio and an atmega328p, and I've come unstuck working out the values needed for the resistors for the voltage dividers. The MySensors page on batteries is unfortunately clear as mud on the matter.

        I'm using the internal 1.1v voltage reference of the atmega, so by my understanding I can't measure more than 1.1v on the analog inputs. The atmega & RFM69 board will be powered from 4v - 6v depending on the application, via a 3.3v regulator. Based on these values I've come to the conclusion that resistors of 1M ohm & 200k ohm will be the best bet. Theres also a circuit diagram below of how the circuit is wired. Is this the easiest way to measure the battery?

        b1d70165-4534-4d94-9e72-1685ce4daff6-image.png

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

        @AdamAnt You could replace the 200K with a 270K preset so that you can adjust it to give the maximum resolution. Remember that you are not measureing voltage with this set up, but an analog 'value' that is 'roughly' proportional to the voltage applied.

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


        18

        Online

        11.7k

        Users

        11.2k

        Topics

        113.1k

        Posts


        Copyright 2025 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