Beginner PCB Design help - LM2596 buck converter - Page 1
Forum section: electronics / beginners

author: electrocheif
author_rank: Newbie
timestamp: October 23, 2024, 03:39:38 pm
content: Beginner PCB Design help - LM2596 buck converterHi,I've been trying to teach myself basic PCB design so that I can make myself a little Raspberry Pi hat to flash some lights. After spending the weekend burning protoboard I decided it would be easier and better to just dive in to PCB design. I don't have an electronics or maths background but I've watched a lot of youtube and have learnt the basics of Kicad after work this week.So far I made a little LED through-hole board which has a good chance of working on first attempt but I wanted something a little more challenging before returning to my original problem. I have some LED Christmas lights that take 2x AA batteries and I had already looked at buying a USB buck convertor to step down 5v to 3.3v for these off Aliexpress but I decided to build my own for practice instead.I was hoping someone on this forum could tell me if my learning/design process is on the right lines and ideally have a quick look at the PCB I designed and tear it to shreds - that's how you learn right.What I've tried so far:Random youtube videos on KicadStay up late tooling round and building that Raspberry Pi hat. I created a PCB that I'm 99% sure would not work at all as some pins marked 3.3V on the schematic were somehow all 5V in PCB designer. Pretty sure I shorted something. Give up and go back to basicsDesign a little LED circuit. Looks good, I'm going to make thisSpend focussed time learning about Kicad on youtube. The best vids I found were from "PCB Cupid"Get a good explanation of what a buck converter isso I know what I'm buildingLots of googling for buck converter circuits. Found one that looked easy but also nothing like what Louis explained. That's because it was just a voltage regulator and I would have built the wrong circuit if I hadn't done some researchFound the TI LM2596 SIMPLE SWITCHER referenced in a few places and decided to use this. Read the datasheet and tried to build the circuit listed under "Typical Application". This is for 5v though, not 3.3v. According to Chat GPT I can just change the IC to the 3.3v version and leave the inductor and capacitors at the same value. Find missing components on snapeda and import into KicadDesign a schematic and add USB-C power connector with the CC pins grounded through 5.1K resistors. Electrical Rules Check passingI want to have this board fully assembled with SMD components by JLPCB but the diode and coil parts from datasheet are not in stock onhttps://jlcpcb.com/parts/all-electronic-componentsso I spent more time looking at specs that I barely understand and then asking Chat GPT if my substitution is OKBuild PCB from schematic, not fully happy with itDo some research on PCB design, Read Dave's book:https://www.scs.stanford.edu/~zyedidia/docs/pcb/pcb_tutorial.pdf,watch some EEVBLOG vidsDelete PCB and start again. Try to layout components like the datasheet says, add big traces and copper fill areas. Design Rules Check passingI've learnt a lot in this process. My overall goal is just to be able to make simple PCBs for Raspberry Pi or other simple circuits for fun, in the future. I'm not planning on changing careers or building really complicated things.So on to my questions:Components OK?* 33uH inductor AIAP-02-330K* Input capacitor 680uF EEE-FK1J681AM* Output capacitor 220uF TPSE227M016R0100* Diode 30V 3A SS33 (THT - could not find an in-stock SMD one)Apart from the USB connector, I only built what was in the datasheet. Is anything else required?All good for intended application?: Connect to old phone charger and hook up a small LED string and possibly any other random low power 3.3V DC needs in the futureWhat are the chances of my PCB design working?I haven't had anything made yet so just asking for any suggestions before I see if this blows up.Thanks for reading all this!Cheers,Geoff

author: electrocheif
author_rank: Newbie
timestamp: October 24, 2024, 09:34:59 am
content: Kicad project files:https://github.com/GeoffWilliams/usb_buck_converter

author: mareks
author_rank: Newbie
timestamp: October 25, 2024, 12:25:18 pm
content: Hi!A few notes:If you are using copper zones to connect nets, then you don't need to route separate traces inside the zone itself (for example, the +5V zone). You can draw the zone in a way that you don't need traces connecting the pad of a component to the zone.The GND pad of C1 is also very close to the trace/zone, so it's a good idea to move it a bit further. Capacitors in general should be as close to the IC pads as possible.The same goes for the +3V3 trace being very close to the GND pad of U1.You seem to be missing GND vias that connect the top and bottom layers of the board. That can help with the GND signal return path.

author: electrocheif
author_rank: Newbie
timestamp: October 25, 2024, 01:47:39 pm
content: This is really helpful thanks Mareks.I've updated the project files in git with your suggestions. Does this look better? For the 3.3V trace not really sure how to route it better. Should it be snaking left and round like the green route I drew or maybe make thinner traces?

author: mareks
author_rank: Newbie
timestamp: October 25, 2024, 03:07:36 pm
content: I tried to rearrange the layout to something closer to what I would do