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.

BQ21040: Vin remains high after adapter removed

Part Number: BQ21040

I have a board as the Tipical Application in datasheet.

Everything works fine but,

I'm trying to sense when a charger is connected (Vin goes high) so I have connected an input pin of my microcontroller to Vin with a pull-down resistor (100k).

I'm noticing a strange behavior, Vin is low when the battery is iserted, Vin goes high when I plug the charger but

when I unplug the charger Vin stay high, (about 0.6V below battery voltage) until the voltage of the battery goes below 3.5ish V.

I've tried pulling current from Vin, and I get it to go to 0V reliably with 25mA of load.

Am I missing something?

Regards,

Gianluca

  • Hi Gialuca,

    Are you able to provide a waveform of the behavior you're seeing? A waveform of VIN when you remove the the charger and see the transition from high to 0.6 below battery would be helpful. Just to confirm, are you also able to charge a a battery? 

  • Hi Anthony,

    I confirm that the battery gets charged and CHG behave like expected.

    This is a waveform of Vin vs Vout when I remove the charger cable

    Vin vs Vout

    While if I put a 200R in in parallel whith the input terminal I get

    Vin vs Vout 200R

    I've tried different Cin and Cout, (1uF in and 1uF out, 2uF in 2.2uF out).

    Whitout the load on the input nothing change;

    whith more capacitance on input side and the load the time to discharge increase but the behaviour remain the same.

    I've also tried with different load on input side, the minimum that reliably "turn off" Vin is 25mA.

    Thank you

    Gianluca

  • Hi Gianluca,

    I know you said you followed the application schematic but can you share your schematic? Does this occur if you try a different source to power the IN pin?

  • Hi Anthony!

    Yes, it does so also if I use either one of my bench power supply or my USB battery pack or USB plug charger....

    Vin does not hang high if I have absolutly no load attached to the battery....

    As soon as I power up the microcontroller board (which also comprise a high power LED) so from few mA to 700+mA this problem arise

    Thank you,

    Gianluca

  • HI Gianluca,

    Awesome, thanks for the schematic. Interesting, can you share a voltage waveform of IN and OUT when you unplug the load? I also notice that you have the microcontroller input connecting to the VIN pin, is it possible for you to try removing VIN again which out that specific connection?

  • Hi Anthony!

    Microcontroller is separated from Vin line from the first time I encountered the problem (to exclude possible error in the program or micro itself)...

    I have to correct myself, Vin does not hang if the load is purely resistive.

    So I checked better Vout

    could it be the problem? this 300hz 400mV ripple that makes Vin stay high?

    Thank you,

    Gianluca

  • Hi Gianluca,

    Gianluca Biondi said:
    I have to correct myself, Vin does not hang if the load is purely resistive.

    Gianluca Biondi said:
    Microcontroller is separated from Vin line from the first time I encountered the problem (to exclude possible error in the program or micro itself)...

    Interesting. So just to check, this only occurs when VIN is removed, the battery is above 3.5V, and occurs when the microcontroller is connected?

    The image you've sent looks too quick for it to be a battery detection routine if that is 1.00ms per division but it looks like there is an issue at the output as well. Have you checked for shorts on this board? It would seem like there is an odd capacitance on the input. 

  • Hi Anthony!

    Anthony P Pham said:


    Interesting. So just to check, this only occurs when VIN is removed, the battery is above 3.5V, and occurs when the microcontroller is connected?



    Yes, that's correct (battery has to be above 3.6V for this to happen). And microcontroller has to be generating PWM to an high power LED (3W led) to get Vin stay high.

    If microcontroller is running low power stuff (state LEDs) it does not create the problem.

    Anthony P Pham said:


    The image you've sent looks too quick for it to be a battery detection routine if that is 1.00ms



    That image show fluctuation on battery voltage when I'm dimming the LED, my speculation was that those fluctuation was the cause...

    I've tried to change the frequency and at 20Hz it works, 76Hz and beyond it start behaving like noted (Vin stays high)...


    Anthony P Pham said:


    Have you checked for shorts on this board? It would seem like there is an odd capacitance on the input.



    Board is behaving like expected, evrything works fine, no anomalies on power comsumption or interruption so I tend to exclude shorts circuit.

    I've checked Cin, 1uF...


    Thank you

    Gianluca

  • Hi Gianluca, 

    It sounds very much like the PWM control of the LED is the suspect of having VIN be high. Is it possible to see the microcontroller portion of the schematic to see how it connects to the charger? 

  • Hi Anthony!

    I've attached the rest of the schematic!

    schema_main.pdf

  • Hi Gianluca,

    I do not see any outstanding issues that would be the cause of the IN waveform to stay high like that after removing it unless other components are keeping the voltage high. If it's possible, look and see which IC in effect is causing it to stay on (i.e. keep the AVR ISP off and see if this IN to stay HI).