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


    Log in to reply
     


  • 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
 

3 out of 3

Suggested Topics


  • General Discussion   1 Mar 2015, 11:21

    87

  • Hardware   25 Feb 2025, 20:56

    4

  • Hardware   9 Aug 2023, 16:28

    5

  • Hardware   18 Nov 2023, 01:41

    3

  • Hardware   5 Dec 2023, 02:21

    6
  • 10

0
Online

11.5k
Users

11.1k
Topics

112.8k
Posts