Problem with cable inductance - Page 1
Forum section: electronics / projects

author: Twistx77
author_rank: Regular Contributor
timestamp: February 06, 2014, 05:25:35 pm
content: 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.

author: fcb
author_rank: Super Contributor
timestamp: February 06, 2014, 05:58:04 pm
content: Schematic? Photographs?

author: Twistx77
author_rank: Regular Contributor
timestamp: February 06, 2014, 09:08:57 pm
content: 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.

author: KJDS
author_rank: Super Contributor
timestamp: February 06, 2014, 09:27:13 pm
content: 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.

author: KerryW
author_rank: Regular Contributor
timestamp: February 06, 2014, 11:24:26 pm
content: 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

author: Marco
author_rank: Super Contributor
timestamp: February 07, 2014, 02:13:13 am
content: Did you try running the sensor leads with a separate cable?

author: Co6aka
author_rank: Unknown
timestamp: February 07, 2014, 07:30:16 am
content: 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.)

author: Twistx77
author_rank: Regular Contributor
timestamp: February 07, 2014, 10:02:02 am
content: 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!

author: sync
author_rank: Frequent Contributor
timestamp: February 07, 2014, 01:00:27 pm
content: Do you use current limiting resistors for the LEDs? In your schematic they are missing.

author: Twistx77
author_rank: Regular Contributor
timestamp: February 07, 2014, 01:04:58 pm
content: 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.

author: fcb
author_rank: Super Contributor
timestamp: February 07, 2014, 01:54:59 pm
content: Have you got some capacitance on the output of the voltage regulators (0.1uF upwards), it could be those regulators oscillating.

author: Twistx77
author_rank: Regular Contributor
timestamp: February 07, 2014, 01:56:44 pm
content: 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.

author: KerryW
author_rank: Regular Contributor
timestamp: February 07, 2014, 02:47:43 pm
content: 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

author: sync
author_rank: Frequent Contributor
timestamp: February 07, 2014, 02:52:58 pm
content: 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.

author: Twistx77
author_rank: Regular Contributor
timestamp: February 07, 2014, 03:08:21 pm
content: HiKerry, 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.

author: dannyf
author_rank: Super Contributor
timestamp: February 07, 2014, 03:16:29 pm
content: 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.

author: dannyf
author_rank: Super Contributor
timestamp: February 07, 2014, 03:18:22 pm
content: BTW, this is a terrible design: the led drivers should have been with the leds, not on the signal side.Zero intellect.

author: Twistx77
author_rank: Regular Contributor
timestamp: February 07, 2014, 03:20:16 pm
content: 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...

author: dannyf
author_rank: Super Contributor
timestamp: February 07, 2014, 03:24:50 pm
content: 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.

author: Twistx77
author_rank: Regular Contributor
timestamp: February 07, 2014, 03:26:47 pm
content: 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...

author: dannyf
author_rank: Super Contributor
timestamp: February 07, 2014, 03:49:39 pm
content: QuoteYeah. An award winning small board that does not work.Job well done,

author: Co6aka
author_rank: Unknown
timestamp: February 07, 2014, 04:08:10 pm
content: Quote from: Twistx77 on February 07, 2014, 01:04:58 pmSo, in other words, your(very poor quality)transmission lines are terminated with diodes. (Someone wrote something about a RF-jammer...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.

author: Twistx77
author_rank: Regular Contributor
timestamp: February 07, 2014, 04:12:07 pm
content: 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.

author: Marco
author_rank: Super Contributor
timestamp: February 07, 2014, 04:17:49 pm
content: Quote from: Twistx77 on February 07, 2014, 10:02:02 amThat'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.

author: Co6aka
author_rank: Unknown
timestamp: February 07, 2014, 04:18:17 pm
content: Quote from: Twistx77 on February 07, 2014, 04:12:07 pmSo 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.

author: Co6aka
author_rank: Unknown
timestamp: February 07, 2014, 04:21:47 pm
content: Quote from: Marco on February 07, 2014, 04:17:49 pmIf he get those unnecessarily high rate edges down, and shuts down the RF-mixers(slash "harmonic generators")he made with the cable and LEDs then he's prolly gonna be OK.

author: Twistx77
author_rank: Regular Contributor
timestamp: February 07, 2014, 04:24:17 pm
content: Marco, cutting the cable is not an option for me I will try anything first.Co6aka, you don't have to see them, they are IR. Also I will try adding the 0.1uF too but I don't know if that will be possible since I don't have much room in the PCB itself.

author: Co6aka
author_rank: Unknown
timestamp: February 07, 2014, 04:28:00 pm
content: Quote from: Twistx77 on February 07, 2014, 04:24:17 pmBut, I've been routinely overexposed to so many powerful electromagnetic fields that I can now see DC to Daylight!

author: dannyf
author_rank: Super Contributor
timestamp: February 07, 2014, 07:08:31 pm
content: You shouldn't try any fixes until you know what the problem is.It is fairly easy to tell if the problem is caused by coupling through the cable or the power supply. No cutting required.

author: Zero999
author_rank: Super Contributor
timestamp: February 08, 2014, 08:42:25 pm
content: Quote from: dannyf on February 07, 2014, 03:18:22 pmI agree.The PSU should be on the same board as the MCU and the LED driver should be on the same board as the LEDs.It's not surprising it isn't working.

author: Marco
author_rank: Super Contributor
timestamp: February 08, 2014, 08:50:32 pm
content: I suspect some of the things OP says he cant possibly change will have to possibly be changed.

author: lewis
author_rank: Frequent Contributor
timestamp: February 08, 2014, 09:01:40 pm
content: Quote from: Twistx77 on February 06, 2014, 05:25:35 pmOut of curiosity, why are the LEDs pulsing so fast? What's the application?

author: scientist
author_rank: Frequent Contributor
timestamp: February 08, 2014, 09:05:50 pm
content: IR laser communication ala LADEE? Possibly.

author: fcb
author_rank: Super Contributor
timestamp: February 08, 2014, 09:29:24 pm
content: I've tried using ULN2803A in fast PWM, it's crap - the (darlington) transistors don't switch fast enough.