1 00:00:00,001 --> 00:00:12,700 Welcome to the CircuitPython Show. I'm your host, Paul Cutler. This episode I welcome back Bradán Lane, who first appeared on the show back in Episode 19, which I've linked to in the show notes. 2 00:00:14,000 --> 00:00:15,760 Bradán, welcome back to the show. 3 00:00:16,340 --> 00:00:17,380 Thank you. It's great to be back. 4 00:00:17,820 --> 00:00:23,520 I'm excited to have you here. Designing a PCB is something I'm hoping to tackle myself this year, so I'm excited to learn more. 5 00:00:24,000 --> 00:00:30,060 Let's start at the beginning and someone wants to design a board. What tools would you recommend for someone just starting? 6 00:00:31,260 --> 00:00:39,620 So designing a board actually has one prerequisite before that and that is figuring out what the circuitry or what the design needs to do. 7 00:00:40,040 --> 00:00:44,420 But jumping into what about designing the board, there's a few different tools. 8 00:00:45,120 --> 00:00:51,820 And you know there's third party and commercial tools but the two within the bulk of the community that I keep seeing pop up over and over again. 9 00:00:52,000 --> 00:00:58,580 One is a web-based tool called EasyEDA, and it has a small download module if you want to do it offline. 10 00:00:59,160 --> 00:01:11,420 But EasyEDA, first of all, is very simple in its user interface, it's very intuitive in its user interface, and it integrates very well with one of the PCB manufacturers that we tend to use a lot. 11 00:01:12,000 --> 00:01:16,660 A big step up from that is KiCad. 12 00:01:17,400 --> 00:01:19,140 And KiCad is an open source project. 13 00:01:19,400 --> 00:01:21,920 For years it's been sponsored and funded by CERN. 14 00:01:22,340 --> 00:01:23,920 And so it has a permanent staff. 15 00:01:23,980 --> 00:01:25,180 It has a budget. 16 00:01:25,380 --> 00:01:26,160 They know what they're doing. 17 00:01:26,700 --> 00:01:28,760 And starting three or four years ago, 18 00:01:29,540 --> 00:01:32,920 KiCad shifted to a major update every year. 19 00:01:33,240 --> 00:01:35,380 And that really got people on board 20 00:01:35,560 --> 00:01:36,560 because before that it was kinda, 21 00:01:37,260 --> 00:01:38,560 when are they gonna fix this feature? 22 00:01:38,680 --> 00:01:39,960 When are they gonna add that feature? 23 00:01:40,580 --> 00:01:54,240 And so going to point releases throughout the year and a major release that people can depend on, you know, approximately every 12, 12 and a half months really gave people who were on the fence that last bit of nudge they needed to move it in. 24 00:01:54,440 --> 00:02:02,980 Now, the learning curve on KiCad, some people are going to say it's pretty steep, but the truth is the learning curve on almost any design tool is pretty stiff. 25 00:02:03,100 --> 00:02:08,740 You know, getting the basics in there, you can do that pretty well with easy ADA and you can do that pretty well with KiCad. 26 00:02:09,220 --> 00:02:15,020 The big advantage for me, at least, I went to KiCad almost immediately, was it let me 27 00:02:15,140 --> 00:02:16,380 grow as a designer. 28 00:02:17,600 --> 00:02:21,800 Whereas within EasyEDA, I started to bump up against its limits pretty quickly. 29 00:02:22,540 --> 00:02:28,340 That being said, the majority of boards that even I design today could easily be done in 30 00:02:28,360 --> 00:02:30,900 EasyEDA if I were more fluent in it. 31 00:02:31,200 --> 00:02:33,900 So those are the two that I kind of talk to people about. 32 00:02:34,360 --> 00:02:38,360 If I go into a school and I'm talking to students, I'm going to talk to the teaching staff and 33 00:02:38,360 --> 00:02:44,540 probably recommend EasyEDA. It also has an advantage in the academic space because if 34 00:02:44,800 --> 00:02:48,220 schools and stuff have like firewalls and lockdowns and they can't install software, 35 00:02:48,860 --> 00:02:53,220 EasyEDA is a browser-based solution and that works great. So those are my two recommendations. 36 00:02:53,900 --> 00:02:56,860 What are some of the tricks you use when you're first starting out designing a board? 37 00:02:57,800 --> 00:03:02,780 There's a number of different types of boards, but the boards that I tend to design are feature 38 00:03:02,780 --> 00:03:08,900 boards as opposed to say a development board. So if you think about a lot of what Adafruit provides 39 00:03:09,520 --> 00:03:14,940 and what Spark and some of the other groups provide, a lot of them are building development 40 00:03:15,100 --> 00:03:19,260 boards. These are boards with a number of pins that run down either side that are broken out 41 00:03:19,360 --> 00:03:23,900 and so you buy the board and then you start adding capability to it external to that. 42 00:03:24,780 --> 00:03:30,140 And I use development boards as a precursor to designing my own custom board. Then I will jump 43 00:03:30,140 --> 00:03:36,100 into designing my own custom board which has all of those extra accessories or sensors built into 44 00:03:36,260 --> 00:03:42,680 and on the board. So I start with a standard PCB breadboard and I stick a development board, 45 00:03:43,100 --> 00:03:47,320 often from Adafruit or a third party, in the middle of that and then start sticking other 46 00:03:47,400 --> 00:03:53,320 components off the sides to just make sure that I'm not out in left field somewhere. I don't need 47 00:03:53,500 --> 00:03:58,860 everything to work but I need to know that like stuff is going to work. So as an example, getting 48 00:03:58,860 --> 00:04:03,580 a touch sensor to work? Well, getting a touch sensor to work isn't really difficult, but 49 00:04:03,880 --> 00:04:10,120 understanding the nuances of how a touch sensor changes depending on the size of it or its 50 00:04:10,460 --> 00:04:15,100 placement or what else may be around is much easier to do on a breadboard than it is jumping 51 00:04:15,200 --> 00:04:22,260 immediately to a printed circuit board. And again, I use various resources on the internet to help me 52 00:04:22,360 --> 00:04:27,580 kind of get that done. So then it's time to start putting it down in a design tool like EasyEDA or 53 00:04:27,580 --> 00:04:57,560 or a keycad, and the very next step that I do is I start looking for resources so that I don't make, you know, beginner mistakes. And that comes down to the open source hardware community. And there's actually an entire initiative of open source hardware and there's registration and stuff. But all I'm really interested in is I want to look at the schematic for a board that I know works. And potentially I want to look at the PCB layout for certain little pieces of that board. I'm not interested in the whole board, but I'm interested in pieces of it. 54 00:04:57,580 --> 00:05:03,320 it. And so I looked to the open source community and a couple of places that I can give examples 55 00:05:03,380 --> 00:05:09,120 is like the very first time I wanted to design a board around the Raspberry Pi Pico, the chip on 56 00:05:09,140 --> 00:05:14,340 that's called an RP2040. Well I started with a Pico on a breadboard and said okay now I understand 57 00:05:14,440 --> 00:05:20,660 how to code for it, I understand how it works, I want to design the actual board. So I went out and 58 00:05:20,780 --> 00:05:26,139 looked into the open source hardware community and found two sources right off the bat. One was 59 00:05:26,140 --> 00:05:30,600 is Adafruit, who publishes all their board designs, they publish their schematics, they 60 00:05:30,700 --> 00:05:35,120 publish their PCB layouts, you can see everything they do. Another one was a group out of Europe 61 00:05:35,320 --> 00:05:40,540 called Solder Party, and they too are very big in the open source. They open source everything 62 00:05:40,720 --> 00:05:46,300 they do. And so by looking at those two sources, I started to understand little things around 63 00:05:46,580 --> 00:05:54,460 routing of power or routing the USB, because reading the data sheet and reading the official 64 00:05:54,460 --> 00:06:00,780 electrical engineering descriptions of like how to route USB, there's lots and lots of constraints. 65 00:06:01,580 --> 00:06:07,260 The truth is, for a lot of these chips, you can get pretty sloppy and it still works perfectly 66 00:06:07,400 --> 00:06:12,440 fine. And there's no way to know that without either designing your own board or looking at 67 00:06:12,520 --> 00:06:16,620 other people's boards that you know work. And so that's kind of one of the things that I start to 68 00:06:16,760 --> 00:06:23,660 dig into before I design my own board is, can I find examples to help me avoid a lot of mistakes 69 00:06:23,660 --> 00:06:33,040 or a lot of iteration. And so that gets me, that probably jumps two or three iterations into my design, because I'm taking from other people and using the work that's already published in the open source community. 70 00:06:34,120 --> 00:06:43,720 -Standing on the shoulders of giants, we like to say in the open source. -Yeah, or as the literary people say, you know, what is it? Good authors plagiarize, great authors steal outright. 71 00:06:43,720 --> 00:07:01,720 - Exactly. So it's really not that different than learning to code. A lot of people will take a look at an existing program, rip it apart, put it back together, add little bits. So you're doing the similar thing when you're writing your schematic. You're looking at other people's designs that are in the open source community to get ideas and to learn those best practices. 72 00:07:01,720 --> 00:07:08,460 >> Exactly. That's even more true when you start dealing with boards that you want to support CircuitPython. 73 00:07:08,980 --> 00:07:19,460 Because CircuitPython can support almost anything, but CircuitPython is very easy to support if you're using stuff that other boards have already done ahead of you. 74 00:07:19,660 --> 00:07:21,400 So again, it's standing on the shoulders of giants. 75 00:07:21,720 --> 00:07:31,440 So for instance, if I know I want a board to support CircuitPython, let me use as an example, you know, that early RP2040, the Pico kind of base thing. 76 00:07:32,140 --> 00:07:41,840 Well, not only did I find that SolderParty had created their RP2040 stamp, which had all the broken out capability I wanted, it also supported CircuitPython. 77 00:07:42,720 --> 00:07:48,640 So I knew right up front that, okay, if I use the RP2040 the same way they did, and I use the same 78 00:07:48,920 --> 00:07:54,600 memory chip that they did, and I use the same crystal, and I use the same USB, then I'm very 79 00:07:54,720 --> 00:07:59,540 likely to be able to support CircuitPython as easily as they did. And sure enough, when I went 80 00:07:59,640 --> 00:08:04,660 to add CircuitPython to that design, I started with their code again, because that too is open source. 81 00:08:05,100 --> 00:08:08,780 I look for examples of hardware that somebody else has already tested to work together. 82 00:08:09,520 --> 00:08:16,560 LEDs that work together or serial that works together or infrared was something that I started playing with last year in earnest. 83 00:08:17,260 --> 00:08:24,780 And so I looked at Adafruit's example from their Circuit Playground Express, I believe is the hardware that they use. 84 00:08:25,380 --> 00:08:39,340 And I also classify that as sort of a feature board as opposed to a dev board. And so I looked at their board, I looked at how they did their chip, I looked at the memory they used, and then I looked at the various components they used, looked at their schematic, and then I started building my schematic. 85 00:08:39,460 --> 00:08:44,420 based partially on that and then partially on the RP2040 86 00:08:45,360 --> 00:08:48,320 schematics that I had found and kind of pieced it together. 87 00:08:48,440 --> 00:08:52,680 And so that getting the schematic mostly figured out came 88 00:08:52,880 --> 00:08:56,020 from just like you were saying with code, copying, pasting, 89 00:08:56,140 --> 00:08:58,940 bits and pieces from other open source opportunities. 90 00:08:59,920 --> 00:09:01,020 Once I had the schematic, 91 00:09:01,220 --> 00:09:03,560 then it was a matter of the board layout. 92 00:09:04,540 --> 00:09:07,140 If you think about a dev board, most of them are rectangular, 93 00:09:07,920 --> 00:09:11,000 Very simple rectangular, quite often they'll have headers down either side. 94 00:09:11,600 --> 00:09:18,900 And so I'll go into the PCB layout, import the schematic data, and that just gives me all these parts. 95 00:09:19,480 --> 00:09:26,720 And what they call rat's nest, which is these unofficial lines that connect pins together based on the schematic. 96 00:09:27,500 --> 00:09:31,840 And I look at, well, what are the going to be the constraints of my board? 97 00:09:32,040 --> 00:09:34,820 So if I'm doing a development board, the constraints are going to be those pin headers. 98 00:09:34,960 --> 00:09:36,020 They got to go down both sides. 99 00:09:36,480 --> 00:09:38,280 They have to be spaced apart a certain amount. 100 00:09:39,000 --> 00:09:41,880 And so I'll lay those out and then start looking 101 00:09:41,980 --> 00:09:43,500 at the rat's nest to try to figure out 102 00:09:43,680 --> 00:09:47,340 what parts most likely belong in different areas 103 00:09:47,640 --> 00:09:48,260 around the board. 104 00:09:49,060 --> 00:09:50,360 And I'll spend a fair amount of time 105 00:09:50,480 --> 00:09:53,660 just moving parts around until I can see 106 00:09:54,240 --> 00:09:56,960 that the rat's nest don't cross over too much, 107 00:09:57,300 --> 00:09:59,360 and they're as short as they can be, 108 00:09:59,860 --> 00:10:01,780 and there are logical things in the right place. 109 00:10:02,460 --> 00:10:05,679 And then I'll actually start doing 110 00:10:05,680 --> 00:10:06,600 what they call the routing. 111 00:10:06,820 --> 00:10:10,760 And the routing is where they connect physical traces 112 00:10:11,040 --> 00:10:15,300 of copper between the different pins that represent 113 00:10:15,420 --> 00:10:18,120 what that rat's nest was telling me I needed to do. 114 00:10:18,400 --> 00:10:20,780 So the great thing about these EDA tools is, 115 00:10:21,420 --> 00:10:23,020 when you go from schematic to PCB, 116 00:10:24,080 --> 00:10:27,040 they kind of tell you what work you need to do 117 00:10:27,300 --> 00:10:28,600 and how you need to do it. 118 00:10:29,140 --> 00:10:32,260 So as long as you got your schematic correct and configured, 119 00:10:32,560 --> 00:10:34,040 then when you go to do your board layout, 120 00:10:34,560 --> 00:10:37,240 you have that information in front of you as sort of hints. 121 00:10:37,700 --> 00:10:39,200 And it's sort of like notes in the margin. 122 00:10:40,060 --> 00:10:41,420 And so you then go through the process 123 00:10:41,480 --> 00:10:42,620 of laying out the parts. 124 00:10:42,700 --> 00:10:43,620 And there's a few tricks. 125 00:10:44,200 --> 00:10:45,500 You'll notice on some boards, 126 00:10:46,180 --> 00:10:47,220 if there's a microcontroller, 127 00:10:47,760 --> 00:10:49,880 there's pins on all four sides of a microcontroller, 128 00:10:50,020 --> 00:10:52,600 which means you've got these routes going every which way. 129 00:10:53,260 --> 00:10:55,220 And if you've got those rails going down 130 00:10:55,380 --> 00:10:56,980 the left and the right side of a board, 131 00:10:57,480 --> 00:11:00,380 one of the tricks they do is they'll put the chip on the 45. 132 00:11:01,820 --> 00:11:03,800 So instead of having a top, a bottom, a left and right, 133 00:11:03,860 --> 00:11:07,400 What you have is you kind of have an upper left and a lower left and an upper right and 134 00:11:07,400 --> 00:11:11,360 a lower right, which now makes them much easier to get to those pins that run up and down 135 00:11:11,420 --> 00:11:12,220 the sides of a board. 136 00:11:12,940 --> 00:11:16,920 And that's a trick that I didn't understand until I tried to lay out my first board. 137 00:11:16,980 --> 00:11:20,280 And then I went and looked at, you know, a board layout from another company or another 138 00:11:20,380 --> 00:11:21,580 group in the open source area. 139 00:11:22,000 --> 00:11:25,040 And it's like, Oh, now I know why they did that. 140 00:11:25,640 --> 00:11:25,860 Sure. 141 00:11:26,460 --> 00:11:27,440 Little things like that. 142 00:11:27,800 --> 00:11:31,280 You know, there's also hints you'll get, you know, for instance, if you've got a USB connector, 143 00:11:32,100 --> 00:11:35,260 the best practice is try to keep those traces as short as possible. 144 00:11:35,920 --> 00:11:38,200 Try not to have stuff cross over and under those traces. 145 00:11:39,000 --> 00:11:42,040 And so there's best practices out there that over time you learn. 146 00:11:42,780 --> 00:11:45,960 All my first boards, no USB at all on them. They were just battery powered. 147 00:11:46,680 --> 00:11:50,780 And so over time the boards get more and more complex. But to begin with, 148 00:11:51,540 --> 00:11:54,600 you know, it's the schematic to the PCB. Now that said, there's, 149 00:11:54,780 --> 00:11:58,360 there's a few things that as a very early designer, 150 00:11:58,460 --> 00:11:59,460 when I first started out, 151 00:12:00,040 --> 00:12:03,880 One of the things that I did was I'd create a board 152 00:12:03,960 --> 00:12:06,400 that was just part of the problem that I was trying to solve. 153 00:12:06,960 --> 00:12:09,300 So for instance, the touch sensors example. 154 00:12:09,760 --> 00:12:11,900 Well, okay, so I created a board 155 00:12:11,960 --> 00:12:13,440 that had nothing but touch sensors on it. 156 00:12:14,120 --> 00:12:16,020 And it cost me, you know, a couple of bucks 157 00:12:16,080 --> 00:12:17,180 to have me manufactured. 158 00:12:18,040 --> 00:12:19,840 But then I could plug it into my breadboard 159 00:12:20,340 --> 00:12:24,180 and hook it up to an Adafruit Feather or another board 160 00:12:24,720 --> 00:12:25,800 and learn how it worked. 161 00:12:26,600 --> 00:12:27,240 Same with LEDs. 162 00:12:28,520 --> 00:12:30,100 sometimes I'll actually do that. 163 00:12:30,240 --> 00:12:31,780 Now I've graduated from doing that 164 00:12:31,900 --> 00:12:33,440 to doing what I call a kitchen sink, 165 00:12:34,420 --> 00:12:36,280 which is if I'm starting down a new path, 166 00:12:37,040 --> 00:12:39,220 I'll design a board, I don't care what shape it is, 167 00:12:39,640 --> 00:12:41,480 but I'll put like everything on it 168 00:12:41,520 --> 00:12:43,100 that I think I might wanna use. 169 00:12:43,680 --> 00:12:47,980 And I'll populate part of it and test it and get it to work. 170 00:12:48,020 --> 00:12:49,200 And then I'll add a couple of pieces 171 00:12:49,320 --> 00:12:51,440 and I'll hand solder parts on and hand solder parts on 172 00:12:52,220 --> 00:12:53,640 and figure out what worked and what didn't 173 00:12:53,660 --> 00:12:55,140 and what I understood and what I got wrong. 174 00:12:55,760 --> 00:12:57,540 And so when I'm designing a feature board, 175 00:12:57,960 --> 00:13:00,220 Often I'll design what I call a kitchen sink. 176 00:13:00,380 --> 00:13:02,680 Just throw everything you think you might want to learn 177 00:13:02,780 --> 00:13:03,800 about it on there. 178 00:13:03,900 --> 00:13:05,720 And it's great because over time, 179 00:13:05,820 --> 00:13:07,220 you populate the whole board. 180 00:13:08,100 --> 00:13:10,080 And not only do you learn about the design of the board 181 00:13:10,120 --> 00:13:11,100 and what worked and what didn't, 182 00:13:11,660 --> 00:13:13,000 but you also learn how to code for the board 183 00:13:13,040 --> 00:13:13,700 you just created. 184 00:13:14,780 --> 00:13:16,620 Those are kind of the approaches I've taken. 185 00:13:16,720 --> 00:13:19,480 I start with maybe designing just part of a board 186 00:13:19,700 --> 00:13:21,220 or a board and put everything on it, 187 00:13:21,580 --> 00:13:23,900 making sure that I can remove stuff and it'll still work. 188 00:13:24,420 --> 00:13:25,240 - That's a really good tip. 189 00:13:25,280 --> 00:13:27,219 I would have never thought about designing 190 00:13:27,220 --> 00:13:34,080 almost a sub board and considering how cheap some of those fabrication companies are that it's just a couple bucks or ten bucks to get five of them. 191 00:13:34,600 --> 00:13:37,800 To build that back into your design on the breadboard is genius. 192 00:13:38,600 --> 00:13:47,980 I do that at least once a year. I'll design two or three of these little sub boards knowing that I need to test them out. And the great thing about them is I keep them. 193 00:13:48,660 --> 00:13:57,200 So if I went like I'm working on a new chip right now, well if I want to design into that feature board that I'm going to create, touch sensors, well I can go grab a touch sensor board. 194 00:13:57,200 --> 00:14:12,080 board I've got that has, you know, touch sensors of various sizes and touch sensors that are, that are masked or exposed. Same for an LED board, you know, boards got, you know, just four LEDs on it, or it's got four NeoPixels on it. And so I could just reuse those. 195 00:14:12,860 --> 00:14:19,600 So we've got the board schematic done, we've got the layout done, and the components are picked out and the traces are all run. What comes next? 196 00:14:20,640 --> 00:14:23,700 One of the things that occurs, and you touched on it, 197 00:14:24,020 --> 00:14:26,940 but it can actually be more work than we often imagine, 198 00:14:27,080 --> 00:14:28,960 which is we pick out the parts. 199 00:14:29,540 --> 00:14:32,540 Well, we need to pick out the parts in one of two ways. 200 00:14:32,780 --> 00:14:34,300 Either the parts we're gonna order ourselves, 201 00:14:35,120 --> 00:14:36,280 or if we're gonna have somebody else 202 00:14:36,600 --> 00:14:37,900 manufacture the board for us, 203 00:14:38,400 --> 00:14:41,060 we need to pick out parts that they have available to them. 204 00:14:41,700 --> 00:14:44,040 I wanna jump back to the EZ-EDA example. 205 00:14:44,300 --> 00:14:46,460 One of the things that's great about EZ-EDA 206 00:14:46,600 --> 00:14:47,980 is it's completely integrated 207 00:14:47,980 --> 00:14:50,660 with one of the board manufacturers in China. 208 00:14:51,400 --> 00:14:54,000 And that board manufacturer will do assembly for you. 209 00:14:54,800 --> 00:14:57,380 And the most cost-effective low-cost solution 210 00:14:57,560 --> 00:15:00,280 for their board assembly is if you use parts 211 00:15:00,360 --> 00:15:01,160 they have in their catalog. 212 00:15:02,180 --> 00:15:04,820 So the great thing about EZ-ADA is when you pick parts, 213 00:15:04,860 --> 00:15:06,680 it knows what parts are in the catalog. 214 00:15:07,560 --> 00:15:09,080 And so it tells you right up front, 215 00:15:10,020 --> 00:15:11,620 this is the LED you should use. 216 00:15:11,900 --> 00:15:13,620 And if you pick a different LED, it's gonna warn you, 217 00:15:13,720 --> 00:15:14,700 well, you can use that LED, 218 00:15:14,840 --> 00:15:15,800 but we don't have it in our catalog. 219 00:15:16,700 --> 00:15:22,340 EasyEDA is great from that standpoint because they help you with the schematic, they help 220 00:15:22,400 --> 00:15:27,140 you with the PCB layout, they help you with what's called the BOM, the bill of materials, 221 00:15:27,660 --> 00:15:30,280 and picking parts that are in inventory and cost effective. 222 00:15:31,020 --> 00:15:37,020 And then when you submit it, all that data, the board layout, the artwork for the board, 223 00:15:37,620 --> 00:15:42,540 the bill of materials, the part numbers down to the part numbers that that company uses 224 00:15:42,540 --> 00:15:47,780 to do assembly of the board is all submitted in one big bundle. 225 00:15:48,700 --> 00:15:50,360 When I do it, I do my own assembly. 226 00:15:50,940 --> 00:15:53,900 And I initially started out with, you know, doing hand assembly, 227 00:15:54,040 --> 00:15:55,640 and I created some hand assembly tools. 228 00:15:56,300 --> 00:15:59,760 And I now have a few pieces of equipment that kind of helped me do assembly in my lab. 229 00:16:00,740 --> 00:16:04,800 I have a list of parts that I know I can get easily through 230 00:16:05,580 --> 00:16:08,200 DigiKey or Mouser or LCSC. 231 00:16:09,320 --> 00:16:10,620 And some of those I have in stock. 232 00:16:10,620 --> 00:16:17,100 And so I know, for instance, there's a thing that happens in almost every board design, and these are called decoupling capacitors. 233 00:16:17,980 --> 00:16:20,500 And all they're really there to do is filter out noise on the board. 234 00:16:21,160 --> 00:16:25,940 They tend to always be attached to wherever voltage or ground is close to each other. 235 00:16:26,500 --> 00:16:27,720 You have these decoupling caps. 236 00:16:27,800 --> 00:16:30,360 Well, the decoupling caps are almost always the same values. 237 00:16:31,400 --> 00:16:36,380 They're either 100 nano farad or they're one micro farad or they're 10 micro farad. 238 00:16:37,160 --> 00:16:39,300 Well, capacitors are really cheap. 239 00:16:39,340 --> 00:16:40,320 And so you don't buy 10 of them. 240 00:16:40,320 --> 00:16:41,340 you buy a thousand of them. 241 00:16:42,100 --> 00:16:43,740 And so now you've got these in stock. 242 00:16:43,820 --> 00:16:45,760 And so now if you know you're going to design a board, 243 00:16:45,820 --> 00:16:47,800 you don't have to look up the part, you know you've got it. 244 00:16:48,480 --> 00:16:51,780 So there are certain parts, I don't go to the next level 245 00:16:51,860 --> 00:16:53,600 of finding out the actual part number 246 00:16:54,620 --> 00:16:55,880 because that would be a manual step for me. 247 00:16:56,020 --> 00:16:58,120 But in general, yes, what you're going to do is 248 00:16:58,160 --> 00:17:01,140 you're going to go through and from your EDA tool, 249 00:17:01,360 --> 00:17:03,620 whether it be EZ-EDA or KiCad, 250 00:17:04,240 --> 00:17:06,540 you can have it generate a spreadsheet, 251 00:17:07,000 --> 00:17:11,400 a report of these are all the parts you have on your board. 252 00:17:11,959 --> 00:17:13,720 And this is how many of each one you need. 253 00:17:14,620 --> 00:17:16,439 And also these are where they go on the board. 254 00:17:17,280 --> 00:17:19,380 And one of the cool things is with KiCad, 255 00:17:19,459 --> 00:17:21,400 because KiCad is open source, 256 00:17:22,140 --> 00:17:23,699 there are people who build custom plugins 257 00:17:23,839 --> 00:17:25,280 and additions and extensions to it. 258 00:17:25,500 --> 00:17:27,240 One of the greatest extensions somebody has created 259 00:17:27,800 --> 00:17:36,980 is a browser extension that takes your bill of materials 260 00:17:36,980 --> 00:17:41,200 in a browser and it lists out all your parts and if you click on a part it will show you 261 00:17:41,260 --> 00:17:44,600 where it is on the board. And if you click on a part on the board it shows you where 262 00:17:44,640 --> 00:17:48,380 it is in your inventory or your bill of materials. And people actually if they're going to do 263 00:17:48,420 --> 00:17:52,220 hand assembly of their board can actually pull this up and have it in front of them. 264 00:17:52,900 --> 00:17:57,940 And it will run on an iPad or an Android tablet. What they'll do is they'll literally have 265 00:17:57,980 --> 00:18:02,160 it show them what part they have to place and it will show them on their board where 266 00:18:02,200 --> 00:18:05,240 it needs to go. And then they click a little button and it shows them the next part they 267 00:18:05,240 --> 00:18:07,180 they have to place and where on the board it needs to go. 268 00:18:07,660 --> 00:18:09,280 And so they can work right down through the board 269 00:18:09,460 --> 00:18:11,300 and graphically see what they're gonna do. 270 00:18:12,140 --> 00:18:15,240 In general, I would recommend for a lot of people, 271 00:18:15,480 --> 00:18:18,140 if you are designing in something like EZ-EDA, 272 00:18:19,000 --> 00:18:21,700 plan in advance to actually have the board manufactured 273 00:18:22,100 --> 00:18:24,840 by the assembly shop for a couple of reasons. 274 00:18:25,920 --> 00:18:28,440 One is it allows you to a lot more creativity 275 00:18:28,560 --> 00:18:30,140 with your board design, because they're gonna use 276 00:18:30,220 --> 00:18:32,600 what's called SMD parts or SMT parts, 277 00:18:33,120 --> 00:18:34,340 which are surface mount parts. 278 00:18:34,760 --> 00:18:36,100 and they can be very, very small. 279 00:18:36,620 --> 00:18:39,940 And they have no problem placing a very, very small part. 280 00:18:40,720 --> 00:18:41,920 But if you're trying to do it by hand, 281 00:18:42,440 --> 00:18:43,940 it's a lot of work and it gets frustrating 282 00:18:44,120 --> 00:18:45,960 and you can make mistakes and the board might not work. 283 00:18:46,560 --> 00:18:49,160 If you're designing a board with what might classify 284 00:18:49,320 --> 00:18:51,220 as old school parts, which are through hole, 285 00:18:51,920 --> 00:18:53,780 then it's much easier to do by hand. 286 00:18:54,680 --> 00:18:57,980 If you want to focus on the design of your board 287 00:18:58,180 --> 00:18:59,940 and not the difficulty in assembly, 288 00:19:00,720 --> 00:19:03,380 then having a board manufacturer actually go 289 00:19:03,380 --> 00:19:05,500 and put all the parts on the board, solder it for you, 290 00:19:05,540 --> 00:19:06,800 and then ship you a finished board 291 00:19:07,700 --> 00:19:11,060 is a great sort of low threshold to consider. 292 00:19:11,980 --> 00:19:15,540 And again, with like EasyEDA and the board manufacturer, 293 00:19:15,940 --> 00:19:18,420 if you use their inventory, it's very cost-effective. 294 00:19:19,420 --> 00:19:21,360 - So with all that said, we've now built a board. 295 00:19:21,800 --> 00:19:23,780 Are there any other pieces of advice 296 00:19:23,900 --> 00:19:25,240 for someone just starting their journey 297 00:19:25,320 --> 00:19:27,260 and learning PCB design that you might have? 298 00:19:28,320 --> 00:19:29,740 - A lot of it's gonna come back to 299 00:19:29,740 --> 00:19:31,300 stand on the shoulders of giants. 300 00:19:31,700 --> 00:19:58,000 That was a great quote. I'm so glad you put that out there. I tell people, I don't have a background in electrical engineering. Five years ago, I knew what a resistor was from high school, and that was about the extent of my knowledge. And through joining a couple of discords and catching a couple of people on social media that were willing to answer my questions, I got my first board to work. And I got the first parts of that first board to work. 301 00:19:58,900 --> 00:20:13,700 Leveraging open source projects, leveraging, you know, various communities around this is really what got me to the point where I can design a board that does what I want it to do. 302 00:20:14,500 --> 00:20:21,360 And now five years on, I'm turning around and now I'm the one who's answering a lot of those questions of the people who are coming in behind me. 303 00:20:21,440 --> 00:20:26,700 And as I explained to them, it's not that I have a formal education and it's not that I'm an expert in this area. 304 00:20:27,360 --> 00:20:30,660 I've just made every conceivable mistake you can probably make at this point. 305 00:20:30,720 --> 00:20:33,140 And I'm just trying to help you avoid them just like other people 306 00:20:33,240 --> 00:20:34,780 helped me avoid them early on. 307 00:20:35,360 --> 00:20:35,520 Sure. 308 00:20:36,640 --> 00:20:39,480 So I wanted to ask you about one of the kitchen sink boards 309 00:20:39,600 --> 00:20:40,720 that you designed last year. 310 00:20:41,540 --> 00:20:43,820 Tell me about the DC NextGen Graffiti Badge. 311 00:20:44,760 --> 00:20:46,600 I loved the graffiti badge. 312 00:20:46,880 --> 00:20:48,840 There was a few things that came from that. 313 00:20:49,380 --> 00:20:52,980 One is I wanted to design a board for learning. 314 00:20:53,500 --> 00:20:57,340 I'd seen the Adafruit Circuit Playground Express and said, you know, this is really 315 00:20:57,340 --> 00:21:03,080 great, but there's a few more things I'd like to have on it. And I'd like to package it 316 00:21:03,260 --> 00:21:09,580 up with, you know, a 3D printed back and its own USB cable and everything it needs to work. 317 00:21:10,440 --> 00:21:14,380 And while I'm at it, I might as well design an entire workshop series and some training 318 00:21:14,440 --> 00:21:18,960 education and a bunch of different tutorials and a whole bunch of example code. And so 319 00:21:19,000 --> 00:21:22,240 I thought this would be a great conference badge. One of the things that's popped up 320 00:21:22,260 --> 00:21:26,659 over the past probably 10 years is this notion of badge life, which is a few of the tech 321 00:21:26,660 --> 00:21:33,320 conferences started using electronic badges and it exploded. The complexity and depth 322 00:21:33,400 --> 00:21:38,040 of electronic badges that are at some of these conferences is crazy. What spawned from that 323 00:21:38,100 --> 00:21:44,040 is an entire indie sort of cottage group that broke out from that, which were groups or 324 00:21:44,080 --> 00:21:49,260 individuals that said, "Oh, I want to design a small badge that I can take and give and 325 00:21:49,340 --> 00:21:54,460 trade with other people or maybe sell." And so I had this idea for a conference badge 326 00:21:54,460 --> 00:21:59,840 that would be easy to program, had lots and lots of functionality on it, looked cool. 327 00:22:00,760 --> 00:22:05,800 And for me, CircuitPython was the logical foundation for that. 328 00:22:06,680 --> 00:22:11,060 So I come back to Solder Party Express and their RP2040 stamp, right? 329 00:22:11,740 --> 00:22:16,360 That was the genesis of saying, okay, let me look at how they designed that. 330 00:22:16,560 --> 00:22:16,640 Okay. 331 00:22:16,720 --> 00:22:18,800 Let me put that on a, on a board with a PCB. 332 00:22:18,880 --> 00:22:23,960 Now let me add touch sensors and NeoPixel LEDs and audio. 333 00:22:24,720 --> 00:22:26,120 Well, geez, where am I going to get audio from? 334 00:22:26,880 --> 00:22:29,280 Oh, Adafruit must have an example. 335 00:22:29,620 --> 00:22:34,680 Sure enough, Circuit Playground Express has a little PWM audio and a little amplifier. 336 00:22:34,860 --> 00:22:36,320 I use the exact same one on mine. 337 00:22:37,180 --> 00:22:40,760 And then I wanted, since the badge wasn't going to have a battery, 338 00:22:41,100 --> 00:22:44,640 that was a distinct decision to not only keep the cost down, 339 00:22:44,640 --> 00:22:48,840 but also shipping and lithium batteries and all that kind of fun stuff. 340 00:22:49,780 --> 00:22:54,080 So how do you make a badge that's going to have personalization on it? 341 00:22:54,260 --> 00:22:56,660 Well, an e-paper display came to mind. 342 00:22:57,440 --> 00:23:01,500 And so again, I went back to Adafruit and I looked at Adafruit's repertoire of 343 00:23:01,620 --> 00:23:04,600 boards and sure enough, they had a little breakout board for e-paper. 344 00:23:05,700 --> 00:23:08,340 Also Waveshare, who a lot of people use for boards. 345 00:23:08,400 --> 00:23:10,640 It turns out Waveshare open sources all their designs too. 346 00:23:11,220 --> 00:23:18,100 And so a combination of those two, I designed a prototype that included the breakout for an e-paper display. 347 00:23:19,020 --> 00:23:27,100 That badge was really an amalgam of various open source capabilities that I found from lots and lots of sources. 348 00:23:28,080 --> 00:23:30,540 And then it was, let me tie it together with a theme. 349 00:23:31,320 --> 00:23:38,180 And since it was going to be for a youth group, youth oriented group, typically 11 to 17, I think is the target audience for DC NextGen. 350 00:23:39,060 --> 00:23:40,820 I wanted something kind of fun, a little edgy. 351 00:23:40,980 --> 00:23:48,400 And so this idea of graffiti on a, you know, like a tag on a wall, a PCB can be any shape you want. 352 00:23:49,060 --> 00:24:02,840 So I used a, I think I used Inkscape and kind of created a box and then I kind of squished it at one end and squished it at the other and kind of got what, you know, the artist would say is perspective and then laid out, you know, like what would look like a brick on it. 353 00:24:02,880 --> 00:24:06,920 So now it's got this brick wall in perspective, graffiti tag on it. 354 00:24:07,420 --> 00:24:09,820 Okay, I've kind of got the artwork figured out. 355 00:24:10,000 --> 00:24:13,400 Now, how do I integrate the artwork with the electronics? 356 00:24:14,360 --> 00:24:16,420 And this comes back to some of the other things like, okay, 357 00:24:17,340 --> 00:24:19,740 touch sensors would be kind of an easy thing to integrate. 358 00:24:20,040 --> 00:24:21,180 And the great thing about touch sensors 359 00:24:21,360 --> 00:24:22,340 is it's part of the PCB. 360 00:24:23,200 --> 00:24:24,900 So there's no hardware you have to solder. 361 00:24:25,740 --> 00:24:27,680 It's literally part of the PCB. 362 00:24:28,000 --> 00:24:30,080 So DC NextGen, that's nine letters. 363 00:24:30,940 --> 00:24:34,080 You know, okay, let's put every single letter 364 00:24:34,180 --> 00:24:34,840 is a touch sensor. 365 00:24:35,520 --> 00:24:36,240 Okay, we can do that. 366 00:24:36,340 --> 00:24:44,280 not a problem. And then the e-paper display, the LEDs, etc. etc. That's a case where the 367 00:24:44,400 --> 00:24:48,700 art drove the shape of the badge and even drove some of the functionality of the badge 368 00:24:48,760 --> 00:24:56,620 or the PCB. And again, there was nothing really special or unique about it. Almost everything 369 00:24:56,680 --> 00:25:03,279 on that badge came from other open source projects. I think the ultimate display driver 370 00:25:03,280 --> 00:25:10,360 was based off of what Waveshare had. The audio was based off of what Adafruit provided. The RP2040 371 00:25:10,460 --> 00:25:16,340 was from Solder Party. It was an amalgam of all these different things. And then when it came time 372 00:25:16,520 --> 00:25:24,020 to get it certified for CircuitPython, because I had leveraged stuff that was already used by other 373 00:25:24,160 --> 00:25:29,440 groups, most of those building blocks were already part of CircuitPython as well. In the next episode, 374 00:25:29,440 --> 00:25:39,460 I talk with CircuitPython core developer Dan Halbert about building CircuitPython from source for boards. In your experience, how easy or hard has it been getting CircuitPython running on your boards? 375 00:25:40,620 --> 00:25:52,400 There was two steps to getting CircuitPython on any of my boards. One is getting it to work, and that's relatively easy. And then it's any of the customization so it's more intuitive to the programmer. 376 00:25:53,440 --> 00:25:59,000 So if we look at the graffiti badge as an example, because I had used the solder party, 377 00:25:59,820 --> 00:26:06,660 RP2040 stamp as the basis, then CircuitPython already supported the RP2040, it already supported 378 00:26:06,780 --> 00:26:13,120 the memory flash that was being used by that, the crystal nose one. So getting CircuitPython to run 379 00:26:13,260 --> 00:26:19,040 on that was very easy. The next step was getting it to have all the integrated capabilities. 380 00:26:19,840 --> 00:26:24,460 And the CircuitPython core support team is incredible. 381 00:26:25,560 --> 00:26:27,480 Adafruit manages a Discord server, 382 00:26:27,700 --> 00:26:29,040 and within that Discord server, 383 00:26:29,720 --> 00:26:30,780 there's many, many channels. 384 00:26:31,180 --> 00:26:33,380 The two that I spend a fair amount of time in, 385 00:26:33,820 --> 00:26:36,160 one is they have a hardware design one, which is great. 386 00:26:36,700 --> 00:26:38,580 You can ask hardware design questions 387 00:26:38,660 --> 00:26:39,820 if you're designing your own board. 388 00:26:40,840 --> 00:26:44,440 There's also one for CircuitPython help. 389 00:26:44,580 --> 00:26:46,900 These are people who are trying to write CircuitPython 390 00:26:47,120 --> 00:26:48,680 and need some help getting things to work. 391 00:26:49,160 --> 00:26:55,900 There's a whole separate channel just for people who are developing customized versions of CircuitPython for their boards. 392 00:26:56,580 --> 00:27:06,340 And you have an option of designing a custom version of CircuitPython for your board and just keeping it that way, or submitting it back in, in the world of source control. 393 00:27:06,420 --> 00:27:07,740 This is called a pull request. 394 00:27:08,680 --> 00:27:14,320 And the team will work with you to make it normalized so it fits in with all the other boards. 395 00:27:14,720 --> 00:27:19,040 So using the same language or the same labels for things that other people are using. 396 00:27:19,140 --> 00:27:23,860 So it becomes much easier for the person who's going to write CircuitPython against your board. 397 00:27:24,620 --> 00:27:29,420 And so that was relatively easy. When I did my second CircuitPython board, it was a little 398 00:27:29,800 --> 00:27:36,020 more nuanced because if you think about almost any development board that's got USB on it, 399 00:27:36,440 --> 00:27:39,920 when you plug it into your computer, your computer is going to recognize that USB. 400 00:27:41,120 --> 00:27:46,060 And often they have these things called vendor IDs and product IDs. 401 00:27:47,020 --> 00:27:52,360 And getting your own vid and PID is going to be different for every board. 402 00:27:53,160 --> 00:27:56,440 So Raspberry Pi handles all the PID assignments 403 00:27:56,620 --> 00:27:59,660 for anybody who's developing a board for RP2040. 404 00:28:00,460 --> 00:28:03,400 You send them a note and say, this is kind of what my board's doing. 405 00:28:03,500 --> 00:28:04,400 This is what I'd like. 406 00:28:05,060 --> 00:28:06,920 Would you give me a product ID? 407 00:28:07,200 --> 00:28:08,760 And almost always they're going to come back and say yes. 408 00:28:09,260 --> 00:28:15,920 and they send you a code and that's your code for life. My second board most recently uses the 409 00:28:16,360 --> 00:28:24,520 Microchip SAMD21 and that's a completely separate thing. Microchip doesn't provide USB IDs so they 410 00:28:24,560 --> 00:28:30,720 don't provide the the PID for those. However, there's a an open source organization that does. 411 00:28:31,700 --> 00:28:35,820 So again you go through the process you submit what you're requesting what you plan to do 412 00:28:35,820 --> 00:28:39,680 and they coordinate and say, well, we'll do it as long as your board is open source. 413 00:28:40,760 --> 00:28:46,640 So this comes back to the same community that got me started. A lot of my designs are related to 414 00:28:46,940 --> 00:28:52,360 open source designs that are already out there. This organization that will provide you a USB ID 415 00:28:53,000 --> 00:28:57,320 says we'll provide it to you for free rather than spending tens of thousands of dollars for it. 416 00:28:58,240 --> 00:29:03,660 If your board is also going to be open source so you can help the next group. And so I have no 417 00:29:03,660 --> 00:29:08,540 problem I publish all my hardware anyways. I sent them the link, this is the link, this is the board. 418 00:29:08,900 --> 00:29:14,260 They said, okay, all the stuff that we expect to be open source is available online. You're good to 419 00:29:14,260 --> 00:29:19,480 go. Here's your ID. So then I take that ID and I have to go back to CircuitPython and make sure 420 00:29:19,600 --> 00:29:26,120 that my build of CircuitPython uses the ID that I was just assigned. So there's a few places where 421 00:29:26,200 --> 00:29:32,080 the process loops around on itself. But again, the open source community and in particular, 422 00:29:32,380 --> 00:29:38,440 the resources that Adafruit provides is incredible for people who are trying to design boards. 423 00:29:39,300 --> 00:29:42,340 Bradán, this has been great. Thank you so much for coming on the show and sharing your 424 00:29:42,500 --> 00:29:47,280 experience in designing boards. Thanks, it's been wonderful and I'm sure that there's lots 425 00:29:47,320 --> 00:29:51,940 of questions still to be had and the great thing about it is the community that's available for 426 00:29:52,160 --> 00:29:57,240 answering questions is huge. Just need to reach out and ask. I couldn't agree more. Thanks again. 427 00:29:58,540 --> 00:30:02,600 Thank you for listening to the CircuitPython Show. To learn more about Bradán, check out 428 00:30:02,640 --> 00:30:06,700 the show notes for links to his homepage and his past visit on the show back in episode 19. 429 00:30:07,920 --> 00:30:11,640 Next episode, I'm joined by CircuitPython Core Developer Dan Halbert to talk more 430 00:30:11,740 --> 00:30:16,220 about building and customizing CircuitPython. Until next time, stay positive.