PCb design sugestion - Page 1
Forum section: electronics / projects

author: edmundopt
author_rank: Regular Contributor
timestamp: October 14, 2013, 08:10:04 pm
content: helloI have schematic based on a app note so it should be ok.I have some questions about the board design.Any mistakes into the input part ? Source will 12volts, DC switched power supplly.I really would like some sugestions:remove islands from the copper fill ?copper fill, connect it to some bus or earth gnd ?the spacing is 60th(inches) on the inputs increase ?on the output I will try to get C2,C3,C4,C5 near C0 to get that ground loop minimized.Images resized

author: Kremmen
author_rank: Super Contributor
timestamp: October 15, 2013, 07:48:01 am
content: OK, some quick comments:Schematic:For schematics, the usual convention is to try and draw those so as to make the signals propagate from left to right. There is no scientific reason for this, it just makes them easier to read generally. Also it is a good practice to arrange various supply and rail voltages so that positives are towards the top of page and negatives towards the bottom. Alternatively, if you don't have negative rails, put the GND/ signal returns to the bottom. And please do avoid rotating components so that their legends / text is inverted. And never, never make a connection _through_ a component symbol (you haven't, this is just an observation). These are small(ish) things but breaking many or all the "rules" can make the schematic look like incomprehensible dog's vomit and definitely labels you as a n00b. The latter of course can be a good thing too depending on the context.PCB:For the actual PCB the layout is much more critical for several different categories of reasons. Principal categories are signal integrity, EMI compatibility, withstanding operating and overvoltages, and in some cases operator and property safety. The last one of course is tightly coupled with the actual circuit as well; dimensioning of components and circuit functionality.With the above in mind, and seeing as how this is obviously an input breakout board for a MCU or similar, the following:- arrange the field inputs on one side of the board, and the (MCU?) outputs on the opposite side. This will maximize the physical distance noise must travel to penetrate your input circuitry.- Layout all components so that the signals do not meander or retrace back and forth. A "later" signal should not parallel or intersect an "earlier" signal.- You have plenty of board real estate (if you really want to make it that big), so use it. A good idea for low frequency circuits is to use the area available; it makes assembly, testing, fixing and life in general easier. Also you can use wider tracks to make the PCB easier to make (if you consider DIY). You get no extra points from narrow tracks so why do it if not needed.- If this board will be manufactured for you, then you can safely assume it will always be at least a 2 layer board. So use it to your advantage. Make the bottom layer a ground plane, and flood fill the top layer with ground as well, stitching the layers together with static vias. This will significantly ease the optimization of current return paths. Just watch against placing individual crosswise tracks on the bottom layer across current return paths.- For an I/O board like this, i would make a 2 sided edge guard fill, i.e. a ring of grounded fill at least a few mm wide, all around the board, with the fixing holes connected to the guard. Connect the guard to the board ground using a ferrite that blocks HF EMI but lets DC levels through. Maybe not really necessary in this case, but good practice for when it is.- The schematic shows LEDs that i did not see in your layout. Indicators are real useful when messing about with proto circuits so do place them prominently and _logically_ in sight. For a manufactured board do use the opportunity to include a descriptive legend for each on the silk layer. (Just as a side note: is there a reason why the LEDs alternate in otherwise identical subcircuits? If not, then this is another point to learn "standardizing". Many PCB packages support subcircuits and the inputs are good candidates for such, but only if they are identical).P.S. Good luck with the competition

author: tszaboo
author_rank: Super Contributor
timestamp: October 15, 2013, 05:54:39 pm
content: Why do you need resistor networks on a board, which has a dance floor on it? Use single resistors, they are cheaper, more common, easier to replace, and you have the place for it. Also, If your main intention is isolation (I guess) Why dont I see that on the board. Make some spacing between the two side. Put the inputs on the top side (not layer) and the outputs on the bottom. Use the space which is there.Also, do you think it is a good idea to put electric capacitor without protection diode on any connector? Why do you need electric in the first place? If it is some 1n-100nF capacitor, use ceramic. If it is bigger, than you really need to look into digital signals, and why we don't use capacitors for timing.

author: mamalala
author_rank: Unknown
timestamp: October 15, 2013, 07:01:22 pm
content: The others have already given good hints, and here are some more:- You have big, chunky connectors, but connect them through thin traces. If you intend to have have more than a few mA, use thicker traces. If not, no need for the heavy connectors.- What is RN1 supposed to do? It will seriusly limit the current that you can switch.- Ground planes are a good thing, but only if you use them properly. You have a lot of unconnected islands (orphans) in the groundplane. They will sure save you etchant, when you intend to etch the board yourself. But they will also make really nice antenna circuits...- You waste a _lot_ of PCB real estate. You can easily arrange the whole thing "in one row". Right now you go into the circuit at the bottom right, use long traces to the upper left, only to get out at the bottom left.- If you intend to have that PCB manufactured, you will have no luck with the drill size used for J3/J4 (and other parts). They are too small.- OTOH, if you intend to have the PCB done yourself, you will run into problems with the pad-size and drill-size combination of U1. The restring there is way too small for that. Can be done, but more likely than not you will just tear them off.Greetings,Chris

author: Alana
author_rank: Frequent Contributor
timestamp: October 15, 2013, 07:13:14 pm
content: Board looks as if it was meant to fit into an enclosure of some kind. Is that true because if not you are wasting TONS of pcb space. Or maybe you can use smaller enclosure and save on PCB.Maybe putting input at the bottom and output at the top?And if you are using electrolytics in output low pass filter it means its for very low frequencies so ground plane is more for the looks than for signal integrity. Especially if its not grounded at all.

author: homebrew
author_rank: Frequent Contributor
timestamp: October 15, 2013, 08:49:48 pm
content: Are we talking 230V inputs here?If no, forget the rest of the post!But if yes, then you shouldn't sleep well with this device operating ...Clearance would be way to low. I would suggest to remove all copper-planes from the input side. I would not take any risk here and also mill an isolation slot underneath the optocoupler. One could even route an earth-trace around the entire output side ...Pay attention to the heat dissipation in your input resistors. Even if your optocouplers only draw say 10mA, your power dissipation would be 2.3W - too much for your 1/4W resistors ... You should think of using a capacitor in series with your input to limit the effective current. So much for the good design of the app-note (in assumption that it is used for 230V:)Regarding the output side it looks as if your 'big' capacitors, together with the resistors form a low-pass filter to get rid of the ripples, if the input voltages were ac. I would suggest using higher valued resistors and smaller caps (just cosmetic reasons, cheaper, longer life etc ... ) and produce a clean TTL signal afterwards using a smith-trigger IC like 74HC14 for example ...Best,Pete

author: edmundopt
author_rank: Regular Contributor
timestamp: October 15, 2013, 09:37:11 pm
content: Hello, and thank you for all the replyes, I will take some bits of each.Sorry for not replying fast, but by default this forum does not email notification. I've updated the profile so now I will receive notification.About the board, it's a input for a microcontroler, it's part of o modular design prototype, anyway, it is intended to work(inside aluminium grounded case) near somethings like ac motor's and pneumatic air valves(they use inductors for swiching).Quote from: Alana on October 15, 2013, 07:13:14 pmyes, board sizes are standard, 100x50;100x100;100x160, I can make them smaler but then I will have to make custom aluminium fittings for each board size, wich is expensive.All conectores must be placed in one side of the board, this is for easy conection between modular boards.Quote from: homebrew on October 15, 2013, 08:49:48 pmInputs are for each input pair, two 3meters to 7meters shielded wires with 12volts dc from microswitch.The power source is a switching power supply.I will read more carefully your replyes. thanks

author: edmundopt
author_rank: Regular Contributor
timestamp: October 15, 2013, 11:26:07 pm
content: Ok, I can't do anything more today, this is a hobby and the ammount of time is small..new board layout completly removes the deboucing circuit, it will be made at the MCU,I will post the board with 100x50 dimensions tomorrow!Kremem, about the schematic, thanks for the tips, I can't believe that I have missed the two first tips after looking at so many schematics, any more tips ?About the PCB, well, I will be making the first one or two, then maybe outside fabrication, I use UV etching so I can produce really thin traces.I understand the later signal and the earlier signal, when looking at this, I can only see the resistors at the input, I can paralel them and make some spacing between them, anywere else on this PCB ?Edge with wholes connects will be made tomorrow!Led will be visible when looking directly at the connector, they are 90º and will use plastic light carrier to the edge of the card, the schematic enables them to be on the proper side of the connector.NANDBlogCapacitors was intended to be a decoupling, but they were wrong, anyway, decoupling will be done by software.Danceflor will be removed tomorrow.Normal resistors are now in place, I'am very lasy, networks are way easier to solderMamalalaIncreased traces width, i think that after the varistor, maybe about 25mA, I need to check the led voltage dropp and and some opto life time calculations, they are not done yet.Islands removed and note taken.I have no idead why the design rules and default pad sizes were lost.. now they are the usual for fabrication ones.I will keep reading, just need time, more sugestions are welcome! =)

author: edmundopt
author_rank: Regular Contributor
timestamp: October 16, 2013, 08:49:02 pm
content: ok, with this board side, I can't place a ground line arround the TTL part or the input part, no space, but also no ground dancing floorif I missed any of your sugestions please reply

author: tszaboo
author_rank: Super Contributor
timestamp: October 17, 2013, 11:15:32 am
content: This is an order of magnitude better. You only need to organize the components, at least the LEDs on a nice logical single line, and make some space between them. I guess you don't want them touch each other.

author: homebrew
author_rank: Frequent Contributor
timestamp: October 17, 2013, 12:26:39 pm
content: I had some spare time on a train ride, so I poked a little around with it ...Here is what came out ...Do what ever you want with it...Of course I could not test it so maybe the others want to have a look, too. So no warranty whatsoever!Maybe you have to adjust the values of the R/C network matching your needs ...Layout and schematic was done with the free version of Eagle (http://www.cadsoftusa.com)

author: edmundopt
author_rank: Regular Contributor
timestamp: October 17, 2013, 06:12:45 pm
content: Quote from: homebrew on October 17, 2013, 12:26:39 pmthks, thats a nice looking simple board, I will start some Eagle training soon, because of the direct compability of the packages.Question, I would think that for the screws and arround the board I would use another GND, you are using the GND of the switching regulator that poweres the MCU, can you try to explain the idea behind it? I would really like some insights.Hany good book for pcb layout ?mister NANDBlogAfter looking at the homebrew schematic, I think I can add +5mA with a little CTR deteoration margin to place LED's on the TTL side, that will enable me to join the connectors on the 12V input side.I'll do all the math and post the new schematic , values and BOM here.thank you again.

author: c4757p
author_rank: Super Contributor
timestamp: October 17, 2013, 06:26:21 pm
content: You made the board double-layer for seven measly tracks?

author: homebrew
author_rank: Frequent Contributor
timestamp: October 17, 2013, 08:37:18 pm
content: Quote from: c4757p on October 17, 2013, 06:26:21 pmYeah, you are right, stupid me! Thanks for the routing ideas, I fixed it ...Quote from: edmundopt on October 17, 2013, 06:12:45 pmYes, you are absolutely right. I didn't put any thought here, because there everything is lo-(no)-speed etc, etc. But I totally ignored the fact, that you want to put that thing into a metal case (probably also grounded).I don't have a book at hand (I'm just a hobbyist, too), but I found something in wikipedia:http://en.wikipedia.org/wiki/Ground_loop_(electricity)"The external shield, and the shields of all connectors, should be connected. If the power supply design is non-isolated, this external ground should be connected to the ground plane of the PCB at only one point; this avoids large current through the ground plane of the PCB. If the design is an isolated power supply, this external ground should be connected to the ground plane of the PCB via a high voltage capacitor, such as 2200pF@2KV. If the connectors are mounted on the PCB, the outer perimeter of the PCB should contain a strip of copper connecting to the shields of the connectors. There should be a break in copper between this strip, and the main ground plane of the circuit. The two should be connected at only one point. This way, if there is a large current between connector shields, it will not pass through the ground plane of the circuit."Sounds reasonable to me but I'm pretty sure, the experts can help you here more than I can ...Anyway, as it is very unlikely that the point of joining the ground systems will be on that board, I have altered the design and isolated them. Now it is up to you where to connect them (if desired at all)Best,Pete