This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TS5A3359: OPA2171:INA818:INA190

Part Number: TS5A3359
Other Parts Discussed in Thread: INA190, INA818, ADS1115, , LM2576

Hi TI Technical Support Team,

Recently, I have design and produced a PCB for battery charging and discharging. I am charging and discharging rechargable li-ion battery with small capacity (around 40mAh ). The circuit is designed to apply constant current, constant voltage charge and discharge modes. The charging or discharging currents are 10mA at max and battery voltage I test is 4.2V at max. When charging or discharging I am pulling the bat_activate pin of U21 IC to high and when test is done I am pulling bat_activate to low to disconnect the battery from the circuit. I am selecting the test modes (constant current or constant voltage) through U17. I am measuring battery voltage through INA818 (gain 1) and I am using INA190 to monitor discharge or charge current. TS5A3359 is used to make current ranging. Using truth table given in TS5A3359 I am adjusting gain for current measurement. The ADCc I use is 16 bit ADC (ADS1115). The PCB is 4 layer PCB, Top and bottom layers are for signal routing and mid layers are 5V and GND planes. No track is passing through mid layers, they are solid planes. 5V is generated using LM2576-5, 12V using LM2576-12 and -12V is generated using LM2576 in inverting mode. All voltage levels are as expected. I also have LED on the board connected to 5V to indicate power. There is not any pull up or pull down resistors on control pins of U17, U21 and U25.

When the power is on, the circuit works as expected, it charges or discharges battery connected to the battery socket. However, when I cut the power and there is battery connected to the battery socket, the 5V LED does not turn off, it continues to be on. When I pull the battery from the socket and nothing connected to the socket, the LED is off. When the power off and there is battery connected to the socket, I measured the 5V point on the PCB as something around 2V. I think somehow the battery voltage couples to my 5V and when the power is off it starts to power the 5V, and as LED is connected there, it powers it, LED becomes ON and the battery that I left connected starts to discharge over LED. I removed INA818 and shorted 3 and 6 pins of INA818 footprint on the pcb, but the result is not changed. 

Could you please comment on this problem and possible solution to this problem? Is it related to my poor PCB design like making one of mid layer as 5V plane? I did not know if this is related to TS5A3359 or not, so if the question is asked in wrong place, I am sorry for it. 

I would like to thank you in advance for the help,


  • Update 1: I also measured 12V point when the power is off, and it is around 1.6V. If I make the 5V plane GND plane and reproduce the pcb, I think the problem will continue. battery will again discharge over my circuit when the power is off. 

    Update 2: TS5A3359 donot isolate battery from the circuit when I cut the power. I disconnected R9, R13, R17 from the circuit, and in this way battery was disconnected. But when R9, R13 and R17 are connected, battery again starts to power my board and 5V, 12V point becomes around 2V although main power is off

  • Hey Ahmet,

    There's a lot going on here and I want to make sure I understand. 
    It sounds like what you're saying is that you have a battery that you're attempting to charge/discharge via this circuit on a socket on the board. You also have external power.
    When the power is on and the battery is attached it works just fine. 
    When the power is on but the battery isn't attached it still is fine.
    When the power is off and the batter isn't attached it still fine. 

    It isn't until the power is off and the battery is connected that you see the issue? 

    I'm not seeing where the LED actually is in the circuit but I'm assuming here that it's on the input (left) side of the multiplexer but it definitely does appear to be leakage through the device. Additionally, looks like you're overcurrent since you have that 10ohm resistor at 5V. The max the I/O on state switching this can handle is 400mA according to the datasheet. There may be extra leakage here as well due to that. You could try changing the resistor values or even some isolation or mechanical switch between the mux and batter may be useful here. 
    Swapping the IC for a new one may be helpful here since there's a chance it may have experienced some damage. 


  • Hi Rami,

    Thank you for your reply, and I am sorry for the misexplanation.

    You understood is correct, as you said when the power is off and there is battery on the socket, I see the problem. Normally, I expect the voltage to be 0V as there is no external power, but I measure something around 2V on 5V pin on the board. And when I measure the voltage of battery, I see that its voltage decreases in time. 

    I also added my power part of the circuit, I forgot it to out in my previous post. The led is connected to 5V output of LM2576-5.

    Regarding the overcurrent issue, actually I am relying on opamp in that issue. The opamp output cannot provide that much current according to datasheet so I relied to that thing. I also changed TS5A3359 with new ones, and same issue continued. 

    I will add relay between battery and mux and will inform you with the result.

    Thank you for your help,


  • Ahmet,

    My concern about the current more comes from the discharge. When everything is turned off, the battery seems to be discharging through the resistors in front of the multiplexer. So the 5V from the battery is back feeding through the mux across 10ohms. If you could determine when the damage actually occurs that would help with debugging. That's to say, with a functioning TS5A3359 power up the device without the battery and check functionality. Then connect the battery and check functionality. Then power down with battery still plugged in and check functionality. If the device is still working, keep the power off and remove the battery and check functionality. This will help determine better what's happening.
    All that becomes a little unnecessary though if you're going to add a relay between the battery and mux though. 
    I expect this to resolve your issue but please update me how it goes!


  • Hi Rami,

    I have checked the COM-NO1, COM-NO2 and COM-NO3 functionality.

    1. When power on and no battery present, the TS5A3359 functionality is ok.

    2. When power on and battery present, the TS5A3359 functionality is ok.

    3. When power off and battery present the TS5A3359 functionality is ok

    4. when power is off and battery removed TS5A3359 functionality is ok.

    I guess from this the problem is not related to TS5A3359.

    I added relay between battery and my circuit and when needed, I am activating it and when power is off, relay cuts the connection with battery. I left the battery connected and power off, 1 day later there was again some voltage drop in battery (around 0.2V), but I guess it is normal, as I test small capacity batteries, and when I measure the impedance between 2 pins of connector, it was around 600k ohm. So this time, there is leakage due to relay, but it was very small. 

    I would like to thank you for your help.