M.2 System-on-Module Hardware Design - Phil's Lab #107

  Рет қаралды 39,101

Phil’s Lab

Жыл бұрын

Tiny M.2 form-factor system-on-module design walkthrough, featuring small BGA-package STM32F4 microcontroller, SDRAM, QSPI FLASH, and more.
Tips on schematic & PCB design, including BGA packages, pin-out, M.2 interface standards, ...
[SUPPORT]
Hardware design courses: phils-lab-shop.fedevel.education
Course content: www.phils-lab.net/courses
Free trial of Altium Designer: www.altium.com/yt/philslab
Tag-Connect: www.tag-connect.com/solutions-target-devices/stm32
Patreon: www.patreon.com/phils94
[GIT]
github.com/pms67
[SOCIAL]
Instagram: philslabyt
[LINKS]
M.2 interface: www.delock.de/infothek/M.2/M.2_e.html
[TIMESTAMPS]
00:00 Introduction
01:02 Altium Designer Free Trial
01:29 Hardware Design Course
01:58 System-on-Modules
04:17 M.2 Interface
08:06 Block Diagram
09:54 Part Choices
10:30 Schematic Overview
11:51 MCU Pin-Out
13:12 SDRAM Schematic
14:08 Series Termination
14:49 I/O
16:08 Power & Decoupling
16:50 Serial Wire Debug (SWD)
17:13 M.2 Connections
17:56 MCU Pin-Out Flexibility
18:41 PCB Overview
20:50 Tag-Connect SWD Header
21:17 Layers
22:21 BGA Fan-Out
24:04 BGA Power & Decoupling
25:34 SDRAM
27:01 Additional Tips
28:32 Edge Connector Routing
29:36 SWD Routing
30:41 Carrier Board (Future Video)
31:35 Outro

Пікірлер: 106
@PhilsLab
@PhilsLab Жыл бұрын
Thanks for watching! The new advanced hardware design course is out - you can check out the content here: www.phils-lab.net/courses
@dr.med.janschiefer7163
@dr.med.janschiefer7163 Жыл бұрын
Your PCB design videos are always the best you can find on KZfaq!
@PhilsLab
@PhilsLab Жыл бұрын
Thank you very much, Jan!
@tylergeneharrison3594
@tylergeneharrison3594 Жыл бұрын
Dude, you keep me excited about engineering! Wicked cool design mate!
@PhilsLab
@PhilsLab Жыл бұрын
That's great to hear - thank you, Tyler!
@rallymax2
@rallymax2 Жыл бұрын
Another excellent, educational, enjoyable, elegantly enlightening tutorial Phil. The SWD stub termination by placing the resistors at the tag-connect was inspired.
@PhilsLab
@PhilsLab Жыл бұрын
Thank you very much for your kind comment!
@Ru21Ben
@Ru21Ben Жыл бұрын
Hey man. Thanks for teaching me about the ground return vias, never would have thought about that.. seems as if our current pcb prototype needs a second one. 😅
@pietrogagliano4484
@pietrogagliano4484 Жыл бұрын
Awesome video Phil! It's always been a fascination of mine to begin exploring the utilization of m.2 form factors! As with your other topical videos the m.2 form factor videos certainly give a foundational understanding of these interfaces!
@PhilsLab
@PhilsLab Жыл бұрын
Thank you very much, Pietro - I agree M.2 is such a cool form factor!
@mbeechey
@mbeechey Жыл бұрын
Brilliant, thanks Phil. Love your videos - as someone who doesn't have an EE academic background (ML/network security), but found myself in a job whereby I am required to take on such responsibilities, your videos are a massive help. Looking forward to checking out your new course.
@PhilsLab
@PhilsLab Жыл бұрын
Thank you very much, Matt - I'm very glad to hear that the videos have been helpful! I hope you like the course and all the best for your job :)
@mikeselectricstuff
@mikeselectricstuff Жыл бұрын
I you had any MCU pins not routed to the M2 connector, it might have been useful to stick a couple of LEDs on the board. Maybe also some accessible test pads for debug outputs.
@Archnemesis88
@Archnemesis88 Жыл бұрын
Another video that is absolute gold! I love these videos that break down the schematic and layout all at once, helps with thinking about the big picture when it comes to design
@PhilsLab
@PhilsLab Жыл бұрын
Thank you very much, Michael!
@exciton007
@exciton007 10 ай бұрын
The little brain is a very good idea! Thanks for the video❤
@vigneshperiyasamy3019
@vigneshperiyasamy3019 Жыл бұрын
What a workmanship!!!!!!!!!!!!!!
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Vignesh!
@CuriousMaker609
@CuriousMaker609 Жыл бұрын
Great video. I didn't know that M.2 form factor had standard dimensions.
@damny0utoobe
@damny0utoobe Жыл бұрын
Why wouldn't it? It is a standard right?
@danedwards_ee
@danedwards_ee Жыл бұрын
Great idea using a microcontroller! I'm currently using the rPi CM4 as a system on module and designing my own custom carrier board.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Daniel! Sounds like an awesome project - good luck with your design!
@TechnopolisDotTV
@TechnopolisDotTV Жыл бұрын
11:25 and 15:18 you mentioned CAN 🤩 I can't wait for it!
@jakubvanek5723
@jakubvanek5723 Жыл бұрын
Perfect video Phil!
@PhilsLab
@PhilsLab Жыл бұрын
Thank you, Jakub!
@DonMuffatello
@DonMuffatello 11 ай бұрын
Still blows my mind that they don't teach board design at uni in EE. I mean what else are EEs meant to even do
@thewld2
@thewld2 5 ай бұрын
EE graduates are entry level placeholders. Only true enthusiast keep elevating in knowledge and positions in the industry.
@rolfdieterklein
@rolfdieterklein Жыл бұрын
cool idea to use the M2 form factor. Gets me an idea for our new modular space transceivers (currently in space move 2 ) , currently we used a solder on system with edge solders to have a modular system - I have to check the form factor , but the connectors are really great. Hope they can be used in space, might have to make some vaccum and shake tests...
@gsuberland
@gsuberland Жыл бұрын
I've been thinking about building an ESP32 SoM with some standard "I use these in every design" parts for a while. The NodeMCU / DOIT style boards are by far the most cost effective approach, with a whole board (ESP32 module, CP2102 or similar, AMS1117, USB connector, LEDs, etc.) typically costing less than just the ESP32-WROOM module would at qty50 from JLC, but the TH pin header connectivity isn't great for compact designs and the power delivery side of it leaves a lot to be desired.
@robv3872
@robv3872 Жыл бұрын
Such a great channel - now I want to design a zynq M.2 module!
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Rob!
@kalimist4217
@kalimist4217 Жыл бұрын
one more amazing stuff, i fell in love with your scientific drawing-designing perspectivity. ill be honest, i totally cloned that skillsets, acting kind, perspective from you and almost totally that channel.. i totally cloned, steal, i hope that wont turns me a idea thief, but if it, i dont care thats really feels good when my stuffs starting appear. thats because of your channel:)... Cong. and really thankfull to you because of bringing that lesson kind stuffs to us. Appreciated. the best thing i did in my life is joining that channel and knowing u and ur stuffs. Endless Thanks to you again.
@PhilsLab
@PhilsLab Жыл бұрын
Thank you very much! :)
@vmiguel1988
@vmiguel1988 Жыл бұрын
Thanks Phil
@PhilsLab
@PhilsLab Жыл бұрын
Thanks for watching!
@irukard
@irukard Жыл бұрын
Sparkfun MicroMod... Inventend once again :D
@marek_ryn
@marek_ryn Жыл бұрын
Nice idea :) I would only add separate Vbat connection on M.2 connector. Especially that you decided to install 32,768 kHz quartz on your board. This would give you possibility to design carrier boards with battery backup and use full potential of integrated RTC peripheral and MCU backup domain.
@vibram500
@vibram500 Жыл бұрын
Awesome project. I hope you will show a module with Human machine interface. This would be awesome
@qqqqqqqqqqqqqqqq7
@qqqqqqqqqqqqqqqq7 Жыл бұрын
I would recommend using a little bit longer power input pins at card edge connection so the power is delivered first. Otherwise great video as usual :)
@pawanv86
@pawanv86 Жыл бұрын
Fantastic video Phil! I was just thinking about AIO Drone FCs. It's crazy to even imagine that manufacturers build PCBs capable of handling close to 140A burst in a 30.5x30.5mm form factor while having sensitive equipment such as the ARM chip on the same little square
@PhilsLab
@PhilsLab Жыл бұрын
Thank you! Yeah, there are some pretty amazing, tiny PCBs out there!
@tinnoc
@tinnoc 7 ай бұрын
First time watching your channel, subscribed! Interesting that you didn't route PA4 & PA5 that are generally where ST places their DAC outputs. I was looking for inspiration for doing my own SOM as most commercially available ones are from the STM32MP1 series. I will do mine with the M.2 connector as well that is great idea, wasn't aware that the connectors where so inexpensive. Thanks!
@steffenmeyer9461
@steffenmeyer9461 6 ай бұрын
i'm actually doing something similar now, just that the main brain, that mostly will stay the same, will be the backplane/motherboard and then the Module is the one that will change depending on the need. actually the base motherboard i'm currently designing will have 3 module spaces that all should be able to talk to each other :D those modules then add either processing power or some sort of IO. the software side of that will be fun too :P though this motherboard will be not so generic as the SoM from the video. but definitely learned something here that will help me in those Designs ^^
@sarbog1
@sarbog1 Жыл бұрын
Very cool....... plan to look into this for model railroad control via DCC. DCC-EX is releasing version 5.0 of command station which will work with STM32F4... Imagine ...design my own mother board and just plugin the STM32F4 module. Using my own mother board I can expand my layout very easily and cheaper than buying proprietary expensive products.
@danedwards_ee
@danedwards_ee Жыл бұрын
A point on the BGA fanning out. How do you deal with the change of reference plane vias? or does it not make that much of a difference if the stitching via is a bit further away? You can see some of the groupings don't (relatively) have transfer vias too close. Would this be something a blind via would help with? Doh! You mentioned it later. but still is there a distance that would be considered too "far"?
@MHBGT
@MHBGT 10 ай бұрын
I really like the concept of the Tagconnect system, but the availability of the actualy mating connector was a huge issue so we reverted to a Molex PicoLock edge connector for programming.
@bakedbeings
@bakedbeings 11 ай бұрын
Something like this (with usb c and a mounting screw) could be sweet for custom mechanical pcbs, versus using a pro micro or teensy. Slot in, add screw, flash via bootloader over usb (with qmk). A radio and lipo support wouldnt hurt either 😊
@PeopleAndroid
@PeopleAndroid Жыл бұрын
Thanks Phill for the videos. Have you considered to write a book about hardware and PCB design, like a student guide/ textbook or something like that?
@PeopleAndroid
@PeopleAndroid Жыл бұрын
It would also be cool to see the SOM working or kinda of projects with it.
@andymouse
@andymouse Жыл бұрын
Fascinating, I think it's a great idea ! a sort of grown up Arduino on steroids, I shall enjoy what's to come.....cheers.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks a lot, Andy!
@kamaldeen4738
@kamaldeen4738 Жыл бұрын
Philip, am using your stm32h7 flight controller for agricultural spraying drone as my project, is it enough to use those sensors you used on the schematic? If not, list the needed sensors and where to connect them please. I really love your work Philip. Big Man
@km-electronics1
@km-electronics1 Жыл бұрын
Very cool project and idea, I think it would be the perfect project for a Kicad 7 tutorial. Out of curiosity, why did you go with M.2 connector instead of, for example, Raspberry Pi CM4 connectors and do you plan to become an OEM?
@PeetHobby
@PeetHobby Жыл бұрын
A Dev board with a fancy connector. 😁 I like the form factor you choose, perfect for the job. The only draw side is the relatively high cost of the m.2 connectors. Well, since you use an MCU for a mere 12 bucks, I don't think a $2 connector will be a big deal.😋
@PhilsLab
@PhilsLab Жыл бұрын
Thanks! Haha yeah, the MCU + RAM does outweigh the connector cost by quite a bit.. I do love the look of the M.2 form factor boards as well though.
@villadelfia
@villadelfia Жыл бұрын
Is there any particular reason you chose to forgo using pin 36 of the m.2 connector?
@TehFreek
@TehFreek Жыл бұрын
This is probably overkill for something intended for internal use only, but offsetting the edge screw cut-out would probably be an effective reminder/indicator that this doesn't use a standard M.2 pinout without affecting the ability to use a standard M.2 connector in any way.
@isaacclark9825
@isaacclark9825 Жыл бұрын
Great content as always. I am inspired to do my own SOM with some BGA parts on it! As I understand it, you didn't need to do any length matching or impedance control for the SDRAM interface? Interesting.
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Isaac! Delay tuning only 'within reason'. Typically, as a rough rule, I aim for within 2.5% of the clock period. Impedance control is preferable given the rise times, however, for this design not entirely necessary given the length scales.
@Biomancer81
@Biomancer81 Жыл бұрын
I have been contemplating something like this for a long time. A SoM in the M.2 formfactor.
@PhilsLab
@PhilsLab Жыл бұрын
Awesome, hope you give it a try soon :)
@Biomancer81
@Biomancer81 Жыл бұрын
@@PhilsLab Im not skilled enough to do it yet, but M.2 seemed an ideal form for SoM exactly as you did it. I love watching your videos.
@jeremyglover5541
@jeremyglover5541 Жыл бұрын
Thanks Phil!! Thanks very much for this great video mate. its funny. I'm working on a high quality integrated audio DSP system at the moment, with multichannel DAC, ADC, DSP, Class D poweramp, along with all the required control and peripheral ie embedded MCU and CPU. I had designed in M.2 connectors for testing different combinations in IV stage/power supply and interface, for the prototyping phase, before deciding on final config and building all on one board. I ended up canning the idea as springing for hard gold on everything increased the manufacturing cost substantially. Do you think its ok to use standard ENIG if its just for prototyping? As it stands i'm using 6 layer ENIG with 2oz outer/1oz inner (panelized and I need this for some power and high current; I know its not ideal for plane cap) and smallest and epoxy filled via in pad (complimentary with advanced PCBs at JLPCB now) so everything else is sorted, just worried about ENIG vs hard gold. The most important one I would still like to use itr for if possible is the XMOS and MCU board, with 2 way i2s. I would much prefer to put this on a module for other projects and its a far nicer interface vs a stacking header or even FPC cable/connector. and I can just put it right at the edge, it doesnt have to be an 'edge connector' (castellated) capability, right? this feature again makes PCBs increase 200-300%. At that time I costed it I was only using 4 layer and not via in pad, but as this capability has gotten cheaper and my design more complex; I increased to 6 layer with via in pad and ENIG, but adding hard gold is a bridge too far and i'll just go without if thats required.
@prashkd7684
@prashkd7684 Жыл бұрын
Phil you should sell the final version of this board as dev board. I'm planning to start a HMI project and would rather use this board as module on my main PCB than starting something like this from scratch.
@MikeHarris1984
@MikeHarris1984 Жыл бұрын
I am extreamly interested in doing this for my projects. It gives me sort of an upgrade path and expantion capabilities where I can have a lower powered Microproccessor board for smaller projects and then have a higher powered one for bigger ones. Or design a board with a breakout connector for future expantion feeding some UART and power lines over the connector, so in the future, when I built another module, I just plug it into it and have another dedicated esp32soc/stm32/atmega2560 or something to feed those breakouts and communicate back over UART... so influding this in my design makes it so adding capabilities is alot of just update code and plug in. My question is, is there an already designed PCB end with the M.2 Key and eveyrhing, or do I have to painstakingly design and hope I got it right in EasyEDA? I would love to test Altium, but 2k a year is way out of my price range for a hobbyest.
@sriyugenther2227
@sriyugenther2227 6 ай бұрын
Hi sir , pls upload the bideo for that carrier board with m.2 slot so that i cam learn more about that pcb too. Thank you
@alfredomorales9559
@alfredomorales9559 Жыл бұрын
Any thoughts on sharing the design so we can use this SoM ?
@T.Lspitz
@T.Lspitz 11 ай бұрын
Im extremely curious about printing my own m.2 nvme pcb blanks and ordering the nand flash chips and memory controllers myself. Would you be willing to do a video on something like that and if its possible??
@TheShorterboy
@TheShorterboy Жыл бұрын
LOL what you can still buy a 446??? Sweet project. You should use a high socket so you can route under the module and use smaller boards.
@SiggyPony
@SiggyPony Жыл бұрын
Very neat :) I need to learn to work the STM32 micro's. I have dev boards but never really got past the basics. Always stuck with Atmel :/
@PhilsLab
@PhilsLab Жыл бұрын
Thanks! I have a few videos on hardware & firmware for STM32 MCUs on my channel - those should be useful for getting started I hope.
@isaacclark9825
@isaacclark9825 Жыл бұрын
Warning. Working with cortex M4 and M7 MCUs can take over your life. When you notice yourself telling folks to buy you test equipment for Christmas, you'll know you've gone too far.
@elektronikprojeniyap
@elektronikprojeniyap 2 ай бұрын
Thanks for affort dude, I have a one question. Why you dont use microvias on STM32F4 components in own components library? Can you put to microvias on stm32f4 pins pad? Sorry about my english. I hope you can understand my question
@mohammad.htarokh2891
@mohammad.htarokh2891 9 ай бұрын
Were can you find the pcb layout for m.2 boards?
@CallistoPili
@CallistoPili 8 ай бұрын
beautiful design. I use Altium at workplace and it is very efficient for high speed stuff, but also I use KiCAD for my personal stuff. This M.2 design is beautiful I know sounds too much but do you have any plan in the future to show new videos about KiCAD specifically with high speed design? thx.
@PhilsLab
@PhilsLab 8 ай бұрын
Thank you very much! I do have a long-form tutorial planned in the near future using KiCad.
@EchONailer
@EchONailer Жыл бұрын
Hi Phil, I was wondering if there is an alternative of the dog bone vias in this design. Is it possible to have a via that is place directly under the BGA pad that has a flat top for the ball to solder too? Great video apologies for the probably, stupid question.
@PhilsLab
@PhilsLab Жыл бұрын
Hi Henry, Yes, that is possible (via-in-pad) but typically quite a bit more expensive. Only really should be done if absolutely needed (high-density, signal integrity reasons, etc...
@MuhammadQasimRauf
@MuhammadQasimRauf Жыл бұрын
Great work as usual Phil. Thumbs up. I had a question I've been meaning to ask you from since a couple of your previous videos. How you're able to override a layer color in layout? I used to do it in schematic part but that would only override partially with boxes of layer color+override color. Hopefully I'm able to get my query across. Thanks
@PhilsLab
@PhilsLab Жыл бұрын
Thanks, Muhammad. There are additional settings you need adjust in the PCB editor, which will change how colours are displayed. Altium has a few docs on how to do that.
@MuhammadQasimRauf
@MuhammadQasimRauf Жыл бұрын
@@PhilsLab I searched for 'net overrides' in the preferences section that lead me to the solution. Thanks for your help also ❤️‍🩹
@jamegumb7298
@jamegumb7298 Жыл бұрын
Audio processing? Could it be used for say connecting to pc through usb and use as a soundcard/dac? surround sound for example?
@PhilsLab
@PhilsLab Жыл бұрын
Yeah, that's right! Just need to create a carrier board with suitable circuitry (USB connector, audio CODEC, power supplies, analogue front-ends, ...).
@theonlyari
@theonlyari Жыл бұрын
Did you have to specify anything extra in your fab drawing for the edge connector?
@PhilsLab
@PhilsLab Жыл бұрын
I typically make a manufacturing drawing highlying the area of the edge connector, as well as directly contacting the manufacturer about it as well.
@nicholasmistry4954
@nicholasmistry4954 Жыл бұрын
Can you share how you split the STM32 in the schematic into A/B/C sub-components?
@PhilsLab
@PhilsLab Жыл бұрын
In the schematic symbol editor, when creating a component, go to 'Tools', then 'New Part'.
@imabeapirate
@imabeapirate Жыл бұрын
Sparkfun does this with their MicroMod line. is your design compattible?
@PhilsLab
@PhilsLab Жыл бұрын
I'm afraid it isn't compatible with the Sparkfun stuff, as I'm just doing this as a personal project.
@shivanshuraj7175
@shivanshuraj7175 5 ай бұрын
Sd ram is word addressed or byte addressed?
@user-td1im4mm8m
@user-td1im4mm8m 7 ай бұрын
How much current/power per pin M.2 supports ?
@BHSAHFAD
@BHSAHFAD Жыл бұрын
What is the purpose of the R2 resistor? Is it to prevent the clock signal from floating? Also why put series termination resistor on X2, but not X1? Also, how do you choose the resistance value of a series termination resistor (is 22ohm just a good rule of thumb)?
@michaelcummings7246
@michaelcummings7246 Жыл бұрын
If I'm remembering right R2 will have to do with power on setup of the MCU and/or the memory config but I would expect he'll cover that in more detail in the next video. The 22ohm resistors are there to prevent ringing on the CLK lines. Didn't use them on the data or address lines because of the relatively slow speed but the CLK are more sensitive so used them there. There is a reason for the value but don't remember the details just know you see it in many different designs not only by him. Might look at some of his past videos where he goes over high speed bus termination. Stuff to do with the crystals really depends on the ones used and what the MCU requires. The low speed one will typically be much less critical as it is just use for the Real Time Clock vs other which will be critical as it is used by the MCU for main clock and effects the setting for bus timing etc.
@tamaseduard5145
@tamaseduard5145 Жыл бұрын
👍🙏❤
@bharatraj32
@bharatraj32 6 ай бұрын
What is the application for 32MB SDRAM? Why do you need such huge RAM memory?
@vibram500
@vibram500 Жыл бұрын
Do you plan to publish this on Git?
@cvspvr
@cvspvr 2 ай бұрын
how long did it take you to make this?
@hanfman1951
@hanfman1951 Жыл бұрын
"very simple design" hm really cool but I don't see it as that simple but you doing a great job :O I would say maybe somewhat simple.
@ClaytonwFirth
@ClaytonwFirth Жыл бұрын
Did you need as many ground connections as you have on the M.2.. could you have used more pins from the MCU instead?
@ClaytonwFirth
@ClaytonwFirth Жыл бұрын
Ok. I should have watched the entire video before asking this question. Sorry.
@PhilsLab
@PhilsLab Жыл бұрын
It's not entirely necessary and you can get away with a lot less. It depends on signal bandwidth and EMI concerns. For a simple 'personal devboard' at these speeds, less would definitely suffice.
@tairegaming5464
@tairegaming5464 Жыл бұрын
Would you perhaps consider selling these,they are s nice package
@rdson1621
@rdson1621 Жыл бұрын
Just wondering, are you living in Germany?! Also wondering, are you running your own business or are you an employee?
@PhilsLab
@PhilsLab Жыл бұрын
Yep, I live in Heidelberg, Germany. And I'm running my own business :)
@rdson1621
@rdson1621 Жыл бұрын
@@PhilsLab Awesome, you made it. That would also be a very interesting video, business owner and what goes along with, the path it takes... I tried too but I failed. Cheers from Basel, roughly 250km southern :-)
@hengzhou4566
@hengzhou4566 22 күн бұрын
Don't quite understand the term "System-on-Module". You can call every PCB a module, then is every PCB with a processor a "System-on-Module"?