Board review? - Page 1
Forum section: electronics / general

author: paulca
author_rank: Super Contributor
timestamp: February 17, 2018, 11:14:09 am
content: I know all your guys are busy, but... I am procrastinating over sending my first PCB for manufacture at PCBWay.If I was to ask extremely politely for a board review, what would be the easiest way to share it? I know that I can plot SVGs and convert to PNG, but a picture may tell a 1000 words but a PCB has more than 1000 words.

author: mars01
author_rank: Contributor
timestamp: February 17, 2018, 11:56:53 am
content: You can use a free cloud storage likehttps://uploadfiles.io/and post the link for the file here.

author: paulca
author_rank: Super Contributor
timestamp: February 17, 2018, 12:33:32 pm
content: The project files:https://ufile.io/g14c4For convenience:So I know it has rough edges. I know I could do without LED driver and multiplex direct MCU pins. I know some of the tracks are a little messy, too much of letting the router do it's thing.Is it a good or bad thing to have use a GND fill on the back side, given it's a digital circuit and the only sensitive parts are the two crystals, where I have kept them as close as reasonably possible to the ICs.

author: paulca
author_rank: Super Contributor
timestamp: February 17, 2018, 12:44:51 pm
content: Those default SMD pads are quite small. Given it will be hand soldered, would it better to make them longer? Given that would require rerouting a large number of tracks from the IC to make room?

author: Deridex
author_rank: Regular Contributor
timestamp: February 17, 2018, 03:10:20 pm
content: I found a few things i would change (note: I'm no expert, it's just my personal style and opinion)Over all i recommend to just route in one direction per layer. As example: Top horizontaly and bottom verticaly.Also it might be easier to use more SMT-Parts instead of THT ones.One word about the shematic:You might want to consider to place a block-C at the Reset-port.I made a few attachments#1: Just something cosmetic stuff about the reset track#2: Also just cosmetic stuff on the 5V track#3: i recommend to connect the GND of IC2 with C4 directly on the same layer#4:the 5V trail looks a bit messy to me. I would use C3 as the main starting point for the routing. For me it looks like you use the block c (C6) of IC1 as a filter.#5:I have been told multiple times, that the ground of a oscilator should be connected to the GND of the IC first before being connected to any other GND. To be more precise: The red marked pins in the attachment should be connected to the yellow pin first. This could be reached by cutting the polygon at the blue lines. At least thats what i have been told.I hope i could help a bit.

author: paulca
author_rank: Super Contributor
timestamp: February 17, 2018, 04:33:02 pm
content: Thank you very much Deridex. You have given me a lot to think about.I was hoping to use the upper layer for everything but ground and the back layer for ground. Routing in different directions on each would need me to route all the ground connections, maybe it's laziness.Then again to address a few of your points I would need to route a few ground independently anyway.Here's one question... what probability would you give it of working as is?

author: mars01
author_rank: Contributor
timestamp: February 17, 2018, 05:05:11 pm
content: Hi,Your PCB is very basic so you can get away with almost everything. Whatever PCB you do it will work. Most likely it will work without problems on a breadboard, tooso don't worry.Some more points you might take into consideration in addition to those (good ones) already made by @Deridex:- watch out for silkscreen overlapping - it's easy to fix and it will give your board a better look;- your clock net from ISP connector to uC might be better to isolate it a bit from the other traces. Don't get me wrong it's ok right now but it's better to keep the clock lines short and a bit separated. Your trace from pin14 of uC can go on top layer on the lower side of the board until near U4 (this is how I would do it)- the I2C connector would be better to have a few mm more distance from the uC. It will be easier to plug the cable connector into it, depending on what connector you will use;- I would route the traces at 0, 90, 180 and 270 degrees from a pad and not to 45 degress and so on. It's easier to cut in case you need to make some mods.- your vias could be made with 0.6mm hole in a 1.2mm pad. It's easier to solder onto if you want to measure things or whatever. Actually you can do this board without any via, using just the through holes of the components.I remade it a bit (something done fast) just to show how I would do it and also because I was curious how Kicad latest version is. I used a nightly and it's surprisingly OK. I could not find the keepout traces (if there is such feature in Kicad).See attached.LE: fattened a bit the VCC trace

author: paulca
author_rank: Super Contributor
timestamp: February 17, 2018, 05:15:47 pm
content: Quote from: Deridex on February 17, 2018, 03:10:20 pmYou mean putting a cap on the reset pin?I have seen this on Uno's and Nano's and people recommending it, but it's not on the minimal schematic for the 338p.I've never figured out what it's for either. Sometimes to do with generating a low pulse for the programmer. I also imagine it would hold the reset pin low for a few nano seconds while the MCU powers on.

author: paulca
author_rank: Super Contributor
timestamp: February 17, 2018, 05:19:51 pm
content: Thanks mars01What I'm pondering, as I'm starting to get bored of the same board... do I made the minimal amount of changes (anything serious) and send it for manu. I will then take onboard all the good advice for my next board.My next board is even simpler. An ATTiny85 controller for the lamp below. Going to give it to someone as a present and the shrink wrapped LED dev module I built on perfboard looks a bit ugly, besides I still need it

author: mars01
author_rank: Contributor
timestamp: February 17, 2018, 05:23:17 pm
content: Also, as a good habit, make sure you put the origin in the lower left corner of the board.LE: added a picture.

author: paulca
author_rank: Super Contributor
timestamp: February 17, 2018, 05:25:24 pm
content: Quote from: mars01 on February 17, 2018, 05:23:17 pmYou mean the drawing origin? I'm wasn't even sure there was one. I just let KiCad do it's thing.

author: mars01
author_rank: Contributor
timestamp: February 17, 2018, 05:28:50 pm
content: I've added a picture to the previous post. It's used as origin for the Gerber files.You find it menu bar: Place -> Grid Origin.

author: paulca
author_rank: Super Contributor
timestamp: February 17, 2018, 05:32:03 pm
content: Aha! I also see something that didn't occur to me. Even though I'm using the backside for ground, I can still route stuff there, pad to pad. I was just using it as ground and via cross links. I can see how that would tidy things up.Have you any tips on working on a layer post fill, or do you just delete the fill, add a few tracks and refill it?

author: paulca
author_rank: Super Contributor
timestamp: February 17, 2018, 05:36:45 pm
content: On going SMD / SMT. When I put the SSOP-24 IC on the board and a disc cap and resistor beside it, it looked ridiculous. The through hole stuff looks huge in comparison.However that cascaded like dominoes.... Make the resistors SMD... why not the caps too? Then I could make LEDs and the RTC SMD.Maybe next time. I have all the components in stock to make this. I think I'm going to go for it tomorrow morning, when the Saturday night ale wears offNext time I might go SMD.

author: mars01
author_rank: Contributor
timestamp: February 17, 2018, 05:48:07 pm
content: Especially for SMD components make your own footprints. In this way you can make them for low density PCB, meaning you can make the pads a bit longer so you can solder them easier.And SMD resistors you can have 100pcs for about 0.25 euro. SMD components are quite cheap and don't take too much space on board and in storage, too. One reason to go for SMD.Regarding the polygon pouring and laying traces, I see that Kicad has some more to do here. It would have helped if the traces would have been a different hue than the ground pour/fill so at least you have a cue where you are laying the traces.In the current situation all you can do is route the GND stuff the last, or route the GND net with traces and then pour a polygon over.Or use the B key (polygon/fill repour) a lotLE: It seems I made a mistake before. The origin for Gerber and Excellon files is found in Place -> Drill and Place Offset.Then, when the Gerber and Drill files are generated, in the window that open when the Plot button is clicked, the option "Use auxiliary axis as origin" must be checked.This is very useful for guys who use FlatCAM and a CNC router to make PCB's by isolation method.

author: Deridex
author_rank: Regular Contributor
timestamp: February 19, 2018, 04:53:44 am
content: Quote from: paulca on February 17, 2018, 05:15:47 pmWell, at your board it might not be needed. But as soon you go for ucontroller etc. i recommend it, because it helps to avoid unwanted resets.

author: paulca
author_rank: Super Contributor
timestamp: February 19, 2018, 10:03:40 am
content: So having found the "drag track" ability I made a few last minute changes and submitted the board to PCBWay for review.* Added a 100nF cap on RESET pin* Expanded the SSOP-24 pad size to 2mm to make it somewhat easier to solder.* Fixed a few track cosmetics.* Tidied a bit of silk screenOf course with it being Chinese new year they will not get to review it until Wednesday, more likely Friday.I doubt I'll see the board before mid march.

author: rs20
author_rank: Super Contributor
timestamp: February 23, 2018, 10:13:01 pm
content: Quote from: Deridex on February 17, 2018, 03:10:20 pmWhat are you talking about?-- An Arduino has the coupling capacitor on the FTDI* line heading towards the Arduino reset as an awful hack to correct for the fact that FTDI is not always intialized reliably high or low.-- Therefore it belongs to the FTDI chip, and is not actually an integral part of the AtMega circuitry.-- The ISP header on the Arduino is NOT connect via the coupling capacitor, because the ISP programmer that you plug into the ISP header isn't a hacky piece of crap that needs this workaround.So given that this board is kind of like an Arduino but without the FTDI chip, we delete the FTDI chip and the associated coupling capacitor workaround. It is totally wrong the place an AC coupling capacitor on the ISP reset line, and the Arduino board doesn't do this either.* Whenever I say "FTDI", I mean the FTDI or the substituted AtMega16U2 chip that substitutes.

author: Rerouter
author_rank: Super Contributor
timestamp: February 24, 2018, 02:00:58 pm
content: I also agree, the capacitor on the reset line would only be needed in very noisy enviroments, or to deal with FTDI weirdness,Just to throw my hat in the ring, even though its already ordered, (there will be a small discrepancy in the schematic symbols, I'm using 4.0.6)No vias, And more forgiving spacing,To the OP,My tips would be dont feel that you need to press traces hard up against each other, set your grid size larger and space them out, at least this early in the game where you care that it functions more than it being as small as possible.Equally you can use the larger grid sizes to make aligning components like switches or text much easier,next up, Plan your silkscreen out, Its information for yourself in however many days or weeks it takes to get building, Simple stuff with wide spacing, your fine to print values on the silk, later on, if you get much more dense you can switch to printing the FAB layer with values, and have it as a reference sheet.For traces, under design rules up the top, under global design rules, you can add other trace widths, so with the right click menu you can easily select between different widths, equally with a different width selected, pressing "e" over a trace will update that segment to the new width.And wrapping up, for things like reset lines, its best to keep them short and far away from anything that may induce enough coupling to cause an unexpected reset, for microcontroller IO, if you have some digital wire toggling with some load on it, and you have it necked right up next to the reset line, it can capacitivly and / or inductivly inject a bit of crosstalk, to avoid it, just space these sensitive traces furthur away from the restAnd while in reality having 5V break a reset line for a tiny blip is fine, see if you can avoid breaking under another signal, or if not, then break under a signal like an output driven high or low.

author: paulca
author_rank: Super Contributor
timestamp: February 24, 2018, 03:10:11 pm
content: Thanks. Kinda stuck with the cap now... although I could leave it unpopulated.I'm not sure the normal grid spacing controls the nudge router spacing. If there a track grid setting in routing preferences? I have where possible started dragging tracks away from each other, particularly when the auto routing puts them right up against pads. My next board is surface mount and all it takes is to scrap the solder mask and the pad could short to the track and be difficult to remove the solder perfectly.I did add some custom silk screen, well, I did one quick pass and tried to think of things I would like to know when building the board, such as + and - on connectors which is always handyIt's 35% built at PCB way, but I don't think I'll see it till mid march with EMS shipping taking at least a week.On my next board which I'm still working on things are simpler but I do have size requirements this time. Trying to squeeze it into a tinny little 44mm x 30mm box. I'll maybe post it here also when I'm closer to sending it off.

author: rs20
author_rank: Super Contributor
timestamp: February 25, 2018, 01:07:00 am
content: Quote from: paulca on February 24, 2018, 03:10:11 pmWait, how did you add it to the schematic? Did you wire it in as a decoupling* cap or a coupling** cap? The original (basically incorrect) request was to add is as a "block" (i.e. coupling**) capacitor, in which case the correct fix would be to install a zero ohm resistor instead of the capacitor. But, if you added it as a decoupling* cap, then take note (for future reference) that you didn't even follow the (basically) incorrect suggestion correctly, but then also yes, the correct fix would be to leave it unpopulated.* From the reset line down to ground** Between the reset pin of the ISP header and the reset pin of the chip

author: paulca
author_rank: Super Contributor
timestamp: February 25, 2018, 06:44:28 am
content: I added it as a decoupling cap. So I effectively have this:GND - 100nF - RESET - 10K - 5VWith the ISP header connected to RESET also.So, my understanding is that the 100nF will filter AC noise on the reset pin to ground and can be left unpopulated.I am not one to follow suggestions blindly. I have to try and understand why. So when I googled it I found quite a bit of debate about it, but the premise that made sense was to use a decoupling cap to ground to remove noise.

author: rs20
author_rank: Super Contributor
timestamp: February 25, 2018, 09:25:57 am
content: All good. Yeah, it will help reduce noise on the reset line, but it also adds a capacitative load that the ISP programmer has to contend with. Without checking the specifications of the ISP programmer, I'd be hesitant to guess what value to use; and given that you're unlikely to need it at all, leaving it unpopulated is a good way to go.Just for context, you can see an example of a coupling capacitor on a reset line on the Arduino schematic (C5 on this schematic):As I mentioned before, this is basically a horrible hack specific to pressing an FTDI chip/ATMEGA16U2 into service as a programmer, so of no relevance to your design.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: February 25, 2018, 09:32:15 am
content: Also if you put a blocking cap, you should also add the diode to prevent overvoltage on RESET.

author: paulca
author_rank: Super Contributor
timestamp: February 25, 2018, 09:40:25 am
content: Quote from: donotdespisethesnake on February 25, 2018, 09:32:15 amWhy? A cap will only ever output the voltage it was charged to. The ATMega can handle 12V on it's reset pin.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: February 25, 2018, 09:46:28 am
content: Quote from: paulca on February 25, 2018, 09:40:25 amWhatever, you're the expert

author: Rerouter
author_rank: Super Contributor
timestamp: February 25, 2018, 10:18:12 am
content: To give clarification, More so as a "what not to do"By switching the resetswitch to ground, it would couple via the capacitor and pull the micro reset pin towards ground (actual voltage doesn't matter in this example), however if you kept that switch held, the micro pin would charge back up to VCC, meaning when you released your resetswitch, it becoming positive would couple through the capacitor and bring the reset pin to VCC + something,Now in reality the majority of micro controllers have protection diodes that shunt out of range signals to VCC or ground, but its more a case of avoid if possibleIn any case, I would not recommend this arrangement for a reset pin, and with FTDI chips being shunned by a lot of the arduino crowd these days, I suspect its relevance has faded.

author: rs20
author_rank: Super Contributor
timestamp: February 25, 2018, 11:19:38 am
content: paulca is correct, the max rating on just the reset pin for the AtMega328P is -0.5V to +13.0V. Given that the highest voltage you'd expect from a worst-case scenario as outline by Rerouter is 5V + 5V = 10V, it seems that the diode would be totally unnecessary, as correctly pointed out by paulca and bizarrely, rudely, incorrectly and unconstructively mocked by donotdespisethesnake.BTW, the reason for the high voltage tolerance of the reset pin is to support parallel programming, in which one routinely places +12V on the reset pin.

author: paulca
author_rank: Super Contributor
timestamp: February 25, 2018, 12:09:45 pm
content: Quote from: donotdespisethesnake on February 25, 2018, 09:46:28 amApologies it was not meant as a challenge, but as a statement of my (miss?) understanding. I should have prefixed it with "My understanding was:"

author: paulca
author_rank: Super Contributor
timestamp: February 25, 2018, 12:20:15 pm
content: Let me try and follow here. In my case I have:Code:5V --> 10K --> RESET --> 100nF --> GND|ISP RESET PINIn normal operation the 5V will charge the capacitor so there is 5V across it, 0 across the resistor, 0 current?When the ISP programmer pulls the RESET to ground, assuming it has no resistor, then 5V will drop across the resistor wasting about 5uA. The capacitor will discharge into the ISPs ground. If it doesn't have a resistor on that pull down then it will take a flash pulse of current from the 100nF but finish up with the RESET pin at ground potential. The 100nF will have 0V on both sides an stay discharged.When the ISP releases the RESET pull down then 5V will pass through the 10K resistor, charging the 100nF cap back up until again we have 5V at RESET, 0V across the resistor and 5V across the capacitor.... or I'm missing something here.

author: Deridex
author_rank: Regular Contributor
timestamp: February 25, 2018, 06:23:47 pm
content: Quote from: rs20 on February 25, 2018, 09:25:57 amI think i made a bit a mistake here, by not telling him, that the cap can be left unpopulated aslong there are no problems.Sadly i enountered already a board with another ucontroller that needed this cap to not reset when the loads were switched. It was a seriosly funny problem ... that took a while to figure out.So i tend to add the pads for a Cap on the reset line on the most boards that switch bigger loads.

author: rs20
author_rank: Super Contributor
timestamp: February 25, 2018, 11:33:09 pm
content: Quote from: paulca on February 25, 2018, 12:20:15 pmYour analysis is perfect, except you're kinda dismissing the importance of that "flash pulse of current" that you mention. Yes, the reset line willeventuallyfinish at the ground potential, but how long does that take? If the ISP programmer thinks that it's pulled the RESET line low forxmicroseconds, but the RC filter formed by the output impedance of the ISP programmer and the capacitor values has a time period of2xmicroseconds, then the ATMega328P will completely fail to be reset successfully. Different ISP programmers and various clones might have different output impedances and reset line pulse widths too, which means that a poor choice of capacitor value could result in inexplicable, intermittent operation and a lot of tears.Put another way; if you placed a 1 Farad capacitor on the reset line, I'd wager that most ISP programmers would fail. The difficult question is, how small do you have to make the capacitance before it becomes reliable? Is it easier/better to just use a lower resistance resistor?

author: paulca
author_rank: Super Contributor
timestamp: February 26, 2018, 04:41:21 pm
content: If it works without it, I'll leave it unpopulatedThe board is now 100% built, just waiting on them shipping it.

author: paulca
author_rank: Super Contributor
timestamp: March 03, 2018, 09:33:29 pm
content: So, I thought this was worth doing:

author: paulca
author_rank: Super Contributor
timestamp: March 17, 2018, 11:40:39 am
content: So I wanted to thank everyone for their help with this. Got the board on Thursday. Soldered it together and... wait for it... not one bug was found with only the push buttons untested still. Spent Friday night programming the RTC and LEDs and this morning doing the oLED. Works a treat.C7 - The 100nF on RESET has indeed been left unpopulated.