Insight on solar battery reading

Hoping this is a easy question pertaining to reading battery voltage and if it can be done. im using a uno r3 to sense battery voltage on my solar array but the reading are fluctuating wildly due to what im guessing is a lack of a common neutral/ground. the uno is powered from constant 9 volt power supply but the battery negative doesnt tie into arduino ground pin . im using the voltage divider R1 1M ohm/ R2 100k ohm and grounding that end to the neg battery. My question is can i tie the arduino ground pin to the battery negative without lettingthe smoke out. i wouldnt think so due to different reference points in respect to ground, is there another way to to do this ? Thank you J

Not sure what your circuit is so post a diagram. You basically have to connect the ground as well. Why should a solar battery do anything but float with respect to the Arduino ground?

My battery is rarely in float as it powers my house on a daily basis usually in a asorbtion mode I wanna add a battery charge via house power at night if the charge gets too low minimizing running g the generator. My battery is weak after 11 years of use just buying time til the new battery bank comes in

That is how it is currently wired just wanna see if i can tie the battery neg to the 2nd arduino grd pin sincethe battery is 24v and arduino power is 9v

jlaughman22: That is how it is currently wired just wanna see if i can tie the battery neg to the 2nd arduino grd pin sincethe battery is 24v and arduino power is 9v

Without doing this you will not get any sensible reading of voltage. I can't see why this would cause a problem as the 9V supply should be floating.

Thanks for the help that alleviated my issue

Not that you asked, but here's one minor additional comment about your circuit. With the high resistance voltage divider you would get a more accurate reading with a capacitor across R2. Something in the range of 0.01 to 0.1 uF would be appropriate. The rational is that the A/D sample and hold switches in a nominal 14 pF capacitance during the "sample" period which has to charge through the resistance. With a proportionally much larger capacitor at the A/D input the circuit is effectively just transferring a small amount of charge from the external to the internal capacitance rather than charging it through the resistor.

With a proportionally much larger capacitor at the A/D input the circuit is effectively just transferring a small amount of charge from the external to the internal capacitance rather than charging it through the resistor.

And how does that charge get onto the resistor in the first place? Why by charging it through the resistor. This time it needs to charge up a much bigger capacitor though and so will be much much slower.

Grumpy_Mike: And how does that charge get onto the resistor in the first place? Why by charging it through the resistor. This time it needs to charge up a much bigger capacitor though and so will be much much slower.

Yes, the bigger capacitor has to charge through the same resistor network, but it isn't constrained to do so during the A/D sample and hold circuit's sample interval.

This suggestion carries an implicit assumption that the voltage being monitored does not have high frequency (relative to the RC filter) content of interest. For battery monitoring typically one would expect only very slow changes in the monitored voltage. That might not be the case if one were looking for behavior under rapidly varying load. In that case perhaps lowering the resistor values for the voltage divider should be considered.

Mark

I tried both the .1uF and .01uF through my test stand and got .1 to .15v better resolution with the .1uF cap it was almost neglible with .01uF cap. Your right about my voltage its a very slow transition from tenths of a volt

Ill leave the .1uF in there

Thanks J

Ill leave the .1uF in there

Your choice but a waste of a capacitor. If it is giving you trouble simply read delay and read again. The first read switches the analogue multiplexer, the delay gives it time to charge and the second read takes the measurement.