# Custom PCB with ADC for monitoring Lifepo4 battery bank voltages

I designed a custom PCB board to allow me to monitor the individual battery cell voltages in my Lifepo4 48v battery bank.

Here is a schematic of the PCB:

Basically I'm using a molex micro fit junior connector to get leads from each of the battery cells positive terminal, each lead gets connected to 1 of 2 high voltage 8 channel multiplexer's, the output of the mulitplexers goes through a voltage divider then to A0 of the ADS1115.

I'm using this as a hat for a raspberry pi 4

there are 2 voltage regulators - 1 that outputs 5v for the pi and ADS1115 and 1 that outputs 15v for the mux

The problem I am running into is when I run the following program to monitor voltage and set the corresponding gpio pins high for any of the cells, I get the same reading (~0.116v - ~0.119v) no matter what channel the mux is on. When the mux is set to low, I get 0v as expected.

Here is the program I'm using to monitor voltage for the ADS1115:

import time
import board
import busio

i2c = busio.I2C(board.SCL, board.SDA)

print("{:>5}\t{:>5}".format('raw', 'v'))

while True:
print("{:>5}\t{:>5.3f}".format(chan.value, chan.voltage))
time.sleep(0.5)


I've tried adding a 10k pull-up resistor from scl to 3.3v on the pi header as well as sda but am getting the same results.

I'm super stumped here and would appreciate any help on this one!

• I don't have an answer for you, I am just curious - why are you using single ended measurement? You have all the wires you need and ADC supports differential input. If you use one MUX for odd, another for even then you can have much better precision. – Maple Apr 25 at 7:13
• I'm sure there is a better way to go about this than what I came up with, I need to get something working first and then I can improve upon it from there. In my POC testing I verified that the circuit setup with an ADS1115 breakout and the same voltage divider provided the 10mv accuracy I needed which is why I went with this design – NomNomCameron Apr 25 at 7:45
• The mux has an ON-resistance of 2 kOhms which is rather inaccurate and temperature dependent so it will screw the accuracy of the voltage divider. Also it cannot switch voltage that is higher than its own power supply, which is 15V in youy case. It has good overvoltage protection, so it should survive, but it won't work. – bobflux Apr 25 at 9:53
• that doesn't explain why I can't read any voltages though, even the voltages that are under 15v all show as the same which I think points to a separate issue? – NomNomCameron Apr 25 at 10:06
• It would be helpful if you could include the cells in your schematic so we know exactly what these B0-x pins connect to. Also indicate what readings you would expect. – DamienD Apr 25 at 11:01