RF + MCU PCB Design Review - Phil's Lab #76

  Рет қаралды 37,228

Phil’s Lab

Phil’s Lab

Күн бұрын

Design review of PCB containing an RF-capable STM32WB microcontroller, SMD antenna, USB, and various peripherals designed with KiCad. Going through schematic and PCB, giving tips and guidelines throughout.
[SUPPORT]
Free trial of Altium Designer: www.altium.com/yt/philslab
PCBA from $0 (Free Setup, Free Stencil): jlcpcb.com/RHS
Patreon: / phils94
Mixed-signal hardware design course: phils-lab-shop.fedevel.education
[GIT]
GitHub: github.com/pms67
[TIMESTAMPS]
00:00 Introduction
00:37 Altium Designer Free Trial
01:13 'smartReflow' Repo
01:55 Schematic Overview and Segmentation
03:27 USB C
04:08 MCU Pinout and WS2812B LED
05:48 Connectors
06:11 MCU SMPS
06:29 Power Input and LDO
08:45 FETs
10:28 MCU Boot/Oscillator
12:12 RF Section
14:03 PCB Overview
15:04 Stack-Up
15:34 MCU, Decoupling, Crystal Layout and Routing
19:05 RF Layout and Routing (SMD Antenna, Controlled Impedance, Stitching)
23:01 EEPROM
23:51 Via Spacing and Transfer Vias
24:36 USB Differential Pairs
25:30 Miscellaneous (Copper Pours, Silkscreen, Placement)
26:33 Outro

Пікірлер: 112
@andile5945
@andile5945 Жыл бұрын
This is absolutely outstanding! Thank you for doing these, Phil.
@PhilsLab
@PhilsLab Жыл бұрын
Thank you very much for watching - glad you like the video!
@Haellsigh
@Haellsigh Жыл бұрын
For the 32 MHz crystal, the MCU probably has an integrated capacitor bank which he planned on using. It's becoming really common with newer microcontrollers.
@PhilsLab
@PhilsLab Жыл бұрын
Ah that makes sense! I hadn't seen that in STM32s before, so that's pretty awesome.
@isaacclark9825
@isaacclark9825 Жыл бұрын
Cool. I never heard of that. That's worth this month's internet fee.
@Graham_Wideman
@Graham_Wideman Жыл бұрын
That feature is great to hear about! Are the capacitors selected by programming fuses? To dial these in, I guess making use of the "clock out" pin would be a great help.
@Mr.Leeroy
@Mr.Leeroy Жыл бұрын
great timing to start introducing features that take up large areas of silicon real estate that is already pretty much at at gold value.
@pcbworks
@pcbworks Жыл бұрын
That makes sense! They (the caps) are not even drawn in the schematic of STM32WB reference design and I was investigating the reason until see this. Thanks
@eleclab4244
@eleclab4244 Жыл бұрын
More RF content please! Great job Phill 👌
@PhilsLab
@PhilsLab Жыл бұрын
More to come! Thank you :)
@mumumumah
@mumumumah Жыл бұрын
Excellent critique Phil - thanks for that, I learned a great deal. And thanks Lukas for the submission - it is always very humbling these sorts of reviews but I believe it has helped many.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Rube!
@testboga5991
@testboga5991 Жыл бұрын
Thank you both! The creator for making enough mistakes to allow Phil to make such an interesting video! Really cool!
@Jihoon0622
@Jihoon0622 Жыл бұрын
I always wanted to see this kind of video, as I want to learn something that every professional engineers naturally know, but not all hobby engineers know. Thank you for this precious contents.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks for watching!
@oshio9129
@oshio9129 Жыл бұрын
I'm doing a design with stm32wb55rg, and this was a pleasant surprise! I'm doing a marathon on your videos! great material
@Sovvyy
@Sovvyy Жыл бұрын
Super helpful video - well explained. Thanks to your viewer for sharing their project too :).
@irgski
@irgski Жыл бұрын
Nice review! Not many ppl would take the time and effort to do such a thorough design review. Very informative.
@BusyElectrons
@BusyElectrons Жыл бұрын
This was very helpful. Thank you for taking the time to share.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks for watching, Jeff!
@Graham_Wideman
@Graham_Wideman Жыл бұрын
Again a great video Phil! These videos fill a very valuable role, in a world where ever more of us are working individually, and don't hang out at an office with the opportunity to look over colleagues' shoulders, or have informal incremental chats to resolve some of these more subtle details, or simply to become aware of them. Well done!
@PhilsLab
@PhilsLab Жыл бұрын
Thank you very much, Graham!
@danielbilodeau4701
@danielbilodeau4701 Жыл бұрын
These are an amazing way of learning tips you might not encounter in every design. I love these videos.
@PhilsLab
@PhilsLab Жыл бұрын
Thank you, Daniel!
@certified-forklifter
@certified-forklifter Жыл бұрын
One of my favorite series, I love watching and learning them. Thank you so much!
@PhilsLab
@PhilsLab Жыл бұрын
Thank you - glad to hear that :) Design review videos should be coming once per month.
@rick_er2481
@rick_er2481 Жыл бұрын
@@PhilsLab That's awesome!! Looking forward to them!!
@EfraAv
@EfraAv Жыл бұрын
I love this series. Looking forward for the next chapter
@jakobhalskov
@jakobhalskov Жыл бұрын
So much useful and practical to learn from this! It is great content to keep my engineering brain going while being on sick leave. Thanks again Phil :)
@PhilsLab
@PhilsLab Жыл бұрын
Thank you, Jakob - hope you recover soon :)
@Genic11
@Genic11 Жыл бұрын
Your Videos are always a treasure trove of knowledge.
@PhilsLab
@PhilsLab Жыл бұрын
Thank you very much - glad you think so!
@antenehtadesse8577
@antenehtadesse8577 Жыл бұрын
keep it up Phil, I really like your point of view and learning from it, so I thank you for it✌
@_a_x_s_
@_a_x_s_ Жыл бұрын
That’s great. Learnt quite a lot. Thanks for the video! For the trace where the width changes, the copper pour under the wider trace can be masked to maintain the impedance consistency.
@PhilsLab
@PhilsLab Жыл бұрын
Thank you!
@timknapen
@timknapen Жыл бұрын
Great review and full speed too! I enjoyed this.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Tim!
@GiorgiAptsiauriX
@GiorgiAptsiauriX Жыл бұрын
This semester we are going to use WB MCU for an IoT project. This is priceless for me.
@jj74qformerlyjailbreak3
@jj74qformerlyjailbreak3 Жыл бұрын
This video earned you a sub. I learned more just from your vocabulary. Very pleasing. Maybe I’m weird. God Bless.
@RedlabsTV
@RedlabsTV Жыл бұрын
Thanks for explaining your thoughts. Very interesting!
@PhilsLab
@PhilsLab Жыл бұрын
Thanks for watching!
@bartek153
@bartek153 Жыл бұрын
Great review Phil. Enjoyed that one :)
@lolsypussy
@lolsypussy Жыл бұрын
I used those exact LEDs with an ESP32 and they worked perfectly fine. It was my concern at first until i gambled to try it.
@breedj1
@breedj1 Жыл бұрын
Again a great video. I find the schematics symbol of Q1-Q5 rather interesting though. I've never seen that in KiCAD. I expect the arrow to point to the gate for an N-channel mosfet
@ahmedalshalchi
@ahmedalshalchi Жыл бұрын
Really prof engineering job ... Thank you Phil ...
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Ahmed!
@stargazer7644
@stargazer7644 Жыл бұрын
6:41 he might not have used a schottky diode symbol, but he has a part number, and that is a schottky diode part. The AMS1117-3.3 needs a Vin of 4.8V, which is a problem with a 0.55V forward voltage drop
@Graham_Wideman
@Graham_Wideman Жыл бұрын
Agreed on the diode. Regarding the AMS1117-3.3 Vin requirement, it looks to me like the Vin-Vout differential needed is more like 1.1 or 1.2V, based on not very high load current. So should operate off 4.5V (not accounting for the diode).
@Mr.Leeroy
@Mr.Leeroy Жыл бұрын
minimal dropout voltage is internal reference voltage + int amp offset + safe margin (which has to be non zero to even make sense of using LDO in the first place) + current based margin + tempco drift. So your 5v rail to give 3.3 linear outuput either has to be compensated for Vdrop (like 5.2V on USB chargers) or designed bang on with particular load level in mind. To use such a simple LDO that is.
@prashkd7684
@prashkd7684 Жыл бұрын
This is inspiring.. I may submit my ongoing project for review i.e. if i can finish it : )
@gmendes1831
@gmendes1831 Жыл бұрын
Thanks for share.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks for watching :)
@mortezaghorbani7927
@mortezaghorbani7927 Жыл бұрын
great video, for future reviews please review the power electronic devices layout too
@Himmelstrutzable
@Himmelstrutzable Жыл бұрын
Very good, once again!
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Joakim! :)
@bren4642
@bren4642 Жыл бұрын
Lots of great info on this review! Agree with the antenna config, you probably only intend to use either/or, but IMO it's unnecessary to use an RF switch unless; you have a spare GPIO, you are not board space confined, you can swallow the extra cost and the device use-case is to switch between internal and external antenna in operation (unlikely here). Instead, I'd recommend using either a 'shared pad' 0R pop option or a u.FL with an integrated switch in series with the RF trace.
@isaacclark9825
@isaacclark9825 Жыл бұрын
I am In the process of reviewing a couple of my own MCU PCB. I am glad this video came when it did. I will be re-doing parts of the layout. I would moderate the suggestion to keep all of the MCU stuff on one page. Once the pin count gets high, I think it is practical to partition the pins based on functionality and put some of those functions on separate sheets. I found that idea to be nearly mandatory practice on a 144-pin MCU project. Perhaps do a hierarchy if it gets that complicated?
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Isaac! For larger MCUs/ICs - yes, I also split the schematic over several pages. But for something as small as this project, I'd keep the MCU stuff on one page.
@1over137
@1over137 Жыл бұрын
the ws2812bs usually work fine on 3.3V data . to be sure a TTL bus interface chips are dirt check to step it up.
@pcbworks
@pcbworks Жыл бұрын
Perfecto!
@cortxt
@cortxt Жыл бұрын
Just about the WB2812 I have it working great in a board with Vdd = 3.3v according to the datasheet min is 3.5v but well it work with 3.3v too, for experience, with the Vi note that Vdd min can by 3.5v it means that you can have a high of 2.45v at least
@nhlakaniphombatha5769
@nhlakaniphombatha5769 Жыл бұрын
PHIL IS. THE MAN 💪💪💪💪...❤❤❤......
@PhilsLab
@PhilsLab Жыл бұрын
Thanks :)
@huynhngocthienvuong541
@huynhngocthienvuong541 Жыл бұрын
great!!!
@lukaswalczak93
@lukaswalczak93 Жыл бұрын
Hey Phil, thank you very much for reviewing my design. I would like to mention a couple things. 1) The reverse polarity diode actually was a shotkey diode, so no problems with the ams1117. Also, the reference design does also not specify load caps for the crystal. I had no problems with it. Even probing the signal was no issue, because the drive strength on HSE is quite high. 2) I took the schematic symbol and parts of it from a reference design. I later realized, that it got pretty messed up. 3) The ws2812b actually works pretty well on 3.3v. I tested this thoroughly beforehand, but i guess it is not good practice to assume this. 4) The stm32wb55 actually have all the same pinout on the same packages, that's why, the exact model number does not matter too much. 5) I only fitted one of those 10n capacitors on the RF line, which is kind of a low cost RF switch. I would never fit both caps, due to the reasons you mentioned with the impedance. 6) Because of the small PCB size, I had trouble to get the layout done on S GND GND S stack up and because my design does not need to fullfil any EMI specs, I thought this would be fine. 7) Filling the top layer with GND was certainly a mistake. However, the Bluetooth performance is even better than on my evaluation boards. But that's probably due to a higher antenna gain and a filter, which is specifically designed for these MCUs. 8) You actually moved my parts, so the silkscreen got moved as well :D 9) These USB C sockets are a nightmare to route. I also did not find a 3d model, the SMD one was the best I could find. 10) The reset switch is on purpose that big. I wanted to be able, to easly reset my oven with a big button on the front panel, because I work with 230v and I didn't want a bug to mess things up. 11) Adding flyback diodes is important, added them later on the loads. Maybe, these points clarify some issues, which were not entirely clear by looking at the design. I am using this oven really often, and the controller works beautifully, even though I certainly missed critical points :)
@Efedeacheese
@Efedeacheese Жыл бұрын
Yeah! Some parts could have done it better (like the usb routing), thats how it is, but other aspects are a little too analytical on the review. Also, deadlines are another constraint in this kind of project! You cant spend a whole year finishing the schematic up to it most minor detail. Especially when you are the circuit, pcb, firmware and mechanical designer. Leave aside BOM management. Sometimes you just make mental notes and keep on working on another stuff or else project is going to be finished by 2080. Specially when you are workin on a open source project (ie: mostly non-paid work) I think you did a great job and the reviewer is being analitical in order to help others in their designs and share knowledge. I know you havent (and i wouldnt) take the review as a critique. Kudos to you for the job and Phill for the review! Good job both of you!
@xxbatman69xx98
@xxbatman69xx98 Жыл бұрын
Question, did you learn how to make a pcb like this in school or was this something you just have to learn outta school?
@lattebois5934
@lattebois5934 Жыл бұрын
Hello Phill. I have a question, which is, should I make copper ground pour on the top and bottom layer of the 4-layer PCB? What is the benefit of both varieties?
@Program2live
@Program2live Жыл бұрын
@Phil's Lab Really helpful as always! Question: If you have a sig, gnd, gnd, sig stackup, is there a benefit to creating gnd fills on the top/bottom layer to surround critical low speed GPIO lines?
@andymouse
@andymouse Жыл бұрын
Wondered myself.
@bozodragojevic
@bozodragojevic Жыл бұрын
I'd imagine it'd be better to create power fills so you get some extra capacitance.
@saha2202
@saha2202 Жыл бұрын
Youre a genius
@badarjahangirkayani6196
@badarjahangirkayani6196 Жыл бұрын
Awesome review. So helpful. The silk screen was messed up a bit because you were moving components around, I think that caused it to look funny.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks! Whoops - I should've moved the components back before commenting on that, good catch :)
@mrechbreger
@mrechbreger Жыл бұрын
There are different grade AMS1117 out there I test quite a bunch of them some time ago... I'm sure there are some which work and some that won't for this design. The difference from one to another which I have seen is quite something.
@Graham_Wideman
@Graham_Wideman Жыл бұрын
Very interesting! Was the variation outside the variation allowed by the datasheet, and did datatsheets vary across manufacturers?
@ramimehyar481
@ramimehyar481 Жыл бұрын
Can you please explain ur point with the zero ohm resistor in path of the rx/tx lines in case something happens?
@hgo31079
@hgo31079 Жыл бұрын
Thanks for this, I really learned alot, don't know if I can get my board review too.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Hassan - sure, just share your design (via WeTransfer) via my website (phils-lab.net).
@hgo31079
@hgo31079 Жыл бұрын
@@PhilsLab ok
@7alfatech860
@7alfatech860 Жыл бұрын
Hi Phil, any comments on the perimeter trace on the top and bottom of the board? Is it useful, harmless, etc?
@PhilsLab
@PhilsLab Жыл бұрын
Hey, I'd say in most cases it's harmless and can be useful to supress 'edge-fired emissions' and for general shielding. This is of course if the stitching is done properly (1/20th wavelength of f(max)).
@7alfatech860
@7alfatech860 Жыл бұрын
@@PhilsLab 👍
@SlimyRedstone
@SlimyRedstone Жыл бұрын
At 5:10, I can confirm that powering WS2812 LEDs at 5V, you can communicate at 3.3V from the microcontroller, but I think this is working at their bare limit even though I have never got any problem working with them
@BrianKPepin
@BrianKPepin Жыл бұрын
If there is a voltage drop due to the protection diode at the power supply 5v is really about 4.3v which puts the minimum signal here at about 3.01v, which is within tolerance.
@turneroq9888
@turneroq9888 Жыл бұрын
I can confirm this is true. Such LEDs can work well with 3.3V communication. LEDs were powered from Lab PSU with strict 5V power
@Mr.Leeroy
@Mr.Leeroy Жыл бұрын
still a bad practice and a wishful thinking to rely on out of spec quirks.
@sampathranaweera3702
@sampathranaweera3702 Жыл бұрын
Can you make one for the soft stuido trail
@longzhao8778
@longzhao8778 Жыл бұрын
why does the stitching via distance around the RF need to be 1/20 of the wavelength?
@sukotka1521
@sukotka1521 Жыл бұрын
You say that you could get away with only 1/3 of the stitching vias. I understand that that is a minimum? So the additional vias aren't harmful?
@Graham_Wideman
@Graham_Wideman Жыл бұрын
Correct. Aside from wearing out the drill bit!
@PhilsLab
@PhilsLab Жыл бұрын
Exactly, as Graham also already has noted.
@kimscheibel2248
@kimscheibel2248 Жыл бұрын
Or you can power the addressable LED with 4.7V, which puts the control level in range at 3.3V, no?
@MrJK193
@MrJK193 Жыл бұрын
There is WS2812B Ver. No.:V5 which does not need 100n cap.
@JakubKraus0
@JakubKraus0 Жыл бұрын
Yep, and also accepts 3.3V input per spec as well. The connection in this design is fine with V5 LEDs, and it's quite possible he received V5 LEDs without knowing, so it works, but would be good to note it in the schematic
@teslatrooper
@teslatrooper Жыл бұрын
I've been wanting to make a design with a Silabs RF microcontroller but put it off because I thought the RF part would be complicated. Thanks for this review showing may not be as hard as I thought. Also I've been using those WS2812's with 3v3 signals for a while, it may not be in spec but in my experience they work fine. A simple solution could be a diode in series to lower the VDD to around 4.3V allowing for a signal high voltage of 3V, the diode on the +5V input might already be enough for that. A 32MHz clock source is recommended for at least some of the STM32WB controllers and they have internal programmable capacitance.
@spehropefhany
@spehropefhany Жыл бұрын
Another option for the LED is to pull the data pin up to 5V and run the GPIO open drain, *assuming* the GPIO pin is 5V tolerant. That works on the STM32F401 for interface with a asynch serial device.
@CuriousMaker609
@CuriousMaker609 Жыл бұрын
I really liked the video and found it informative. If you think your video is too long, why not split it into parts? It also seems like you are rushing to keep your video short. I would love to hear more about the nuances in the aspects that you are reviewing in your video.
@swayamgupta6356
@swayamgupta6356 Жыл бұрын
Foreal man.
@ExplodingWaffle101
@ExplodingWaffle101 Жыл бұрын
23:52 What’s the issue with bias being too close to pads? I always thought it was fine to have the via tangent to an SMD pad, or even to have the via drill tangent to the pad- lower impedance and all that. (obviously this design is not exactly space constrained. and usually I place vias on the same 0.5mm grid as components so this isn’t an issue. still curious though)
@MSP_TechLab
@MSP_TechLab Жыл бұрын
As Phil said it can cause solder leaking. If via is too close to pad it can "suck" solder during soldering process which can cause bad joint between pcb and smd part.
@km-electronics1
@km-electronics1 Жыл бұрын
Also, you will be charged more for the PCB if the fabricator considers them as "via in pad".
@Kefford666
@Kefford666 Жыл бұрын
@@MSP_TechLab Solder wicking
@paulrnash
@paulrnash 4 ай бұрын
Nice review, but you nicked him for silkscreen under components, highlighting the crystal load caps that *you* hastily rearranged… 😂
@PhilsLab
@PhilsLab 4 ай бұрын
True haha.. sorry about that :D
@rezkybelianto6216
@rezkybelianto6216 Жыл бұрын
Ive watched tNice tutorials a couple tis and i tNice tutorialnk the key is to slow the video down to .75. TRY IT!!!
@jhonchirstofer1895
@jhonchirstofer1895 Жыл бұрын
Hi
@PhilsLab
@PhilsLab Жыл бұрын
Hello :)
@tamaseduard5145
@tamaseduard5145 Жыл бұрын
👍🙏❤
@benjamincrall8065
@benjamincrall8065 Жыл бұрын
While the WS2812Bs don't state 3.3v support, in my experience they have always worked with 3.3v signals and 5V power.
@yuventussellyullu3795
@yuventussellyullu3795 Жыл бұрын
bro Usually the components in each MCU, what am I?. Please reply
PCB Vias 101 - Phil's Lab #77
17:01
Phil’s Lab
Рет қаралды 46 М.
Critiquing My Own PCB Designs - Phil's Lab #43
24:54
Phil’s Lab
Рет қаралды 49 М.
Me: Don't cross there's cars coming
00:16
LOL
Рет қаралды 13 МЛН
Дибала против вратаря Легенды
00:33
Mr. Oleynik
Рет қаралды 5 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 11 МЛН
Custom Keyboard From Scratch Part 2
17:13
Casual Coders
Рет қаралды 35 М.
019 Inverted-F PCB Antenna: How to tune PCB circuits using a NanoVNA
10:48
The Most Common 2-Layer PCB Design Mistakes and How To Avoid Them
10:57
BGA PCB Design Tips - Phil's Lab #95
28:21
Phil’s Lab
Рет қаралды 35 М.
Boost Your PCB Design Productivity | 7 Best Plugins for KiCad
10:58
Terminal Curiosity
Рет қаралды 26 М.
FPGA Design | Beyond dev boards: your own custom PCB
10:45
Psychogenic Technologies
Рет қаралды 8 М.
Hacker's Guide to UART Root Shells
17:40
Flashback Team
Рет қаралды 466 М.
FPGA PCB Design Review - Phil's Lab #85
33:13
Phil’s Lab
Рет қаралды 28 М.
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Рет қаралды 176 М.
Aesthetic PCB Design Tips - Phil's Lab #84
17:56
Phil’s Lab
Рет қаралды 73 М.
После ввода кода - протирайте панель
0:18
Up Your Brains
Рет қаралды 1,1 МЛН
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 1,2 МЛН
iPhone 16 с инновационным аккумулятором
0:45
ÉЖИ АКСЁНОВ
Рет қаралды 7 МЛН
PART 52 || DIY Wireless Switch forElectronic Lights - Easy Guide!
1:01
HUBAB__OFFICIAL
Рет қаралды 30 МЛН