Hey! I made a leonardo clone based on this blog and youtube video I found DIY Arduino Leonardo ATMEGA32U4 ā Luis Geissler but when I plug it in after I burn the bootloader, windows doesn't recognize it:
Windows has stopped this device because it has reported problems. (Code 43)
A request for the USB device descriptor failed.
Strange thing is I'm able to upload my sketch and have it run perfectly fine via the "upload using programmer" function in the IDE.
This is my second attempt at this, my first replaced the microUSB connector with a USB-C one, windows did not even acknowledge anything was plugged in at all that time so at least this is somewhat a step forward? This second one is the same i just put the microUSB back thinking it would fix it. I had the PCBA made from JLCPCB.
Which, if you are using a programmer, erases the bootloader, does it not?
And if you're not using a programmer, is quite a feat.
Looking at J2, which I assume is the programming interface by which you uploaded both your bootloader and your sketch, I have questions.
Why no ground connection? How does that work?
The pinout doesn't seem to match the usual 6 pin Arduino header. Is there a reason for that? And is your unnamed, unmentioned programmer aware of the unusual pinout?
I kinda just forgot it so I use a GND connection from another pin. In the schematic I copied they left it out. I'm not sure why. I'm anxious there are other things they left out that is making it so that its not working
Yes I am aware of the unusual pinout and I have been able to burn the bootloader etc successfully and I've been able to upload my sketch using the programmer (I'm using an Arduino Uno).
I'm not sure what you mean by the programmer erases the bootloader...
Once upon a time, I couldn't figure out why I was getting nothing but USB errors when I plugged in a freshly soldered PCB with a USB connection. After much head scratching, I finally realized that despite checking and double checking, I'd still managed to reverse D+ and D-. And it took me quite some time to see it because I knew I'd double checked it before sending the PCBs off and was sure it was right.
Given the things in your schematic that have already made me ask questions, I'll recommend you do what I do when nothing works. Check everything. Then do it again.
Even the stuff you're sure is correct. Especially that.
And if necessary, do it again. It's almost always right there in front of you but you can't see it because in your head you're seeing what you thought you did, not what you actually did.
It's like trying to proofread something you've just written. You're not seeing the words on the page, you're seeing the words in your head. Sometimes, just putting things aside for a few weeks and coming back to it after a while is enough to go "ARGH! HOW DID I NOT SEE THAT!"
The Leonardo CAD files are online. You could d/l them and study that as the master design.
Co-Pilot informs us --
Spacing: Maintain consistent spacing between D+ and Dā. Ideally, the edge-to-edge spacing should be small enough to ensure tight coupling but not so close that crosstalk or manufacturing issues arise.
Length Matching: Keep the trace lengths matched within a tolerance of ~0.15 mm (6 mil) for USB 2.0. For USB 3.x, the tolerance is even tighter.
Avoid Stubs: No vias or stubs between the USB controller and connector unless absolutely necessary. If you must use vias, match them for both traces.
Layer Consistency: Route both traces on the same layer to avoid impedance discontinuities.
Reference Plane: Always route over a continuous ground plane to maintain impedance and reduce EMI.
Your schematic is a mess.
In many places you have references designators overlaping parts and text and overlapping text on text making it totally unreadable.
Ah wow that would explain a lot! I honestly had no idea it mattered but it definitely does add up!! Thanks so much! My bad for trusting an autorouter... the traces are really tiny so I dont think I could solder up a solution like that but I'll definitely keep it in mind when I get the next one printed...
The traces are thin. Carefully scrape the solder mask to bare an area enough to use, and cut the trace where the red X is.
It may not be perfect, but it may 'work' well enough for troubleshooting.
is this good enough do you think? I didnt really do the math involving the length of the traces etc etc but i used the differential routing thing in KiCad this time and there are no vias. Think it'd be good enough to just work? 3rd times the charm hopefully
Ah I just used the KiCad tool and assumed because it insisted on twisting like that there must be a reason I wasn't getting lol. If you mean askew as in rotated, I just wanted it to look cool in a circle and assumed I could get away with it. They look like this now: