Author Topic: Power Circuit for at90USB1286  (Read 4633 times)

0 Members and 1 Guest are viewing this topic.

Offline Old_Gold_Hand

  • Thread Starter
  • Posts: 56
  • Location: Richmond, VA
    • American Haptics
Power Circuit for at90USB1286
« on: Mon, 09 December 2019, 07:24:58 »
Hello everyone, first time poster reporting. Read several threads searching for an answer, but didn't seem to find an unequivocal one.

Designing a pcb to use AT90USB1286 and want to know how the circuit from the usb plug should work. I have attached an image of the schematic I am working on; which I cobbled together from the ruiqimao tutorial and the teensy++ schematic. pls no bulli

Really new to pcb design and microcontroller stuff, so feel free to point out anything that looks wrong in my circuit or to just comment in general.

Thanks!
Love yall

Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Power Circuit for at90USB1286
« Reply #1 on: Mon, 09 December 2019, 09:11:41 »
at 1st glance the only thing that make me scratch my head is the usb shield going to a microcontroler I/O and what seems to be a rather large number of decoupling caps, although with those the more you have the less risk of trouble with electrical interferences you get.
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline Old_Gold_Hand

  • Thread Starter
  • Posts: 56
  • Location: Richmond, VA
    • American Haptics
Re: Power Circuit for at90USB1286
« Reply #2 on: Mon, 09 December 2019, 09:32:25 »
Thanks! yeah this whole process has been pretty head scratchy for me. I found some more documentation and with some help from AVRfreaks.com I put this revision together. I added a linear voltage controller and I think this feels more correct: a new usb mini symbol with the correct pins, with shield going to TVS diodes and the ID going to the correct pin on the microcontroller.
Love yall

Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Power Circuit for at90USB1286
« Reply #3 on: Tue, 10 December 2019, 05:28:25 »
you really do not want anything to only be able to go wrong, it is nice to see all the protection a controller could ever dream of
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline Applet

  • Posts: 488
  • Location: Sweden
Re: Power Circuit for at90USB1286
« Reply #4 on: Tue, 10 December 2019, 05:54:57 »
One thing I notice is that your 1uF reference cap (C8) is not connected to ground. Other than that, it looks good as far as I can tell.  :cool:

Edit:
Why is shield on the USB-connector connected to PE3? Very common to connect it to gnd for USB applications (sometimes/often through a ferrite bead or resistor with a capacitor in parallell).

Adding ESD protection diodes is a good idea.
« Last Edit: Tue, 10 December 2019, 06:30:08 by Applet »

Offline Findecanor

  • Posts: 5039
  • Location: Koriko
Re: Power Circuit for at90USB1286
« Reply #5 on: Tue, 10 December 2019, 08:29:14 »
If I remember things correctly you would use both large and small decoupling capacitors to be able to dampen multiple frequencies.
The placement is most important: There should be one close to each IC's Vcc input pin. The reason why the Teensy++ 2.0 has so many small capacitors is because there is one very close to each Vcc input to the microcontroller. The AREF pin's capacitor is also very close to it. The large decoupling capacitor, however is close to where the optional power regulator would be soldered. (back of PCB)

From what I've read, USB shield should be connected to GND as close to the connector as possible.
🍉

Offline Old_Gold_Hand

  • Thread Starter
  • Posts: 56
  • Location: Richmond, VA
    • American Haptics
Re: Power Circuit for at90USB1286
« Reply #6 on: Fri, 13 December 2019, 20:44:33 »
Thanks for all the responses!

After spending a bit more time on AVRfreaks.com, I put together this new power circuit.

My new question is why do some USB connectors only have 5 pins? I attached a pic of an adafruit usb mini b connector breakout. It doesn't have a shield pin. If i use this usb mini b connector, do I need all this sheilding? Seems excessive if the thing is only getting 5v from the usb port on a computer. Again, I have no idea.

Once I get this thing dialed in I can get cranking. I have access to a lot of manufacturing capability, so excited to make some neat cases.
Love yall

Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Power Circuit for at90USB1286
« Reply #7 on: Sat, 14 December 2019, 02:24:25 »
USB full size only have 4 pins in revision 1.1 and 2, they added 2 data pairs in usb3 but kept the 4 older contacts at the same place for compatibility. those are your 5V, GND, D+ and D-, the ID pin was added with usb mini and micro and i think it is used for OTG, USB type C uses 20 contacts but some connectors only breakout those 5 when only usb2 speed and power is required (like keyboards and mouse).
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline Findecanor

  • Posts: 5039
  • Location: Koriko
Re: Power Circuit for at90USB1286
« Reply #8 on: Sat, 14 December 2019, 09:16:17 »
USB type C uses 20 contacts but some connectors only breakout those 5 when only usb2 speed and power is required (like keyboards and mouse).
USB C does not have the ID pin! It is deprecated. Instead a protocol is used for switching directions, and this protocol now allows for data and current to be in different directions. This has enabled USB C hubs/dongles to be downstream for data but upstream for power, so that they can charge a laptop and be a hub for its peripherals.
Unfortunately, there is no bridge between OTG and USB C's direction-switching protocol.

A proper USB 2.0 Type C breakout board thus has only four pins that you could solder to:VBUS,GND,D+ and D-.
The breakout board itself must have a 5.1K resistor from each CC pin to GND so that the device will correctly identify itself to smart Type-C cables and upstream ports as being a current sink
The configurations of contacts, wires and pins is quite complex. There is not always a 1:1 correspondence between contacts in a socket and pins in its footprint either.
« Last Edit: Sat, 14 December 2019, 10:11:53 by Findecanor »
🍉

Offline Applet

  • Posts: 488
  • Location: Sweden
Re: Power Circuit for at90USB1286
« Reply #9 on: Mon, 16 December 2019, 02:58:32 »
You currently have a capacitor in series with the output of the regulator, that will not work, or am I missing something? The regulator is not necessary (MCU is speced to work up to 5.5v), but it will be protection for the MCU I guess. What voltage are you planning to run the MCU on?

EDIT:
Oh, maybe the pin on the furthest right should be connected to ground? And VCC-net is supposed to be added before the cap?
« Last Edit: Mon, 16 December 2019, 03:01:06 by Applet »

Offline Gondolindrim

  • Posts: 688
  • Location: Gondolin
    • My GitHub
Re: Power Circuit for at90USB1286
« Reply #10 on: Sun, 05 January 2020, 21:42:44 »
Thanks for all the responses!

After spending a bit more time on AVRfreaks.com, I put together this new power circuit.

My new question is why do some USB connectors only have 5 pins? I attached a pic of an adafruit usb mini b connector breakout. It doesn't have a shield pin. If i use this usb mini b connector, do I need all this sheilding? Seems excessive if the thing is only getting 5v from the usb port on a computer. Again, I have no idea.

Once I get this thing dialed in I can get cranking. I have access to a lot of manufacturing capability, so excited to make some neat cases.

The shield is a metallic mesh around the cable that effectively protects it from interference, because the cable is a long conductor in air -- essentially an antenna. So the shield acts with Faraday Shield effect to prevent that. Also the connector outer metallic part is attached to it.

NEVER hardwire the shield to the PCB ground. This means you are injecting noise from the EMI caught by the shield into the GND and this can seriously mess up the grounding in the PCB and the MCU functioning. Instead use one of those RC filtering nets (a 1Mohm resistor in parallel with a 4.7nF cap to GND).

You currently have a capacitor in series with the output of the regulator, that will not work, or am I missing something? The regulator is not necessary (MCU is speced to work up to 5.5v), but it will be protection for the MCU I guess. What voltage are you planning to run the MCU on?

EDIT:
Oh, maybe the pin on the furthest right should be connected to ground? And VCC-net is supposed to be added before the cap?

That capacitor is gonna break the circuit. He has to remove it.

A pessimist will tell you the cup is half empty. An optimist will tell you the cup is half full. An engineer will tell you it's exactly twice the size it needs to be.

Offline Gondolindrim

  • Posts: 688
  • Location: Gondolin
    • My GitHub
Re: Power Circuit for at90USB1286
« Reply #11 on: Sun, 05 January 2020, 21:45:27 »
Thanks for all the responses!

After spending a bit more time on AVRfreaks.com, I put together this new power circuit.

My new question is why do some USB connectors only have 5 pins? I attached a pic of an adafruit usb mini b connector breakout. It doesn't have a shield pin. If i use this usb mini b connector, do I need all this sheilding? Seems excessive if the thing is only getting 5v from the usb port on a computer. Again, I have no idea.

Once I get this thing dialed in I can get cranking. I have access to a lot of manufacturing capability, so excited to make some neat cases.

As has been said, ID pin is deprecated, but not only that, the MCU doesnt use it, so you can leave it unconnected.

Your ESD protection IC is wrong and has only one channel. Use one with two, for example, USBLC6.

Also that LDO is way too complex, use one with fixed (not adjustable) output voltage that has three pins only.
A pessimist will tell you the cup is half empty. An optimist will tell you the cup is half full. An engineer will tell you it's exactly twice the size it needs to be.

Offline anorak

  • Posts: 16
Re: Power Circuit for at90USB1286
« Reply #12 on: Mon, 06 January 2020, 08:06:10 »
Why do you even want to use an LDO? The MCU can be directly connected to the 5V of the USB port.

Offline Gondolindrim

  • Posts: 688
  • Location: Gondolin
    • My GitHub
Re: Power Circuit for at90USB1286
« Reply #13 on: Mon, 06 January 2020, 08:09:33 »
Why do you even want to use an LDO? The MCU can be directly connected to the 5V of the USB port.

Good point.

Also I forgot but ATMEGA needs 8MHz crystal at 3.3V. 16MHz is only supported with 5v
A pessimist will tell you the cup is half empty. An optimist will tell you the cup is half full. An engineer will tell you it's exactly twice the size it needs to be.