First PCB, power connection questions - Page 1
Forum section: electronics / beginners

author: Babbsdrebbler
author_rank: Newbie
timestamp: January 14, 2024, 06:31:17 pm
content: Hey there,I'm trying to pin down the design for my first PCB and I'm in need of some input.It's a esp32 for which I connected the SPI CLK and data output to a buffer IC so that I can connect them to smart LED strips via 4 pin plugs.The plan was to have one input power connection (5-24V) that powers the board and is passed on to the LED strip connectors which should be pluggable in a direction safe way (J1/J2, 4 pin).Power to the esp32 is provided via a 7805 pinout compatible buck converter from Aliexpress (5V/1A) which will be put on the back of the board.After I consulted the PCB trace width tool I've started questioning if passing the LED power via the PCB is a sane idea since ~5mm of width will allow about 10 amps at a 20C temperature rise and I'm not sure if I want 5mm traces and big connectors.I've started looking for connectors that allow for wires to be passed in additionally to PCB through hole connections so that I can feed the input power to the connector via a cable but feed the SPI data via the PCB.Additionally I've started searching for non-PCB connectors which allow wire connections on either side but can be disconnected and connected in the middle via plugs.My goal is to have a tidy connection to the LED strips via plugs and not connect all power wires via a multitude of wago connectors that I use for my other projects.Unfortunately I've yet to find a good solution to this so here I am.Questions:* Am I overthinking the 5mm trace width problem?* Do you know suitable connectors or ways to make this tidy and safe for unknowing people?I'd like to fully open source the files so I want to be able to provide a "safe" current guesstimate and general safety instructions together with the no liability notice...PCB, schematic and full kicad project file with production exports are attached.Thanks

author: sparkydog
author_rank: Regular Contributor
timestamp: January 15, 2024, 10:41:09 pm
content: Oof. Well, first... your routing needs a lot of work. Go back, delete all the ground traces, then putALLyour traces on the back. You're going to have to delete and re-run some other traces also to make this work, but itcanbe done. (Maybe not universally, but I managed it with your board, and without even moving any components.)...Then accept that the 5V trace is absurd that way 🙂 and put in ashortjump across the front with a single via. (Or maybe you'll come up with an even better design than I did and not have that problem.)Figure this out first, because your designs are all going to be problematic until you get good at single-layer routing. Yes, it's an art, and yes it takes practice, but it's worth it. For now I'll leave this as an exercise for the reader, but let me know if you give up and want to see how I did it. (In general, vias aren'tforbidden, but the fewer — and smaller — holes you punch in your ground plane, the better.)Okay, now that your routing is much better... add the ground plane on the front and replace the 12V traces with another fill. These will carry current a lot better than the dinky 2mm traces you had. If it were me, I might look for a beefier input connector (J7), though; you've got a little bit of room to go bigger without affecting anything else.I'd probably also bumpallthe traces up to 0.5mm just on the principle that you're nowhere near hurting for space.BTW, have you considered how this board would be mounted?

author: sparkydog
author_rank: Regular Contributor
timestamp: January 15, 2024, 11:06:12 pm
content: BTW, why are U2, J1 and J2 on the back of the board? Why is J8 a female header when J6 is male? Your model/footprint also seems wrong for U2; is that supposed to be a horizontally-mounted TO-126? (Is that what the User.1 rectangle is supposed to represent?)I was going to say something about using standard footprints/models, but... huh, seems SN74HCT125N (IC1) reallyislonger (19.3mm vs 17.9mm) than a standard DIP-14...

author: Babbsdrebbler
author_rank: Newbie
timestamp: January 16, 2024, 03:25:44 pm
content: Hey sparky, thanks for taking the time to look at the mess I created.* J1/J2 were on the back for no real reason, they are now on the front and are 2 pin now* J6/8 footprints don't matter, they are intended to be used if I want to connect something in the future, I've cleaned them up nevertheless* U2 is supposed to be on the back and will be mounted via 90 degree pins so it's parallel to the PCBU2 is the buck converter which I'll source from AliExpress since I've read in this forum that it doesn't make sense to create your own buck designs if you don't have the knowledge/experience.As such there's no footprint until I make one but I didn't deem it necessary since I can reserve some space for it via the custom rectangle and the connection is via standard pin headers.* I've moved everything but U2 to the front* Re-wired everything* I've fixed the jumper connectionsI've attached the current state and will do some more research into higher current PCB connections before I change J1, J2 & J7 again.

author: Ian.M
author_rank: Super Contributor
timestamp: January 16, 2024, 03:48:11 pm
content: Rotate your original four pin J1, J2 90 degrees so their power pins line up and are at the end next to the board edge and you can use shorter wider tracks on both sides of the board to link them for far higher current capability. However I would strongly recommend a fuse between power in and the LED strip connectors. Sparkydog is already sorting out the rest of your layout, and probably doing a better job than me . . .

author: MarkS
author_rank: Unknown
timestamp: January 16, 2024, 05:07:09 pm
content: Why are you not using a ground plane? Are you going to etch this yourself?

author: sparkydog
author_rank: Regular Contributor
timestamp: January 16, 2024, 05:21:17 pm
content: If you're moving the LED power off board (which IMHO isn't necessary), then upsizing J7 is probably not needed. 🙂Quote from: MarkS on January 16, 2024, 05:07:09 pmMark, I think that's partly my fault, i.e. the OP misunderstood my recommendation. Note that the original design is two-sided.Babbsdrebbler, unless you are etching this yourself, please,pleasereplace all your ground traces with a ground plane. The goal isn't to only use one side of the board,period(unless youareplanning on etching it yourself!), it's to use one side for power/signals so that the other side is all ground plane. If you're mounting stuff on the back anyway, I'd also flip JP1 back to the back so you can run all your signal traces on the back; that way they're easier to inspect when the board is populated.If you've got another board hanging off the back, then you could also get away with leaving J1/J2 on the back, which would give you even more space for a big J7. Or, if you're happy with them on the front, that's fine too. The recommendation to put them on the front was largely because most boards have almost nothing on the back and are usually expected to lie close to a solid surface. That's evidently not the case here, so the usual reasons to not put them on the back don't apply.Ian has a good point about fuses, though you'd have to sacrifice a lot of trace width or else make the board bigger to add fuses to both legs. Or put the fuses off-board. You might also want to fuse VCC-to-Buck, if your board doesn't already have its own fuse.Anyway, I'm attaching what I did for your perusal. Still has power on-board. Ground plane not shown for clarity's sake. I also made J8 male and changed U2 toConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Horizontal; same THT footprint (except the pin numbers are reversed), but the model is much closer to what you're actually using IIUC. Note that I routed this assuming you need fairly conservative clearances. If that's not the case, it would be much better e.g. if the ground plane could connect between pins, and being able to route traces between pins would permit some circuitous routing of the J2 data traces to allow you to route the 5V better and without the via.Oh, and... are you planning on this board just floating loose in space? Holding it by the edges?