2
\$\begingroup\$

I have a custom PCB with a microcontroller but it doesn't work. I have checked the PCB with a multimeter, but I couldn't find any obvious issues. I suspect that something wrong with the design, or the ATmega32U4 is damaged.

There are many things that could be wrong, but to keep things simple I wanted to ask for feedback on the USB connection first:

USB-C Connector

Electrical engineering is not my main field, so I would very much appreciate it if someone could confirm that this USB-C design looks correct. All I need from the connector are the power lines and the D- and D+ data lines.

This is the connector I am using:

https://www.lcsc.com/product-detail/USB-Connectors_DEALON-USB-TYPE-C-017_C2927037.html

https://datasheet.lcsc.com/lcsc/2201121330_DEALON-USB-TYPE-C-017_C2927037.pdf

What is weird is that I just noticed that in the datasheet only the power pins are mentioned in the "pin assignment" table:

enter image description here

Could it be that I used a power-only connector? The physical connector does have all the other pins you see in the schematics though...

EDIT: As pointed out by @Justme, the issue was that I put 22K resistors on the D- and D+ lines, while it should have been just 22 ohms. After replacing the resistors it worked fine.

\$\endgroup\$
4
  • \$\begingroup\$ Check continuity between the data lines on the board and the data lines on a cable plugged into it. \$\endgroup\$
    – Hearth
    Commented Sep 2, 2023 at 14:13
  • \$\begingroup\$ cuidevices.com/blog/… has a picture of 24-pin Type C (left) vs 6-pin power-only Type C (right). If you look at your connector which set of contacts are shown as present? \$\endgroup\$ Commented Sep 2, 2023 at 14:18
  • \$\begingroup\$ @ChesterGillon my connector has the full set of pins on the inside of the connector, and the same amount of pins as in the schematic is exposed on the outside. However, someone else pointed out I am using 22K resistors on the data lines instead of 22, which is likely my problem. Thanks for checking. \$\endgroup\$
    – peanutman
    Commented Sep 2, 2023 at 14:38
  • \$\begingroup\$ Suggestion to beginners: Schematic symbols in electronics design are not the same thing as a standard library in software programming. Because every circuit is unique, schematic symbols often need further editing to fit better visually in a particular diagram, this is the only way to improve readability. When you find your schematic symbols are becoming difficult to read, edit the symbols and save the modified symbol as the "project local" version. Reordering the pins is usually the first good step to untangle a messy diagram. For example, in your diagram, move all VBUS/DP/DN pins together. \$\endgroup\$ Commented Sep 2, 2023 at 14:51

1 Answer 1

3
\$\begingroup\$

The connections are correct.

However, if you really put 22k resistors in series on the data lines, that will be the reason why it does not work.

Maybe the guide you are copying had an error, or you copied the value incorrectly.

They might be 22 ohms, definitely not 22 kilo-ohms.

EDIT: Yes, ATMega32U4 dataheet mentions 22 ohms required in multiple different places.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks so much for the review. I just double-checked and it's not only wrong in my schematic, I also soldered 22K resistors on the PCB. That would explain some things... Thanks again! \$\endgroup\$
    – peanutman
    Commented Sep 2, 2023 at 14:35
  • \$\begingroup\$ After replacing the resistors I can confirm that this was the issue. I'm so happy it's working now! \$\endgroup\$
    – peanutman
    Commented Sep 2, 2023 at 16:55

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.