Voltage Divider to measure battery charge



  • 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



  • 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



  • @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.


Log in to reply
 

Suggested Topics

  • 87
  • 1
  • 3
  • 6
  • 7
  • 2

10
Online

11.4k
Users

11.1k
Topics

112.7k
Posts