0
\$\begingroup\$

I have tried implementing a design involving AT90usb646 about four times but in each case the board gets connected and immediately disconnects . lsusb outputs that an Atmel Corp device has been connected so I know that the board is working but it gets disconnected before I can do anything with it . I usually fabricate it with Oshpark and have had no troubles whatsoever but this time I tried etching the PCB at home since this is a hobby project and I wanted to try out things rather quickly . The boards are two layered and I followed every guideline for laying out the USB portion namely keeping the tracks small and components close , calculating the trace width with impedance calculators , not breaking the ground pour underneath the usb data lines and keeping the VBUS and Ground pour away from the usb data lines to prevent noise. This is the image [![enter image description here][1]][1] The data sheet from Microchip for AT90USB646 suggests a couple of caps for VBUS and UCAP and I have placed them accordingly . I have rechecked everything and also cross-checked with Teensy ++ which uses AT90USB1286 which is similar to AT90USB646 but can't figure out what it is I'm doing wrong. Here's the schematic

[1]: https://i.stack.imgur.com/d0bJe.pngenter image description here

\$\endgroup\$
  • \$\begingroup\$ Please provide the used schematics and the caps which are in use. IMHO the data lines are too close - how big is the gap between those wires? Did you made any electrically check between the nets with a multimeter before assembling? Did the firmware work with an evaluation board of Atmel? \$\endgroup\$ – Tom Kuschel Aug 16 '17 at 19:36
  • \$\begingroup\$ @Tom Kuschel there was no way I could get the differential impedance to be 90ohms without making the lines extremely close. I did check for shorts and continuity with dimm before and after assembling and everything read correctly, the voltage on the USB data lines were around 3.56V which almost precisely matches the expected value given in the datasheet. I haven't loaded any firmware, this series ships with a dfu bootloader and I was hoping to use dfu-util or flip to load firmware but since the connection barely exists for a few seconds, I haven't been able to do so. \$\endgroup\$ – Aakusti Aug 16 '17 at 19:51
  • \$\begingroup\$ Also tried with different USB cables? Once I had troubles with a simple cable. \$\endgroup\$ – Tom Kuschel Aug 16 '17 at 19:54
  • \$\begingroup\$ @Tom Kuschel tried with different cables and different computers but the problem persists. I guess I'll order it from Oshpark and use the same components to check if it works. I think it might have something to do with the DIY method of PCB making. I hope someone can shed light on their approach to making USB enabled PCB at home \$\endgroup\$ – Aakusti Aug 16 '17 at 19:59
  • \$\begingroup\$ please provide a schematic and the components for any help \$\endgroup\$ – Tom Kuschel Aug 16 '17 at 20:07
1
\$\begingroup\$

This chip uses full-speed USB mode. In this mode there is absolutely no reason to split hairs about 90-Ohm differential impedance, especially on traces that are few mm long. Any trace will work just fine. And cables will make no difference.

Since the device initially connects (half-way maybe) and descriptors were read by the host, it likely means that the device system frequency is out of whack. Initial control transfers use relatively short packets, so, even if the USB frequency is off by several percent, the GET_DESCRIPTOR will be fine. However, longer packets might run out of host receiver flexibility. Fix your clock, and everything will be fine.

BTW, the ground wire at the connector is unreasonably skinny.

\$\endgroup\$
  • \$\begingroup\$ Will check the clock and report back \$\endgroup\$ – Aakusti Aug 17 '17 at 1:42
  • \$\begingroup\$ The teensy ++ schematic used 10pf for the crystal but the datasheet prescribed capacitance in the range 12-22pf , I used 18pf instead of 10pf and it started working . You were right , it had to do with the crystal . \$\endgroup\$ – Aakusti Aug 18 '17 at 8:09
  • \$\begingroup\$ @Aakusti, crystal oscillators are delicate things. Your design apparently is too marginal if such a small difference caused it to pass or fail. Frequency "pullability" is usually not that strong, and should fit into USB FS tolerance range (+-2000 ppm) with any of this caps. There might be more hidden/marginal issues, which you would need to sort out. For some ideas and caveats please digest the following stackexchange items, electronics.stackexchange.com/search?q=user%3A117785+crystal \$\endgroup\$ – Ale..chenski Aug 18 '17 at 8:19
  • \$\begingroup\$ I did use a new IC , I think that might have made a difference too . Thanks , I will go through the reading material \$\endgroup\$ – Aakusti Aug 18 '17 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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