Author Topic: [Solved] Need help debugging my first PCB project  (Read 4553 times)

0 Members and 4 Guests are viewing this topic.

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
[Solved] Need help debugging my first PCB project
« on: July 22, 2022, 12:12:46 am »
Hello! I'm Cory, nice to meet you.

I'm trying to learn how to design my own PCBs and I'm running into an issue with my first project. I sent out a USB hub design to be manufactured by JLCPCB, but when I assembled it and tried it out, I'm seeing that it is not working properly. I've come here hoping to get some tips or advice on how I should proceed to figure out what is malfunctioning...

Here's the assembled circuit:



And when I plug it into my computer, I'm getting an error message about the device exceeding port current limits.



Also, note that I used a female USB port connector for the upstream data port, which required me to get a USB-A male to male cable to hook it up to a host device. I know this type of cable is generally "dangerous" to use, but because I had a brain fart and designed the upstream port with the wrong gender, I think using this cable shouldn't be contributing to the problem? Just including this tidbit of information in case my assumptions are wrong.

I don't really know where to go from here... Doing some searches online shows me an article about ESD management and robustness but I have no idea if this applies to my situation. The problem looks to be a short between power and ground, but it also looks like there is a lot that goes into shielding and surge protection when it comes to USB devices. If this is the case, I'm not so sure where to begin.

Details
  • I'm using the FE1.1s SSOP usb controller IC. Datasheet
  • I quite literally copied the USB hub design from "Retrocution". link. I've examined the connections and topology of both circuits and as far as I can tell are the same. But I wouldn't be surprised if there was some other aspect of the design that I did not copy correctly. I'm very much a beginner when it comes to electronics and hands on stuff... Maybe this could be some very basic mistake I made that most people would take for granted?
  • I used my multimeter to test continuity of my connections. Everything seems to check out, at least for all the junctions that I thought to check.
  • The files and KiCAD (5) project I created is here: https://github.com/CoryParsnipson/usb-hub-pcb-test. I can dig into it and provide more details if needed, just let me know.

EDIT:

It might help if I included the schematic and front/back copper layers. The fill on the back is the ground plane VCC and the fill on the front is the ground plane.





EDIT 2:

Here's a gerber image of Retrocution's USB design:



Rats nest of my own design, in case this makes it easier to distinguish connections:



Thanks so much for your attention!
« Last Edit: August 02, 2022, 07:51:41 pm by Cory Parsnipson »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: Need help debugging my first PCB project
« Reply #1 on: July 22, 2022, 12:39:48 am »
First of all, check for shorts on the VBUS/GND. It is hard to tell, since the datasheet is very brief, but it looks like generally people connect OVCJ to 3.3 V if not used. Disregard that, it is connected.
« Last Edit: July 22, 2022, 12:43:03 am by ataradov »
Alex
 

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Need help debugging my first PCB project
« Reply #2 on: July 22, 2022, 12:51:10 am »
Just tried VBUSM and BUSJ with ground and looks like there isn't a short.

I do have another newbie question though...

If I put my multimeter contacts on either side of the 0603 ceramic capacitors, sometimes it causes the multimeter to "chirp", like maybe there's a small bridge somewhere. Is this something I should worry about?
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: Need help debugging my first PCB project
« Reply #3 on: July 22, 2022, 12:58:57 am »
Try the actual pins on the upstream USB connector.

The chirp is normal. To test continuity multimeter applies some voltage. A discharged capacitor appears as a short to that voltage. Then capacitor charges and the short goes away.

Technically if you have a lot of capacitance on VBUS, it might cause the host to detect the surge. But assuming that C3 is <= 10 uF, you should be fine. Your schematic lacks any values, so it is hard to tell.
« Last Edit: July 22, 2022, 01:00:28 am by ataradov »
Alex
 

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Need help debugging my first PCB project
« Reply #4 on: July 22, 2022, 01:50:58 am »
The chirp is normal. To test continuity multimeter applies some voltage. A discharged capacitor appears as a short to that voltage. Then capacitor charges and the short goes away.

Technically if you have a lot of capacitance on VBUS, it might cause the host to detect the surge. But assuming that C3 is <= 10 uF, you should be fine. Your schematic lacks any values, so it is hard to tell.

Ahh okay, that's good to know. Thanks! The capacitors are 10uF 0603 ceramic capacitors.

Try the actual pins on the upstream USB connector.

I went over things touching one probe to the actual pin on the IC and the other probe to something on the PCB. All connections are as depicted in the schematic. Checking for shorts between the ground and VCC planes hasn't exposed anything yet...
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: Need help debugging my first PCB project
« Reply #5 on: July 22, 2022, 02:26:42 am »
So, there is no short between pin 1 and 4 on the J3?

I have no idea what that message from windows actually means. It might be that it reads the maximum power from the descriptor and does not think the port can supply that much.

Are you plugging it into a root port or through a hub?

Try to remove C3 entirely just to see what happens.
Alex
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: Need help debugging my first PCB project
« Reply #6 on: July 22, 2022, 02:31:58 am »
Wait, don't you have GND and VCC switched on the connector?
Alex
 

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Need help debugging my first PCB project
« Reply #7 on: July 22, 2022, 03:26:12 am »
So, there is no short between pin 1 and 4 on the J3?

I have no idea what that message from windows actually means. It might be that it reads the maximum power from the descriptor and does not think the port can supply that much.

Are you plugging it into a root port or through a hub?

Try to remove C3 entirely just to see what happens.

I don't think so. I checked J3 and the other two connectors as well. Probing the GND and 5V pins of each shows no contact.

I plugged it into both built in ports on my laptop.

I removed C3 like you suggested and it still gives me the power surge error message.

Wait, don't you have GND and VCC switched on the connector?

Uhhh, I thought it might have but I double checked this earlier today. Are you referring to this diagram?



The J3 footprint (rightmost connector) has the power pin (bottommost) connected to VDD5 by the fat trace that goes between the GND and D+ pins on the front (maybe this was a bad routing choice?). This pin has contacts going into the power plane (back-side). The ground pin (the topmost one) is connected to the ground plane on the front. Does this work out ok?

================

I ordered some more capacitors and USB ports. I ordered Retrocution's design too, so I think I'm going to try and assemble one of those and see if it works.
« Last Edit: July 22, 2022, 06:07:23 am by Cory Parsnipson »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: Need help debugging my first PCB project
« Reply #8 on: July 22, 2022, 04:19:33 am »
Here is the pinout of the connector. If you match it with yours, you will see that +5V should be on the crystal side.

But also, is the rats nest version different from the routed one? I'm really confused.

No, rats nest just has connector rotated.
« Last Edit: July 22, 2022, 04:24:17 am by ataradov »
Alex
 
The following users thanked this post: Cory Parsnipson

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4388
  • Country: nl
Re: Need help debugging my first PCB project
« Reply #9 on: July 22, 2022, 04:43:32 am »
Another observation of your PCB raises the question why you routed a trace on the top layer from the incoming USB connector VCC to the IC where you could have easily use a via to the bottom layer being VCC near the capacitor close to the IC.

Something unrelated to your PCB is about the images you added. You are using a "cloud" service and not the forums own storage to hold them. When this external source disappears your posts become somewhat useless. See this topic for more info: https://www.eevblog.com/forum/beginners/test-can-somebody-let-me-know-if-this-image-shows-up/msg4286842/#msg4286842

Offline inse

  • Frequent Contributor
  • **
  • Posts: 779
  • Country: de
Re: Need help debugging my first PCB project
« Reply #10 on: July 22, 2022, 04:55:00 am »
I confirm ataradov, either the pin # orientation differs between the CAD model and the socket or could this also have happened from incorrectly mirroring components from top to bottom side?
 
The following users thanked this post: Cory Parsnipson

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Need help debugging my first PCB project
« Reply #11 on: July 22, 2022, 05:47:32 am »
Here is the pinout of the connector. If you match it with yours, you will see that +5V should be on the crystal side.

But also, is the rats nest version different from the routed one? I'm really confused.

No, rats nest just has connector rotated.

Oh wow, good catch. I should have checked the USB spec...

My symbol is wrong! This was made a couple months ago so I don't remember if I made it myself or if I downloaded it from a random website. But pin 1 is marked as GND and pin 4 is VCC so I hooked it up wrong.



This explains why the layout didn't complain. Oh dear...

Gonna see if there's a way to salvage this.  :-\

Thank you so much, ataradov!

I confirm ataradov, either the pin # orientation differs between the CAD model and the socket or could this also have happened from incorrectly mirroring components from top to bottom side?

Probably user error or that I just downloaded an incompatible symbol. This one says CU01125, which I am not familiar with. The connector I'm using is CU01SAV1S00. But regardless, the USB pinout should be standard? I think I must have modified the symbol. I'll have to remember to be more careful.

Another observation of your PCB raises the question why you routed a trace on the top layer from the incoming USB connector VCC to the IC where you could have easily use a via to the bottom layer being VCC near the capacitor close to the IC.

Well, like I said, this is the first time I'm doing this. That's a good idea. I'll make sure to do that if I end up doing a second run.

Something unrelated to your PCB is about the images you added. You are using a "cloud" service and not the forums own storage to hold them. When this external source disappears your posts become somewhat useless. See this topic for more info: https://www.eevblog.com/forum/beginners/test-can-somebody-let-me-know-if-this-image-shows-up/msg4286842/#msg4286842

Ok, I changed the images.
« Last Edit: July 22, 2022, 06:11:03 am by Cory Parsnipson »
 
The following users thanked this post: pcprogrammer

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4388
  • Country: nl
Re: Need help debugging my first PCB project
« Reply #12 on: July 22, 2022, 09:52:38 am »
A simple check to verify the pin out is to just measure it. When you have a spare connector just hook it up to a cable and use your multi-meter to determine the polarity.

Fixing the circuit board is a bit trickier, because just rotating the connectors would screw up the DP and DM connections and the shielding will be off. But you could cut the traces and use some wires to make the correct connections.

And then hope that the chip survived :palm:

Offline inse

  • Frequent Contributor
  • **
  • Posts: 779
  • Country: de
Re: Need help debugging my first PCB project
« Reply #13 on: July 22, 2022, 12:26:09 pm »
Mount the connectors from the other side :-)
 
The following users thanked this post: Ice-Tea, Cory Parsnipson

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4388
  • Country: nl
Re: Need help debugging my first PCB project
« Reply #14 on: July 22, 2022, 12:35:12 pm »
Mount the connectors from the other side :-)

Still leaves the swap of the USB signals.

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Need help debugging my first PCB project
« Reply #15 on: July 31, 2022, 10:30:16 pm »
I made some progress, but I am now running into a different error. Props again to inse for suggesting to mount the connectors on the other side.

I was going to add wires to the connector, when I noticed that the D+ and D- signals are also mirrored between the actual connector part and my symbol. So this opens up the possibility of mounting the connectors to the backside of the PCB as previously suggested.

I did that and plugged it in and it was successfully recognized as a Generic USB Hub! Woo hoo!




...or not...

I'm not sure what happened, but between it working with the connectors on, and me adding solder to the mounting pins and adding a case, it somehow stopped working!  |O

I'm getting an error saying the device description request failed.



So close...
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: Need help debugging my first PCB project
« Reply #16 on: August 01, 2022, 01:48:20 am »
Windows messages are not very helpful. Do you have access to any Linux machine? PC or RPi would do. Look at the output of the 'dmesg' command and it usually generates more helpful messages.
Alex
 

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Need help debugging my first PCB project
« Reply #17 on: August 01, 2022, 02:33:43 am »
Sure! I have a Fedora partition.

Code: [Select]
[  189.720453] usb 2-1: new high-speed USB device number 16 using xhci_hcd
[  189.834332] usb 2-1: device descriptor read/64, error -71
[  190.056443] usb 2-1: device descriptor read/64, error -71
[  191.178478] usb 2-1: new full-speed USB device number 18 using xhci_hcd
[  191.293340] usb 2-1: device descriptor read/64, error -71
[  191.512383] usb 2-1: device descriptor read/64, error -71
[  191.728366] usb 2-1: new full-speed USB device number 19 using xhci_hcd
[  191.842355] usb 2-1: device descriptor read/64, error -71
[  192.064383] usb 2-1: device descriptor read/64, error -71
[  192.166421] usb usb2-port1: attempt power cycle
[  192.546344] usb 2-1: new full-speed USB device number 20 using xhci_hcd
[  192.546537] usb 2-1: Device not responding to setup address.
[  192.750477] usb 2-1: Device not responding to setup address.
[  192.958364] usb 2-1: device not accepting address 20, error -71
[  193.072321] usb 2-1: new full-speed USB device number 21 using xhci_hcd
[  193.072513] usb 2-1: Device not responding to setup address.
[  193.278504] usb 2-1: Device not responding to setup address.
[  193.486351] usb 2-1: device not accepting address 21, error -71
[  193.486464] usb usb2-port1: unable to enumerate USB device

Dropping the dmesg output here. I'm gonna go google what these error codes mean.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: Need help debugging my first PCB project
« Reply #18 on: August 01, 2022, 03:32:59 am »
This basically means that there is no communication of any sort, but the device is attached to the bus (pull-up resistor enabled).

Something is wrong either with the data pins or the IC itself. The only thing you can check externally is that crystal is oscillating and the frequency is correct.

Is this the same IC that was subject to the reversed voltage? This may be the source of the issue.
Alex
 

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Need help debugging my first PCB project
« Reply #19 on: August 01, 2022, 03:38:37 am »
Ok. I think I might have damaged the connector when I was putting the case on. I guess... I could try again and not be so rough on the connector this time.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12696
  • Country: ch
Re: Need help debugging my first PCB project
« Reply #20 on: August 01, 2022, 09:43:10 am »
Ok. I think I might have damaged the connector when I was putting the case on. I guess... I could try again and not be so rough on the connector this time.
what makes you suspect the connector? USB A connectors are fairly robust. I agree with atadarov’s suspicions.


Another possibility of how the IC could become damaged is ESD. As a hot-plug interface, USB data and power lines should be ESD protected. One way is with a discrete TVS diode to ground on each of those 3 lines. Another (what I used on my most recent project with USB) is a “steering” diode array ESD protection device like the Bourns CD143A-SR05LC and countless pin-compatible equivalents available from numerous vendors. Pin 1 goes to ground, pin 4 goes to the USB 5V, and pins 2 and 3 each go to one of the data lines.

For sure I’d put one on the upstream (PC-facing) port, but it probably wouldn’t hurt to have them on the downstream ports, too.
« Last Edit: August 01, 2022, 09:46:45 am by tooki »
 

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Need help debugging my first PCB project
« Reply #21 on: August 01, 2022, 07:26:28 pm »
Oh, I should have mentioned before that I assembled a second PCB because I was unable to de-solder the USB connectors on the first one. So the IC on the second one should be okay.

A problem with the data pins sounds reasonable. I was thinking along those lines when I meant that the connectors might be damaged. When I put on the case, I initially made the holes too small, so I was trying to see if I could flex the cover a little and push the connectors through. I didn't use too much force, but you never know.

I reflowed the USB connector pins with a soldering iron and checked for bridges, but the result hasn't changed.

Another possibility of how the IC could become damaged is ESD. As a hot-plug interface, USB data and power lines should be ESD protected. One way is with a discrete TVS diode to ground on each of those 3 lines. Another (what I used on my most recent project with USB) is a “steering” diode array ESD protection device like the Bourns CD143A-SR05LC and countless pin-compatible equivalents available from numerous vendors. Pin 1 goes to ground, pin 4 goes to the USB 5V, and pins 2 and 3 each go to one of the data lines.

For sure I’d put one on the upstream (PC-facing) port, but it probably wouldn’t hurt to have them on the downstream ports, too.

Is this likely to have happened by me touching it with my hands? Or does this happen when plugging into the host computer? If it has been damaged by ESD, is it fixable/diagnosable or would I have to assemble a whole new board?
« Last Edit: August 01, 2022, 07:37:27 pm by Cory Parsnipson »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: Need help debugging my first PCB project
« Reply #22 on: August 01, 2022, 07:53:10 pm »
ESD damage is possible, but not very likely. A lot of it depends on your environment and handling of the device as well. There is no easy way to test if it is ESD damage, the easiest approach is to just swap the IC or build one more board.

Check the clock, it would at least tell you that oscillator has started.
Alex
 

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Need help debugging my first PCB project
« Reply #23 on: August 02, 2022, 07:49:29 pm »
I went to go touch grass yesterday and then this morning when I went to go probe the crystal with an oscilloscope, I plugged it into my docking station and it mysteriously started working...  :-//

Here's what I tried:

* Plugging into right side USB port of docking station
* plugging into left side USB port of docking station (this has a battery symbol above it)
* plugging directly into both USB ports of laptop
* unplugging, waiting ten minutes, and then plugging back into a USB port
* put it back into the case, screw everything on, and plug directly into laptop and docking station

No problems reported anymore...  :wtf:



I guess I'll mark this solved, though I still feel kind of in the dark about what went wrong in that last part. Thanks for your help, everyone!

==============

As an exercise, I went to look for a waveform anyway, though I'm not sure how useful it is given that the thing is working as expected now...

I broke out an oscilloscope and attached the probe and ground to both sides of the 12MHz crystal. This gives me a very clear sinusoid, though it appears to be oscillating at 80MHz-ish based on the numbers on the screen? Is that normal?? I suppose I could be reading it incorrectly or using the oscilloscope improperly.



 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: [Solved] Need help debugging my first PCB project
« Reply #24 on: August 02, 2022, 09:01:35 pm »
Don't attach the scope across the crystal. Attach the ground to to the ground and probe either of the pins. Ideally XOUT, as it has lower chance to cause disruptions.

Usually with crustal oscillators when things start to work if you touch them means that you don't have correct load capacitors. Usually you need to have load capacitors to the ground from both XIN and XOUT.  Some value may be already integrated into the IC, but the actual value you need depends on the crystal parameters. The datasheet here does not have any information, so all you can do is guess.

If it keeps being unreliable, add 5-15 pF capacitors to the ground from the crystal pins. In your case it would be a bit tricky, since you have 5V pour on the soldering side. This is another case why you want to have mostly ground pours.
Alex
 
The following users thanked this post: Cory Parsnipson


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf