KiCad 7 STM32 Bluetooth Hardware Design (1/2 Schematic) - Phil's Lab
ฝัง
- เผยแพร่เมื่อ 20 พ.ค. 2024
- Step-by-step schematic and PCB design tutorial for STM32WB-based hardware (USB, RF, power) in KiCad 7. (Part 1 of 2 / Part 2: • KiCad 7 STM32 Bluetoot... ) PCBs by PCBWay www.pcbway.com
[SUPPORT]
Hardware design courses: phils-lab-shop.fedevel.education
Course content: www.phils-lab.net/courses
Patreon: / phils94
Tag-Connect: www.tag-connect.com/solutions...
[GIT]
www.github.com/pms67
[SOCIAL]
Instagram: / philslabyt
[LINKS]
KiCad 7: www.kicad.org/
STM32CubeIDE: www.st.com/en/development-too...
MCU Datasheet: www.st.com/resource/en/datash...
AN5165: www.st.com/resource/en/applic...
AN2867: www.st.com/resource/en/applic...
Hardware Design Playlist: • Hardware Design
[TIMESTAMPS]
00:00 Introduction
01:04 PCBWay
01:43 Pre-Requisites/Overview
04:24 Courses
05:01 Project Creation
05:31 Schematic Editor Basics
09:08 Adding Microcontroller (MCU)
14:11 STM32CubeIDE
19:13 MCU Power and Decoupling
31:35 MCU SMPS
36:51 MCU HSE & LSE Crystals
46:15 RF Section
50:36 Schematic Symbol Creation
55:41 Footprint Creation
01:06:58 RF Section Continued
01:09:17 Programming Interface (SWD/BOOT0)
01:23:34 USB
01:33:01 Power (LDO Regulator)
01:39:27 Adding Peripherals (UART, LED)
01:45:39 Cleaning Up Schematic
01:50:53 Annotation
01:52:46 Electrical Rules Check (ERC)
01:54:30 Assigning Footprints
02:03:22 Adding Component Information
02:06:02 Net Classes
02:07:24 Part 2 (Next Video - PCB Design) - วิทยาศาสตร์และเทคโนโลยี
Thanks a lot for watching - if you like the video, please leave a like and a comment - this really helps me out! Part 2: th-cam.com/video/PlXd3lLZ4vc/w-d-xo.html :)
A note on impedance matching: The RF matching network changes depends on the package of STM32WB you use (as the impedance at the RF1 pin depends on package, see application note). You can also use an integrated part by ST (e.g. for this package, MLPF-WB55-01E3) that does this for you. You will probably have to tune the final impedance matching network in any case on the real PCB. Finally, if you have an antenna that isn't matched to 50 Ohms, you will require an additional matching network (again, see application note).
Thank you for such a great video. It's helps beginners like me who can't afford buying courses. Again, THANK YOU SO MUCH BRO :)
Thank you, you are very welcome! :)
MLPF-WB55-01E3 does this give better performance that a LC impedance matching circuit ?
one more doubt , what is the final impedance matching that we need to do on real PCB , can you please give me some pointers
❤
This is type of content that makes YT (still) valuable. Among tons of BS stuff, videos like this are as rare as gold and valuable as gold at the same time. TOP MATERIAL, HAT OFF!!
Thank you very much!
Thank you for continuing to put out updated KiCAD content, even though you usually use Altium these days. Not all of us can afford (or can justify the cost of) an Altium license (or qualify for their student license.) In my case, not only can I not afford it, but even if I could, I couldn't really justify the expense, since electronics is a hobby for me rather than my livelihood. Your videos are always excellent, very informative, well edited, and to the point, without needless frills that distract from the message that are so common on YT these days.
Also, if I may, would you please consider putting out a video comparing/contrasting Altium to KiCAD, specifically what situations/types of designs where moving to Altium would be a better choice. I vaguely recall you mentioning things here and there in videos past, but my memory is fuzzy, and it would be nice if you could elaborate on these differences all in one place.
Thank you for your kind comment! Regarding making a video comparing Altium and KiCad, I'll add that to the list of videos I want to make. Thank you :)
I benefited so much from your first KiCAD stm32 PCB design video, and this is a great work again 👍
I'm very glad to hear that, thank you. Hopefully this one is useful as well!
this content is so awesome!! Thank you so much.@@PhilsLab
Okay, this is definitely the best tutorial out there to design your first STM32 based PCB using KiCAD. Everything important is covered in detail plus some useful tips and suggestions. You could literally design your board form zero knowledge to working board following this.
Thanks so much for this valuable resource!
Thank you very much, Martin! I tried to squeeze in the fundamental KiCad workflow/commands one may need for most designs, hopefully this'll be a useful resource.
I'm really thankful that you've created this tutorial with KiCAD. I've learned a lot from your tutorials using Altium Designer, but KiCAD is the tool I use, and I was afraid you had abandoned it. Thank you.
Still watching, but I want to mention that it looks like this video can literally serve as a companion while designing. Excellent work.
That's great, glad to hear the video still holds up! :)
amazing work
im a software engineer by trade and i do electronics on the side.
this is exactly the type of content i look for .i love the extra explanations your throwing on each decision you take ,its exactly what i want to hear instead of someone speed working and finishing the design in the standard youtube from idea to pcb in 20 min format.
also keep the low power Bluetooth device content coming, my pebble smartwatch broke after 6 years and i want to make a new one .the mobile app is easy for me ,this right here is what im missing !
again amazing.
Thank you very much! I'm glad to hear that the level of detail is about right on this video - I'm always a bit unsure how much to add vs how long the video end sup being.
Thank you so much for the videos you make on altium and kicad. It's been really helpful and has really helped me with learning more about proper PCB design, as well as cool tricks I didn't know Kicad or altium could do.
Terrific video plus I learned a few more handy skills in Kicad. Eager to see part 2. Thanks Phil.
Thank you so much! Part 2 coming soon :)
Great video Phil, not only covers how to use the tool (KiCAD) but many of the design features and practices behind them. Well done.
Part 2 please!!
Great job as always phil !
Coming soon! Thank you!
For people who needs to use that MC as a controller for a BT audio and an advanced peripherals, I'd like to let you know an optimal pin layout:
PA0, PA3, PA8-PA-10 go to SAI1 ch A (no SAI-PDM)
PA1, PB8, PB9 go to I2C1
PA7, PB2, PB4 go to I2C3
PA4-PA6 go to SPI1
PA11, PA12 got to OTG USB
PB9 can go to IR_OUT
PA13, PA14, PB2 go to SWD
and PA2, PA15, PB0, PB1, PB8 go to GPIO
.. I spent an hour yesterday for that puzzle )
I love it, i usually watch your videos several times, this one have a LOT of info. Thank you very much!
Thank you very much, hope the videos deliver! :)
This is awesome, I just started PCB design with phils lab and now i work as an electrical engineer!
Phil, you are the man for keeping the kicad design series alive alongside the equally excellent altium design videos. Thank you tremendously!
Thank you so much, you're very welcome!
I really appreciate all the work you put into your videos, your hard work shows every time. They are always through, concise, easy to follow, and no fluff. Thanks for keeping it simple, and making it useful! Looking forward to part 2! Stoked you did this one in KiCad btw; it fits my budget and is more realistic to my workflow :)
Thank you very much for your kind words! Glad you say that there is 'no fluff', as I was a bit worried, as this video (+ the second part) are considerably longer than any other video I've done for the channel.
Thanks a lot. Yet another superb video. Exactly the right level of detail for my taste - spot on! Looking forward to part 2.
Thank you very much, Niels - glad to hear the level of detail is right!
Very useful video, thanks Phil! A quick tip regarding when you are calculating the coordinates for the pad placement, you can enter the calculations inside the Position X/Y in the Footprint Editor.
Thank you very much for all that you do Phil. Your videos have been such an invaluable resource for helping me understand electronics. I hope you realize how appreciated your efforts are.
Thank you very much for your kind comment, Paul!
As you asked : I am going to follow that video step by step, produce the board and play with it. Thanks man, it is way better to watch your video than tv's crap
Excellent video and a great service to the community. Thank you.
Thank you, John!
Thank you so much Phil. These videos make board design more accessible than I could possibly have dreamed.
Thank you, Harry - glad to hear the videos are having the desired effect! :)
This is like an early christmas gift. Thank you! I wish you a healthy and great time with your family my friend!
Thank you very much! All the best for you and your family as well, happy holidays :)
Thank you Phil, this is a good exercise for me this holiday
Awesome, thanks for watching! :)
As a graduate electronic engineer, I have an interest in the hardware side but couldn't find a job due to a lack of experience. However, your videos motivate me to get on my feet and continue trying. Many thanks.
Wishing you all the best for your job search! What helped me the most is having real, physical projects to show (and also to send along with my application as attachments).
Bring a completed PCB that works, and you've got a job.
Thank you Phil, your guides are so good.
Thank you very much!
Every time I watch one of your videos, I am simply in awe of the quality of the information and of the delivery.
Thank you very much for your kind words!
Thanks you very much Phil for all the content you create and post, i´ve learn a lot with them and have design and manufacture PCBs successfully thanks to your insights and teching!! thanks again!!
Thank you for your support, Giovanni - great to hear that the content has been helpful!
You’re doing a great service by making these STM32 videos. I often use them as a sanity check. Please keep up the awesome work.
Thank you very much!
Your videos are special Phil ❤
Thank you very much, Mohamed!
This is so helpful to a beginner like me to understand how all the pieces are put together. Can't wait for part 2 to see the thought process for placing and routing on the PCB.
Very glad to hear that, thank you! Hopefully part 2 is useful as well :)
Thanks sooo much for all your very resourceful videos. I've learnt a lot from them. God bless you Phil.
Thank you so much for your kind comment - I'm glad to hear that the videos have been helpful! :)
I really appreciate the little details like explaining why there are capacitors on the power pins 👍 thank you
Thank you, glad to hear that! :)
Thanks a lot Phil ! Amazing as always
Thank you, Omar!
Thanks a lot for your interesting tutorials. I bought your courses and I am learning pcb design techniques very easily
Thank you very much for your support
Absolutely stunning, awesome stuff. Love your content and the way you present it, highly valuable for all of us, Thank You very much indeed, love and respect.
Thank you very much for your kind words!
Invaluable content, thank you!
Thank you!
To be honest i'm a bit thick when it comes to schematics and pcb design, but i was able to follow this video with ease, and most importantly i was able to understand what i was doing and why, that is a testament to the way you present the information, and explain it, so thank you so much for taking the time and effort to produce this, and all of your videos. :)
Hey thanks for the kicad tutorials , most learners cant afford altium thank you so much
Thank you, Amitesh - you're very welcome!
This is worth pure gold. Best quality yt video about mcu that I found ever
Thanks a lot, Sebastian - glad you think so!
Thanks Phils each and every videos are helpful.
Thank you very much!
Love your videos! Thanks for taking the time to make them.
Thanks for watching, Jayson!
Thank you very much for this goldmine of knowledge.
Thanks for watching!
I generally use labels connected to the chip and do all of the power stuff in separate little block on schematic. It keeps the area near MCU free for actual schematic
Great Video Phil! Nice Job! ☺
Thank you! :)
Brilliant. Just brilliant. In this video you share so many "gotchas". And I love the breadth of the design you cover, including searching for an LDO that is in spec but also included in the KiCAD library - just what I do each time, to avoid more work :) I still learned a lot, so thank you.
Thank you very much, Mike! Glad to hear that the level of detail is about right!
Thanks very much for the tutorial. I've recently started working on a zigbee thermostat using the same uC you're using in this tutorial. I had no experience with RF and this video and you're review on the reflow station helped me a lot on troubleshooting my design. Keep up the good work :)
Thanks, Alex - glad this is helpful!
Absolute first class as always, Phil 💪🏻
Thank you very much!
Thank you for making this. I recently picked KiCad back up and was reviewing some tutorials on here but the features and interface have changed so much in the last 2-3 years.
Thanks for watching, Rob!
Yes, it is great to see more microcontroller design content and I personally like the occasional Kicad-based video.
Thank you, Isaac!
I like your kicad vids very much i made my first pcb thanks to your old tutorials.
Thank you, glad to hear the tutorials helped!
This would have been so helpful last year when i did a custom pcb with stm32wb15 for my master thesis, especially the firmware part. i still used your general stm32 design videos, could not have done it without you. thanks phil!
Thank you! Shame the video came a bit late, but I still hope it's useful - and hope everything went well with your master's thesis :)
yes its done now, the actual hard part of the tesis was documentig everything ;)
Well done for the efforts and patience doing all these long videos!! With Christmas time around the corner, i thought that i won’t have anything to watch, but surely your videos will keep me busy for the weekend.
Thank you! Glad to hear this will give you something to watch - next part is coming out very soon as well :)
Love the full length videos!
Thanks a lot, Nick!
Informative and fascinating! Thank you.
Thank you, glad to hear that!
Excellent tutorial. I am about to do a LoRA circuit and this is a great refresher on the basics.
Thank you very much, Patrick!
Thanks for your work Phil's, I will share the link on my wechat to more people who's interested in pcb design.
Thank you so much for sharing!
I love your channel , so informative
Thank you!
I wish I had this tutorial 6 years ago when I had to design one of these at my former job. Thank you for your detailed video!
Thank you!
Thank you. There aren't many people like you.
That's very kind, thank you!
These videos are really helpful, thanks a lot!
Thank you, Michal - I'm glad to hear that!
you are really a professional -thx
Thank you, Harald!
*Bookmarked for later. This is almost exactly what I need for my current project, and I'll have time to watch the entire thing and follow along.
Glad to hear that - thanks, Jim!
Thanks for the timestamps!
You're very welcome - let me know if they're 'granular' enough!
many thanks for this knowledge!
Thanks for watching!
One of the tricky things with RF design is that those matching component values also depend on the PCB design and stack-up. The capacitance between pad area and GND plane can easily form a capacitor in sizes of hundreds of femtoF to some pF. A design I did recently on Eurocircuits with its DEFINED IMPEDANCE pool showed me this same problem: I calculated a 0.9pF capacitor for a Pi impedance matching filter at "only" 434MHz. I ended up redesigning the PI filter while incorporating 1.75pF impedance from PCB tracks and 2 SMT pads (!).
The DEFINED IMPEDANCE pool is nice, since the dielectric constants of core materials is well defined, along with using thin materials between outer and inner layers. Thus 50Ohm tracks are thin and well defined. But it also adds a lot of parasitic capacitance on the PCB. 0.3pF could be the "just" amount of extra(!) capacitance they needed on their PCB design with their layer stackup (which is presumably unknown). But on a "proper" RF stackup, it may very well be different..
Realisitically, the safest thing is to keep those parts TBD at design time, and then tune them with layout solutions in tools such as ADS, or better on the real boards with VNA equipment. But these options are not cheap or trivial to do neither. It requires some extra reading into this stuff.
So I recognize why you tried to gloss over these complications and just recommended copying those devboard values as initial design values. (Good job)
Yes, that's exactly right. As per my pinned comment, the values need to be tuned on the actual physical PCB itself, as you also said. Those 0p8 and 0p3 values are tiny and definitely can be near pad/stray capacitances. Due to time I have to gloss over quite a few topics unfortunately, but at least those values serve as placeholders/a starting point. A future video will be dedicated to matching and tuning on a "real-world" PCB :)
Thank you so much for another awesome video. I learned so much from your videos. 👍
Thank you, Stefan!
Another incredible video with a wealth of information, thank you! Do you plan to have any videos covering your process for integrating a chip antenna instead of the u.FL connector? You have a couple videos covering designs with RF signals and some of them even feature a board with a chip antenna in the b-roll, but the walkthrough includes the connector. I also watched one of your design reviews for someone who integrated a BLE chip antenna and you mentioned some guidelines to follow with respect to skirting vias which I hadn't considered in my own design. I have looked through datasheets for these antennas and a lot of times they are sparse, so if there are any additional things to consider that would be awesome to see (noting that this is probably a complex topic).
Great job, thank you.
Thank you too!
Like others have stated in the comments, the videos you produce are excellent educational resources. It’s your channel and a few more like it, that are all that keeps TH-cam relevant. Without your level of quality, YT would just be the 21st century equivalent of a “Global Funniest Home Videos “ show.
Thanks for all the great material.
Thank you very much for your kind words!
Phil. keep it up. I wish you go 1M subs soon.
Thank you!
Amazing!!! Thank you
Thanks, Alex!
Awesome, I also have benefited from your videos so much thank you
Thank you for watching! Glad to hear that the videos have been helpful.
This is very good. Thank you.
Thank you too!
1:36:00 For PCBs that will be working over a battery, we should also consider minimum Quiescent Current to give max battery life. For example, LM7805 has a quiescent Current of 5-10mA (this is when the circuit is not consuming power, i.e., sleep mode) which is huge!!! A good LDO will have a quiescent Current in uA or nA.
That's right. The MIC5365 used in this design is also pretty decent at around 32uA.
Thank you very much phil
Thanks for watching, Mohammad!
Great learning video, I'll start implementing it next week. I think once you've done all that you can definitely get a job as a junior hardware designer
Thank you very much!
Thanks so much for this detailed video. There is always a small trick I can grasp. This time it was the Net Classes colors and the Bulk Editor !!
A trick I use, instead of adding pwr_flag like at @1:54:03 is to add in one corner one PWR_FLAG connected to a GND symbol and one to a +3v3
Thank you for watching! :)
Great video! Thank you!
Thanks for watching!
Thank you very much for this video.
Thanks for watching!
Great tutorial and I now know how to assign net class. New Year resolution is to sign up for your courses...and finish them:)
Thank you! Awesome, hope to have you part of the courses soon :)
hi, phil i would love to know which work would this hardware perform, i've watched keenly both tutorials and i can tell they are great, thanks man
"Scratch the surface", "fairly short youtube videos"
> 2 hours long!
You are a gem for making this sort of knowledge available for all beginners in very approachable format. Great content!! I have grown more confident in kicad for my own projects learning a lot of tips from you.
My 0.0002 cents would be to ask if you are interested in exploring other MCU platforms as well as STM's for these types of tutorials for the future. By golly I wouldn't be surprised if your videos ended up driving many thousands extra sales to STM now and into the future.
Thank you very much! Great to hear that the videos have been helpful. Regarding other MCU platforms, this is definitely something I'd like to have more of on the channel. For example, I've been wanting to design an NRF dev board for some future videos but haven't gotten round to it just yet. I just find the STM32 line of products so accessible that I keep coming back to them (and this is said without sponsorship or similar).
again a masterpiece.
Thank you!!
Two tips for footprint creation:
1. You can type formulas directly in the position and size fields and KiCAD will automatically calculate them for you.
2. Use Shift+M to move a part precisely. This can be used when you know the distance between two pads, but not it's final position. Position the pad centered to the other one, then use Shift+M to move.
You can use these in PCB layout too.
Like when i say Phill you are the BOSS. I truly mean it. God bless you BOSS Man! I Love you bro!
Thank you very much!
Thanks a lot for the Video
Thanks for watching, Christian!
great work
Thank you!
You are a life saver, just in time
Thank you!
@@PhilsLab Can you tell me when part 2 is coming
In about 2h 25min :)
@@PhilsLab great 😃
@@PhilsLab Iam using Stm32wb55rg with VFQFN68 package. In that there is no VSS pin , is the Exposed pad acts as VSS , in my pcb i have not connected the epad to gnd. I cannot program the MCU I wanted to know did I screw up with the epad. Please take some time to check my query I don't know who else to ask.
Thanks you!!!
Thanks for watching!
Thank you very much.
Thanks for watching!
I tried the PCBWay assembly a few weeks ago and I was really impressed with the quality, speed and price. They even dealt with half-empty BoM because I was a bit lazy to select all the passive components. And I didn't need to manually pre-order non-stock components which in my opinion is the main disadvantage of JLCPCB assembly.
Glad to hear you were happy with PCBWay! Yeah, they definitely have more room for flexiblity/customisation, which is great.
Being a ECE student in India i was inspired by you the most sir thank for your work sir
I'm very glad to hear that, thank you!
Welcome back to KiCad :)
Haha thanks :)
Great tutorial. Thank you. Those tag-connect devices are cool, but damn they're not cheap for what they are! I was wanting to get some but it's over $100 AUD for one plus the retainer clips!!!!
Thanks! Yeah, the initial cost seems a bit much, but they're incredibly useful/easy-to-use and pay for themselves after a number of boards.
Soooo nice !!!!
Thank you!
Good, interesting stuff there, and a good deal of it not specific to KiCAD - most of it is just good project and design practice.
One point about using datasheets from suppliers' websites, though. Some suppliers (yes, RS and Farnell, I'm looking at you) don't update their datasheets beyond the first version. The difference between the ATTiny-0 datasheets from Farnell or downloading them from Microchip's website was the difference between a project working or not. There had been a few revisions since it was first published. I appreciate it's a lot of work keeping that up to date when you stock so many items, though.
Thanks! Yes, that's a very good point!
Great vid
Thanks!
Need part 2 🙏🙏🙏