AtMega32u4 battery powered - Page 1
Forum section: electronics / beginners

author: Tiflo
author_rank: Contributor
timestamp: July 22, 2016, 08:16:25 pm
content: Hello,I am working on my second project and I have some question about the AtMega32U4 wiring. I don’t want to use the 5V from the input USB so I have cut the trace from the USB connector. Instead I’m using the 5V coming from the 12V -> 5V buck convertor. The USB data lines are connected to the AtMega through a USB Hub chip.In fact, I don’t know how to wire properly the AtMega in this configuration, particularly for the pins VBUS, UVCC, UCAP and UGND, related of the USB supply which I don't use. The datasheet isn’t clear for me and I didn’t find any example. Do you have a clue ?One more question, this is my second board layout, and the first one in SMD. The left part of the board can draw a large amount of current. Should I split the bottom layer ground plane between the logic and power side ?Schematic :http://bit.ly/29QQVHvRouting :http://bit.ly/2a6xNnWThanks for your help,Tiflo

author: Signal32
author_rank: Frequent Contributor
timestamp: July 22, 2016, 08:28:13 pm
content: I think the scenario you're looking for is described in figure Figure 21-6 of the datasheet, page 259. Check out the wiering that they suggest.http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdfAs for the ground plane, probably not, post your schematic, what is powering the micro and what is powering the power side ?

author: Tiflo
author_rank: Contributor
timestamp: July 22, 2016, 08:44:26 pm
content: Thanks for your reply.The schematic and the layout are linked in the first post :http://bit.ly/29QQVHvI saw this figure in the datasheet, so if i'm correct :UVCC going to the external 5VUCAP to 1uF capUID ? I don't know this pin !?but the problem is VBUS ... i'm not using it because only the datalines are connected to the usb hub IC. Should I leave it floating ?QuoteThe entire device is powered by a 12V car battery. The powerside is directly connected to it and the logic / usb hub side is powered by a 5V buck convertor (LM1084)

author: Kilrah
author_rank: Unknown
timestamp: July 22, 2016, 09:08:32 pm
content: The mentioned schematic suggests that you need to connect VBUS to the VBUS pin even when not powering the device with it. As explained on page 265 it's used to detect when USB is plugged.

author: Signal32
author_rank: Frequent Contributor
timestamp: July 22, 2016, 09:12:11 pm
content: Quote from: Tiflo on July 22, 2016, 08:44:26 pmYou should connect VBUS to the USB voltage (5V) as the datasheet recommends.UID is the extra pin that you have on for example Micro-Usb connectors. It is used for indicating OTG mode ON/OFF.http://electronics.stackexchange.com/questions/35462/why-does-micro-usb-2-0-have-5-pins-when-the-a-type-only-has-4Also, I would not split the ground plane.PS Nice layout

author: Tiflo
author_rank: Contributor
timestamp: July 22, 2016, 09:46:19 pm
content: Quote from: Kilrah on July 22, 2016, 09:08:32 pmI don't have VBUS pin on the USB hub chip :http://www.kean.com.au/oshw/WR703N/GL850G%20USB%20Hub%201.07.pdfI missed the paragraph page 265, thanks !QuoteThanks for the explanation about UID.QuoteNoticed.Now I'm scared to send it to the pcb manufacturer ... not confident with the Kicad DRC

author: Rerouter
author_rank: Super Contributor
timestamp: July 22, 2016, 10:10:10 pm
content: Kicads DRC has worked just fine for me in the instance of are these traces or vias too close, or too small.To that end it should produce your board just fine, but with all cad packages, check your Gerber's if you want to be 100% confident

author: Tiflo
author_rank: Contributor
timestamp: July 22, 2016, 10:30:30 pm
content: Quote from: Rerouter on July 22, 2016, 10:10:10 pmIt shows me a lot of errors and it is difficult to see which is normal or not.The netclass rules are OK on the rest of the board, but they causes issues when they arrive on the fine pitch IC where the rules can't be followed. There is a possibility to definitively hide those errors ?I also get errors on the usb differential pair corner, I don't know why ... they are routed with constraints.Sorry for the french UI

author: Rerouter
author_rank: Super Contributor
timestamp: July 23, 2016, 01:40:28 am
content: If the rules cannot be followed on a chip, might i suggest going to design rules up the top and setting them up to what your manufacturer can reproduce, if a chip is too small to meet these rules, then they will not meet the manufacturers requirements either,From your list with the multiple REF** entries, i would say you have added parts manually rather than at the schematic level, and as such lacks a netlist entry, on the left side of your image it would appear you have manually added stitching via's,To better do this, there is an option on the left edge of the program to turn off delete old tracks, this way you can via stitch without issue, under general you can also turn off magnetic pads and traces if you want to place them in arbitrary positions on the traces,some of the other errors i would need to see the log to decode for you,

author: Tiflo
author_rank: Contributor
timestamp: July 23, 2016, 11:54:13 am
content: Quote from: Rerouter on July 23, 2016, 01:40:28 amThe USB trace require 12mil spacing. I think when the trace is attached to the pad, it try to apply the rule to the entire pad. But the pad spacing is smaller than 12mil ... which raising an error.For REF parts, they are related to plane vias. I added the manually and don't know if there is a better way to do that. I have tons of them, so I can't place them on the schematic side.QuoteI will look at this option, thanksThere is a false error and the DRC result in attachment.

author: Rerouter
author_rank: Super Contributor
timestamp: July 23, 2016, 12:12:57 pm
content: on that one looking at the length of the problem traces it would appear you indeed have a tiny spec of a trace from the other net at that point,Ah so your setting a netcall rule for the usb traces, yes that will be in error because it does indeed treat the rule as a rule,for the latest release version of kicad you can instead use the opengl differential router, that will handle your width and seperation, and you can even tune for differential skew quite easily, (the demo video pretty much tells you everything you need to know to use it), only annoyance is having to change the renderer from default to opengl under the veiw options to use it, but once your done you can switch straight back,e.g. the attached image is my own first attempt at routing usb, using a 0.3mm board, the chip i am using places both crystals directly next to high speed usb, so i went a little crazy on the via stitching... and as i had yet to use the new tools went out of my way to tune it aswell,

author: Tiflo
author_rank: Contributor
timestamp: July 23, 2016, 12:48:16 pm
content: I'm already using the lastest Kicad version in openGL mode (F11 shortcut) and the differential router. It's a really powerfull tool !How did you implement the via ? Using a new part ?Edit : Thanks for the vias stiching idea, I wasn't aware about this ... so added to my design.Plus TVS on the input datalines and 1M resistor between the crystalsGerber checking with ZofzPCB software is amazing !!

author: Rerouter
author_rank: Super Contributor
timestamp: July 23, 2016, 10:11:48 pm
content: I implemented the stitching using the trace tool, so click to start trace, place via hotkey end trace hotkey, that way its tied to the net, and i don't get any DRC problems,