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?
-
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.
Suggested Topics
-
Over the air updates
General Discussion • 23 Mar 2014, 21:38 • ToSa 1 Mar 2015, 11:21 -
Sensor to detect marijuana vape/smoke
Hardware • 21 Jan 2025, 06:36 • Hellmark 25 Feb 2025, 20:56 -
hlk-pm01 are to noisy for rfm69?
Hardware • 5 Aug 2023, 21:16 • Tmaster 9 Aug 2023, 16:28 -
Best VOC sensor for detecting a wide range of VOC's?
Hardware • 26 Oct 2023, 23:59 • NeverDie 18 Nov 2023, 01:41 -
Arduino Nano Every problem
Hardware • 1 Feb 2020, 09:18 • hakha4 5 Dec 2023, 02:21 -
"Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design"
Hardware • 24 Jan 2024, 23:06 • wrendral 3 Feb 2024, 07:13