Author Topic: Problem with cable inductance  (Read 15529 times)

0 Members and 1 Guest are viewing this topic.

Offline Twistx77Topic starter

  • Regular Contributor
  • *
  • Posts: 151
  • Country: 00
Problem with cable inductance
« on: February 06, 2014, 05:25:35 pm »
Hi,

I'm having problems with a prototype that I'm developing and I would like to know if I could get some advice. I know that I might be very mistaken here but I think the problem is the cable inductance for the frequencies I'm working with.

I have a board with an MCU that works @ 3.3V and also I have a ULN2803A which drives some LEDs. The MCU have to read some analog signal which come from some light sensors. Both, sensors and LEDs are in a separated board and they connect to my board using a flat cable. When I started the project I needed 4 cm of cables at the most just to connect both boards and be able to flip one over the other but now I need to add about 1 meter of cable between boards and that is causing me serious problems.

The reason for that, is that the board I got with the sensors and LEDs share both GND and 3.3V so the current of the LEDs (60mA) is generating spikes of about 4 volts and 15 Mhz in the 3.3V rail and in the output of each sensor when I pulse the each LED (LEDs are controlled by a 4Mhz signal). Of course, this is terrible for the ADC of the micro but so far it just makes the MCU work "funny". These spikes are only visible when I take the ground from the main board and measure the output in the "external" board. If I measure the output using the external board's ground I only get about 40mV of noise which would be ok for my application.

Anyway, I would like to solve the problem at least for now to test without having to make new boards but I don't find a solution. I think that the right way to do it would be to have the driver in the second board with its necessary capacitors and having separated supplies for the sensors and the LEDs. I would also add a filter to the ADC's inputs.

Does anyone know a possible solution for this? I mean, I could add son caps or maybe a resistor to each sensor or thing like that. I've tried adding son 10uF caps to the 3.3V rain in the external board but I think the problem is the return because the ULN2803 is in the low side. I can't use lower frecuency for the LEDs because I need to turn them on and off quickly.

I would appreciate any advice.

Thank you.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2174
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Problem with cable inductance
« Reply #1 on: February 06, 2014, 05:58:04 pm »
Schematic? Photographs?
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline Twistx77Topic starter

  • Regular Contributor
  • *
  • Posts: 151
  • Country: 00
Re: Problem with cable inductance
« Reply #2 on: February 06, 2014, 09:08:57 pm »
I've made a simple schematic explaining. The MCU has it own caps for filtering and decoupling as recommended. The problem is the cable because the same board with a 4 cm cable works just fine.

Thanks.
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: Problem with cable inductance
« Reply #3 on: February 06, 2014, 09:27:13 pm »
Try building a model in LTspice of the cable and the signals you have on there. Look up the resistance and interwire capacitance for the cable you are using.

Then try using a 16 way cable where every other strand is ground and see if LTspice* gives better results.

*other Spices are available.

Offline KerryW

  • Regular Contributor
  • *
  • Posts: 112
  • Country: us
Re: Problem with cable inductance
« Reply #4 on: February 06, 2014, 11:24:26 pm »
According to your schematic, LED current doesn't go through the cable ground line, only through the 3.3V line and the signal line.  That should not cause spikes on the ground line.  But, since the spikes change based on where the scope ground is, you must have spikes on the ground line.  Very odd.

Can you try pulsing only 1 LED?  Pulse just the LED on pin 2 of the cable and measure the spikes.  Do the same with the LED on pin 4.  Are the results the same, or different?

Kerry
One accurate measurement is worth a thousand expert opinions
- Adm. Grace Hopper
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7760
  • Country: nl
Re: Problem with cable inductance
« Reply #5 on: February 07, 2014, 02:13:13 am »
Did you try running the sensor leads with a separate cable?
« Last Edit: February 07, 2014, 02:15:54 am by Marco »
 

Offline Co6aka

  • Supporter
  • ****
  • Posts: 311
  • Country: us
Re: Problem with cable inductance
« Reply #6 on: February 07, 2014, 07:30:16 am »
I'm finally dozing off but... Fast edges equals high frequency so essentially you've got a transmission line, which means you need to consider impedance and termination/matching at both ends (and ground/return.) And, in your circuit you've got multiple transmission lines. If you experiment with sending pulses down lengths of coax (or twisted pair) and play with termination (at both ends) you'll see on your scope (probe at each end) how mangled the waveform can get, plus other nasty effects. Then, if you probe your circuit you'll recognize something that's now familiar.

(BTW, back in the stone age of high speed parallel connections it was common to see ribbon cable with a ground plane, and of course termination resistors at each end, to both ground and V+. I still have a couple of rolls of the stuff for nostalgia's sake -- I'm so sentimental... sigh.)

Co6aka says, "BARK! and you have no idea how humans will respond."
 

Offline Twistx77Topic starter

  • Regular Contributor
  • *
  • Posts: 151
  • Country: 00
Re: Problem with cable inductance
« Reply #7 on: February 07, 2014, 10:02:02 am »
Hi,

Thank you all for your advice. I've attached an image of what Im getting from each sensor when they are saturated (3.3V). This is what I get when I measure the voltage with the ground lead connected to the ground of the main board and the probe to the ADC input  (in the main board) which comes from the sensor.

KJDS: I will try that.

KerryW: Pulsing a LED in any of the lines gives me basically the same result as the image below.

Marco: I can't do, I have to use the existing connector.

Co6aka: I would try that but I can't do that now since I can't mess up the PCB much and there are 10 sensors and 8 LEDs.

Any other idea?

Thanks!
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Problem with cable inductance
« Reply #8 on: February 07, 2014, 01:00:27 pm »
Do you use current limiting resistors for the LEDs? In your schematic they are missing.
 

Offline Twistx77Topic starter

  • Regular Contributor
  • *
  • Posts: 151
  • Country: 00
Re: Problem with cable inductance
« Reply #9 on: February 07, 2014, 01:04:58 pm »
I do, sorry, I did that schematic quickly just to show. They are between the ULN2803 and the connector for the cable, so in the main board.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2174
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Problem with cable inductance
« Reply #10 on: February 07, 2014, 01:54:59 pm »
Have you got some capacitance on the output of the voltage regulators (0.1uF upwards), it could be those regulators oscillating.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline Twistx77Topic starter

  • Regular Contributor
  • *
  • Posts: 151
  • Country: 00
Re: Problem with cable inductance
« Reply #11 on: February 07, 2014, 01:56:44 pm »
Hi fcb,

Yes I do have and I don't think that is the problem since in the mainboard I don't see the noise I only see it in the ADC inputs.

 

Offline KerryW

  • Regular Contributor
  • *
  • Posts: 112
  • Country: us
Re: Problem with cable inductance
« Reply #12 on: February 07, 2014, 02:47:43 pm »
It appears to be caused be impedance mismatch / edge speed.  Try putting a couple (2-4) of nano farads on the input line of the ULN2803 of 1 of the LED drivers, and see if that line stops generating the spikes.

Kerry
One accurate measurement is worth a thousand expert opinions
- Adm. Grace Hopper
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Problem with cable inductance
« Reply #13 on: February 07, 2014, 02:52:58 pm »
I not an EE. So maybe I'm completely wrong.
First I think you build a radio jammer. With this pulses and the long antenna (the 1m cable) I think it will radiate. Do you want to risk that?

As you see your design is not good. One wire for ground is far too little. External parallel data buses are usually using one ground wire per data line. And this is only low current. On a flat cable they are usually connected:
GND DATA GND DATA GND ...

I think following happen in your circuit. When switching a LED the current pulse causes a spike on the +3.3V line on the LED board due the cable inductance. This spike is coupled through the decoupling caps to ground. So you see the spike on ground too.

The fast edges of the LED driving signals are the problem. Try make them slower. Maybe ferrite beads on the LED lines will work or caps to ground (RC filter) after the current limiting resistors on the control board. And try a ferrite bead between the +3.3V line and the decoupling cap on the LED board. Keep the LEDs before the bead (see attachment).

A better design is to put the LED driver on the LED board to keep the (pulsed) current loop to a small area. And use much more lines for ground and Vcc/+3.3V.
« Last Edit: February 07, 2014, 02:54:55 pm by sync »
 

Offline Twistx77Topic starter

  • Regular Contributor
  • *
  • Posts: 151
  • Country: 00
Re: Problem with cable inductance
« Reply #14 on: February 07, 2014, 03:08:21 pm »
Hi

Kerry, I will try that to see if I have any luck. First I will just try to filter the spikes with an RC filter in each ADC input.

sync, I agree 100% with that " I think following happen in your circuit. When switching a LED the current pulse causes a spike on the +3.3V line on the LED board due the cable inductance. This spike is coupled through the decoupling caps to ground. So you see the spike on ground too."  it is what I think is happening from the beginning. Hence the title of the post.

 I know the solution would be to have the driver as close as possible to the LEDs, the problem is that at first the idea was that the cable was going to be 3cm's long not 1 meter so I thought 1 gnd line would be good enough for not much current. Anyway, lesson learned . I don't have a ferrite bead right now nut I can probably find some in my junk drawer.

Thank you both.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Problem with cable inductance
« Reply #15 on: February 07, 2014, 03:16:29 pm »
I have to say that I am not 100% of what your issues are.

If the issue is that the leds are getting turned on too fast, you can use pull-up or pull-down to slow down their turn on / off. Quite frankly, the traces are too fast for it to have been caused by the leds' current draw.

Having said that, if the signal from those TSL257 are getting coupled to the led current, you can put a low pass filter on the mcu side for those signals. That can be done either in hardware or in software.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Problem with cable inductance
« Reply #16 on: February 07, 2014, 03:18:22 pm »
BTW, this is a terrible design: the led drivers should have been with the leds, not on the signal side.

Zero intellect.
================================
https://dannyelectronics.wordpress.com/
 

Offline Twistx77Topic starter

  • Regular Contributor
  • *
  • Posts: 151
  • Country: 00
Re: Problem with cable inductance
« Reply #17 on: February 07, 2014, 03:20:16 pm »
Hi Danny,

I've already tried the Pull-up resistor in the driver with no luck.  I'm already filtering.

BTW, first read before judging, at first the idea wasn't to have a long cable... I'm trying to recycle what I already have...

 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Problem with cable inductance
« Reply #18 on: February 07, 2014, 03:24:50 pm »
Not sure what 3.3v supply it is. I would decouple the tsl257's vdd pin from it, via an inductor or resistor or diode.

The mistake isn't about the use of long or short cables: something like this simply makes zero sense, regardless of how long / short the cable is.
================================
https://dannyelectronics.wordpress.com/
 

Offline Twistx77Topic starter

  • Regular Contributor
  • *
  • Posts: 151
  • Country: 00
Re: Problem with cable inductance
« Reply #19 on: February 07, 2014, 03:26:47 pm »
It does make sense when you want the board to be as small as possible...

Also, not the best idea to put big ICs in flexible boards...
« Last Edit: February 07, 2014, 03:28:21 pm by Twistx77 »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Problem with cable inductance
« Reply #20 on: February 07, 2014, 03:49:39 pm »
Quote
It does make sense when you want the board to be as small as possible...

Yeah. An award winning small board that does not work.

Job well done, :)
================================
https://dannyelectronics.wordpress.com/
 

Offline Co6aka

  • Supporter
  • ****
  • Posts: 311
  • Country: us
Re: Problem with cable inductance
« Reply #21 on: February 07, 2014, 04:08:10 pm »
They are between the ULN2803 and the connector for the cable, so in the main board.

So, in other words, your (very poor quality) transmission lines are terminated with diodes. (Someone wrote something about a RF-jammer... :-DD Anyway...) Without thinking too much about it, cut the value of your existing (LED) current limiting resistors in half, and then put equal value resistors directly in series with the LEDs (add 'em to the leads) and tack bypass caps across the LEDs (not across the resistor/LED combo, just the LED.)

Afterthought: After the above, also add bypass caps at the connector on the main board, after the resistor; you'll be making a R/L/C filter with all that mess.
« Last Edit: February 07, 2014, 04:14:41 pm by Co6aka »
Co6aka says, "BARK! and you have no idea how humans will respond."
 

Offline Twistx77Topic starter

  • Regular Contributor
  • *
  • Posts: 151
  • Country: 00
Re: Problem with cable inductance
« Reply #22 on: February 07, 2014, 04:12:07 pm »
Hello Co6aka,

Thanks for the help. I will trying "splitting" the resistors. I might try the caps but a small value since I need the LEDs to stay on for just a brief moment.

That is really helpful.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7760
  • Country: nl
Re: Problem with cable inductance
« Reply #23 on: February 07, 2014, 04:17:49 pm »
Marco: I can't do, I have to use the existing connector.

That's not what I asked, I asked if you tried ... you can just cut up the ribbon cable and run the sensor leads separately for a test.

My naive guess is you have cross talk, with your edge rates you have significant energy at frequencies at which capacitive impedance between the leads is going to be in the order of 100s of Ohms ... close to the characteristic impedance of ribbon cable, so even if the sensor output impedance is low this will create crosstalk AFAICS.

If it's crosstalk you can just shield the sensor lines, you can continue using the same connector just not the same cables.

PS. although at that point the crosstalk between the LED leads and the reflections are still a problem.
« Last Edit: February 07, 2014, 04:22:56 pm by Marco »
 

Offline Co6aka

  • Supporter
  • ****
  • Posts: 311
  • Country: us
Re: Problem with cable inductance
« Reply #24 on: February 07, 2014, 04:18:17 pm »
I might try the caps but a small value since I need the LEDs to stay on for just a brief moment.

So brief that you can't see das blinkenlight?  ;)  Try 0.1uF chip caps.  Also, I updated my previous post; our posts crossed in the mail.
Co6aka says, "BARK! and you have no idea how humans will respond."
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->