 I designed my first PCB, I was really intimidated before, I had no idea if it was going to work and it did, and it was amazing, it was the most exciting thing to see this creation come to life and do a very boring job of changing the brightness on my monitors. This was largely in part to KeyCAD, which is a free and open source bit of software, which you probably already know because you're here watching this talk. These two people here know more than anything how important KeyCAD is to the open source community, so this is C-Pressor and Clement. They both in their free time and possibly for jobs as well, hack on hardware for fun and profit, and they are going to talk to us about some of the cool add-ons that can make KeyCAD even more enjoyable to use. So please give them a big hand. Right, hello everyone, welcome to our talk. So we're here to tell you about the ecosystem of tools that people have built around KeyCAD. So KeyCAD is awesome, we all agree about that. If you don't know what KeyCAD is, I'm very surprised you're here, but it's a really nice tool for making circuit boards. It's awesome and some people have made it even more awesome, but sadly a lot of people who use it have no idea that there's all these wonderful extra tools that are not part of KeyCAD but that you can use with it. So we're here to do a bit of show and tell and get you excited about it and hopefully make your life as much easier as these tools have for us. So first of all, there's this thing called the plugin and content manager in KeyCAD and it's possible you're not aware that this is a thing because when the first version that had it was released, it was a bit hidden, like literally not visible in the main window, but that's been fixed now so update your KeyCAD, it will be there and many of the things that like we're going to show you are on there and there's also many other cool plugins that people have built. So go there and check it out, it's got a lot of good stuff. All right, over to you. All right, so I'm going to start to show you KiBuzzard, which makes pretty labels. It's in the plugin and content manager we just had, so we prepared a little demo on how that looks. So usually when you have your board and you want to add some text to explain what's happening, you use a text tool, place it somewhere and you have the boring text with like the boring font, but you can do nice labels with this add-on, so I just pressed the button on the top right, see that again, like over here, open that, you can put in your text, you can specify how it looks, so I'm changing the corner style here and yeah, we have our label, just place it as simple as that and do more of them. And those are really nice, we are going to see them in the 3D view in a moment over there and that is exactly how they will look on the finished board, so this is pretty nice. The next one I'm going to show you is the interactive HTML bomb, so the bomb is the bill of materials, you use that to order parts, but also when you assemble the board to see which parts go where, which you have already placed and so on. And this thing, as it says, is interactive, so I'm going to show how it looks, we are going to start with like this is our finished board in the 3D view, we are going to assemble that, this is it in the PCB view, and what you need to do is figure out which part it is that goes there, so you can open up that part, see what it is, pick it and place it, but that's pretty tedious to do. So we are generating that bomb and opening that up in our browser, so it's just one HTML file that contains everything and there you have a PCB view that is linked with the bomb table. As you can see when I hover over that table it highlights the parts that are on the PCB, so I can see what they are, it goes both directions, so I can place the same values pretty easily. And then there's also on the left side of the table there's those check boxes you can use to track which parts you already like sourced or put in your parts bin and which parts are already on your board. And that is actually configurability, so you can add more rows of that for other check boxes like I ordered that part, I put it in the right place, I prepared it for assembly, I put it on the board and so on. You can also configure if stuff should get crooked or so on, so there's lots of options to that, I figured them out for yourself, I guess. Yeah, that's it for the interactive HTML bomb, I really like that, you can also use that on a tablet computer for example. It's just an HTML file, put it on your workbench, press things and be done. There we go, now you're in camera. Okay, so that was I think our second tool, so up for our third tool which is called Keykit. That one is used to make panels of PCBs, so if you have a single PCB but want to have a panel of them, that automates that stuff, so you don't have to draw your panel manually as you would have done earlier before this tool didn't exist. So here's a quick demo of that, so we start with our single PCB, it's a rectangle one, a pretty simple one. We need to actually make a new file for this tool to work, then open up the tool, select which board we want to penalize. On the left side we have all those settings in a nice graphical user interface. On the bottom there's those settings as JSON representation and on the top you have that if you want to run it from the command line, so you can do that tool interactively and on the command line. So just hit penalize and there's our panel. I'm going to show that in the 3D view, take some time on that machine and this is how it looks. So we have a panel with some tabs and mouse bites in it, but there are some parts missing because I put in the wrong settings, so we're going to change those, going to change the spacing between the PCBs a little bit and also change the way how the tool scans for which parts go on the panel and hit penalize again, it replaces what we already had. We get a new panel and you can probably see that there are some more connectors on it once the GL player decides it wants to work. Here we are, so there are now a few more parts on there and this is our finished panel. You can configure also not this type of panel routing, you can also include vscoring, add tooling holes, fiducials and everything that's required for a proper PCB assembly. So there's lots of options to that tool, it has a great documentation, so one of the best documented tools I actually know, so look into there to see what it can do. Next is also Keykit, it's the step after that. So when we have our panel we want to generate production data, so export Gerber files, you can do that manually in Keycard, but you can also automate that. And good reason for automating that is making less mistakes and also you can have presets for different manufacturers because there's different ways on how those Gerber files should be called and there's naming conventions and you can script that. So on the command line call Keykit, I put in the FEP PCB way that's preset that is in there and then we look into the out directory and there are our Gerber files already. As simple as that and we can view them and then we will see that there is the panel of our Gerber files, this is the panel we had earlier exported with the correct settings to order them on PCB way. There are presets for a few different manufacturers but you can also do your own and reuse them every time you make a board. So we talked a lot about boards now, so another tool we need is one for generating footprints. So quite a lot of footprints are tedious to make manually because they had a lot of pins. We have an example here, this thing has 42 pins placing them all one by one is definitely not something one would do, so let's automate that. To do that we need to look at the mechanical drawing and figure out where those things are and where they go. So we check the other page of the data sheet where we have all the measurements and how big the part is, how big the landing pads are and so on. And then we punch them into a YAML file. So I prepared that so there's already the finished YAML file so you see that there are a lot of numbers in that file that are basically the same that are in the data sheet. I think all the things are pretty self-explanatory but there's also great documentation for this generator. So what we do next, we just run it, it says it's building the footprint, it has generated that one and now we can open it up in the footprint editor. And that's it, there's our generated footprint. Actually typing in all those numbers took me like a few minutes. But now comes the interesting part, if you want to make variations of that you can just copy paste it, edit it. And what I'm going to show next is we're going to change the amount of wires in there as an example. So I go over here, remove one setting for the wires, enable another one, save that, run the generator again and then we're going to have a look at the changed output of the generator. That one should have only three wires, like so. And if you look at that in the 3D view we can also see that the paste, which is the gray part, doesn't overlap the wires so we probably have less paste leakage when soldering so it's most likely a better footprint. This generator can not only do these types of footprints that I just shown so this is a QFN footprint. Can do various other types of packages as long as they are reasonably sane so there are quite a lot of packages out there that have not a regular pin spacing and simple odd pad shapes. The generator cannot do that but you can probably like do half to work with the generator and then edit the rest of the stuff manually. Next tool is actually not directly related to PCBs but to your whole assembly because what you need to do in most cases is actually not have a PCB but also connected up to lots of other things so you need wires. It's nice to document them and you can do that with wirewiz. In a similar way that we've seen with the footprint generator you can type in how your wiring harness should look like. So in this example we have two connectors at the top then we define one cable between those connectors and the third block at the bottom is how those are connected. We run through the generator and get a visualization like this. I have another example for that that looks a little bit more fancy, it has more colors, more pins. You can do that with multiple connectors so it's not just limited to two-two on each end so there's basically no limits on how complicated your cable should look like. You can also include pictures in there for documentation of how the plug looks, add more text and so on. This tool also has a pretty nice documentation, there's lots of examples, you can look up for inspiration. I totally recommend using that. Now I think it's time for Clement to show you a few other tools. The next tool we're going to look at is KeyCat StepUp. This is an enormously complex piece of software which does horrible things behind the scenes to make your life easier. It is a plugin for FreeCat and FreeCat is a parametric 3D modeling editor for solid modeling and solid CAD. What KeyCat StepUp does is it can read and write KeyCat files of all currently usable versions which is a ridiculous maintenance effort but it's amazing that it exists because you can do really cool things with it. We're going to take a footprint that was just generated and make a 3D model for it. We have this footprint but it has no 3D model. This is the case for many footprints in the KeyCat library and all footprints that you've just freshly generated yourself. We're going to import that into KeyCat using KeyCat StepUp mod. We're going to load a footprint and I'm loading the PCB here. This is a mistake, it should be the footprint but in this case it just does the right thing. This is our footprint and we're going to then design a model on top of it. This is now the standard FreeCat design process which is like we're building basically a sketch and then extruding that sketch. I'm making a rectangle here and you then look on the datasheet and check those dimensions and enter those in here. This one is supposed to be 4 and then the height of it is supposed to be 1 so we're going to extrude it to 1mm. Then we're going to add a pin 1 indicator in the top left so that's the orientation that the footprint was in KeyCat. Then we can use the edges we just added as reference and mark the distances from the edge. Then the size of that circle which is usually not specified but you can also do it by eye. Then we're going to change the color. A really nice thing about using FreeCat for this kind of work is that you can actually get a screenshot from your datasheet and insert it as an image plane and have that in the background and make your 3D model match. Even if the dimensions on the drawing are not really well documented you can still kind of fudge them into the right place and get the model that's good enough for mechanical testing. I'm exporting this as a step file now and then on the KeyCat side I go in there and add a 3D model so I find that file and then we have a 3D model on our part. That's one of many things you can do with KeyCat StepUp. I'll show you two more. We're going to take a board which is just a really boring rectangle. We want to make it fit around the common household object at HackerCamps which is this matiboto which is slightly incorrectly measured. I do have a datasheet for a matiboto but I was too lazy to type in all the correct dimensions. We're going to import our board using the loadboard function and it's going to complain that it's missing some parts but that's fine. Then we're going to take this bottle and copy it and paste it into that file. Then we're going to change its position to get it where we want it to be. What we want to do here is make a board that is much nicer shaped and that then fits around the bottle without any additional support. We're going to place the bottle in the board where it's supposed to go and then we're going to change the shape of the board. I'm hiding the board itself and showing just its outline which is also imported from the KeyCat file and I'm going to delete that because I don't need it anymore. I know where the parts on it are. I can still see the circuits that are on there. Now I'm just going to use the arc tool to make some nice looking shapes. Drawing this kind of shape in KeyCat is possible but extremely painful. It's not something you really want to be doing and in FreeCat it's really, really easy. I'm using the tangent tool to align all the curves so they all line up and then I can drag them around to make them have the shape that I imagine for this. This board only has one part on it. If you have a bunch of parts on it you can also see that we cannot move things around there because then there won't be enough space for the parts and things like that. Now we're adding a cutout for the bottle. This is a 2D view but we can actually rotate it in 3D and use that to make it fit exactly that spot on the bottle. We can now take this and then push that sketch to a PCB and this will actually overwrite our KeyCat file with the new shape. Over here we need to actually close this file and open it again because it's now being edited outside of KeyCat. Now we can remove the old outline and we have this one. That's how that works. I'll show you another thing. This is actually more like a FreeCat feature in itself. We're going to take a board and fold it. You might be wondering why you want to fold a PCB but there is a thing called flexible PCBs so you can actually make PCBs that bend. It's very hard to actually check whether those are correct without actually bending them. Before discovering this tool I would just print them out on paper and bend them but it can now be done in CAD. FreeCat has this tool called Sheet Metal Workbench and with that you can take a board. This is a board also imported the same way. I've hidden the board and just have the outline. I've added a line to it and I can bend around that line and you can put in a bunch of bends and make it go any direction, any angle, any turn radius. This is just a simple PCB cable made to fit between two parts of a very small device. This is how you verify that it actually fits. Another tool. This is a KeyCat plugin called Replicate Layout. It is there to save your time and effort when you are doing a lot of the same thing. For example we have a complex design here with a lot of hierarchical sheets. Each one has an HDMI connector which has a bunch of high speed connections and some ESD diodes. I've painstakingly done the routing for the exit from the connector in here. I don't want to do it eight more times. What I do, I select the connector and go to Replicate Layout and it finds all the sheets in the schematic that match this one. I can select any number of them and then go Replicate Layout and it will place the parts and connect them in exactly the same way. This saves such an enormous amount of effort. Don't repeat yourself, make the computer do it. Over to you for the next one. The next one is called PCB Checklist. It's actually not really a tool. It's just a list somebody made with a list of all the different types of mistakes you can make when designing a circuit board. What you can do is go through the list and make sure you don't repeat them. I think all mistakes I had on circuit boards so far on my own were actually already on that list. If I just had followed that list, I would not have made them. Here's an example of just the top of the schematic review checklist. I didn't count how many points are in there, but this is perhaps a fifth of the complete list, perhaps less. There's one for schematic review and one for PCB review. I highly recommend you check this one out. If you find something that's not on the list, then open a pull request and ask to add it to that one. That brings us to the last tool, GIT. Keycard was designed to have its projects tracked in GIT. There's actually a lot of design and engineering that we have here. It produces nice diffs when using GIT. For example, most files have a stable sorting. There's a few things that don't work too well right now, but it's really good, I would say. If you change just a few items like text, move one part around or so, you can actually read that in the diff and see what has happened. I highly recommend you manage all your keycard projects in GIT. That already brings us to the end of the tools we wanted to show you today. We have one more slide with all the URLs to all the tools we showed you today. We are also going to upload those slides in pre-talks. We are going to upload those slides in pre-talks. You can look them up over there and follow those links. This was just a small introduction. We selected those tools that are the easiest to show and that bring the most value to the average user, but there are quite a few more. Just search around. There's, for example, the Keycard ISC channel, or there's a Keycard forum. Lots of people hang around that have created lots of more different tools and workflows for Keycard. Thank you. I think we're ready to accept some questions. Thank you very much, both. If anyone has any questions, there are two audience microphones in the centre aisle, so please wander up to there and ask them. Hello, my name is Axel Rost. I have a question about the interactive HTML bomb. It seems to me like a tool that you use over several days while managing stuff. Does it store the status of the check boxes anywhere in the cookie or somewhere? Do you have to do it all again? Yes. It does store the state, I think, in the local storage of your browser. In the demo that I showed, you've probably seen that a few of those boxes were already checked when I opened that thing up in Chromium. Twice because I made a mistake the first time. But the state was saved. Thank you. Hi. In the same example in the HTML thing, you had some LEDs lined up around some shape. Do you have an extension for that, a plug-in, or do you do that manually? There's actually also an action plug-in in the plug-in and content manager that helps you to distribute parts around the board, also in, for example, polar coordinates or rectangular. In that specific case, it follows a rather complex bzq of outline. So what I did is I planted up in Mechanical Cat, exported those layers into Keycat and manually moved the LEDs to the exact position. It's only 32, so it was doable. You can, of course, write the script to do it because there's a Python API for Keycat. If it would be more than 32, I would probably have scripted that. Okay. If there are no more questions, that brings us to a close. Go forth and use your new Keycat abilities for good or at least morally dubious purposes. Oh, there's another. Hello. So if people don't have you folks to point them out to this kind of thing, what can we do to Keycat to make all these things more obvious? Not hide the plug-in and content manager. You can also join the documentation team. Keycat is always looking for people to help. For example, if you open the current menu, there are quite a few spots where it says to do, document this, write down how it's going to be used. Any help there is welcome. That's it for the stage for the rest of the evening. Thank you very much for coming and thank you, Clements and Steve Presser.