I have about 72 of the following circuits on my board. The MOSFET and R2 comprise of the output stage and the pull up resistor is my input stage. The long length of wire in-between is the wire under test.

enter image description here

I've had this working for quite some time now and it works well. However, today I hooked up a wire harness of about 15 m in length - I wanted to see how much ringing was present. I noticed something else though - there was 1.3 MHz sinusoidal waveform present at the "Output Voltage" node. The peak to peak voltage was approximately 400mV(!). Here's the waveform in all it's glory:

enter image description hereenter image description here

When I measure the voltage at the MOSFET's drain, I get this:

enter image description here

The induced voltage seems to be gone when the MOSFET drives the line low. I then got another harness of about 4 m in length - the amplitude of the waveform was much reduced now - approximately 150mV but the frequency was the same. Twisting the wires reduced the amplitude (I forgot by how much. I will do the test again when I go back to work and post here) however, for us, twisting the wires isn't a solution. The harness is manufactured according to our customer's specs and if they dont' specify twisted wires, we can't have twisted wires!

My questions are:

  1. What could be causing this? Are these voltages being induced from somewhere? The environment isn't noisy.
  2. How can I ensure these voltages don't cause issues when my CPLD reads the voltage at the "Output Voltage" node.

NOTE: I know the o-scope screens don't show the frequency, I'm not sure why that is, but the frequency was a stable 1.3MHz. I remember this vividly.

How did I measure the signals? I connected my probe ground clip to a ground point near the pull up resistor, R1 (it's not visible in the schematic). I then I connected my probe to the "Output Voltage" node. This is the measurement at the input side. To see what was happening at the MOSFET side, I again connected my probe near a ground point that was near the MOSFET and measured at the MOSFET's drain. As the rising/falling times aren't excessively high, I don't think this is a measurement error - ESPECIALLY because the waveform's amplitude was reduced when I got a shorter wire.

  • \$\begingroup\$ Your scope shows the frequency: the timescale is 500 ns/div, and a period of the signal is a bit less than two divisions, so 1.3 MHz is consistent. \$\endgroup\$ – clabacchio Apr 21 '12 at 9:42
  • \$\begingroup\$ Have you tried twisting the wires? \$\endgroup\$ – clabacchio Apr 21 '12 at 9:44
  • \$\begingroup\$ Yes. The waveform is gone then. I apologize I forgot to mention that. However, twisting the wires isn't the solution! The wiring harness is produced according to specs of our customer. If they don't want twisted wires, we can't have twisted wires in the harness! \$\endgroup\$ – Saad Apr 21 '12 at 9:46

I'd bet that if you disconnect the wire at the MOSFET then you'll still have the 1.3 MHz at the pullup resistor. If that is the case then your wire is acting like an antenna and you're receiving something.

Sources of radio waves tend to change. This could be why you haven't seen this before. Or, you never used this kind of wiring harness before and so never tried an "antenna tuned to 1.3 MHz" before.

There is not much you can do with this to fix it. At least, not much that doesn't have some negative side effect.

One solution is to put an RC filter just before the pullup at the input. Size it so the cutoff frequency is as low as possible without effecting the speed at which you can measure the cable. It might be that you can't do it without effecting the speed, those are the breaks.

Keep in mind that the R from the RC, and your pullup resistor will form a voltage divider. When the MOSFET is on, and the wire is 'low', then the R+Pullup will limit how low the voltage on the input will go. Make sure that the R in the RC is low enough, or raise the value of the pullup, so your input will go low enough.

Another possibility is that you are exciting some sort of resonance in the wire. This is unlikely since the speed of the signal traveling down the wire and back is much faster than 1.3 MHz. But if it were a problem then I would look at putting a resistor in series with the MOSFET. Basically something to slow down the falling edge of the signal.

  • \$\begingroup\$ David, I understand that the filter will have negative side effects but the rise/fall time of my signal is about 5ns. I am OK with (much) slower edges - even 250 ns is OK. Will a RC filter affect these edges drastically? \$\endgroup\$ – Saad Apr 21 '12 at 15:01
  • \$\begingroup\$ @Saad 1.3 MHz has a period of about 769 ns. For an RC filter to be effective at filtering out 1.3 MHz then the RC time constant will have to be longer than 769 ns. So yes, an RC filter will affect the edges drastically. \$\endgroup\$ – user3624 Apr 21 '12 at 15:13
  • \$\begingroup\$ I remember, once I have put so much effort on creating an LC circuit that is in 27MHz band but couldn't manage to make it work, the distance from the transmitter was less than a meter. After that, I've never worked with RF :) \$\endgroup\$ – abdullah kahraman Apr 21 '12 at 15:24
  • \$\begingroup\$ @Saad you can use a badn-stop (notch) filter eventually...but if it's digital, maybe it's not so much of a problem \$\endgroup\$ – clabacchio Apr 21 '12 at 15:30
  • twisted wires (cheap)
  • coax cables (expensive)

Or redesign with:

  • larger output voltage swing (so the interference is small in relation to signal)
  • symmetric outputs (two outputs: one is high, then the other one is low. And the other way around.)
  • current loop (instead of measuring voltage, measure current. Commonly 4-20mA is used)
  • 1
    \$\begingroup\$ Nice answer, but apparently the OP wants just to know what happens, and not to solve it; especially, he refuse to use twisted wires, and I guess coax also. \$\endgroup\$ – clabacchio Apr 21 '12 at 13:17
  • \$\begingroup\$ @clabacchio I never said I refuse to twist wires. I said I cannot twist the wiring harness cables. Why? They are made to specs which are given to us by our customer. Here's an example: ayenbee.com/media/images/photos_products/product_harness.jpg - do any of the wires look "twistable"? The specs list everything - weather the wire ought to be shielded or not, what it's length is, gauge, terminal etc. \$\endgroup\$ – Saad Apr 21 '12 at 13:25
  • \$\begingroup\$ @Saad well sorry I didn't want to be rude, and I don't understand what do you eman with "harness"...but the point is that the solutions aren't appliable as I see the problem. Do you confirm it? \$\endgroup\$ – clabacchio Apr 21 '12 at 13:42
  • \$\begingroup\$ I understood #2 in the 'questions` section as 'how can I solve it?' But I guess I misunderstood. English is not my native language. I didn't know what was meant by 'harness' either, until I just saw the above picture. \$\endgroup\$ – jippie Apr 21 '12 at 13:44
  • \$\begingroup\$ @clabacchio I understand. Consider a "harness" to be a group of wires. Each wire has a specified length, colour, gauge etc. The spec also mentions where the wire goes. For instance, a harness could consist of wires that make the rear lights in your car work. \$\endgroup\$ – Saad Apr 21 '12 at 13:45

Longish comment:

  1. How can you be sure that the environment isn't noisy? I think that it's quite impossible to have a completely noise-free environment, even inside a Faraday cage; the point is how noisy it is.

  2. How do you connect the grounds and the supplies? Obviously, if they aren't connected together, and you measure at the left side (referenced to Q1's source) the other end will be basically dangling when not pulling low.

  3. You don't have a push-pull output stage, so in any case the resistor will be a weaker (even if not so weak) pull-up.

But I think the strongest point is n. 2, so if you can, post a diagram of the measurement scheme.

  • \$\begingroup\$ The environment isn't excessively noisy. There is no heavy machinery that would cause emissions, or anything of that sort. The supply and ground are connected via planes. I have a 3.3V and a GND plane - both are complete planes with no traces on them. The application demands that I should have a open-drain configuration. With a push-pull stage, bus contention is an issue. \$\endgroup\$ – Saad Apr 21 '12 at 9:32
  • \$\begingroup\$ @Saad but seeing the frequency, the enemy seems to be some RF emission, which is almost everywhere. See edit. \$\endgroup\$ – clabacchio Apr 21 '12 at 9:32
  • \$\begingroup\$ I edited my post to describe how I measured the signals. \$\endgroup\$ – Saad Apr 21 '12 at 9:39
  • \$\begingroup\$ try up ground to the earth, not virtual grounding , do it actual. You'll notice it's gone. \$\endgroup\$ – Standard Sandun Apr 21 '12 at 10:25
  • \$\begingroup\$ @Saad - I agree with clabacchio, it does look like RFI. Is there an AM radio transmitter nearby? If you turn the 'scope timebase down can you see any modulation? \$\endgroup\$ – MikeJ-UK Apr 21 '12 at 12:18

Well it looks like you "harnessed" a resonance mode of your cable to act as an AM radio. Actually a "cable has up to a pair of connectors, and a "harness" has more than 2 connectors.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.