KiCad 7 ESP32 PCB Design Full Tutorial - made by morten laboratories iot-thing
Вставка
- Опубліковано 24 лис 2024
- Complete step-by-step PCB design process going through the schematic, layout, and routing of a ESP32-based PCB including USB in the new KiCAD 7. All the way from schematic creation, through to four-layer PCB layout and routing, as well as sending it off for manufacture.
▶ Subscribe: / @made.by.morten.labora...
Click the Bell Icon to get notifications about my future videos!
Link to KiCad 7.0 files
github.com/mor...
github.com/mor...
▶Refererral link:
pcbway.com/g/i...
▶Order PCB or PCB+Assembly here: www.pcbway.com...
#iot #tutorial #kicad
This is great, seeing every step unedited helps catching the small steps which are often missing in other tutorials
@@VeniceInventors thank you for the kind words
I cannot stress enough how good this tutorial is !!! Thanks a lot.
Thank you for the kind words, i really appreciate them a lot
@@made.by.morten.laboratories Can we get a tutorial on how to route this PCB? :(
@@udlabs5711 Good idea, I will look into this topic
@@made.by.morten.laboratories it would be invaluable since this is a 4 layer design. I doubt that there is any video on UA-cam which can go into such detail with KiCAD.
Many thanks!
@udlabs5711 Good idea, thanks for input
Thanks for sharing. There is a great feature called "Fillet line" you can use on your edge cut so you don't need to spend so much time getting smooth PCB corners manually. Select more than one edge cut line and right click and you find it. It even more useful if you don't have rectangular board to start with.
Thank you very much for that, i just tried it in KiCad 8, thats is really nice
This is so good! would be great to see more board designs in full like this!! can learn a lot from it
I am very happy you like, much more are in the pipeline
Very nice video, thanks.
It would have been nice, if you have told a little about why, the DTR/RTS transistor setup, the multitude of capacitors.
That would have made the video even better :)
Thank you for comment and feedback your response is really inspiring
Thanks, I learned how to align texts. 🙂I would advice you:
To align parts/footprints : display a smaller grid and set cursor to "Display full-windows crosshair"
at the end of routing: Use tools > cleanup track,vias
DRC: Exclude "normal" warnings to visualize abnormal warns and errs.
Create Gerber files in a dedicated sub-directory for the manufacturer.
Thank you for advice, i am glad you learned a few things 😀
It is really worth watching tutorial please make more videos on such boards ❤️
@@ammarece Thank you very much for the kind words, new projects are in the pipeline ...
great video learned alot... Only thing missing is how do you chose the values of the caps and resistors? Also with the RGB led why didnt you use an addressable led as it would have given you back 2 additional pins?
Thank you, i am glad you like the content and find it useful :-) I find the values in the datashetts and i made serveral designs so i know most of them by heart. I have a bootloader that does not support addressable LEDs and i need to control the LEDs from the bootloader.
thank you very much
searched for such a video for a while
I am glad you found it and enjoy the content!
when you start a project, first show the schematic and say: let's draw it. You did the opposite. you have something in mind and we just follow blindly.
Please check the description for the video
No, I like the way he is teaching, very good in step by step of drawing, details. Good to learn. Thank you!
@duynguyen6229 Thank you for nice feedback
really amazing I am waiting your next discussion really thanks
Thank you 🙂
This is so good! 👍
@PCBWAY, thank your for the support 🙂
Massive thanks from our side 🥂! More pls@@made.by.morten.laboratories
I really enjoyed this and learned a lot. Thank you!
@MrDad247, i am really happy you enjoy the content
Amazing video! When I go to assign foot prints there were only a few pre-populated - i'm running a recent 8.0 version of kicad, is there a step I missed that helps it to automatically assign more of the footprints?
I can make a library with the footprints and upload to the git repository - let me know if you need it? 🙂
Wow, yeah that would be great@@made.by.morten.laboratories
@jakekalstad2494
Have a look here:
github.com/mortens-lab/iot-thing/tree/main/v11/iot-thing_Library_11.pretty
the video is really grateful for me to learn something which is more useful
thanks for the video
I am really glad you like the content 😀
@saiautomations12 , i have added a video with at test of the assembled board
Brilliant instructional video
I am very happy you like it 🙂
It seems a nice tutorial. I tried to follow it until I had a problem about 1h31m: I realized you changed all capacitor and resistor names when you went into "Edit Symbol Fields..." because they did not match your previos work in the schematic. None of the resistor names and values match the ones you made before in the video.
I dont recall that, i updated some of the fooprints which is quite normal before you start up the PCB layout - could you please share some further details about your problem?
Why did you label RxD TX and TxD RX (@34:48)? And swap them at the ESP32 (@1:10:58)? Great video, BTW!
@edgarmatzinger9742 Thank you for comment. It was a mistake, the pins are connected the right way and the design is working fine.
Thank you very nice tutorial. I have one question though. You initially wanted to have one interlayer as a ground plane and one power plane but at the end of the video you set them all to be a ground planes. Why is that?
Thank you for comment. I did some routing of power tracks in the power layer, the remaining area was filled with a copper pour connected to GND. Its not neccesary to have the whole area filled with +3.3V since the power consumption of the whole board is quite low.
@@made.by.morten.laboratories thanks for the explanation
Hello, thanks for this video.
Please I would like to know how you did to determine the footprint of the “Fuse” value?
@arnoldtachi7025 , the footprint is a Wuerth Fuseholder, do you need link?
@@made.by.morten.laboratories yes, i need this link. Please
@arnoldtachi7025 - www.we-online.com/en/components/products/FSH_THT_PCB_CLIP_COVER_69610X003002, the part number is 696105003002
You can also find it here : www.snapeda.com/parts/696105003002/Wurth%20Elektronik/view-part/?ref=search&t=696105003002
Thank you so much, i have a question, I understood the tutorial but i want to understand the logic of the design why are you using these capacitors why these resistors with these values and so on is there is a guide somewhere i can follow ?
Thank you for the nice response. You can normally find the resistor and capacitors values in the datasheets for the integerated circuits used in the design. Also its common practice to use a 100nF near the supply pins on the integrated circuits. The electrolytic capacitor is placed to take fast current demands from the LED strips, here 1000uF is common practice - i hope this can help you in your next projects.
Per the ESP32 documentation, you likely don't need the two transistors for the DTR/RTS. Just wire them direct.
@@EdHayes3 i will try and test it
absolutely amazing tutorial! thank you so much
Thank you so much, i am glad you liked it :-)
My man's is recording this tutorial at 4am
Yes its hard work 😀😀
@@made.by.morten.laboratories Currently in the process of going through the video. It's a long one, but it's been super helpful so far! Well done
You need some coffee my man. I had you on 2x and did not even notice :D
You can add them here : ko-fi.com/mortenslab 🙂
When you labeled the wires from the CP2104 TXD and RXD pins, you mentioned that they will be connected to the RXD and TXD pins, respectively, of the esp32, thus you labeled them RX and TX. Then, when you copied the two labeled lines and connected them to the esp32, you connected the line labeled TX to the esp32 RXD pin, and the line labeled RX to the esp32 TXD pin. Thus, you have: CP2104 TXD - line labeled RX - esp32 TXD, and CP2104 RXD - line labeled TX - esp32 RXD.
Is this correct? My understanding is that, typically, between components, TX goes to RX, and RX goes to TX.
Its not perfect, i works fine on my prototypes, i will try and improve this in the next video
@@made.by.morten.laboratories Not intended as criticism. I appreciate the work you have done here. I just wanted to check my understanding.
Hey bruv, nice work. Why did you not run the ERC, coz when I dis so I discovered that the no connect flag was really needed in the pins that were no wired up
Thank you. I think you can enable/disable that function for not used pins. I did run DRC, please check your settings for that feature :-)
Great job, thank your for this great tutorial.
You are very welcome, i am glad you liked it 🙂
I'm a newbie to PCB design and I was wondering how the traces was done since that part of the video was cut out
They were just routed to experience . You can find a lot of online calculators if you need to design for defined currents
Thank you very much!
You are welcome
I gotta say you did an amazing job with the video. I have already made a few version of your board in the video. Just wondering about the resistor ratings, what sort of specs should i be looking for.
Also what about the capacitors voltages, how do i determine that? Just trying to put a digikey order together. I'd really appreciate any help.
Thanks again for the awesome Video!
@zviper, you are very welcome, i am glad you liked it, please note that the transistor Q1 on the DTR pin must swap emitter and collector! I have built a few boards myself and they now work great. I will soon release a video with some demo code. About resistors this is just standard ones no special requirements for 1% or 5% or any voltage. For ceramic capacitors i normally go for 50V for low capacitance - smaller than 220nF. With larger ones please use atleast double voltage of the signal its connected to
@@made.by.morten.laboratories Thanks for the insights to picking the parts. I'm actually now just running into trouble finding the 1A poly fuse on digikey. Also the esp32 you chose doesn't seem to be available anymore, is there a alternative to that?
I would gladly become a patreon member for a digikey BOM :)
btw this was my first venture into pcb design. I'm hooked, every day i'm thinking of something i can make with my new found skill.
@@zviper I will be happy to help you out with a BOM, give 1-2 days to find the numbers, i will also be happy to have you as a patreon 🙂
@@made.by.morten.laboratories awesome even though i think i have all the right parts picked out ill def sub for a bit :D. Looks like i can get the esp32-E variant. (edit) Im the number 1 member
@zviper, thank you so much, you are now my first official Patreon supporter!! I have created a BOM with digikey partnumbers, You can find it on the github, the link to it is also in the video description - the filename is "iot_thing_BOM_Digikey.csv", i hope you find it usefull 🙂
thank you !
You are very welcome 🙂
Are the I2C pins correct? Aren't they supposed to be pin 33 and 36 respectively?
When using the ESP32 with Arduino IDE, the default I2C pins are GPIO 22 (SCL) and GPIO 21 (SDA) but you can configure your code to use any other pins.
Nice. Thank you!
You are welcome, i am glad you liked the content
Glad you don't mind. I'm learning how to design PCBs, rules and stuffs like that. Thanks again.
Hi, please I would like to know how you go about downloading your 3D models of components not available on KiCAD
@haroldchouansi7257, Wuerth Elektronik have very good models, else try SnapEDA, GrabCAD, 3Dcentral, Digikey - just to name a few. Let me know if you look for something specific
Alright so you should note on title that this is just a layout/footprint tutorial since you intend to give them schematic to start layout anyway.
I am not 100% sure on what you mean?
Would you be able to assemble at home? Because the offer i got from pcbway with assembly was quite expensive.
Very good tutorial btw
Yes, i and have some extra boards, please send me your contact details
I have made som changes to the design as i need some different sensors and don't need the LEDs.
So i thought I would buy the PCB at pcbway and then assemble it myself at home, but I'm not sure if that's plausible
Thank you
@@philipskov6859 I can assemble - please get in touch with me before you order from PCBWAY
@@made.by.morten.laboratories Thank you, how can i contact you?
@@philipskov9851 send mail to yt.made.by.morten(at)gmail.com
Hello sir, I downloaded the files. But when i try showing the pcb in 3d model on my computer, the 3d models of the fuse and capacitor are abscent. I added the library pretty in the folder, i tried using the same method as you. But i did not manage to show the fuse, neither the same 3d file name. Can i get the files somewhere of the 3d models you had ? Thank you for your time.
You can find fuse F2 here under download, i use the step file
www.we-online.com/en/components/products/FSH_THT_PCB_CLIP_COVER_69610X003002%20696105003002
Here is C16
www.we-online.com/en/components/products/WCAP-ATG8#/articles/WCAP_ATG8_SIZE_10
860010475017
Wurth are very good with 3D models
I hope you can find the parts
@@made.by.morten.laboratories Thank you for you reply. But the link does not work. It gives mes page not found.
www.we-online.com/en/components/products/FSH_THT_PCB_CLIP_COVER_69610X003002
Nice video, thanks :)
Thanks, You are very welcome :-)
How did you calculate the trace width, cause I'm seeing that some are bigger than others
You and find a lot of online calculators that can help you on this topic
Nice design, did you order the PCB? Is the design tested? As I'll be using esp usb part as a reference for my design
Thank you, the board has been tested, i will hopefully soon upload video with hardware testing results.
@@made.by.morten.laboratories
Great, I would love to see the hardware... Thanks
I will work on that 🙂
@sultan7679, there is now a new video showing the tests af the assembled boards
Great @@made.by.morten.laboratories
👍
why do you always connect new capacitor to the 5V or 3.3v with each connector or module ?
isn't that going to affect the cumulative capacitance of them all I mean it's like putting like 10 capacitors in parallel.
and Also why do you use 22R on RX and TX ?
You have to decouple each IC close to the powersupply pins. Different capacitor values will be effictive at different frequencies and you are right they all add up. The 22R resistors is just to protect the ESP32 pins from short circuits.
@@made.by.morten.laboratories thanks you very match that was helpful ❤❤❤❤
@@musictitles3235 You are very welcome
Re: UMH3N at ~37:00... DTR -> Base (Q1B) & Emitter (Q1A)... RTS -> Base (Q1A) & Collector (Q1B)? This is not as per esp32 devkitc_v4-sch? RTS should go to the emitter of Q1B...? Also, these are normally 10kΩ resistors, however UMH3N has only 4.7kΩ...?
You are correct, this was changed in version 1.1
I want to know sir, can this circuit design able to convert to ESP 32 CAM?
This design is not intended for interfacing to a camera, i think its cheaper ans eaiser to buy one of the exising modules with camera mounted - thank you for comment :-)
Hey, nice Tut. But, why are you know witch one connects to others? I ame a hobbyist and no Electronics-wonder. Where are the "standarts" for such a circuit? P$: i ame german speaking....
You can find some reference schematics on Espressifs homepage, look for DEVKITC, or else its just like building with Lego, there are many ways to get electronics working
I am not able to get the footprint that you have used for the fuse , i guess u got a custom footprint,so what shall I do now ?
Have a look here:
github.com/mortens-lab/iot-thing/tree/main/v11/iot-thing_Library_11.pretty
FUSE_696105003002.kicad_mod
Its a Wurth partnumber, you can find 3D model and more here:
www.we-online.com/en/components/products/FSH_THT_PCB_CLIP_COVER_69610X003002
@@made.by.morten.laboratories thanks i will check it out 👍
@@SparkUpLife21 You are very welcome
I like it :)
Thank you, i am glad to hear that :-)
Hello. You have incorrectly connected the transistor to the DTR signal. It needs to be turned over
Yes i found this issue too, i am working on updated file, thank you for checking, after the transistor pins was swapped the upload from Arduino IDE worked. A was lucky that RX and TX was not swapped :-)
I will soon post a video about the finished board
@@made.by.morten.laboratories Ok. I'll be waiting, it's very interesting 👍
@user-qt1oe6sl5p - i have updated the github repo with v1.1
@user-q1oe6sl5p. there is now a new video showing the tests af the assembled boards
Hejsa - gætter på, at du er dansker.
Anyhoo, et par forslag:
1. Tilføj drill/layer origin og brug det ved Gerber generering (eksta bonus er, at så kan du også fræse printet på fx. en billig CNC3018)
2. Tilføj et folder navn, før du genererer Gerber: så ender de i en underfolder og holder dit projekt rent.
Fed video.
Hygge,
HB
@hagalazmultiverze3411, yes dansker :-) Tak for de konstruktive forslag der er hermed implementeret i de fremtidige projekter.
@@made.by.morten.laboratories Var så lidt :-)
Cool projekter 🙂
I couldn't find this element in the library. How can I find it? It gives an error. fuse 2
You can find the footprint here : www.snapeda.com/parts/696105003002/Wurth%20Elektronik/view-part/
@@made.by.morten.laboratories Can you link the finished file of the project? I couldn't find it on github
@@zupezco I have updated the git repo with the latest version v11. I have added all footprints there as well - here is link github.com/mortens-lab/iot-thing/tree/main/v11 - i hope you find it useful
Hello, the F2 Fuse footprint part is not in my library, as far as I can see, you created it yourself, but I could not find that part on the internet. Where can I find?
If you can find the "Fuse" library the look for the "Fuse_1206_3216Metric" footprint
@@made.by.morten.laboratories
thank you, i fixed everything later
@@theoguz8922 Great 🙂
@theoguz8922 I have uploaded footprints here : github.com/mortens-lab/iot-thing/tree/main/v11
Some of the issues you addressed in this video are resolved in version 8. Please redo this video with the new version.
Yes, i have some new projects in the pipeline
Why do we use a converter? Sir, please explain in detail.
Please elaborate on this one?
*logic converter@@made.by.morten.laboratories
@bakicandar4607, normally the LED strips 5V logic so their logic high threshold is higher than the 3.3V volt from the ESP32 GPIO pin. Using the converter, we now have 5V logic signal.
thx@@made.by.morten.laboratories
What is the footprint of f2 fuse ?
Hi @syedhussainbi4010
www.we-online.com/en/components/products/FSH_THT_PCB_CLIP_COVER_69610X003002, the part number is 696105003002
You can also find it here : www.snapeda.com/parts/696105003002/Wurth%20Elektronik/view-part/?ref=search&t=696105003002
what about esp32-s3 wroom 2 variant?
Yes i am also working on these modules, they have more GPIO and better BLE
definitely you should take a look.@@made.by.morten.laboratories
Can i publish a version based on yours on LinkedIn plataform, as a learning experience, making reference to you of course ?
Yes of course, please send me link as well :-)
@@made.by.morten.laboratories Nice. Thank you very much.
@gean7917, did you manage to publish the content on Linkedin?
@@made.by.morten.laboratories not yet.
Usefull,thx
You are very welcome 😀
Can i got configuration setting morten? Thanks
@@jehudagintings2621 sorry what do you need?
@@made.by.morten.laboratories sorry, I mean is the library sir..
@@jehudagintings2621 Have a look on my github repo, there is link in the video description
@@made.by.morten.laboratories thanks a lot sir 🙌
Thanks!
Hi Christian, thank you very much for your support, i hope you will enjoy the next content on the channel too
@@made.by.morten.laboratories Thanks for this tutorial. The slow pace and the complete a to z guide is helping me make my first PCB.
@@made.by.morten.laboratories Would it be possible to hire you to give some feedback on my first PCB design?
@@christianreinholdt3700 Please write me you email and will get in touch
@@made.by.morten.laboratories It seems like im not able to post a comment with my email address in it?
nebi hocaya selamlar uludag uni
Greetings, i hope you found the video useful
Hy can you share me the datasheet of this
1) ESP32-WROOM with builtin 16 MB FLASH
2) SI7021-21 Silabs temperature and humidity sensor
3) CP2104 Silabs USB to serial UART interface for ESP32 programming and debug port
4) QWIIC connector - interface for a lot of other I2C based modules
5) RGB LED and button
6) Relay that can handle up to 16A
7) USB-C interface for communication and power
8) 4 LED Strips can be connected via screwterminals, port is levelshifted, onboard fuse
9) Size is 80x80mm
What is SW1 doing is it some kind of Enable, Reset button
SW1 will be used for factory reset of the device. When pressed for 10 sec the ESP32 will delete WiFi credientals and cloud connectivity. The Switch is just connected to a GPIO pin. This will part of the Arduino code - i will release a video of this later if interested
@@made.by.morten.laboratories Okay understand. So the button is just a user programmable button. I thought it has something to do with Enable or Reset buttons that all development boards have. Why do you not have such buttons in your design ?
@@zeKite This can be done from the USB interface during development of the code.
@zeKite, there is now a new video showing the tests af the assembled boards
1:32:41 what is the footprint for C 22u
These are 0805 in size
@@made.by.morten.laboratories thanks
It would appear your link to pcbway has an error
@scottbarber2441 - thank you very much for pointing this out, the link is now updated :-)
what is 3.3VA used for ? instead of 3.3V
This is a local power net for the CP2104 USB-UART interface IC. You can draw up to 100mA out of the CP2104 and this is not enough to power the whole board.
Did you ever put power flags? I didnt see in the video. In my case KiCad always wants power flags to proceed.
OK, is that a part of your design rule check ?
KiCad Stable Release
Current Version: 8.0.2
Yes, thank you for info
I just found out the usb-c connector wasn't put in my cart. It looks like a wrong digikey part number. This is the closest match i could find 2073-USB4105-GF-ACT-ND or this one with less pins and cheaper 2073-USB4125-GF-ACT-ND
Maybe this can help : forum.digikey.com/t/alternative-for-type-c-31-m-12-from-korean-hroparts-elec/30155
1 is in 1000 piece order only and the other is $2. and the part# i posted is 80 cents. What gives i don't get the large price difference, my part# is good for 20k cycle while the other is rated for 10k cycle. both seem to have gold plating.
@@zviper I got the USB-C connector from LCSC, do you know that company?
I have not, but from what my pea brain can see there is very little difference. My pick looks to have alignment pins on the bottom. Obviously ill have to change my footprint and symbol for it
@@zviper OK, i am sure you are able to do it 🙂
I had a nightmare, that i had forgot to order a component. It came true. Absolutely horrible!
Ohh no, which one?
@@made.by.morten.laboratories It was for my other board im making. must have deleted it when getting rid of some duplicate item. Btw the BOM does have some duplicates. There shipping is brutal too, i added so much so i could get free shipping lol and now i still have to pay shipping :( ahh
Yes i know how it is, i don't like to pay for shipping either
@@made.by.morten.laboratories Just got my hoard of parts. Oh my are they tiny and lots of them... do you have a storage suggestions for so many small parts?
Turns out my eyes are better in CAD, the parts in person look like a poppy seed 😂.
I guess i need a microscope now :(
@@zviper yes i cant work on this without a microscope 🙂 I have some plastic boxes marked with - SMD capacitors / SMD resistors / SMD ICs and likewise. I keep the parts in the bags - normally i order from Mouser or Digikey and the you have the exact type numbers on the parts because of the label.