Correct way to show screw holes for manu - Page 1
Forum section: electronics / general

author: paulca
author_rank: Super Contributor
timestamp: February 23, 2018, 07:15:36 pm
content: Do I put screw holes on the edge cuts or ... how do I force a "drill"?Basically I have to / want to make the board the size detailed here:http://www.hammondmfg.com/pdf/1551G.pdf

author: fourtytwo42
author_rank: Super Contributor
timestamp: February 23, 2018, 08:50:53 pm
content: In PcbNew just directly "add footprints" "select by browser" M for "Mounting holes" did I get the question right ?

author: janoc
author_rank: Super Contributor
timestamp: February 23, 2018, 09:15:26 pm
content: Yep, a mounting hole in Kicad is basically just a footprint with a through hole pad on it. You put it on normal layers as any other component.BTW, tip - if you add holes by hand (i.e. you don't have them in the schematics/netlist - probably nobody does), it helps to lock them in place so that they don't get removed when you reload/update your board from the schematics after any changes. That also prevents you from accidentally moving them around.

author: firewalker
author_rank: Super Contributor
timestamp: February 23, 2018, 09:27:13 pm
content: You want something like this?Alexander.

author: rs20
author_rank: Super Contributor
timestamp: February 23, 2018, 09:58:53 pm
content: Quote from: janoc on February 23, 2018, 09:15:26 pmThere can be a bit more to it than that. Does the OP want the screw hole to be plated or unplated? Both are legitimate choices in different situations, and you can check what you've specified in the drill report file that KiCad can generate. For example, this board has both plated AND unplated 3mm holes:Code:...Drill file 'power.drl' containsplated through holes:=============================================================T1 0.30mm 0.012" (40 holes)...T9 3.00mm 0.118" (2 holes)Total plated holes count 236Not plated through holes are merged with plated holesunplated through holes:=============================================================T10 3.00mm 0.118" (1 hole)Total unplated holes count 1I can't recall off hand how to specify the difference, but both are simple pads. I think maybe the unplated hole is made by having a pad size of zero, or maybe turning off the copper layers. Play around until the drill report file matches want you want.Quote from: janoc on February 23, 2018, 09:15:26 pmWell, I do... But locking the holes is a great idea in any case, to avoid accidentally moving them as you said.

author: janoc
author_rank: Super Contributor
timestamp: February 24, 2018, 10:43:26 am
content: Quote from: rs20 on February 23, 2018, 09:58:53 pmSure, but that you can set when you are configuring the footprint/pad. Just set the pad type to "NPTH Mechanical" instead of the default and it will not be plated.Quote from: rs20 on February 23, 2018, 09:58:53 pmHmm, out of curiosity - how are you representing the holes in the schematics/netlist? Just put down any 1pin test pad somewhere in the corner? I can see wanting to do it if I wanted to make sure the holes are tied into the ground net, for ex, but not sure why I would do it otherwise.

author: paulca
author_rank: Super Contributor
timestamp: February 24, 2018, 11:57:06 am
content: I'll try a few of the ideas later. I got as far as putting a single through hole pad onto the board, also found a few suggestions by google.I don't need the screw hole to be plated or on the ground plain, but it wouldn't hurt the case is ABS plastic.I'd rather not have that "REF***" on the silkscreen though

author: langwadt
author_rank: Super Contributor
timestamp: February 24, 2018, 01:48:22 pm
content: Quote from: paulca on February 24, 2018, 11:57:06 amclick ref** E for properties and untick visible should do it

author: paulca
author_rank: Super Contributor
timestamp: February 24, 2018, 03:10:57 pm
content: Quote from: langwadt on February 24, 2018, 01:48:22 pmAh ha! I was trying to delete it but it won't delete references. Didn't think of hiding it.Also, a tip to self... put the drill holes in for screws first. Means you stand a chance of laying the board out around them. In this case you can see I can't really use the other screw (top level User Drawing). I did try and move the DC jack around, but it looked like completely redoing the board to accomodate it.One screw will do!

author: janoc
author_rank: Super Contributor
timestamp: February 24, 2018, 05:34:32 pm
content: Quote from: paulca on February 24, 2018, 03:10:57 pmJeeze, don't be lazy! It is not like you have hundreds of traces on that board, moreover the push & shove routing in Kicad will let you move things around with ease. Not putting a screw next to the power jack that will get unplugged and reinserted (thus loading the board mechanically) is a bad idea and you will likely pay for it by something getting broken over time.Even regardless of the screws you should probably move the traces around the pin 8 of IC1 (hmm, any reason for using both IC? and U? conventions on the same board?) - that looks like asking for a short even though you have ton of space to move the trace above that pad. The traces between the pins of the P1 header the same story. Did this actually pass the DRC checks?You have two layers, use them! It is better to put a via down and route the trace over the other side than to risk a short because of a trace too close to a pad. Murphy will ensure that you will get a stray piece of solder or a hairline short from the etching there and good luck finding that ...

author: paulca
author_rank: Super Contributor
timestamp: February 24, 2018, 06:11:38 pm
content: Thank you for the feedback.If I move a component the tracks don't follow it. When I move the barrel jack down as far as I can I will still have the screw head screwing down onto the GND pad.Besides, it's still a little draft as I'm not 100% certain on the footprint of the DC jack. It is assuming I go for a standard SMD one, but I think through hole might be cheaper. So when I make a concrete decision on that I'll try and move it to accomodate the screw.I also have to test the size gain/loss with using a TO-92 version for U1 (LM78L05) as I already have them in stock (IC / U thing was just an oversight) That will move things around a bit too.I'm starting to realise that for these small boards you spend a lot of time starting from scratch, but each revision is 'usually' better.It did pass DRC checks, but I think the nudge router is set to assume absolute minimum clearance is fine, maybe I should up my minimum clearance a bit until I need it lower.However I already moved the tracks away from P8 on IC1. You are correct I should via down to the back layer for the pins on the other side of P1, thanks.

author: janoc
author_rank: Super Contributor
timestamp: February 24, 2018, 06:23:26 pm
content: Quote from: paulca on February 24, 2018, 06:11:38 pmThat's normal - but then you can just delete only the segment of the track going to the component, not the entire net.Quote from: paulca on February 24, 2018, 06:11:38 pmIf it is a regular barrel jack, I would probably go for a normal panel version - the kind that you make a hole in the enclosure wall and then fasten it with a nut and connect to the board using wires.Problem solved and it will be much more robust than SMD-mounted one.Quote from: paulca on February 24, 2018, 06:11:38 pmCheck your design rules - normally the clearance should be set to about the same value as the track width, i.e. if I am using 10 mil traces, they should have at least 10 mil clearance too. Of course that's not an absolute rule but it is a good starting point.

author: Rerouter
author_rank: Super Contributor
timestamp: February 25, 2018, 12:00:20 am
content: Even on the smallest PCB's where there is a will, there s a is a way, When you get to certain levels of complexity, you may find yourself ripping up and reoptimising sections a few times,I can forsee a way to have both SOIC chips against 1 another, however thats too hard to do in paint,You could also run that data line on the top layer, there is nothing in the wayAs for the screw holes, see the image, you have plenty of room.

author: paulca
author_rank: Super Contributor
timestamp: February 25, 2018, 08:12:56 am
content: Quote from: janoc on February 24, 2018, 06:23:26 pmI'm actually struggling with the DC jack. The random SMD one I picked off RS Components for laying out the board that matched the default KiCad footprint is 10.5mm high, but it's 2.5mm pin diameter. I need 2.1mm.Based on the drawings of the case (linked) I need something which is less than 11mm high (assuming a 1mm minimum board thickness).Max height: 11mmMax length: 20mm - could push to 22mm. C2 might need to lean over anyway due to height limits, but can lean towards the pin header (P2) or down towards the bottom.Max width: 17mmMax current: 1A (I'd prefer 2A)Voltage: 12VDChttp://www.hammondmfg.com/pdf/1551G.pdfThis panel mount one does not state it's total or drill diameter and is pushing it on length.https://uk.rs-online.com/web/p/dc-power-sockets/0487832/This THT one is pushing it on height and might require the lid get notched to accommodate the plug.https://uk.rs-online.com/web/p/dc-power-sockets/8840957/There are a few which are confused about their pin diameter2.1 or 2.5?https://uk.rs-online.com/web/p/dc-power-sockets/1251075/Of course I could just go up a case size, but I'm determined this will fit!

author: janoc
author_rank: Super Contributor
timestamp: February 25, 2018, 01:13:44 pm
content: In my experience the safest option is to order few of the jacks and measure them yourself. That's the only way to see how and whether it will fit - the dimensional drawings tend to be crap and often don't even match the actual part, especially when it is something generic like this. I have seen both Farnell & RS showing datasheets for a totally different component than what I was looking at, so beware!The length shouldn't be a problem, IMO. If you don't have enough space on the board you can easily flip the voltage regulator or the microcontroller (or even both) to the other layer and move the capacitor (the advantage of SMD - they don't interfere with each other because there are no holes through the board!). Or use a flat tantalum type that doesn't take as much space. That will certainly free up quite a bit of space there. You can also gain space by moving the two pin header for the switch to the edge of the board - I am sure that one's position isn't critical because you are going to connect it using wires.BTW, the best way to design things like this where you are constrained by the enclosure is to first position all the mechanical things that have to somehow interface with the box - screws, connectors, switches, etc and lock them down. If there are any protruding parts (e.g. a connector that will pass through the wall of the enclosure) don't forget to think about how the thing will be assembled - protruding parts on multiple sides of the board could prevent you from actually inserting the board into the enclosure!Then place the remaining components because then you will see how much space you have to work with.Personally I love this kind of work - it is a fun 2D-3D puzzle to work out and pretty satisfying when everything fits together. And also very infuriating when you assemble the board and discover that you have screwed up the position of something by a millimeter and it doesn't fit now.

author: Bassman59
author_rank: Super Contributor
timestamp: February 26, 2018, 09:01:48 pm
content: Quote from: paulca on February 25, 2018, 08:12:56 amUsually this sort of jack comes in both flavors (2.1 mm and 2.5 mm). Same footprint, just different center pin size. I know Switchcraft parts are like that.

author: paulca
author_rank: Super Contributor
timestamp: February 26, 2018, 09:10:14 pm
content: i have half a dozen DC jacks in the parts bin, but the PCB mount ones are 0.5A and not enough for the purpose. I have 2 panel mount ones and the ebay listing claims 3A... I'm suspicious though.I might order a few different ones from RS and see whats what. I like the idea of the PCB mount as it will keep things neater and easier to just drop the PCB in and screw it in place without fighting with short link wires in a tiny enclosure, or making them long and spoiling the look of the semi transparent case.

author: Bassman59
author_rank: Super Contributor
timestamp: February 26, 2018, 10:45:15 pm
content: Quote from: paulca on February 26, 2018, 09:10:14 pmSwitchcraft RASM722claims 5 amps.

author: paulca
author_rank: Super Contributor
timestamp: February 27, 2018, 08:13:19 am
content: I went for this one:https://uk.rs-online.com/web/p/dc-power-sockets/1251075/Also bought surface mount caps for the 100uF instead:https://uk.rs-online.com/web/p/aluminium-capacitors/7393040/So that's the BOM ordered, now I can start tweaking for the known footprints and hope I don't need to adjust when they turn out different.

author: paulca
author_rank: Super Contributor
timestamp: February 28, 2018, 08:21:25 pm
content: So after matching the footprints to the datasheet of the components that arrived, I have ended up with this:I redone the switch to be pull up open as this seemed to be the more common way and avoids having to deal with the internal pull up stuff.Question is... does anyone see anything blonde? Should I get it printed?

author: paulca
author_rank: Super Contributor
timestamp: February 28, 2018, 09:30:02 pm
content: So... after I submitted the order to PCBWay I discovered the my DC Jack foot print is mirrored.I told myself 10 times, if I check one thing it's the pin out of the custom footprint. Hit "Pay" and ... 3 minutes later I realised.Now I could just cut the PSU leads and swap them. It's an option, but... luckily PCBWay agreed to hold the order. I can submit Gerbers by email to release it.

author: janoc
author_rank: Super Contributor
timestamp: February 28, 2018, 10:38:12 pm
content: Quote from: paulca on February 28, 2018, 09:30:02 pmHappened even to the best of us

author: Bassman59
author_rank: Super Contributor
timestamp: March 01, 2018, 05:58:13 pm
content: Quote from: paulca on February 28, 2018, 09:30:02 pmMake sure you fix the footprint in your library! There's nothing like making the same mistake twice.Then there's this: Tuesday night I submitted Gerbers for two boards to Seeed. In Wednesday morning's e-mail was a coupon from Seeed: "Save 10% on all PCB orders in March!"ARRRRRGHHHHH.

author: paulca
author_rank: Super Contributor
timestamp: March 01, 2018, 07:03:02 pm
content: Quote from: Bassman59 on March 01, 2018, 05:58:13 pmYea, so as a final check I ignored everything except the traces on the screen and held the part up to the screen and ... even got my multimeter out and tested that the pins that go to 12V have continuity with the centre pin.It wasn't that the footprint was mirrored it was that I had numbered the pins wrong.It meant dropping the 12V under the ground on the back side, but that's what it's for.I almost sent it with the silkscreen still saying GND on the 12V pin, but I think I would have caught onto that. Also nearly sent it without punching the ground onto the back plane with a few vias. Kicad DRC didn't catch that so it must see a ground connection somewhere, but I can't find it.Anyway, fingers crossed. My first board is in the hands of EMS. This one is coming DHL, so it remains to be seen if I get stung for a customs handling fee... probably.

author: paulca
author_rank: Super Contributor
timestamp: March 03, 2018, 09:34:43 pm
content: Looks nice in 3D.

author: rs20
author_rank: Super Contributor
timestamp: March 04, 2018, 03:11:42 am
content: Just a side note; I received some third-hand advice a while ago which goes like this: if the through-hole version of a part is actually no larger than the surface mount version, then just use the through-hole version. For example, electrolytic capacitors and big DC jacks, you want to use the through hole versions. Reasons include:Greater mechanical strength: the part ends up practically riveted in place as opposed to relying on the much weaker bond between copper traces and the underlying FR4.Easier SMD reflowing: big parts catch the air and get blown around, plastic can start degrading, you can give the electrolyte in a cap a harsh introduction to the world, etc. Just popping the through-hole part in and soldering it by hand is much faster, easier, and less stressful to all the components of the board.(Often) lesser parasitics: Now of course your 0805 and 0603 SMD components have way better ESL than pretty much any through-hole components, but we're not talking about those. We're talking about SMD components that are the same size as their through-hole counterparts; electrolytic SMD caps of this type are basically just their through-hole counterparts with their legs splayed out and a plastic base added. This makes the leads longer, worsening the ESL, and you lose the lovely property of through-hole electrolytics that they dive directly down to the power and ground planes (where present) with no intermediate vias required.Exceptions to this rule:May be more difficult for automated assembly (irrelevant to the home hobbyist)If leads sticking out the other side of the board are a problem (bit of a stretch)On this basis, if I were you, I'd be using the through-hole barrel jacks and electrolytic caps instead of the SMD ones you're using there.

author: paulca
author_rank: Super Contributor
timestamp: March 08, 2018, 07:48:09 pm
content: Quote from: rs20 on March 04, 2018, 03:11:42 amThanks. I agree, but a lot of this is about exercise and learning through playing. I just wanted to make my first SMD board as SMD as I could make it. It still has THT pin headers and switch wiring.Anyway, the board arrived! Oddly it arrived before the one I ordered 2 weeks before it. (The binary clock). Note to self, DHL is worth it, EMS not so much. The Binary Clock is stuck with Parcel Force because customs were a dick about it, so hopefully I only have to pay the £1.80 or so VAT and the extortionate admin fee to parcel force to release it. Unless customs have valued it higher or consider it a commercial import.Anyway... "Piper Lamp".* The DC jack custom foot print aligns perfectly, the two drill holes for it's mechanical stays align perfectly.* It fits in the case.* The screw holes align!* The lid closes with the DC barrel jack in place, although it's tight, probably 0.5mm too high, but that will not both how it looks. I could sand the top of the barrel jack or bend the SMD feet up a fraction, but I don't think I'll bother.All looks great. I might try and make one up tonight to test it. I have 5 sets of components and 10 boards, I can make a few of them and give the best one to my daughter.For completeness, the rest of the device has come along.A section of 2" white PVC waste pipe from the hardware store fits absolutely perfectly into the ring where the lamp holder would go in the lamp shade, perfectly in that it actually holds the pipe in place.Around this bit of pipe a 1m length of WS2811 LEDs (12V 3xseries sets) wraps in a spiral. The glue, although it claims "3M" of course is pants and it has started to peel at the ends which are under more stress. A dob of thick CA glue will hold it.The chaining wires on the top I will remove by pulling or melting the hot glue away and desoldering them, they won't be needed. The other end the tail + - wires will be cut right back, hopefully in such a way that they can never short againt each other and the remaining + - and Data go into the 3 pin heading in the device.I will drill small holes to add cable ties for durability and keep the pipe in place, then add hot snot around the rim and cable tie it in place. It has to survive a few knocks as and table lamp will get.Of course the final piece is a 12V DC wall wart.The lamp is free standing as it doesn't require air flow for cooling.A lot is obviously involved in programming the LED patterns and the modes selected by the switch. Having an ISP header is all but essential of course.Fingers crossed that everything works out.

author: paulca
author_rank: Super Contributor
timestamp: March 08, 2018, 09:27:18 pm
content: So it all soldered together, sort of okay. I had issues with the paste melting and ended up with the hot air at 380C to get the capacitor to reflow. I think I will pre-heat the board, next time and leave the solder paste out of the fridge longer. I will also do the DC Jack and Capacitor with the iron.It powered on, in that it took 12V and didn't heat up, melt, let smoke out or consume a lot of current. All voltages registered okay.So I connected a programmer to it and suddenly it started consuming current, 200mA of it and the PSU went into current limit. I disconnected it and tried powering it from the USBAsp alone. No smoke. So I checked the two ICs for heat.I have a blister on my finger now. The ATTiny was about to burst into flames, hot enough to badly burn my finger.So I checked again the programmer header and found... GND and 5V are backwards. Damn.Well wired a quick adaptor, connecting back up and ... no response from the ATTiny, but at least it doesn't burn me now and it's wired right.It's getting late, so I am going to leave it for tonight. Either I have cooked the ATTiny, I have 4 others... or it survived but there is a problem programming them. It's happened before that I couldn't program them due to weird factory fuse settings. Tomorrow I will solder one of them onto an adapter and check it programs on a breadboard or if I need to refuse it. If I need to refuse it, it will be annoying as how can I HV program it without soldering it to something!I'm actually hoping I cooked the ATTiny or the 5V regulator and don't need to HV refuse the MCUs.I can live with the backward header power pins it will only be programmed by me and probably only once.

author: rs20
author_rank: Super Contributor
timestamp: March 08, 2018, 10:17:31 pm
content: You also need to consider whether you've killed your programmer -- that's a definite possibility (given that you effectively provided a strong -5V to its Vtg line).Btw, this is why you slowly ramp up voltage and current on your power supply when connecting your board for the first time -- you wouldn't have done any damage if you had a 10mA current limit in place.

author: paulca
author_rank: Super Contributor
timestamp: March 08, 2018, 11:43:28 pm
content: It's okay I tested the programmer still functions by programming a Nano with it, it does, though I was probably lucky.

author: paulca
author_rank: Super Contributor
timestamp: March 12, 2018, 10:50:14 am
content: Well it took me quite a while to get it working. I had issues with the fall time on the data waveform.I fixed it with a pull down botch resistor. However as was suggested in the MCU sub forum I should double check that FastLED library did indeed set the port as output. if it didn't then (I might be wrong), setting the port high turns on the pullup resistor, setting it low turns the pull up off, which might explain the slow fall time, ie the port is not sinking current to GND but just disabling the pull up which would show as a ski slope fall time.Other than that the board works fine. Fits perfectly in the case and I was able to solder the switch onto the wire pads instead of fitting the switch to the case. The switches I got just high enough that the top is flush with the case and as I drilled the hole in the lid a millimeter wider it is easy to press without protruding a lot. It's a little "botchy" but you wouldn't notice at first glance. Switch is secure.Just the programming to do now. Spent Saturday evening devising about 4 different rainbow patterns, but suddenly they all started animating at the same speed, so I expect I have variable scope leakage or have done something blonde.Soak tested it on bright white 100% for 4 hours and the wall wart PSU became warm, but not hot. The bench supply reported this as 1.1A, the PSU is rated for 2A. 100% cold hard white is the worst case usage. So all good. Even survives being switched off and on repeatedly, although I couldn't switch it off and on again faster than the cap discharges to try and lock it up.The only minor issue, which is being pedantic. On the bench PSU the 100uF cap pulls a lot of current at first power on. The PSU flicks to CC mode for half a second. I'm sure this won't stress the wallwart that much.