Author Topic: Charger IC cuases bad data to appear on shift registers outputs  (Read 1405 times)

0 Members and 1 Guest are viewing this topic.

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Hello All,

This is a bit long so please bare with me...

A battery powered product I am developing contains 24 shift registers (MC74HC595A-D) which are daisy chained to one another. Each SR is coupled by a 0.1uF capacitor. Each output of the SR is controlling a FET with controls an LED. A microcontroller is used to send the serial data to all the 24 SRs and by that control 192 (24*8) LEDS on/off state. This is all working very well.

On the same PCB (4 layers), there is a charger IC from TI (BQ24192L) which is used to charge the battery. When charging, the product lights up 1 to 6 sequential leds to show the user the progress of charging (1 led on - low battery, 6 leds on - battery charger).

When charging with a low power settings, say 5W, everything is working, again, very well.

When high energy charging is taking place, say 10W or more, the display of the leds sometimes (it refreshes once a second) goes wrong. Usually what ill see is that one led which should be on is off and the one next to it, which should be off is now on. Sometimes 2 sequential leds will turn on, etc. Since I am updating the charge status once a second (the last led is always blinking at 1Hz), I see a lot of these 'mistakes'.

I have been trying to solve this problem for tens of hours but failed. I turn to this community for help!

A few more important notes:

1. When high charging is present, the charging IC gets very hot and goes into thermal regulation after a few seconds. The wrong leds problem is there before and after the thermal regulation. There is not a good way to cool it down on this PCB edit.

2. I have scoped all the control signals (data, serial clock, latch clock) going into the SRs and they all work great. No problem there.

3. I have tried to light up different leds in the array, even the 1st led of the first SR, but the problem is there also.

4. When scoping the charger IC (please see attached pictures and schematics) I see a 1.5Mhz noise from its internal buck converter appearing on the voltage rail of the system. The noise's peak to peak pulses are about 1V high on the VBUS inputs of the charging IC, 300mV peak to peak on the VBAT and VSYS pins of the charger IC. The same noise (300mV) is also present on each of the SR's power pin (16) and GND (8) pin.

5. Have tried adding larger +smaller caps at the VBUS input but did not help.

6. Have tried to filter the VBUS input with a LC filter (two caps and a coil) but that did not help.

I think the problem is the noise generated but I am not sure. Also, I do not know if it is a conducted noise or radiated one and, I do not know how to reduce it, if this is actually the cause of the problem I am facing.

Thank you for reading this and would love to hear your thoughts on this.

Nir.
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2596
  • Country: us
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #1 on: June 19, 2021, 06:52:19 pm »
It's going to be hard to offer useful advice here without seeing a more complete schematic and a pcb layout.

Also what's the clock frequency on the spi bus and what spi mode are you using? It could be that your interface is configured incorrectly and is just barely working at low power charging but fails due to the additional supply noise or induced noise on the signal lines at high power charging.

1Vpp noise at the charger ic input is a lot, but you will need to be careful how you probe this to make sure what you're seeing on the scope is coming from the circuit and not the probing setup.  Did you capture those traces with a short spring clip for the ground instead of a flying lead? And probing directly at the ic pin (or as close as possible) with the ground on the closest available ground point?
 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #2 on: June 19, 2021, 07:19:48 pm »
Hey @ajb and thank you!

Yes, these reading were taken with a very short gnd and probe leads, they may not be very accurate but the noise is there for sure and of course it
gets higher for higher power charging and vice versa.

For the control of the shift registers I did not use an SPI port but rather regular outputs from the microcontroller. Since the control routines
are interrupt driven they can not be interrupted and so their timing is always constant. These SR devices can work with a frequency of up to 15Mhz but
my clock does not go above 1Mhz.

Also attached are a set of 8 schematics. 7 of them make up the main pcb of this product. The 8th ("Bottom PCB") includes just the USB type C connector from which the charging power is fed. Please also find the BRD (inside the ZIP) file attached.

Please note the following about these schematics:

1. There are 3 more identical Leds pages (2,3,4) which are exactly the same as Leds1 so I have omitted them.

2. On the 'Power' schematics, R901 is installed and J8/U34 and all of their supporting components are not installed. On that same page, U35 (DC/DC 3 to 5V) is not installed, pin 2 and 5 on the PCB are short circuited and so the 5V signal is actually a 3V one (no need for it)

3. On the 'Charger' schematics, R903 is installed and U25 and all of its supporting components are not installed.

Nir.
 

Online temperance

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: 00
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #3 on: June 20, 2021, 12:09:43 am »
In the first picture, the battery internal resistance is translating the inductor current into a voltage. This should be a clean triangle wave with minimal ringing. However, one can see inductor saturation effects.
Some species start the day by screaming their lungs out. Something which doesn't make sense at first. But as you get older it all starts to make sense.
 

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 1877
  • Country: us
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #4 on: June 20, 2021, 12:32:17 am »
You have got a *lot* of loads (24) on that  microcontroller SR_SC output (1 MHz shift-clock).  Have you looked at the shape of that clock? There's got to be a lot of stray capacitance on that net -- pins and traces --  and perhaps this is where the power supply noise is causing problems by glitching the clock.

Probably not related, but it looks like you have no current-limiting on your LED drive circuit (unless it's built in to the LEDS).  Your PWM driver will vary the long-term average voltage, but not the peak, and as far as I can tell the LED current is going to be pretty random and the peak current possibly excessive.
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #5 on: June 21, 2021, 07:47:52 am »
Please see below a scope image of the clock signal. As you can see, it looks OK. Per you LED remarks - Thank you I will open a separate thread just for this I wish to keep this one focused on the problem at hand which I must solve ASAP. If you have other ideas/directions I can look into I will be very glad.

Nir.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3237
  • Country: gb
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #6 on: June 21, 2021, 09:13:25 am »
Is that scope trace taken with the high charging current and the scope ground connected to the shift register ground?
 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #7 on: June 21, 2021, 09:21:32 am »
Yes this scope image is during high charging (10W) and the scope GND and lead are on the SR IC.

 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #8 on: June 21, 2021, 09:22:24 am »
@temperance - What can be done to solve this?
 

Online temperance

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: 00
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #9 on: June 21, 2021, 12:09:07 pm »
You can choose an inductor with a larger saturation current or decrease the charge current. Also make sure the self resonant freq. of the inductor is above 1.5MHz.
« Last Edit: June 21, 2021, 12:10:49 pm by temperance »
Some species start the day by screaming their lungs out. Something which doesn't make sense at first. But as you get older it all starts to make sense.
 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #10 on: June 21, 2021, 01:06:12 pm »
Thank you. I have checked and found that I have this inductor (L1 on my schematics) installed: https://www.digikey.com/short/522q085n

It seems that it can handle a maximum of 1A current. I am loading it with more than 2A...

This seems to be a/the problem. My question: Can this BAT ringing effect the SR by means of radiated emission? I am asking
this since I am now probing all the control signals of the SR with a logic analyzer and they all seem to be working great.

Nir

 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #11 on: June 21, 2021, 06:42:15 pm »

Update: I went ahead and replaced the original inductor with a giant one I have with me, this guy: https://www.digikey.com/short/wm2jc9cq

It can easily handle the current I need (although it is 10uH and not 2.2uH as recommended)

And... the problem is still there! But I must say that all other charging related issues (Max charging power, heat generated on the charging IC, ringing on the line) have improved dramatically so thank you @temperance for noticing this!

Question is... Where do I go from here?

 

Online temperance

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: 00
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #12 on: June 21, 2021, 07:46:55 pm »
That's indeed a giant inductor. The original inductor can not handle the current. Have a look at the data sheet. At 1.5A, the inductance of a 1µH inductor is only 0.5µH.

Where you go from here? Reading your original post again:

Quote
4. When scoping the charger IC (please see attached pictures and schematics) I see a 1.5Mhz noise from its internal buck converter appearing on the voltage rail of the system. The noise's peak to peak pulses are about 1V high on the VBUS inputs of the charging IC, 300mV peak to peak on the VBAT and VSYS pins of the charger IC. The same noise (300mV) is also present on each of the SR's power pin (16) and GND (8) pin.

You are looking at common mode noise.  You will need more capacitors on the input of the circuit to prevent high di/dt currents from flowing trough the wiring between the power supply and your board. On the charger page I can see 2.2µF. This not enough for a 10W charger. Put a 100µF low ESR cap + 100nF at the input of the board.

I would first try to solve this issue because it prevents you from taking proper measurements.

For the LED's you write you will open an other thread. No need to that. R= (VCC-VFled) / Iled.



« Last Edit: June 21, 2021, 09:08:50 pm by temperance »
Some species start the day by screaming their lungs out. Something which doesn't make sense at first. But as you get older it all starts to make sense.
 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #13 on: June 21, 2021, 09:24:16 pm »
When you write "Put a 100µF low ESR cap + 100nF at the input of the board" you mean right next to the 2.2uF or physically near
the point where the power from the power supply is entering the board?
 

Online temperance

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: 00
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #14 on: June 21, 2021, 10:11:51 pm »
The 100nF cap as close as possible to the charger IC. The 100µF just where the power enters the board.
Some species start the day by screaming their lungs out. Something which doesn't make sense at first. But as you get older it all starts to make sense.
 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #15 on: June 22, 2021, 07:08:30 am »
I have added the two capacitors.

With these two capacitors in place and with the giant inductor (please see attached a picture of my board and scope probe setup),
I am getting the following readings on TP1 and TP2 (my charger schematics). Please note TP1 is a 100mV per division and TP2 was taken with a 200mV per division.

The large spikes at TP2 are also present on my entire 3V rail (fed from the SYS output (TP2) of the charger).



Nir.
 

Online temperance

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: 00
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #16 on: June 22, 2021, 02:53:54 pm »
TP1 looks fine now. But TP2 doesn't.

How long are the wires between the battery and your board?

The ripple rejection of the TPS79530 is almost zero at the switching frequency of the battery charger so all noise generated by the charger is passed to the output of the LDO. You have to improve this circuit to make it work properly.

How:
1. Make the connection between the charger and the battery pack as short as possible.
2. Add extra capacitors at the output of the charger. The 10µF you've got there doesn't mean anything. You will need 100µF or something with a very low ESR and ESL + 100nF with very short leads, preferably surface mount.
3. Add a 2.2R resistor in series with the LDO input and add a 10µF capacitor at the input of the LDO which creates a low pass filter. (F -3db= around 7KHz) If 2R2 is too large, you can try 1R with 22µF.

Also, can you find a smaller inductor which can be soldered onto the board with shorter connections?

Some species start the day by screaming their lungs out. Something which doesn't make sense at first. But as you get older it all starts to make sense.
 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #17 on: June 22, 2021, 08:15:31 pm »

The wires were 10cm long so I decided to shorten them. I took off the shrinkage cover of the battery and discovered 10cm more... I have now
shorten it to 3cm total but the signal is almost the same and the problem is still there (I was sure this is it!!)

I do not have the other components you have advised with me so I will go ahead and order them, I should have
them in a few days. While I am ordering - Do you have a suggestion as a replacement for the TPS79530? A SOT223-6 regulator which
has a good ripple rejection for the 1.5Mhz? It only runs the microcontroller and a few other digital low current devices so even a 50mA regulation output current
would be enough.



 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #18 on: June 22, 2021, 08:28:01 pm »
Also would love your recommendation for that ~100uF very low ESR/ESL cap.

 

Online temperance

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: 00
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #19 on: June 23, 2021, 02:07:12 am »
The LDO is fine. It's normal for the regulator to a low PSSR at high frequencies.

1. You've got two 10µF-25V capacitors a the output in what looks to me an 0805 package. Make sure they are really 10µF at the applied voltage.
https://redexpert.we-online.com/redexpert/#/module/13/productdata/=885012208069/C/gte:10uF+lte:10uF/size/+or+0805+1206

The minimum capacitance required for proper operation is described in the data sheet under 10.2.2.3.

2. A 10µF 0805 capacitor starts to be reactive above 1MHz. To solve this, you have to add a 10...100nF capacitor at the charger output close to the inductor.
The 100µF capacitor suggested earlier will not help because they don't "work" at high frequencies.

The problem might also be with your board layout if the above doesn't help to reduce the high frequency noise seen at TP2.

3. Don't turn on the LED's for now because they don't have proper current limiting resistors.

4. The MIC5014 is not needed. The same can be done with a P MOSFET.





Some species start the day by screaming their lungs out. Something which doesn't make sense at first. But as you get older it all starts to make sense.
 

Offline NirTopic starter

  • Contributor
  • Posts: 12
  • Country: il
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #20 on: June 23, 2021, 08:20:21 am »
I have disconnected the SYS output from the 3V regulator and fed that regulator from an external lab power supply. The results are exactly the same.

This made me think of a sentence you wrote a few posts ago saying "You are looking at common mode noise" and this seems to be the case since
i am seeing the noise both on my GND path and my 3V path.

I know there is something called Common mode chokes to help deal with common mode noise - If that is correct, would you be so kind
and let me know what kind of choke should I use and how exactly do I connect it (or more than one?) in my hardware?

Nir.
 

Online temperance

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: 00
Re: Charger IC cuases bad data to appear on shift registers outputs
« Reply #21 on: June 23, 2021, 08:40:16 pm »
That's very strange because the frequency at which the common mode noise spikes appear correspond with the charger switching frequency and duty cycle. This simple circuit should be able to work fine without common mode filters.

Is the charger shut down?

Also, did you install current limiting resistors in series with the LED's?

Perhaps an other picture of the common mode noise so we can see what's going on.

Can you make pictures of the board layout?
Some species start the day by screaming their lungs out. Something which doesn't make sense at first. But as you get older it all starts to make sense.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf