2
\$\begingroup\$

I am trying to make a breakout board with the ESP32-S3-WROOM-1 and wish to try out some of the USB-OTG examples. In the schematic of the chip I am using there only seems to be 2 capacitors tied to D+ and D- but I am not sure what the values need to be. I then turned to the schematic of my S3-WROOM-1 Devkit module and it only has these diodes tied to D+ and D-. I decided to try and implement it similarly for D+ and D- only as I don't intend powering OTG devices as mine are self-powered. I just wish to know if I did it correctly along with the layout of the pcb. If it will work with the capacitors only as well that would be fine as well and would just require the values as Im unsure.

ESD Diode

From S3 Datasheet:

enter image description here


From: S3 Devkit datasheet: enter image description here


My versions: enter image description here enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ have you consider turning 90 degrees C8 and C12? I think it might look nicer :) \$\endgroup\$ Dec 1, 2022 at 17:48
  • 1
    \$\begingroup\$ No I haven't, the esp32 datasheet says they need to be close to the pins and have always thought that that's how they should be oriented. :) \$\endgroup\$
    – th0r1000
    Dec 2, 2022 at 18:41
  • \$\begingroup\$ Some aesthetic comments - fatten up the tracks on J4 and try to route on a grid so you get consistent track spacing. Tidy up the little dog legs. Locating components on a grid or simply aligning them also makes the board look more professional. \$\endgroup\$
    – Kartman
    Dec 2, 2022 at 23:24

3 Answers 3

5
\$\begingroup\$

Yes, it is correct. I built a similar one and it works very well

Link to the entire project, schematics, layout, etc: https://github.com/crgarcia12/electronics-homeassistant-lightscontroll

Something you might consider

  1. Using a usblc6 instead of individual diodes: https://www.st.com/resource/en/datasheet/usblc6-2.pdf enter image description here enter image description here

  2. Double check if connecting the Shield to GND is what you want to do, specially considering you have an external source (is it floating GND?) I usually do it using a very large resistor instead. This will allow voltage to match, but protect in case there is a spike or any differential. I believe the general recommendation is to not connect them at all, but since you have ESD to GND, it might be better to connect them using a resistor instead.

  3. Since you have space, you can add a resistor in series or a probe-point, to connect a logic analyser or an oscilloscope in case there are problems. This have been very useful to me.

  4. Make sure you read the ESP placement guidelines. For example, make a cut-out under the antenna if you can. If you cannot, do not place any copper under it in any layer (I can't see properly your picture, but I think you are even sending 3V under it)

  5. The capacitors have to be very small value. In all my tests it works fine without them

This is my ESP-32 S3 version (link): enter image description here

And this my ESP-32 version, with individual diodes instead: enter image description here

\$\endgroup\$
6
  • \$\begingroup\$ I use the srv05. Practically the same. If this device is not the host, don’t connect shield. It can make unintentional loops, act as an antenna etc. Myself never used the caps as well. \$\endgroup\$
    – RemyHx
    Dec 2, 2022 at 20:09
  • 1
    \$\begingroup\$ Carlos, some comments regarding your schematic - the way it is drawn makes it difficult to see how it works. Some conventions might help: inputs on the left, outputs on the right. Net tags horizontal. Vcc pointing up, gnd pointing down. If we look at your relays, the boxes give no idea they are relays/SSRs. Draw with wires to the connector rather than using nets. Same with the uln2003 to the relays. This way it is obvious how the circuit works. Makes no difference to the pcb, but for people reading your schematic it is easier. Also makes errors easier to spot. Use multiple sheets if reqd \$\endgroup\$
    – Kartman
    Dec 2, 2022 at 23:16
  • \$\begingroup\$ Thanks a lot for the tips @Kartman!! I did not notice that, but you are completely right. I shuffled the schematic a bit, added more wires, removed nets, used custom relays footprints with a more accurate set-up. I think to make it properly I need to increase the page size, which I will do :) (link: raw.githubusercontent.com/crgarcia12/…) \$\endgroup\$ Dec 5, 2022 at 18:14
  • 1
    \$\begingroup\$ Regarding shield: USB-C defines shield and ground tied inside the connector; they almost certainly must be tied in any circuit to maximize EMI performance, particularly for self-shielding PCB designs (i.e. where board ground plane serves the purpose of EMI enclosure in lieu of a metallic or lined enclosure). \$\endgroup\$ Aug 27, 2023 at 12:48
  • 1
    \$\begingroup\$ @CarlosGarcia A full understanding is quite a deep subject; Ott's EMC book is comprehensive, and I guess quite accessible as these things go, but it still takes years of experience and study to fully understand the subject. Afraid I don't have many resources to offer; my knowledge is developed from a variety of sources and theoretical understanding. As for sites, they might indicate different solutions because of subtle details that are easy to miss; or they're just flat out wrong, which happens often enough with such a deep subject. \$\endgroup\$ Jan 24 at 8:46
2
\$\begingroup\$

Regarding the USB shield, it is the first point of contact with the cable connector and serves as both a general cable shield and low-impedance path to ground for preliminary ESD discharge on connect.

Avoiding ground loops through the USB shroud (e.g. if bolted to a metal chassis, etc) is accomplished by connecting the low-impedance USB shield to board ground via parallel capacitor (commonly 4.7nF to 10nF) and resistor (100k-1M), which affords capacitor-coupled shielding and ESD spike discharge path, with the resistor affording a 'leaky' DC discharge path and avoiding low-impedance ground loop issues.

For small isolated boards with little fear of ground loops, it is advisable to connect the shield directly to board ground - ensuring that ESD has a preliminary path (i.e. "equipotential") to board ground before USB D+/D- connection is made, relieving stress on USB ESD protection diodes alone.

\$\endgroup\$
0
\$\begingroup\$

enter image description here

I can't find anything to say on the answer of Mr. Carlos , but a 100nf capacitor is suggested between vbus and gnd in the datasheet.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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