Author Topic: Signal distortion only when USB is connected.  (Read 119 times)

0 Members and 1 Guest are viewing this topic.

Offline permal

  • Contributor
  • Posts: 49
  • Country: se
Signal distortion only when USB is connected.
« on: December 11, 2017, 06:40:32 AM »
Hi,

I'm working on my first larger circuit and so far things are working out above expectation, but I've got one issue I can't find the cause of; whenever the USB cable is connected to the MCU breakout board (Sparkfun ESP32 Thing), I get severe signal distortion in two of my input lines, see the attached images.

The input signal is a 5V active low signal (Wiegand signal from a keypad, powered from the same 12V as the rest of the circuit). The first image shows what it looks like with the USB connected, the second one with only the device's own power supply running. This is measured on pin 1 & 8, left side of U401 (TXB0102DCU) in the middle of the schematic.

As can be seen in the third image I put a jumper (JP401, center left of the MCU on the right side in the image) for the 3.3V power of the MCU to be able to cut it off from the internal power while the USB is connected, but the distortion is present even with that off.

Could someone please give me some pointers what I've done wrong?

The entire schematic is available here, in KiCad format, and also attached as a PDF to this post.

Update: Connecting a Laptop running only on batteries, i.e. isolated from mains results in the same distortion.
« Last Edit: December 11, 2017, 06:57:34 AM by permal »
 

Offline ogden

  • Regular Contributor
  • *
  • Posts: 178
Re: Signal distortion only when USB is connected.
« Reply #1 on: December 11, 2017, 06:49:35 AM »
At the moment hard to tell. Where do you connect your USB? Could be some weird ground loop problem or supply isolation failure somewhere in the chain (PC/scope/device). Any chance to connect your thing to completely isolated (from mains) USB power bank or laptop?
 

Offline permal

  • Contributor
  • Posts: 49
  • Country: se
Re: Signal distortion only when USB is connected.
« Reply #2 on: December 11, 2017, 06:53:42 AM »
At the moment hard to tell. Where do you connect your USB? Could be some weird ground loop problem or supply isolation failure somewhere in the chain (PC/scope/device). Any chance to connect your thing to completely isolated (from mains) USB power bank or laptop?
It's to a PC (connected to mains), I'll try with a laptop running on batteries and see if that makes a difference.
 

Offline permal

  • Contributor
  • Posts: 49
  • Country: se
Re: Signal distortion only when USB is connected.
« Reply #3 on: December 11, 2017, 06:58:10 AM »
At the moment hard to tell. Where do you connect your USB? Could be some weird ground loop problem or supply isolation failure somewhere in the chain (PC/scope/device). Any chance to connect your thing to completely isolated (from mains) USB power bank or laptop?
It's to a PC (connected to mains), I'll try with a laptop running on batteries and see if that makes a difference.
Made no difference, same distortion with Laptop running on batteries.
 

Offline ogden

  • Regular Contributor
  • *
  • Posts: 178
Re: Signal distortion only when USB is connected.
« Reply #4 on: December 11, 2017, 07:04:28 AM »
It's to a PC (connected to mains), I'll try with a laptop running on batteries and see if that makes a difference.

When I see some unwanted noise, I determine it's frequency and obviously try to find source of it. When you know source, then it is much easier to find it's path into your circuit. First suspect of such spikes - switching supply somewhere around. Very handy accessory for your scope when you seek for switching noise is straight core inductor like this:



Connect your scope probe to it's leads and sniff around all the supplies in the chain, try to find EM field that matches frequency of the suspect noise.
 

Offline ogden

  • Regular Contributor
  • *
  • Posts: 178
Re: Signal distortion only when USB is connected.
« Reply #5 on: December 11, 2017, 07:09:59 AM »
Made no difference, same distortion with Laptop running on batteries.

What do you see on other side of level shifter U401? Try to find origin of the noise/signal. Measure all around your circuit and components connected to it! Amplitude is enermous BTW.

Some RIgol scopes have host USB port - try to plug it there. Same result?

[edit] Maybe 0.5A of standard USB is not enough to power your circuit. Try phone charger that can deliver 1A as well.
« Last Edit: December 11, 2017, 07:14:12 AM by ogden »
 

Offline permal

  • Contributor
  • Posts: 49
  • Country: se
Re: Signal distortion only when USB is connected.
« Reply #6 on: December 11, 2017, 07:22:07 AM »
Connect your scope probe to it's leads and sniff around all the supplies in the chain, try to find EM field that matches frequency of the suspect noise.
You mean to use the inductor as a antenna? One pin connected to the scope, the other unconnected?

What do you see on other side of level shifter U401? Try to find origin of the noise/signal. Measure all around your circuit and components connected to it! Amplitude is enermous BTW.

Some RIgol scopes have host USB port - try to plug it there. Same result?

[edit] Maybe 0.5A of standard USB is not enough to power your circuit. Try phone charger that can deliver 1A as well.
Same thing on the other side of U401. Same thing with the USB connected to the Rigol. The 0.5mA from USB is enough, power draw is <400mA.
 

Offline ogden

  • Regular Contributor
  • *
  • Posts: 178
Re: Signal distortion only when USB is connected.
« Reply #7 on: December 11, 2017, 07:32:06 AM »
You mean to use the inductor as a antenna? One pin connected to the scope, the other unconnected?

As magnetic field antenna. Which means both pins connected  - one to ground lead an another to tip of the probe. Noise is huge - you shall see it just by simply probing. Inductor is just convenient & isolated "magnetic field probe" to check what's going on in the supply transformers and high current tracks.

Quote
Same thing on the other side of U401. Same thing with the USB connected to the Rigol. The 0.5mA from USB is enough, power draw is <400mA.

I would test it anyway using powerful enough 5V supply (into the VUSB). You never know what is inrush current unless you properly measure it (which most likely you did not).

[edit] You do not tell what's connected to "pin 1 & 8, left side of U401" and how connected, how it is powered. Maybe noise is coming from there?
« Last Edit: December 11, 2017, 07:34:17 AM by ogden »
 

Offline permal

  • Contributor
  • Posts: 49
  • Country: se
Re: Signal distortion only when USB is connected.
« Reply #8 on: December 11, 2017, 07:45:08 AM »
Perhaps it wasn't clear, but I did write:

Quote
The input signal is a 5V active low signal (Wiegand signal from a keypad, powered from the same 12V as the rest of the circuit)

So that is what is connected to pin 1 & 8. The signal is fine as long as the USB isn't connected.

The entire circuit, including the keypad, draws less than 400mA, I've set my powersupply to cut of at 400mA and it is not cutting off. Unfortunately I don't have the schematics for the keypad, but it is what I assume is a standard Wiegand interface; D0, D1 and GND.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf