UPDATE: I believe I have mostly solved the power issues, but now have USB connectivity issues described in EDIT 3 at the bottom.
I designed and printed a PCB for my MIDI controller project with a modified Arduino Micro microcontroller built in. I swapped out the USB Micro for a USB-C type port (just using the 2.0 protocol), but when I plug it in, after programming the bootloader to the ATMEGA32U4 via "Arduino as ISP" with an Uno as ISP to the ICSP of my board, my board seems to get no power from the USB bus (the power LED doesn't light up, nor is it recognized as a USB device), but it does get power over the ICSP and I got a success message after programming it with the Uno.
I have tried many USB cables, including USB-C ones I know to be 2.0 compatible and USB Micro cables (which have been tested with regular Arduino Micros) with micro-to-C adapters, but still get nothing. My PCB has full parity with my SCH file, and I tested it on multiple of these boards that I got printed, so I am pretty sure I must have messed something up in the schematic or in component selection (not all the exact components from the official Arduino Micro schematic were available at JLCPCB where I had mine printed so I made some substitutions).
Can anyone help me figure out what the issue might be?
EDIT 1: So I found out that the power is coming in through the USB, its reading 5V at the USB pins, 5V on either side of the fuse F1 and the VUSB pin of the T1 FDN340P/PMV48XP, but 0V at both the VIN and +5V pins of the same T1, so that seems to be the problem component? I'm using a PMV48XP in that position, not sure if I messed that up somehow? I'm a bit out of my depth here I think
| Designator | Value | Component | |:--------------------------------------------------------|:-------------------------|:--------------------------| | C_ARD_1, C_ARD_2, C_ARD_6, C_ARD_9, C_ARD_10, C_ARD_11 | 100n | CL05B104KO5NNNC | | C_ARD_3, C_ARD_14 | 22u | RVT22UF16V67RV0017 | | C_ARD_4, C_ARD_5, C_ARD_7 | 1uF | CL05A105KA5NQNC | | C_ARD_12, C_ARD_13 | 22pF | 0402CG220J500NT | | D_ARD_2 | CD1206-S01575 | CDSU4148-HF | | F1 | MF-MSMF050-2 500mA | MF-MSMF050-2 | | J3 | USB_C_Receptacle_USB2.0 | KH-TYPE-C-16P | | L1 | green | 19-217/GHC-YR1S2/3T | | L2 | MH2029-300Y | BLM21PG300SN1D | | ON1 | blue | 19-217/BHC-ZL1M2RY/3T | | R_ARD_1, R_ARD_2, R_ARD_4, R_ARD_9 | 10K | 0402WGF1002TCE | | R_ARD_5, R_ARD_6, R_ARD_7, R_ARD_8 | 1K | 0402WGF1001TCE | | R_ARD_10, R_ARD_11 | 5.1k | 0402WGF5101TCE | | RP3 | 22R | 4D03WGJ0220T5E | | RX1, TX1 | yellow | 19-213/Y2C-CQ2R2L/3T(CY) | | T1 | FDN340P/PMV48XP | PMV48XP | | T2 | PMV48XP | PMV48XP | | U1 | ATMEGA32U4-XUMU | ATMEGA32U4-MU | | U2 | NCP1117-5 | NCP1117ST50T3G | | U4 | LP2985-33DBVR | LP2985-33DBVR | | Y3 | 16MHz KX-7 | 3225-16.00-10-10-10/A | | Z1, Z2 | CG0603MLC-05E | EZJZ0V500AA |
EDIT 2: I think I found the problem. It looks like something got messed up when I was choosing the footprints of the MOSFET transistors T1 and T2. Here is a screenshot from the datasheet of the PMV48XP datasheet showing the pinning info: and now here is a screenshot of the relevant part of my PCB file: So according to my schematic (again, based on the official Arduino Micro SCH, so I'm assuming its correct?) T1 Gate should be VIN, T1 Source should be +5V, T1 Drain should be VUSB. On my PCB T1 Gate is actually VUSB, T1 Source is +5V, T1 Drain is actually VIN. So it looks like the Gate and Drain pins got swapped between my SCH and my PCB. Same story for T2. Can anyone with more knowledge confirm that the connections outlined in the schematic are correct? And whether that would explain the problems I've described?
EDIT 3: I have de-soldered T1 and T2, which were in indeed incorrectly wired. I have shorted the contacts between VUSB and +5V on the footprint of T1 and the board is getting power as it is supposed to.
Now I have a new issue which is that after I have programmed the board via ICSP (using the Arduino as ISP method, burning the Arduino Micro bootloader to it), when I plug the board into my computer (again, testing with a variety of cables and ports), my computer won't recognize it as a USB device. I'm not sure if this is a related problem to my previous one (and maybe I should make a new post if not?) or where I am going wrong now.