1
\$\begingroup\$

I’m having trouble with a board I made interfacing a USB 2.0 connector to an ESP32.

The schematic for the USB that’s not working is as follows:

enter image description here

With IO19 & 20 being the USB connections:

enter image description here

Power is still being delivered through the USB port, but data is not working. My laptop will not recognize the USB device when I plug it in.

Here are the USB and ESP32 datasheets:

https://www.we-online.com/components/products/datasheet/629105150521.pdf https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf

I can send a zip of the project if needed, any help would be nice!

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Have you tried flashing a known working USB demo project to the ESP32 and seeing if that enumerates? This will narrow down whether it is a firmware problem or a hardware problem. Hardware problem might not just be the USB connections, it could also be a bad input clock frequency similar. Firmware problem might be failing to set the correct alternate function for those pins or failing to properly initialize USB state machine with a descriptor. \$\endgroup\$ Commented Mar 7 at 17:24
  • \$\begingroup\$ @Hammdist yes, I've been able to work on ESP32 devkits. This board also contains a USB to UART chip which is connected to the ESP, and that works fine for the most part. Hence why I'm confused as to why this is not working. \$\endgroup\$ Commented Mar 7 at 17:30
  • \$\begingroup\$ Usually the fastest way to debug this kind of thing (absent specialized tools like actual hardware USB debugging equipment) is to start with demo code that is known working and gradually transform it step by step into the program that doesn't work. In this way I once discovered that it is crucial to mark certain variables as volatile if the interrupt handler communicates with the main thread through them (this was also in the context of USB device). \$\endgroup\$ Commented Mar 7 at 17:48
  • \$\begingroup\$ Take out the TVS diodes and see if it works. I also don't see any series resistors which are usually good for matching. Have you done transmission line matching on your PCB? \$\endgroup\$ Commented Mar 7 at 18:08
  • \$\begingroup\$ @VoltageSpike no, I didn't do any matching, I didn't think it was necessary for USB lines at short distances, I'll take out the diodes and see if it works though. Thanks for the suggestion! \$\endgroup\$ Commented Mar 7 at 18:14

1 Answer 1

0
\$\begingroup\$

The SMAJ5.0CA is not suitable for USB data lines, for two reasons.

The first one is, it has approximately 1000pF of capacitance, so it will degrade the data signal with too much capacitance so it cannot work.

Second detail is that the "C" means it's bidirectional, so it withstands 5V in either direction over it without otherwise affecting the signal. So it is not even that useful for USB data lines that needs to be between 0V and 3.3V.

So remove the ESD protectors from data lines and see if it works.

\$\endgroup\$
4
  • \$\begingroup\$ Thanks, I'll try this out in the next couple of days and let you know if it works! \$\endgroup\$ Commented Mar 7 at 22:09
  • \$\begingroup\$ This worked! Would you be ale to explain why the 1000pF is an issue here? \$\endgroup\$ Commented Mar 10 at 17:14
  • \$\begingroup\$ @AymanIslam Because high speed communications like USB are sensitive to capacitance, and 1000pF in a single lump is in the order of 10x more than allowed by USB specifications. For 12 Mbps signaling ESD protection devices have like 10pF and for 480 Mbps they have like 1 pF. \$\endgroup\$ Commented Mar 10 at 17:53
  • \$\begingroup\$ Sounds good, thanks! \$\endgroup\$ Commented Mar 10 at 18:41

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.