Hi Everyone,
Today I want to build a circuit that measures the supply voltage from a battery! I am using an Arduino for prototyping right now. Basically the concept is to measure a battery supply of 12 volts. I am using a buck regulator to step down the 12 volts to a 5 volt supply for the arduino. However I want to measure the 12 volt supply using an analogPin to tell whether or not we go below 12 volts.
(My system will stop working below 11.9v).
I have tried to step down the 12 volts using a 47.6kohm and 10kohm voltage divider but it was wildly inaccurate. The ADC would measure 2.58 volts when my multi-meter would measure 2.22 volts. This leads me to believe that either the resistors I had were probably 5% trash or that the adc is reading incorrectly, or the multi-meter is trash. As a quick fix, I adjusted my code to the resistance measured on the multi-meter and computed the supply voltage that way.
I just don't like how inaccurate the divider is and how it could a possibly taking up more power than wanted.
Is there an IC or a better way to do this???
I read this and it seems promising but also a little cumbersome.
https://www.electronicdesign.com/mi...er-battery-monitor-circuit-needs-only-one-pin
I appreciate any help
Joshua
Today I want to build a circuit that measures the supply voltage from a battery! I am using an Arduino for prototyping right now. Basically the concept is to measure a battery supply of 12 volts. I am using a buck regulator to step down the 12 volts to a 5 volt supply for the arduino. However I want to measure the 12 volt supply using an analogPin to tell whether or not we go below 12 volts.
(My system will stop working below 11.9v).
I have tried to step down the 12 volts using a 47.6kohm and 10kohm voltage divider but it was wildly inaccurate. The ADC would measure 2.58 volts when my multi-meter would measure 2.22 volts. This leads me to believe that either the resistors I had were probably 5% trash or that the adc is reading incorrectly, or the multi-meter is trash. As a quick fix, I adjusted my code to the resistance measured on the multi-meter and computed the supply voltage that way.
I just don't like how inaccurate the divider is and how it could a possibly taking up more power than wanted.
Is there an IC or a better way to do this???
I read this and it seems promising but also a little cumbersome.
https://www.electronicdesign.com/mi...er-battery-monitor-circuit-needs-only-one-pin
I appreciate any help
Joshua