First pcb - Page 1
Forum section: electronics / beginners

author: Tom10000
author_rank: Contributor
timestamp: May 03, 2018, 11:47:57 pm
content: Hello, I have just finished my design of my first PCB it is of a lm317 power supply I am worried that I didn't do it correctly please could I have some feedback on what to improve on.I Have attached the Gerber Files below.Thanks,Tom10000

author: Nitrousoxide
author_rank: Regular Contributor
timestamp: May 04, 2018, 01:02:41 am
content: Please upload them as images (or PDF's) as many people on the forum do not like to download zip files. Its easier for users to view and you're more likely to get an answer.

author: Tom10000
author_rank: Contributor
timestamp: May 04, 2018, 02:28:42 am
content: okay thanks, I have now attached a photo

author: ataradov
author_rank: Super Contributor
timestamp: May 04, 2018, 02:58:59 am
content: Traces are too thin for no real reason. An also too close to each other and pads. The routing looks all over the place. Some component shuffling may help with that (just rotating PR1 90 degrees clockwise will make routing much cleaner). There is also no mounting holes.But generally, it looks functional. If you plan to order the boards, then do a double sided routing and ground fill on both sides.

author: pigrew
author_rank: Frequent Contributor
timestamp: May 04, 2018, 03:36:47 am
content: I agree with ataradov, especially about using a ground plane (at least on the bottom side). Also, make your input and output tracks (along with GND) much wider.Review the datasheet again about components and placement suggestions. For example, the TI sheet specifies the 0.1uF or 1 uF ceramic or tantalum input capacitor to be as close as possible to the LM317. Your 0.1uF output capacitor looks too large... you should be able to get one with 0.1 or 0.2in pitch.You may also want to add a heat sink for the LM317. If so, make sure you have ample room on the board to add it (and perhaps add places to solder the heatsink down for mechanical support).

author: james_s
author_rank: Super Contributor
timestamp: May 04, 2018, 05:32:35 am
content: For a first try it's not bad, but by any other measure it's a mess. Shift some parts around to avoid having traces snaking all over the place and make the traces thicker. Most board houses charge the same for single and double sided boards so don't be afraid to put traces on both sides if it makes the layout easier, usually it does.PCB layout is an art that takes practice, keep at it and you'll get it down.

author: Tom10000
author_rank: Contributor
timestamp: May 04, 2018, 10:29:03 am
content: Okay I just finished redoing it with all your recommendationsthankyou

author: austfox
author_rank: Regular Contributor
timestamp: May 04, 2018, 11:30:31 am
content: I thought they were being a bit tough on you for your first board, but you've taken those comments and improved the board soooo much. Well done!

author: Mr. Scram
author_rank: Super Contributor
timestamp: May 04, 2018, 11:44:40 am
content: That's a massive improvement. Good job!

author: Ice-Tea
author_rank: Super Contributor
timestamp: May 04, 2018, 11:49:17 am
content: They will not be able to produce the thin silkscreen circle around your logo I'm afraid

author: pix3l
author_rank: Regular Contributor
timestamp: May 04, 2018, 12:30:57 pm
content: Have you checked the wiring on your potentiometer? Are you sure the resistance between the two legs you have wired up is going to change the way you think it will?

author: ataradov
author_rank: Super Contributor
timestamp: May 04, 2018, 02:54:19 pm
content: Yes, this looks way better. But PR1 is indeed wired incorrectly. Can you also post the schematic?

author: james_s
author_rank: Super Contributor
timestamp: May 04, 2018, 04:51:40 pm
content: That looks WAY better, good job. I would still suggest making the traces thicker though, there's no reason not to. Also make sure you check the physical clearances, I've been burned a few times when real components were larger than the silkscreen showed. Maybe move that capacitor a bit further from the regulator too, you don't want electrolytic capacitors too close to things that get hot.

author: Tom10000
author_rank: Contributor
timestamp: May 04, 2018, 10:54:36 pm
content: Okay i have uploaded the schematic and I will also check the wiring now thank you

author: ataradov
author_rank: Super Contributor
timestamp: May 04, 2018, 10:58:21 pm
content: Yes, your PR1 will not actually adjust anything. You need to connect central wiper pin to one of the end pins. Which one - depends on the resistor and which way you want adjustment to happen.The first layout made it look like the connection was there. There is a lesson here - good and logical layout lets you catch errors. Even in a simple example like this.

author: Tom10000
author_rank: Contributor
timestamp: May 04, 2018, 11:33:11 pm
content: So like what I attached down below would that be correctthanks for pointing it out

author: ataradov
author_rank: Super Contributor
timestamp: May 04, 2018, 11:34:52 pm
content: Yep. That looks correct. The resistor part, I have not checked the rest of the components, but general schematic looks correct, and the values can be tweaked later.

author: Tom10000
author_rank: Contributor
timestamp: May 04, 2018, 11:55:14 pm
content: Okay, I moved the capacitors over and fixed up PR1Thanks

author: ataradov
author_rank: Super Contributor
timestamp: May 05, 2018, 12:01:43 am
content: Your logo still has that thin circle outline. It will disappear in manufacturing.Also, if you plan to put some connectors on the input and output pins, then silk screen text will be obscured by those connectors. If they are just for soldering wires, then it is fine.Text with the date is also too small, it will be a smudge at bets and will not be printed at all at worst. Silk screen has pretty bad resolution from cheap PCB manufacturers. And there is plenty of space, no need to go small.

author: Tom10000
author_rank: Contributor
timestamp: May 05, 2018, 12:15:22 am
content: Okay Increased the line width and the labels are just or soldering wires so they are fine how they thanks

author: ataradov
author_rank: Super Contributor
timestamp: May 05, 2018, 12:39:01 am
content: Now order it. I still have doubts about the logo and its fine lines, but it would not affect functionality, so who cares.

author: james_s
author_rank: Super Contributor
timestamp: May 05, 2018, 04:36:50 am
content: I would still make the traces thicker, at least those that are carrying significant current. What you have will work, but there's space to make them easily twice the width you have without issues.

author: MarkF
author_rank: Super Contributor
timestamp: May 05, 2018, 04:48:05 am
content: I might suggest that you try to keep each circuit trace on the same side of the board if possible.Edit: Of course you do have to balance that with how they divide up the copper pours.

author: MarkF
author_rank: Super Contributor
timestamp: May 05, 2018, 07:56:46 am
content: I don't want to bash your PCB. Just thought you might want to see what's possible with a little component rearranging. You could get all the traces on the top layer and a solid ground plane on the bottom layer.One last comment: You didn't provide any mounting holes.

author: tautech
author_rank: Super Contributor
timestamp: May 05, 2018, 08:22:39 am
content: I'd suggest you add some component polarity identifiers into the copper so not to rely entirely on the silkscreen.Square pads for:Diode cathodeElectrolytic cap positiveYou can also add symbols for specific component pads into the copper, K, +, 1 or even just a dot that signifies pin 1 on an IC. Big list only restrained by your imagination. In fact, anything you might have as silkscreen you can have instead in the copper.Bigger pads for IN and OUT.Optimize hole sizes to suit componentry.C1 and C2 pad annular rings need enlarging.Always think; Rework, does my layout improve or hinder it. Are annular rings robust enough to not lift as a result of component substitution or replacement.Agree with MarkF, this could easily be done on a SS board withjustthoughtful component orientation to allow simple routing pathways.Great improvement from your first attempt Tom.

author: hugo
author_rank: Regular Contributor
timestamp: May 05, 2018, 11:23:44 pm
content: You can also add an extra diode, which is suposed to protect the LM317 regulator.

author: MarkF
author_rank: Super Contributor
timestamp: May 16, 2018, 01:17:32 pm
content: While following this thread, I realized that I have a need for a small adjustable supply for one of my projects. I used a 10-turn pot to adjust the voltage and added an input jack for a wall-wart. I may or may not populate all the input/output jacks.Here is the PCB that I've ended up with:

author: james_s
author_rank: Super Contributor
timestamp: May 16, 2018, 04:21:05 pm
content: Looks good, although you can buy small modules that are effectively a switchmode version of that for about a buck shipped from China so unless you need a specific form factor or just want the design/layout practice it likely makes more sense to just buy one.

author: Mr. Scram
author_rank: Super Contributor
timestamp: May 18, 2018, 01:30:51 am
content: Quote from: james_s on May 16, 2018, 04:21:05 pmNot having switchmode noise could be an advantage.

author: james_s
author_rank: Super Contributor
timestamp: May 18, 2018, 03:58:21 am
content: You can get linear versions too.https://www.ebay.com/itm/LM317-DC-DC-Linear-Step-down-Voltage-Regulator-Power-Supply-Module-5V-9V-12V-24V/222697536114?It's fun to build stuff, but jeez, it's hard to buy the regulator alone for the price of the whole module shipped.

author: tautech
author_rank: Super Contributor
timestamp: May 18, 2018, 05:20:47 am
content: Quote from: james_s on May 18, 2018, 03:58:21 amYeah sure but check the thread title: First PCB.Tom's only a young fella and soaking up all the guidance we can give him and for a first PCB a 317 is a good choice and almost a 'right of passage' like making your first project a homemade PSU.Power and control devices, power paths, headers, mounting holes, different component lead hole sizes. All things we take for granted once we've do a PCB or two.Just a few months back Tom didn't even have a DMM and wanted a broken one to fix......well until someone sent him a nice blue Brymen.Tom's on the right path now; learn to walk before you learn to run.

author: james_s
author_rank: Super Contributor
timestamp: May 18, 2018, 04:37:59 pm
content: Yeah no argument there, my comment was largely directed toward the person who said they needed one for a project.

author: rdl
author_rank: Super Contributor
timestamp: May 19, 2018, 12:29:29 am
content: Useful info adapted from various datasheets.

author: MarkF
author_rank: Super Contributor
timestamp: May 19, 2018, 04:40:02 am
content: Quote from: rdl on May 19, 2018, 12:29:29 amClose. But, not quite.

author: rdl
author_rank: Super Contributor
timestamp: May 19, 2018, 03:32:00 pm
content: According to my data sheet, you are right. I wonder how that discrepancy sneaked in. I also wonder if it makes any difference where C2 discharges to.

author: hugo
author_rank: Regular Contributor
timestamp: May 19, 2018, 04:30:04 pm
content: Quote from: rdl on May 19, 2018, 03:32:00 pmThat will work when the input is shorted to ground.