diy solar

diy solar

Need help figuring out a resistor problem on a project

Crowz

Solar Wizard
Joined
Dec 24, 2022
Messages
2,785
Location
Alabama
I built a setup to replace the battery monitors I have on my cars that reports voltages via wifi to a website since they discontinued the monitors so I needed a replacement.

Everything works perfect on 9v batteries aka the kind you put in a voltmeter etc.

I need to measure 12v car batteries and lifepo4 batteries and such. It wont work. I can't figure it out.

I have a 47k ohm resistor on the 12v+ wire and a 10k resistor on the negative side. I tap between these to get the voltage down to where the analog to digital connects.

When I power up the system without connecting the adc wire to the battery I want to test it the unit works fine. It connects to the wifi and reports 0 volts which is correct.

When I have the wires hooked to a 9v battery and power it up it works fine and connects to the wifi and reports 9 volts to the server.

When I connect it to the 12volt lifepo4 it won't connect to the wifi and of course doesn't send info to the server.

If I connect the wire with it running it never sends results to the server even though it sent a 0 volt report before hooking up the test leads to the battery.

Ive ordered an lcd panel to attach to the thing so I can see more info on whats going on but I can't wrap my head around the battery size being the issue.

It's not a voltage issues since I added more resistors to bring the test voltage down to even lower than what the 9v battery reporting with the old amount of resistors.

Is there some crazy part of the ah capacity of the battery being able to overload the resistors? I can't imagine this being possible but I'm reaching for any possible explanation at this point. I could understand if I was drawing any real amps across the resistors but I'm just measuring voltage not running something would draw amps unless the Arduino thing can draw amps when first connected somewhere on the analog to digital circuit???
 
Those resistance values should work for anything up to around 18V to give a 0 to 3.3V output for your ADC.

You have got the ground of the ADC circuit wired to the negative of the battery under test?

Have you put a voltmeter across the input to the ADC?
 
Are you using a common ground?
It probably has no reference if the grounds are separate.
 
Its wired like this other than I have a 47k resistor in the rtop spot. Actually I have 2 47k resistors in the rtop spot as of last tests I did to get
the voltage down to the same level a 9v battery is at since the 9v works but it didn't help.

I verified I had the right voltage on teh adc0 connection spot. I'm flat out of ideas. When that display gets here thursday I can monitor it live to see whats going on hopefully. It's to tight of a spot to get a notebook computer into where I have it at when connected to the 12volt battery bank.



wiring.jpg
 
As I mentioned it works FLAWLESSLY with a 9v battery and works flawlessly when I don't have a battery connected to the test wires.

But the second I connect the test wires to a 12volt battery it won't respond.
 
The adc0 wire was 2.37v with 13.51v on the battery at one point. I have it down to 1.235v now with the extra resistors and the battery itself still being 13.3v right now.
 
Ive powered it with usb from different computers, a buck converter and a usb power plug on a 12v inverter. Same results with each power source.
 
Have you tried putting an additional load across the battery terminals to fully activate the BMS? It's possible the tiny current needed by a 10 or 20M multimeter may just be some kind of bleed-through a closed BMS. I don't know what load ADC0 presents, but it may be more than the meter, yet not enough to activate the BMS. The divider isn't drawing much either. Shot in the dark, I know...
 
Is that 12v car battery inside the car connected to cars 12v system or stand alone with nothing connected to it?
 
Is that 12v car battery inside the car connected to cars 12v system or stand alone with nothing connected to it?
The battery bank that's causing the problem is 2 12v lifepo4 batteries in parallel that run my 12v side of my solar setup.

I didn't have any other 12v source handy to test with so I used a 9v battery to make sure it was working and it reads it just fine.

I will get some other kind of 12v battery close enough to it to test later today.
 
I just finished testing using the 12v battery in my bmw x5 and it did the same thing.

So the problem is using a 12v battery and not lifepo4 related.

Now the difference between working and not is :

9v < 12v

9v battery is 500mah < 12v battery at 100ah

So its either volts or capacity since that's the only remaining difference. I lowered the volts showing on the adc0 pin with a 12v battery to less than the 9v showed originally and still doesn't work.

I'm going to leave it alone till the display gets here thursday to make diagnosing this easier.
 
Still waiting on the capacitors but I did get the lcd displays for it.

I was able to get the screens working and the unit is actually working perfectly as far as reading the battery when it doesn't send the information.

The weird part is it connects to the wifi and gets an ip address but never post anything when 12v or more is on the adc pin.

I even rewrote the entire routine so it reads the data first and then fires up the wifi after its done with the adc function which should be safe but no go.

It will connect to the wifi, get an ip address and doesn't post to the site if 12v is applied to the adc pin.

I'll try the capacitor angle when they get here but I'm losing faith in this thing rapidly.

Display looks nice at least :)

batmonlcd.jpg
 
Back
Top