How to Make a Raspberry Pi Compute Module 4 Carrier Board in KiCad - Part 1 | Digi-Key Electronics

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Applause] [Music] [Applause] [Music] raspberry pi has released the compute module 4 it has many of the same specifications as the raspberry pi 4 but instead of breaking out connectors and headers on the sides it gives you two hirose connectors underneath that give you the gpio and access to high speed buses this is really meant for industrial and professional use cases and while you can buy a raspberry pi official i o board that breaks everything out for you i think it would be more fun to make my own using keycad and over the next couple of episodes i'm going to do just that and show you how to get started to create your own carrier board let's get started example keycad files for the compute module 4 actually don't run on keycad 4 or 5. you need keycad 6. at the time that this video was made key cad 6 was not out so what we need to do is head to keycad.org go to download pick your operating system and if this says current version 6 or greater go ahead and download that but for my purposes i need to use the nightly build so click on the nightly link and then find the most up-to-date nightly build so for me that is november 10th and we're going to do the 64-bit version let that download when that's done go ahead and run the executable which should install kicad for you you'll want to do this and accept all of the defaults while that's going look for the raspberry pi compute module and what we're looking for is the i o board look for the product page on raspberry pi you should see the i o board and what we're looking for here are the keycad files let's download those because we can use these as a template or as a way to give us some indication about how to lay things out finally head to my github repo for the carrier template and let's download that as well go ahead and unzip all of these let's move both of these projects to the keycad project directory if you don't see it yet create one in documents or wait until keycad has finished installing once kicad is done go ahead and open it you should get to the projects page and let's start by opening the i o board project so that goes to documents keycad cm4io keycad and look for the pro file i'm going to go ahead and enable acceleration and this is the schematic for the i o board notice that the i o board uses hierarchical sheets in keycad you can double click on the sheet to view the individual components in that sheet right click and say leave sheet or press alt backspace to go out feel free to look through the schematic to see how the raspberry pi foundation created the i o board the next thing i'm going to do is modify the template that we downloaded to be the new project feel free to start your own git repo or clone it or do whatever you want and modify the carrier template and check it into your own repository somewhere but for now i'm just going to keep everything in the keycad projects directory so let's go into here i'm going to grab the hardware folder the rest of this is not needed for the project and i'm going to paste it in the top level folder of the kiked projects directory feel free to go ahead and delete the rest of the folders from the repo i'm also going to rename this to whatever i want to call my individual project i'm going to call mine the base carrier this is a bit of a throwback to my old spark fun days when i helped create some of the original blocks that you could put the edison on the base block was actually one of the most popular ones and it was just a simple two usb connectors that gave it power and the other one could be used for data transferring in and out i think it was on the go but i don't quite remember we're gonna keep our project here simple and use it just as a usb client so hopefully we can talk to it from a computer but we'll see how that goes this is all experimental since i don't actually have a compute module 4 on hand yet the other thing you'll need to do is go in and rename basically anywhere you see carrier template rename that to your project name so these are hierarchical sheets that we will go into and modify later but for now any of these files that have carrier template you'll need to rename them so now what i like to do is open up another instance of keycad it will yell at us saying keycad is already running i'm going to say yes continue this actually opens up a second instance running on my computer and that way i can flip back and forth between the cm4io board schematic and alt tab to the one that i'm working on now so let's go to open project we're gonna get out of the github repo go into the keycad projects directory and go into the new project that we just created open up the pro file and this is our project so open up the schematic i'm going to enable acceleration and as you can see i created the template to look somewhat like the i o board so you can double click on these schematics and i left you a lot of space here to create your own schematics and you can even create your own hierarchical sheets outside of this if you wish we won't need that for hours but know that you can create them out here and link them all together so the first thing you should do is click on the page settings and rename this i'm going to update it with the current date leave it at version 1. since it is me i'm going to leave the rest of these the same say okay double-click go into each hierarchical sheet and do the same thing let's take a quick moment to talk about hierarchical sheets to create one there's a button on the right side that says add hierarchical sheet click it and then you can drag to create something that's like a schematic symbol i'm going to name it test since we're going to delete this in a minute and notice that it creates a new file on your computer that is basically another schematic hit escape and then double click to go in it once we're in here i'm going to add a component if you get this error i'm not really worried about it i'm not using any valves and then we want to copy default global footprint library table say ok and you should see all of the libraries here i'm going to look for a basic resistor add this to the sheet in fact let's add one more notice that there are a couple of labels you can use to connect things together i'm going to hit w and create a couple of nets here so you can see what's going on first there are global labels ctrl h to add them so click on your line name it whatever you want a global label is connected to everything in the hierarchy so if i leave the sheet and go into here and i create another global label those will be connected next is the local labels use the local label to create a local label on your node this name this net only exists within this sheet then we have the hierarchical sheet labels let's add one of these i'm going to call it hi because i don't feel like spelling hierarchical right now if we leave the sheet and we click on our hierarchy sheet you should see an option that says import sheet pin and then high will appear there this will allow you to connect lines and nets to other hierarchical sheets or to maybe some other components you have on this top level sheet those are the three basic labels you can use for nets and i left this last one blank so that i can show you how to use say a ground or a power symbol if you use a ground or a power symbol these act as global labels so any of these gnd or power symbols that you add will be connected to all of the others in the other sheets i hope that gives you a basic introduction to hierarchical sheets we can leave these and i'm going to go ahead and delete that one since we don't need it any longer but note that if you want to create your own for your own project you can do that you can connect them use global labels or just use local labels within that for now we're going to be working with just these two hierarchical sheets let's start in the gpio section to begin we'll make a power section that feeds 5 volts to the raspberry pi compute module notice that the compute module takes 5 volts in and spits out 3 volts or 3.3 volts and 1.8 volts after some digging i found this usbc connector usb c allows us to supply three amps across the lines so this is a much better way to go than say like a usb micro connector or something and it will save a space rather than using a big barrel jack looks like digikey does not have these in stock hopefully we can get a hold of these at some point but for now let's start by downloading the snap eda symbol and footprint for keycad once that's downloaded unzip it and we can see that there is a keycad mod file this is the footprint which needs to go into a library to create a library just create a folder with the suffix.pretty and i'm going to give it the name of the part so we'll just call it usb4105-gf dash i'm going to move the mod file in there the step file is for the 3d viewer which i don't particularly care about so what i'm going to do is create a folder for the library that we can just drop into our user libraries i'm going to give it the same name as the part and i'm going to move the dot lib and the dot pretty file and folder in there then let's cut that we're going to go into our project and there should be a libraries folder that was automatically created as part of the template you'll see some of the files from the compute module 4 i o board that i've included in there for the template that you can use if you so desire but for this particular component i'm going to paste this in there let's go back to keycad here's our base carrier and what you want to do base carrier bring up the project viewer go to preferences manage symbol libraries go to project specific libraries and you'll see the cm4 io library already added let's click add existing library keycad base carrier go up one and go to libraries here's the library that we created and we want the dot lib file that is for the schematic symbols click ok and i keep getting this error it looks like it's looking for a legacy library i don't need valve so i'll just click ok for that in fact if i want to get rid of that i can go find valve i'm not using these and then just get rid of that hopefully that will solve that error we want to do the same thing for the footprint so preferences manage footprint libraries project specific libraries and it should be the same steps but this time we're going to add the dot pretty folder click ok let's add a symbol we're going to add it about here here is the library that we just added and this is the symbol for the usbc connector anytime i add a custom symbol like this i like to update the property values to include the manufacturer the manufacturer part number as well as wherever i'm going to buy it from so in this case the digikey part number so this looks like the manufacturer part number but i'm going to start over for some of these because you'll find that these names all are different and when you go to create the bomb it'll be on different rows and kind of a pain in the butt to update them to make them all one row so i'm actually going to get rid of all of these let's bring up the digikey page and digikey should have them all listed here so the manufacturer is gct so i'm just going to copy that i'm going to add a new field called manufacturer paste that in new field mpn which is the manufacturer part number which should be listed here new field i'm going to call it the digikey part number and i'm going to use cut tape that works well for single items and the last thing we need to do is update the footprint this should automatically point to [Music] the dot pretty this definitely does not look right we created that in the usb4105.pretty and you should have the footprint here feel free to take a look at this this should look like a usbc connector and double click on it there we go footprint has been added okay something that i'd like to point out is that the raspberry pi 4 uses a usbc connector for power however notice that after a whole bunch of research online it does not appear that they connected the cc lines correctly so we're going to do this a little differently that being said they do have an overvoltage protection diode here which we'll use in fact we're going to use basically this same one i found it on digikey here this works and looks like they have an ultra librarian model that makes things really easy in keycad click download keycad we want the keycad model download log in after you've logged in you should be able to go to kicad you have to do the process over again i'm going to be a rebel and do everything in millimeters for the footprint that is because i'm going to copy what the raspberry pi 4 and the compute module 4 i o board have done and everything is laid out in metric so you know what i'm going to try a board in metric this time from here the process is kind of the same just like we did with snap eda you want to extract it and it looks like everything is given the current date that you downloaded it to fix that i'm going to give it the manufacturer part number which is just the same that's on the footprint right here i'm going to update the schematic library and footprints.pretty is super generic which might mess up your libraries if you have more than one of these if you have a whole bunch of footprints.pretty it's going to look really weird in your library browser so i'm going to give it a new name there that should work for us in fact i'm going to give this the same name and we're going to cut that and we're going to move it into our libraries and just like we did before go to project specific libraries and add the diodes symbol library and do the same for the footprint rather than bore you with adding every component i'm going to skip to the end schematic note that this process was the same for each component that i added i found what i wanted on digikey and downloaded a pre-made symbol and footprint library please see my other intro to keycad videos if you'd like a more detailed step-by-step walkthrough on how to make a schematic and footprint as you can see i added a few leds here these match up with the cm4io board in fact i directly copied and pasted these leds from this schematic and changed them to match the digi-key parts that i wanted to add this is the usb-c section that we added in the first part i added two 5.1 k-ohm resistors to the cc lines this will allow us to pull up to 3 amps notice that i left all of the data lines unconnected i also added a gpio port these break out the uart spy and nboot lines that you can also find on the raspberry pi 4 header the nboot line needs to be connected to ground in order to upload an os to the raspberry pi if you got the one with the emmc option notice that i don't have an sd card slot here which means that the cm4 module you buy must be the one with the emmc this board that i'm making will not support the light version over here i added a quick or stemi port that allows me to connect a number of i squared c sensors to my breakout board and i've added some optional pull-up resistors here in case i want to put the pull-ups on the board itself i put dnp for do not place and that will tell me to just leave them as footprints and don't actually populate those parts down below i added an eeprom write protect jumper so you can solder this if you don't want your end users to be changing the eeprom on the compute module let's leave this sheet and go to the high speed section all i added here was a basic usb micro or on the go cable but in reality it's just going to be a usb micro footprint just like ones you find on many electronics nowadays before we move to usbc however here it is configured such that the compute module is to be used as a usb client i'm purposely removing the on the go ability because i don't particularly want to figure out how to make it a host i don't care to bring usb devices to this at this point however what i'm hoping to do is that i can just plug in a cable and i can get a serial terminal to my raspberry pi to do that i'm connecting the v bus pin to the id pin on the compute module through a voltage divider this was the same that was in the cm4 i o board if you go to the usb hub section you can see that their on-the-go connector here connects through a 2.2 k ohm resistor to the otg which goes to the id pin and then another 2.2 k to ground my understanding is that this pin allows this usb mux to select between usb client and the usb host which is done through this hub and then there's two usb connectors on the i o board but we just want to bring the client i'm going to ignore the whole host section right now in order to keep the board simple part of that usb section was also an esd suppression circuit so i added one of these which i found on digikey i hope this works i have not had a chance to test usb on the cm4 because i don't have a cm4 and i pray when i get one and get the board all of this works now that the schematic is done we want to fill in the reference designators so from any sheet in your schematic just click the annotate schematic button click annotate it will complete and you should notice that the reference designators have all been numbered regardless of which sheet you go to from there you're welcome to perform the electrical rules check however what i have noticed if i run it i get tons of errors if i go into one of my sheets all of my non-connected pins are gonna throw an error some of the inputs and outputs which look okay to me i'm gonna go ahead and ignore this for now i can double check my schematic to make sure it looks good personally i don't have a lot of luck with ercs i know that i'm probably supposed to care about them but i'm just going to go ahead and delete the markers and hope everything works it can always help to have somebody else look at the schematic for you and do a review prior to laying out the board or even shipping it off to production then we want to go to assigning footprints to schematic symbols so click on that button if i did everything right while i was placing down symbols and updating the footprints in those symbol properties all of these should be populated in fact i can go in here and check by clicking on one of the footprints clicking on the footprint viewer yes that looks like my smd diode those look okay you just want to go through here and make sure all of these have an assigned footprint if not you can click on one say this one didn't have a footprint assigned find the footprint library which this would be resistor smd find the footprint you want to use so the 0603 and double click on it to assign it and you would do that for all of these if they were missing some of the footprints all of this looks okay so i'm going to click apply save schematic and continue click ok i'm going to wait to do the bill of materials when i'm done with the layout click on the open pcb new button and you'll be presented with the template file from here click the button to update pcb with changes made in schematic click update pcb and close you should get all of the components on your mouse so just click anywhere to drop those and on the next episode we're going to take a look at placing them routing them and then shipping this board off for production if you'd like to use these files for your own board or use it as a demonstration to make something similar you can head to my github repository which is named rpi cm4 base carrier and i will be keeping this project in here for now if you want to download it and make it yourself or modify it to your own ends i hope this has given you a head start in creating your own carrier board for the compute module 4. since i don't have a cm4 on hand right now to be able to test any of this i'm just kind of hoping it works so if you see something that looks a little off in the schematic please let me know in the comments i hope i'll get a chance to update everything prior to sending it out to production on the next episode i'm going to show you how to do layout with all of this and order all of the parts see you then [Music]
Info
Channel: Digi-Key
Views: 29,853
Rating: undefined out of 5
Keywords: DigiKey, KiCad, Raspberry Pi, Compute Module 4, CM4, carrier
Id: ypcPJC_umPQ
Channel Id: undefined
Length: 20min 2sec (1202 seconds)
Published: Mon Dec 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.