1 00:00:00,000 --> 00:00:01,800 All right, welcome everybody. 2 00:00:01,900 --> 00:00:04,160 My talk, my name is Jeff Geisberger. 3 00:00:04,160 --> 00:00:05,140 I also go by BigTaro. 4 00:00:05,140 --> 00:00:06,700 A little bit of self-docs there. 5 00:00:07,200 --> 00:00:08,840 So my talk is you want to make a badge. 6 00:00:08,840 --> 00:00:12,480 Badge creation 101 from SAO to hashtag badge life. 7 00:00:12,960 --> 00:00:16,780 So first a little bit of legalese for this talk because I like my job. 8 00:00:16,780 --> 00:00:21,020 The views expressed in this presentation are my own and do not necessarily reflect the views of my employer. 9 00:00:21,020 --> 00:00:22,580 With that out of the way, let's have some fun. 10 00:00:22,800 --> 00:00:24,900 So first off, who is this guy? 11 00:00:24,900 --> 00:00:28,200 You can call me Jeff, El Jefe, BigTaro, BT, that badge guy, AU. 12 00:00:28,200 --> 00:00:29,800 You know, I'll respond to anything. 13 00:00:30,000 --> 00:00:33,140 My 9 to 5, I hack stuff as a security engineer. 14 00:00:33,140 --> 00:00:35,480 I do devices about 15 years now. 15 00:00:35,740 --> 00:00:37,580 And then my 5 to 9 a.m. 16 00:00:37,580 --> 00:00:39,320 is love making blinky hardware. 17 00:00:39,320 --> 00:00:41,060 Badge life for about four years. 18 00:00:41,180 --> 00:00:42,580 That's the best part. 19 00:00:42,880 --> 00:00:47,080 This year I released four and a half badges at DEF CON. 20 00:00:47,080 --> 00:00:48,580 We're going to call it four plus one. 21 00:00:48,580 --> 00:00:52,600 One is not 100% ready, but that's a whole another story for another time. 22 00:00:52,840 --> 00:00:55,420 First up is the fight dystopia party badge. 23 00:00:56,200 --> 00:00:59,040 Next up is the gunslinger be gone and sheriff SAO. 24 00:00:59,220 --> 00:01:03,920 I also made a submarine badge and the frog star badge this year. 25 00:01:05,120 --> 00:01:09,760 As my friend said, dude, when do you effing sleep? 26 00:01:10,200 --> 00:01:12,000 Respectfully, what the eff is wrong with you? 27 00:01:12,000 --> 00:01:12,760 Are you okay? 28 00:01:12,760 --> 00:01:14,060 Do you need someone to talk to? 29 00:01:14,500 --> 00:01:17,060 This about sums up badge life in a nutshell. 30 00:01:17,060 --> 00:01:19,020 So if you're getting into it, be forewarned. 31 00:01:19,020 --> 00:01:22,220 It is a huge time sink, but it's also a lot of fun. 32 00:01:22,920 --> 00:01:29,260 So a little disclaimer, this talk is about building a badge from near zero knowledge, get it working and have fun. 33 00:01:29,380 --> 00:01:33,680 This talk is not making an incredibly optimized, power efficient lead badge. 34 00:01:33,680 --> 00:01:34,120 Okay? 35 00:01:34,120 --> 00:01:38,400 This is a talk that says, here's how I get started with badge life and have fun doing it. 36 00:01:38,400 --> 00:01:41,460 Not here's how I become a pro electrical engineer with 30 years of experience. 37 00:01:41,460 --> 00:01:43,340 I just want to set that expectation right now. 38 00:01:43,340 --> 00:01:43,920 Got it? 39 00:01:43,920 --> 00:01:44,780 All right. 40 00:01:44,900 --> 00:01:47,760 So the agenda, first off, what is an SAO? 41 00:01:47,760 --> 00:01:50,400 We'll go over the definition if you're unfamiliar with that term. 42 00:01:50,400 --> 00:01:51,780 Let's make one. 43 00:01:52,340 --> 00:01:55,820 Then we'll prototype a working badge and turn it into a real badge. 44 00:01:55,820 --> 00:01:57,700 And that's kind of the flow of this talk real here. 45 00:01:57,700 --> 00:01:59,340 So first off, what's an SAO? 46 00:02:00,100 --> 00:02:05,220 An SAO is a shitty now called simple to be more PC, simple add on. 47 00:02:05,420 --> 00:02:12,180 These are some that I've personally created here on this stage, but essentially what they are is let you put a thing on a thing to get more bling. 48 00:02:12,820 --> 00:02:28,600 So this was a community standard that let you essentially attach other PCBs to a host PCB to just become more flashy and do more fun and have some add on and people have made things that work together and whatnot and I'll get into that. 49 00:02:28,660 --> 00:02:38,420 So for example, this is a badge that I did for another conference where the SAO with a hat was actually a full fledged badge and would talk to the host badge and synchronize RGB patterns and things like that. 50 00:02:38,420 --> 00:02:39,680 So kind of fun stuff. 51 00:02:40,120 --> 00:02:41,820 And it could be as simple as complex as you want. 52 00:02:41,820 --> 00:02:44,900 So as I said, the one I made was a full on badge in itself. 53 00:02:44,960 --> 00:02:47,040 This is one by someone named El Hefe. 54 00:02:47,360 --> 00:02:52,380 Not me, I'm not El Hefe here, but essentially, oh, I was like really blocked by my podium. 55 00:02:52,380 --> 00:02:56,380 Okay, well, it's essentially a single LED that lights up, right? 56 00:02:56,380 --> 00:02:59,400 So you could go as simple as that to as complex as full blown hardware. 57 00:02:59,400 --> 00:03:01,040 And I just wanted to give you the scale of this. 58 00:03:01,040 --> 00:03:04,420 The whole point of it is, have fun, make something cool. 59 00:03:05,220 --> 00:03:06,740 So why start with an SAO? 60 00:03:06,740 --> 00:03:12,900 Why not just go right into badge life and just build some crazy complex thing that does a billion features and then you stay up until 3 a.m. 61 00:03:12,900 --> 00:03:15,680 coding for six weeks straight, like I may have. 62 00:03:16,740 --> 00:03:19,980 So SAOs are a really simple way to get into making hardware. 63 00:03:20,760 --> 00:03:21,680 It's an easy simple way. 64 00:03:21,680 --> 00:03:23,060 Hey, ma, look, I did a thing. 65 00:03:23,060 --> 00:03:24,320 Here's a thing, right? 66 00:03:24,320 --> 00:03:26,380 It blinks, it makes little flashy lights. 67 00:03:26,380 --> 00:03:27,100 It's good. 68 00:03:27,540 --> 00:03:28,640 And do you enjoy the process? 69 00:03:28,640 --> 00:03:32,000 It's a really good way to say, hey, I'm getting my feet wet. 70 00:03:32,060 --> 00:03:35,180 Am I going to actually enjoy doing this thing and pulling my hair out at 3 a.m. 71 00:03:35,180 --> 00:03:41,740 trying to debug some hardware where, you know, the documentation says one thing and the hardware does something completely different because, you know, chips. 72 00:03:42,600 --> 00:03:44,980 Also, SAOs will not break the bank. 73 00:03:45,120 --> 00:03:52,800 200 SAOs, which for a conference like DEF CON is almost nothing, 250 bucks, give or take, you know, compared to thousands for badges. 74 00:03:52,840 --> 00:03:57,420 We're talking about like $10,000 potentially for a run of a complex badge versus a couple hundred bucks. 75 00:03:57,600 --> 00:03:59,320 You could probably afford that a little easier. 76 00:03:59,960 --> 00:04:00,400 All right. 77 00:04:00,400 --> 00:04:01,920 So let's start with that SAO. 78 00:04:01,920 --> 00:04:03,120 How does it work? 79 00:04:06,220 --> 00:04:08,440 The community standard, made for fun. 80 00:04:08,600 --> 00:04:09,640 Funny names. 81 00:04:09,720 --> 00:04:12,580 I translate a little bit for you because the standard is in mill horsepower. 82 00:04:13,200 --> 00:04:16,920 It's a 3.3 volt standard, roughly 280 milliamps draw. 83 00:04:17,060 --> 00:04:19,800 If you don't know anything about electrical engineering, don't worry about that. 84 00:04:19,800 --> 00:04:23,840 Your badge is not going to draw that much more than that unless you're doing something crazy. 85 00:04:25,760 --> 00:04:27,580 So here's kind of the standard pinout. 86 00:04:27,580 --> 00:04:30,880 If you've seen any of the badges that have a little slot, there's six pins. 87 00:04:31,180 --> 00:04:33,140 You can get the pictures online. 88 00:04:33,140 --> 00:04:34,300 I'm just putting it here for reference. 89 00:04:34,300 --> 00:04:35,540 I'm going to talk about it a little bit. 90 00:04:36,080 --> 00:04:39,440 On the badge side, you have a female keyed connector. 91 00:04:39,440 --> 00:04:40,760 It's a 2 by 3 socket. 92 00:04:41,200 --> 00:04:42,600 I'm in the way of all these pictures. 93 00:04:42,600 --> 00:04:43,820 This is going to be a rough presentation. 94 00:04:43,820 --> 00:04:44,760 I'm sorry, guys. 95 00:04:45,800 --> 00:04:48,300 And then this is the side that goes on the actual SAO. 96 00:04:48,300 --> 00:04:49,600 It's the mailed keyed connector. 97 00:04:49,600 --> 00:04:55,860 And the reason why we use the shrouded connector, some people don't like to use the keyed connectors because of cost, but they stay on. 98 00:04:55,860 --> 00:04:56,920 Otherwise they'll just fall off. 99 00:04:56,920 --> 00:05:02,900 The original standard, which was four pins, everybody was losing their SAOs everywhere if you guys remember older DEF CONs. 100 00:05:04,480 --> 00:05:08,540 So the gist of this one, there's six pins for communicating with the host badge. 101 00:05:08,540 --> 00:05:09,340 We're not doing that here. 102 00:05:09,340 --> 00:05:10,400 We're starting real simple. 103 00:05:10,400 --> 00:05:11,920 We're going to use power and ground. 104 00:05:13,220 --> 00:05:20,260 And then over here in the bottom right, which you definitely cannot see, if you look at the slides later, there's some part numbers if you want to make your own later. 105 00:05:21,620 --> 00:05:22,140 All right. 106 00:05:22,140 --> 00:05:23,620 So what does it actually look like? 107 00:05:23,740 --> 00:05:26,520 So let's start one with an LED that's just on. 108 00:05:26,520 --> 00:05:27,520 Real basic, simple. 109 00:05:27,520 --> 00:05:29,800 It just has a light and it looks cool. 110 00:05:30,280 --> 00:05:32,540 So this is electrically essentially what it is. 111 00:05:32,540 --> 00:05:35,300 You have a resistor, an LED, and a battery. 112 00:05:35,760 --> 00:05:37,440 But in this case, we don't have a battery. 113 00:05:37,560 --> 00:05:40,300 We have a SAO connector. 114 00:05:40,600 --> 00:05:41,460 That's it. 115 00:05:41,460 --> 00:05:42,860 That's the whole circuit right there. 116 00:05:42,860 --> 00:05:43,380 Done. 117 00:05:43,380 --> 00:05:43,620 All right. 118 00:05:43,620 --> 00:05:46,340 You don't need any more electrical engineering for the rest of this part of the talk. 119 00:05:46,980 --> 00:05:47,560 All right. 120 00:05:47,560 --> 00:05:48,040 Circuit's done. 121 00:05:48,040 --> 00:05:48,920 What's next? 122 00:05:49,540 --> 00:05:49,820 All right. 123 00:05:49,820 --> 00:05:51,640 So how do we actually make an SAO? 124 00:05:51,640 --> 00:05:53,060 Start with an EDA. 125 00:05:53,340 --> 00:05:59,440 EDA stands for Electronic Design Automation, and it makes you go from circuit to circuit board and everything in between. 126 00:05:59,920 --> 00:06:01,440 Here's some EDAs. 127 00:06:01,440 --> 00:06:02,900 KiCad, free, pretty decent. 128 00:06:02,900 --> 00:06:05,040 It's what I use for a majority of my work. 129 00:06:05,520 --> 00:06:13,680 Easy EDA is free, a little less featured than KiCad, but really tightly intertwined with JLCPCB, which is one of the major fab manufacturers. 130 00:06:13,720 --> 00:06:18,980 And what that lets you do is you could just essentially pull from their parts library directly, but I'll show you workarounds to get around that. 131 00:06:18,980 --> 00:06:19,920 But they are a little limited. 132 00:06:19,920 --> 00:06:23,920 They don't allow very complex cutouts on your board shapes and stuff like that. 133 00:06:24,400 --> 00:06:26,380 There's Autodesk Eagle and Altium Designer. 134 00:06:26,380 --> 00:06:27,160 I have some text here. 135 00:06:27,160 --> 00:06:32,440 You could read it, but essentially they cost money, and I don't want to do that for my hobby projects, right? 136 00:06:32,440 --> 00:06:33,660 This is just for fun. 137 00:06:33,760 --> 00:06:36,580 If you're a professional, Altium Designer is unbelievable. 138 00:06:36,660 --> 00:06:41,180 It's got some amazing features for auto-routing and whatnot, but we're not going to do that here. 139 00:06:41,180 --> 00:06:42,120 This is badge life. 140 00:06:43,300 --> 00:06:43,920 All right. 141 00:06:43,920 --> 00:06:44,820 Start off. 142 00:06:44,920 --> 00:06:46,340 Start off with KiCad. 143 00:06:46,340 --> 00:06:47,500 Create a project. 144 00:06:47,900 --> 00:06:49,600 Here's the five easy steps. 145 00:06:49,800 --> 00:06:51,020 Create a new project. 146 00:06:51,080 --> 00:06:52,200 Build your schematic. 147 00:06:52,520 --> 00:06:53,380 Assign footprints. 148 00:06:53,380 --> 00:06:54,380 I'll get into all these. 149 00:06:54,860 --> 00:06:56,100 Lay out your PCB. 150 00:06:56,680 --> 00:06:58,040 Export to the factory. 151 00:06:58,360 --> 00:06:59,160 You're done. 152 00:06:59,300 --> 00:06:59,960 All right. 153 00:07:00,100 --> 00:07:01,960 So let's recreate that circuit into KiCad. 154 00:07:01,960 --> 00:07:05,080 So we have that circuit here with the resistor, the LED, and the SAO connector. 155 00:07:05,540 --> 00:07:06,020 Boom. 156 00:07:06,020 --> 00:07:08,140 Place the LED, resistor, and SAO symbols. 157 00:07:08,660 --> 00:07:09,700 Connect the wires. 158 00:07:10,680 --> 00:07:12,560 And everything is on the side that I'm on. 159 00:07:12,560 --> 00:07:15,900 I apologize, guys, if you want to move over there to see a little bit better. 160 00:07:15,900 --> 00:07:19,080 Um, so that's, that's, that's essentially it. 161 00:07:19,080 --> 00:07:22,100 But where do I get the SAO symbol for KiCad, right? 162 00:07:22,100 --> 00:07:23,900 That's a weird custom part. 163 00:07:23,900 --> 00:07:25,340 You just download it. 164 00:07:25,340 --> 00:07:30,680 Um, Twinkle Twinkie got some really, uh, good parts that are available online, open source. 165 00:07:30,680 --> 00:07:36,680 You could just download it, put it in, drop it into your project, and they got the 3D model, the footprint, the schematic, everything. 166 00:07:36,680 --> 00:07:37,760 So it's like Lego blocks, right? 167 00:07:37,760 --> 00:07:40,600 If you guys know how to make Lego, just plug and play, you're done. 168 00:07:41,420 --> 00:07:41,900 All right. 169 00:07:41,900 --> 00:07:43,040 So I keep talking about this footprint. 170 00:07:43,040 --> 00:07:43,980 What is a footprint? 171 00:07:43,980 --> 00:07:48,380 Footprints are the pads and holes in a PC that let components electrically attach to it, right? 172 00:07:48,380 --> 00:07:58,240 So every part has a shape, and then you essentially pick the right shape for that part, and then the part will, during the manufacturing process, stay on your board and then work. 173 00:07:58,980 --> 00:08:00,500 But what footprint do I use? 174 00:08:00,500 --> 00:08:02,300 Uh, excuse me, I have standards. 175 00:08:02,800 --> 00:08:06,300 LEDs, capacitors, resistors, et cetera, they're mostly standard sizes. 176 00:08:06,300 --> 00:08:10,900 I say mostly because every single manufacturer has some weird part that does not fit the mold. 177 00:08:10,900 --> 00:08:14,140 Um, but for the most part, you're going to do some really standard sizes. 178 00:08:14,140 --> 00:08:15,940 And again, pictures are right behind me, I apologize. 179 00:08:16,740 --> 00:08:18,880 Design your layouts to be reworkable. 180 00:08:19,100 --> 00:08:21,160 Make sure there's room for a soldering iron. 181 00:08:21,160 --> 00:08:25,500 So like when you're laying out your parts and you're picking, oh, these parts fit really small and really intricate. 182 00:08:25,500 --> 00:08:26,020 Cool. 183 00:08:26,020 --> 00:08:27,740 How are you going to fix that when something goes wrong? 184 00:08:27,900 --> 00:08:33,680 So you got to think of like, all right, make the largest part possible that will still fit your design. 185 00:08:33,680 --> 00:08:40,460 Makes it a lot easier, especially in badge life, when you're sitting in a hotel room with a soldering iron you're not supposed to have and fixing little badges at like two in the morning. 186 00:08:40,460 --> 00:08:42,760 It's really good to have some room to work on that. 187 00:08:43,760 --> 00:08:45,900 Um, I recommend an 0603 or bigger. 188 00:08:46,140 --> 00:08:50,700 That's just a standard part size, uh, for LEDs, resistors, capacitors, things like that. 189 00:08:50,700 --> 00:08:51,840 You can always go smaller. 190 00:08:51,840 --> 00:08:55,120 I have done in certain designs, but it just makes it a little easier to rework. 191 00:08:55,340 --> 00:08:55,760 All right. 192 00:08:55,760 --> 00:08:56,600 We picked our size. 193 00:08:56,600 --> 00:08:57,380 Are we good? 194 00:08:57,940 --> 00:09:01,340 Now we got to check your suppliers for availability, footprints, et cetera. 195 00:09:01,380 --> 00:09:01,760 Right. 196 00:09:01,760 --> 00:09:09,600 As I said before that every part's a little bit different, um, but some manufacturers like JLCPCB have a giant parts library and you can just pull parts from it. 197 00:09:09,600 --> 00:09:12,420 And they also provide the footprints, which are mostly correct. 198 00:09:12,960 --> 00:09:16,020 Um, so here is, you know, an example of that. 199 00:09:16,020 --> 00:09:22,240 They give you the, the, the thing for the, uh, the schematic, they give you the footprint, um, a little warning though. 200 00:09:22,240 --> 00:09:23,640 Sometimes those footprints are not great. 201 00:09:23,640 --> 00:09:31,020 So I recommend doing prototypes of your boards first, because sometimes they're a little too small or the pins are not actually, uh, connected correctly. 202 00:09:31,020 --> 00:09:32,440 And I've been burned by that in the past. 203 00:09:32,480 --> 00:09:34,980 Uh, it happens, but it's, it's rare, but it does happen. 204 00:09:35,620 --> 00:09:42,880 Um, there's a nice tool called EasyEDA2KiCAD, which, uh, JLCPCB has their own EasyEDA software and you could just run this thing. 205 00:09:42,880 --> 00:09:45,980 You put in a part number and it pulls down all the files for you right in a KiCAD. 206 00:09:45,980 --> 00:09:47,260 You don't got to do any extra work. 207 00:09:47,340 --> 00:09:51,280 Um, so you just type in a part number, boom, it appears in your libraries and then you're good to go. 208 00:09:52,900 --> 00:09:56,740 Um, so over here is an example of assigning footprints. 209 00:09:56,740 --> 00:10:05,580 In our example, we have the simple add-on connector, which has the simple add-on footprint and then a resistor and a diode that all use a 603, uh, layout. 210 00:10:05,580 --> 00:10:07,820 I said diodes and LED, but same thing. 211 00:10:08,180 --> 00:10:08,860 All right. 212 00:10:08,860 --> 00:10:10,320 So now we have the PCB editor. 213 00:10:10,840 --> 00:10:12,300 We'll drop our parts in. 214 00:10:13,240 --> 00:10:15,320 Uh, here's the command to actually do so. 215 00:10:15,800 --> 00:10:18,940 Wire them up, you know, just connect everything in the electrical circuit. 216 00:10:18,940 --> 00:10:20,380 If you notice here, I'm going to jump back. 217 00:10:20,480 --> 00:10:25,260 Those little, uh, blue lines that connect KiCAD is really nice at just telling you what to do. 218 00:10:25,260 --> 00:10:30,100 Um, so if you've done your circuit correctly, it's telling you how your needs to be connected here physically. 219 00:10:30,360 --> 00:10:31,900 Um, so it's like the physical side of the PCB. 220 00:10:31,900 --> 00:10:32,500 So it's really easy. 221 00:10:32,500 --> 00:10:33,600 You just connect the lines. 222 00:10:33,740 --> 00:10:39,740 Um, so wire them up and electrically you're done, but wait, what about the art? 223 00:10:40,380 --> 00:10:40,920 All right. 224 00:10:40,920 --> 00:10:42,760 The art, find license, create art. 225 00:10:42,760 --> 00:10:46,860 That's the fun part of badge life, making these cool designs with funky features and whatnot. 226 00:10:47,000 --> 00:10:49,480 Um, this is just an example I'm going to use for this demonstration. 227 00:10:49,480 --> 00:10:52,340 I did not make this, uh, by Socko ST, but it's an open art. 228 00:10:53,240 --> 00:10:55,320 SVG format, uh, has to be a vector format. 229 00:10:55,320 --> 00:11:00,500 So that way it can, and we'll KiCAD will work with that. 230 00:11:00,640 --> 00:11:02,320 You get about four colors. 231 00:11:02,400 --> 00:11:10,700 Now that is a little bit wrong because now there's like full color PCB printing and screen printing and all these like new techniques, but they're relatively very new. 232 00:11:10,720 --> 00:11:12,040 You're going to do four colors. 233 00:11:12,040 --> 00:11:13,740 It's a lot easier when you're starting off. 234 00:11:14,060 --> 00:11:16,660 So the four colors we got are essentially the solder mask. 235 00:11:16,660 --> 00:11:18,240 It's usually one color. 236 00:11:18,280 --> 00:11:22,840 Um, there are people in badge life village you could talk to that have made multiple of different colors, kind of cool stuff. 237 00:11:22,840 --> 00:11:30,060 Um, but essentially you have one color, red, green, blue, purple, black, white, yellow, kind of like the standard colors. 238 00:11:30,580 --> 00:11:32,520 You get silk screen, usually white or black. 239 00:11:32,520 --> 00:11:35,780 Usually this is all dictated by the manufacturer, unless you're making boards in your house. 240 00:11:35,780 --> 00:11:37,020 Uh, but this is an intro talk. 241 00:11:37,020 --> 00:11:38,140 So you're going to use a manufacturer. 242 00:11:38,240 --> 00:11:47,580 Um, so you find a manufacturer that has colors that you like, uh, PCB wage, LLC, PCB, Osh park, all those, they have different color mixes and whatnot, and they'll show you what's available. 243 00:11:48,040 --> 00:11:49,240 You have metal. 244 00:11:49,240 --> 00:11:56,300 Um, it's either copper unique, so it'll be either silver or gold, um, after being tinned by the flux, uh, sorry, by solder. 245 00:11:56,300 --> 00:12:03,040 And so essentially you get another color there and then FR four is a semi-transparent yellowish color. 246 00:12:03,120 --> 00:12:06,060 Uh, so that's kind of the colors you're working with when designing a PCB. 247 00:12:06,060 --> 00:12:10,500 If you look down on any badge life you're currently wearing, you could pick out those four colors of what they are. 248 00:12:11,000 --> 00:12:17,940 All right, so now let's go import that art into Kikad, import the SVG and break it apart into layers. 249 00:12:18,040 --> 00:12:19,440 What are these layers? 250 00:12:19,840 --> 00:12:20,140 Okay. 251 00:12:20,140 --> 00:12:24,340 So the way Kikad works is essentially there's a layer for every single thing that's there. 252 00:12:24,340 --> 00:12:31,560 There's the copper layer, there's the solder mask layer, there's the paste layer, the silk screen layer, um, all these things I was talking about, there's just different layers. 253 00:12:31,560 --> 00:12:35,080 So what you do is you break up your art into those different layers. 254 00:12:35,080 --> 00:12:39,280 So you can get those different colors, um, transparent areas. 255 00:12:39,280 --> 00:12:42,900 You can create a rule area that says, Hey, don't put anything here. 256 00:12:43,040 --> 00:12:45,720 Um, and that way it'll just show up as essentially nothing. 257 00:12:45,720 --> 00:12:51,220 There won't be any, uh, solder mass or it'll just be an empty space, which makes that kind of ugly yellow color. 258 00:12:51,400 --> 00:12:53,520 Um, but it is semi-transparent, which is good for LEDs. 259 00:12:54,920 --> 00:13:00,920 Um, draw filled zones to the front and back, uh, let the front and back mass layers act as silver gold color. 260 00:13:00,920 --> 00:13:04,220 So you essentially just say everywhere else, just dump copper, right? 261 00:13:04,220 --> 00:13:07,860 And so that way it'll just fill in and I'll show you what it looks like in a second. 262 00:13:08,620 --> 00:13:12,240 Uh, move your parts into the art for aesthetic positioning, right? 263 00:13:12,240 --> 00:13:15,420 It's kind of the part of badge life is you want to make sure it looks kind of pretty and fun. 264 00:13:15,580 --> 00:13:18,080 Um, so here we have this little hacker dude on a laptop. 265 00:13:18,080 --> 00:13:22,480 We're going to have it connect at the bottom and we're going to have the led right on their eyes there. 266 00:13:23,320 --> 00:13:23,780 All right. 267 00:13:23,780 --> 00:13:25,020 You outline your image. 268 00:13:25,400 --> 00:13:27,620 Um, I really like using illustrator for this. 269 00:13:27,620 --> 00:13:28,820 You can also use Inkscape. 270 00:13:28,820 --> 00:13:31,140 If you're into open source, uh, it's just a little bit easier. 271 00:13:31,140 --> 00:13:33,880 Uh, in my workflow, you just use a pathfinder unite. 272 00:13:33,880 --> 00:13:36,360 You take your complex shake shape and make it one shape. 273 00:13:36,600 --> 00:13:45,120 Um, cause it has to be a single continuous line for the cutout of your board, um, import onto the edge cuts layer, um, fill all your zones again. 274 00:13:45,120 --> 00:13:48,380 And we'll just say, Hey, okay, let's go refill your circuit board. 275 00:13:48,540 --> 00:13:49,900 Um, and there you go. 276 00:13:49,900 --> 00:13:50,620 There you're done. 277 00:13:50,620 --> 00:13:51,920 Your SAO is right there. 278 00:13:52,100 --> 00:13:53,160 Uh, that's what it looks like. 279 00:13:53,160 --> 00:13:55,280 You give you in 3d and that's, that's basically it. 280 00:13:55,280 --> 00:13:56,220 It's relatively simple. 281 00:13:56,220 --> 00:13:59,100 It'll probably take you a couple hours the first time you do your first one. 282 00:13:59,260 --> 00:14:01,480 And when you get into it, it's just a lot more fun. 283 00:14:01,880 --> 00:14:03,820 All right, now we've got to manufacture this thing. 284 00:14:03,820 --> 00:14:05,240 So we have our design files. 285 00:14:06,140 --> 00:14:09,100 Um, for example, I keep mentioning JLCPCB. 286 00:14:09,100 --> 00:14:09,780 I'm not sponsored. 287 00:14:09,780 --> 00:14:12,280 I just abuse them a lot and I love and hate them. 288 00:14:12,280 --> 00:14:13,900 They have more problems than not. 289 00:14:13,900 --> 00:14:21,680 But anyway, um, there's some really cool plugins out there where essentially, uh, this one for KiCad will let you pick from their parts library. 290 00:14:21,680 --> 00:14:27,740 Uh, you can assign parts to their part IDs and then generate the files that the manufacturer actually needs to create it. 291 00:14:28,040 --> 00:14:30,840 Um, so you select your components, send off to a manufacturer. 292 00:14:31,080 --> 00:14:37,180 Uh, and when you send something off to a manufacturer, I didn't write this in the slides here, but you have a bomb file on a CPL file. 293 00:14:37,180 --> 00:14:41,400 So the bomb file is like what part is assigned to what like identifier. 294 00:14:41,400 --> 00:14:46,820 So we had like D1, R1, and then we'll say, okay, this part is actually, you know, this model number. 295 00:14:46,820 --> 00:14:51,140 And then my manufacturer's model number is like C1, 2, 3, 4, 5, 6 or something. 296 00:14:51,140 --> 00:14:51,280 Right. 297 00:14:51,280 --> 00:14:52,240 And so you get that list. 298 00:14:52,240 --> 00:14:58,120 So the manufacturer knows what to create and CPL file is the positioning and rotation on the part. 299 00:14:58,120 --> 00:14:58,720 Is it on the back? 300 00:14:58,720 --> 00:14:59,620 Is it on the front? 301 00:14:59,620 --> 00:15:00,680 How do you position it? 302 00:15:00,680 --> 00:15:03,500 And so that way it knows where everything goes on your circuit board. 303 00:15:03,500 --> 00:15:05,060 So these tools just take care of it all for you. 304 00:15:05,060 --> 00:15:06,160 You don't got to do anything manual. 305 00:15:07,000 --> 00:15:11,880 So now you send it off to manufacturer, wait three to five weeks, voila, badge life done. 306 00:15:11,880 --> 00:15:14,140 You got a board and hopefully it works. 307 00:15:14,640 --> 00:15:15,100 All right. 308 00:15:15,100 --> 00:15:16,560 So now we're going to draw the rest of the owl. 309 00:15:17,700 --> 00:15:20,760 So how do we go from a simple circuit to full on badge life? 310 00:15:20,900 --> 00:15:22,460 The answer is open source. 311 00:15:23,180 --> 00:15:24,620 Learn from the experts. 312 00:15:24,620 --> 00:15:26,500 Remember this is a one-on-one talk, one-on-one talk. 313 00:15:26,500 --> 00:15:27,720 We're not experts right here, right? 314 00:15:27,720 --> 00:15:29,180 But we just learn from them. 315 00:15:29,660 --> 00:15:31,760 Adafruit, SparkFun, et cetera. 316 00:15:31,760 --> 00:15:34,400 They release all their schematics for their development boards. 317 00:15:34,400 --> 00:15:35,380 It's phenomenal. 318 00:15:35,380 --> 00:15:41,460 Especially if you're learning, you just say, hey, they have a circuit board, which has the part I want on it. 319 00:15:41,460 --> 00:15:43,520 Let me just go look at how they made their circuit board. 320 00:15:43,520 --> 00:15:46,400 You can pull their values for resistors, capacitors, whatever. 321 00:15:46,400 --> 00:15:47,980 They've already done the work for you. 322 00:15:47,980 --> 00:15:51,760 And if you're prototyping with that exact dev board, then it works. 323 00:15:53,760 --> 00:15:56,400 They also have software libraries that are decent starting point. 324 00:15:56,400 --> 00:15:58,500 I say decent because they're usually not full featured. 325 00:15:58,500 --> 00:16:02,340 And if you're doing something esoteric with the hardware, you're probably going to write that code yourself. 326 00:16:02,680 --> 00:16:05,500 But it's a really good starting point to just get off the ground and running. 327 00:16:06,340 --> 00:16:08,320 And please, please support these folks. 328 00:16:08,320 --> 00:16:09,340 I really mean it. 329 00:16:09,340 --> 00:16:13,480 They create some unbelievable hardware release everything open and free. 330 00:16:13,580 --> 00:16:19,260 And because they do that, there's a lot of manufacturers in countries that don't believe in copyright infringement and things like that. 331 00:16:19,260 --> 00:16:20,240 And it is open hardware. 332 00:16:20,240 --> 00:16:21,740 So it is allowed to be taken. 333 00:16:21,740 --> 00:16:28,900 But then they'll resell those boards for a dollar or two versus the 20 or 30 that these people need to continue making cool stuff. 334 00:16:28,900 --> 00:16:30,240 So please support them if you can. 335 00:16:31,500 --> 00:16:31,800 All right. 336 00:16:31,800 --> 00:16:33,520 So prototype the circuit on a breadboard. 337 00:16:34,020 --> 00:16:37,520 This is an example of a badge I made last year. 338 00:16:37,920 --> 00:16:38,820 I won't get into the badge. 339 00:16:38,820 --> 00:16:39,680 It's not actually important. 340 00:16:39,680 --> 00:16:45,100 But I'm just showing you what it kind of looks like when you kind of hodgepodge all these development boards together on a breadboard. 341 00:16:45,740 --> 00:16:52,020 There is a chip that you have to select is kind of the first thing you do is like who's going to be the brains of my badge. 342 00:16:52,460 --> 00:16:59,520 I recommend one of the following starting out, an ESP32S3, an RP2040, RP2350. 343 00:17:00,480 --> 00:17:01,060 Why? 344 00:17:01,060 --> 00:17:02,300 Why would I pick those? 345 00:17:02,300 --> 00:17:04,260 So first off, they all got built-in USB. 346 00:17:04,260 --> 00:17:05,580 So it makes it really easy. 347 00:17:05,580 --> 00:17:09,860 You don't have a special serial to USB chips or anything else you got to put on the board. 348 00:17:10,040 --> 00:17:11,780 They're dead simple to flash. 349 00:17:11,960 --> 00:17:18,140 The ESP32S3 requires some tool chains, but it's like built into the Arduino library, if you guys are familiar with that. 350 00:17:19,000 --> 00:17:23,360 But the RP2350 and 2040 show up as a drive. 351 00:17:23,600 --> 00:17:25,660 And then you just drag and drop your firmware onto it. 352 00:17:25,660 --> 00:17:27,460 And it's ridiculous easy to flash. 353 00:17:27,460 --> 00:17:34,920 For example, I did a conference badge for about 1,000 badges and trying to get 15 volunteers how to set up a tool chain to flash some hardware would be impossible. 354 00:17:35,000 --> 00:17:37,560 But I was like, here's the file, just plug it in and drag and drop, right? 355 00:17:37,560 --> 00:17:39,400 It's a lot easier for that type of work. 356 00:17:40,060 --> 00:17:42,940 The other thing they have is solid Arduino library support. 357 00:17:43,280 --> 00:17:49,960 So if you're unfamiliar with Arduino, it's kind of this like open hardware development ecosystem where everybody's made libraries for almost everything. 358 00:17:50,040 --> 00:17:55,520 And so having compatibility with that is really important, because you could essentially say, hey, I want to do a thing with this funky hardware. 359 00:17:55,580 --> 00:17:59,400 And sometimes even the manufacturers go, we wrote a small little library for you to do that, right? 360 00:17:59,400 --> 00:18:00,900 And then you could just get off the ground running. 361 00:18:01,520 --> 00:18:05,940 And these chips have more than enough peripherals in IO. 362 00:18:05,940 --> 00:18:08,600 They can do pretty much whatever you want to do on a badge. 363 00:18:08,860 --> 00:18:11,360 If you're doing something super funky, you're going to be way into it. 364 00:18:11,360 --> 00:18:16,720 But starting out, more than enough to just click some buttons, run some LEDs, just drive a screen, things like that. 365 00:18:18,000 --> 00:18:22,000 JLCPCB also has an RP2350 guide that I have a link here. 366 00:18:22,100 --> 00:18:25,500 But essentially that's a way to say, hey, how do I get started with this chip? 367 00:18:25,500 --> 00:18:27,320 What sort of considerations do I have to have? 368 00:18:27,840 --> 00:18:28,340 All right. 369 00:18:28,340 --> 00:18:29,320 I have the hardware. 370 00:18:29,320 --> 00:18:30,260 I built my prototype. 371 00:18:30,260 --> 00:18:31,160 Now the code. 372 00:18:31,760 --> 00:18:34,540 There are kind of three schools of thought with developing a badge. 373 00:18:34,540 --> 00:18:37,880 There's the Arduino and it's incredibly easy to get running. 374 00:18:37,880 --> 00:18:39,220 You download the Arduino IDE. 375 00:18:39,280 --> 00:18:41,580 You install your board files. 376 00:18:41,580 --> 00:18:44,080 That's right from a searchable thing within the IDE. 377 00:18:44,080 --> 00:18:46,700 And then you say, click compile and you're done, right? 378 00:18:46,860 --> 00:18:49,620 It's very limited and it's a little slow. 379 00:18:49,620 --> 00:18:55,640 And the way the compiler is set up, it's set up to be easy to use, not to be the most powerful. 380 00:18:55,880 --> 00:18:56,940 So that's one consideration. 381 00:18:56,940 --> 00:18:58,300 We're doing some more advanced stuff. 382 00:18:58,380 --> 00:19:06,360 For example, I started on making a badge and it got to the point where compile times are up to like eight minutes a pop, which was just ridiculous and I had to move on to a different thing. 383 00:19:07,120 --> 00:19:11,480 Platform IO and VS Code, it's a pain in the butt to set up. 384 00:19:11,480 --> 00:19:14,580 Every time I have to do it, it's at least like 45 minutes to an hour. 385 00:19:14,580 --> 00:19:16,320 Maybe I'm just really bad at computers. 386 00:19:16,800 --> 00:19:19,180 But this is essentially like just a big pain in the butt. 387 00:19:19,180 --> 00:19:21,300 But once it's set up, it's rock solid. 388 00:19:21,300 --> 00:19:23,920 You can import Arduino libraries, raw code, whatever. 389 00:19:23,920 --> 00:19:28,160 The tool chain is really mature and it's like the way to go in making advanced stuff. 390 00:19:29,700 --> 00:19:30,900 Compile your own. 391 00:19:30,980 --> 00:19:35,560 Then you can use manufacturer supplied tool chain for your MCU and do everything yourself. 392 00:19:35,820 --> 00:19:41,080 I don't recommend doing this when starting out, but at some point we're doing some crazy chips, you're going to get into this. 393 00:19:41,880 --> 00:19:47,100 All right, so now you kind of have the IDE and the compile things. 394 00:19:47,840 --> 00:19:52,100 Here's some common Arduino libraries that we're going to go with for this example on what to do. 395 00:19:52,100 --> 00:19:53,660 So first off, bling. 396 00:19:53,660 --> 00:19:55,060 You want your badge to blink. 397 00:19:55,060 --> 00:19:57,500 I see some people in the front that have some blinky badges. 398 00:19:57,720 --> 00:20:04,360 Adafruit has a NeoPixel library, they call it, that works with WS2812Bs and some other type of LEDs. 399 00:20:04,360 --> 00:20:09,760 It supports like almost every chip on the planet that is used in sort of the hobbyist community. 400 00:20:10,080 --> 00:20:15,960 Some of it's really gross where it like bangs all the stuff out and some of it's really nice where it uses like your timers and everything. 401 00:20:15,960 --> 00:20:16,880 But it just works. 402 00:20:16,880 --> 00:20:20,360 You drop that on and you set the pin that you're going to use for your bling. 403 00:20:20,540 --> 00:20:21,540 It just works. 404 00:20:21,540 --> 00:20:22,600 It's really nice. 405 00:20:23,240 --> 00:20:29,720 If you have a screen, there's a couple libraries I recommend Adafruit Graphics, TFTSPI, and LoveYan Graphics. 406 00:20:29,740 --> 00:20:33,640 They're a Japanese group, so a lot of their documentation you got to Google Translate. 407 00:20:33,820 --> 00:20:37,780 But three really cool libraries that support a whole ton of screens. 408 00:20:37,780 --> 00:20:44,580 Every screen I've thrown at it, because essentially what happens is you have a screen and usually have a display controller chip that's on the screen itself. 409 00:20:44,600 --> 00:20:47,820 And so you just make sure your library supports that display controller chip. 410 00:20:49,060 --> 00:20:49,980 And then input. 411 00:20:49,980 --> 00:20:51,460 You want buttons to do something , right? 412 00:20:51,460 --> 00:20:56,000 So EasyButton is built into like Arduino, for example, and ButtonFever is another library I really love. 413 00:20:56,380 --> 00:20:59,360 They support, like, you can pull the button state, like, is it pressed? 414 00:20:59,360 --> 00:21:00,240 Is it not pressed? 415 00:21:00,240 --> 00:21:01,400 You can also have interrupts. 416 00:21:01,400 --> 00:21:09,060 So when a button is pressed, fire off this function, which is really, really nice when you're like, hey, you know, change my screen or change my bling or do something else. 417 00:21:09,060 --> 00:21:10,720 It's just a nice, easy way to get started. 418 00:21:11,120 --> 00:21:11,500 Cool. 419 00:21:11,500 --> 00:21:12,620 So I got a working prototype. 420 00:21:12,620 --> 00:21:13,420 What's next? 421 00:21:14,500 --> 00:21:21,040 So how do I get from this breadboard thing to this ridiculously complex KiCad schematic, right? 422 00:21:21,040 --> 00:21:24,600 So this is actually the schematic for that breadboard, but we'll get there. 423 00:21:25,080 --> 00:21:26,720 So start with the brains. 424 00:21:27,000 --> 00:21:31,020 The Raspberry Pi Foundation provides a working reference board for KiCad. 425 00:21:31,160 --> 00:21:35,900 You can download this and they give you a fully working RP-2350 board. 426 00:21:35,900 --> 00:21:42,860 You just download it and then you can send that to a manufacturer if you wanted to, as long as you assign, like, the BOM part files. 427 00:21:43,220 --> 00:21:44,840 It has both the schematic and layout. 428 00:21:44,840 --> 00:21:45,640 So it's really simple. 429 00:21:45,640 --> 00:21:53,560 As you see here, it's got the MCU, it's got the flash, it's got the USB, it's got pretty much everything you need to get started. 430 00:21:53,560 --> 00:21:57,440 So you just kind of start hodgepodging your peripherals on and then you're good to go. 431 00:21:57,740 --> 00:21:58,860 Is it the best? 432 00:21:58,860 --> 00:21:59,440 Eh. 433 00:22:00,200 --> 00:22:01,220 But does it work? 434 00:22:01,220 --> 00:22:02,180 Yeah, it does. 435 00:22:02,300 --> 00:22:08,540 Which is super nice because now, as someone who's just starting out, you don't need to worry about the complex part of the brains of your device. 436 00:22:09,040 --> 00:22:10,820 It works right out of the box. 437 00:22:11,020 --> 00:22:13,500 All right, next, hodgepodge your open source in. 438 00:22:13,620 --> 00:22:19,900 So for example, on the right here is Adafruit's schematic for the display breakout for a screen I was using. 439 00:22:20,200 --> 00:22:26,280 I bought their device, I plugged it into my breadboard, and then I looked at their schematic and I said, oh, okay, that's all you need? 440 00:22:26,280 --> 00:22:26,560 Cool. 441 00:22:26,560 --> 00:22:27,660 And I just made my own. 442 00:22:27,820 --> 00:22:30,500 And so now I don't have to use an add-on board for my badge. 443 00:22:30,500 --> 00:22:33,600 I could just plop it right onto my badge and then have the screen plug right in. 444 00:22:34,920 --> 00:22:37,140 This is another example of something I've done. 445 00:22:37,220 --> 00:22:41,160 I needed sound on my badge to play tunes. 446 00:22:41,420 --> 00:22:43,140 And so Adafruit had a really nice circuit. 447 00:22:43,140 --> 00:22:44,280 I said, cool, look at that. 448 00:22:44,280 --> 00:22:45,540 Everything works right out of the box. 449 00:22:45,540 --> 00:22:46,720 It's relatively good. 450 00:22:46,780 --> 00:22:48,600 I read the spec sheet because I was going a little deeper. 451 00:22:48,600 --> 00:22:49,800 I tweaked it a little bit. 452 00:22:50,180 --> 00:22:53,880 But just relatively copied right for right off the open source. 453 00:22:53,880 --> 00:22:54,980 And then done. 454 00:22:54,980 --> 00:23:00,140 You've got a working circuit for this peripheral that you just plug into a data line to your MCU. 455 00:23:00,980 --> 00:23:01,820 All right. 456 00:23:01,820 --> 00:23:03,020 You've got a working badge. 457 00:23:03,020 --> 00:23:11,120 And to show you kind of how coming from that open source to the actual badge itself, anybody seen those frog badges this year that are around? 458 00:23:11,180 --> 00:23:12,900 That's the badge here. 459 00:23:12,900 --> 00:23:16,120 If you look on the right, there's the RP2350 reference design. 460 00:23:16,120 --> 00:23:21,100 And you look on the left, there's my personal design for this badge besides the power stuff, which I've done myself. 461 00:23:21,100 --> 00:23:25,380 The rest of it is relatively copied straight from theirs because it works. 462 00:23:25,560 --> 00:23:28,360 Why do extra work when you're just trying to have fun, right? 463 00:23:29,200 --> 00:23:30,080 All right. 464 00:23:30,080 --> 00:23:34,280 So we started out with basically a breadboard. 465 00:23:34,280 --> 00:23:38,480 Those are all those kind of components and whatnot I just plugged into wires. 466 00:23:39,040 --> 00:23:40,480 We threw it into KiCad. 467 00:23:40,480 --> 00:23:41,720 We built up a schematic. 468 00:23:42,380 --> 00:23:43,900 We laid out the board. 469 00:23:44,620 --> 00:23:45,680 It's right behind me. 470 00:23:45,680 --> 00:23:47,740 So I'm sorry if you guys can't see some of that. 471 00:23:47,980 --> 00:23:49,780 And then the final badge. 472 00:23:49,780 --> 00:23:54,540 And then we get a working badge that we can deliver for DEF CON and everybody can have fun playing with it. 473 00:23:54,760 --> 00:23:55,080 All right. 474 00:23:55,080 --> 00:23:56,120 So is it that easy? 475 00:23:56,180 --> 00:23:56,740 That's it? 476 00:23:56,740 --> 00:23:57,160 It's done? 477 00:23:57,160 --> 00:23:58,560 You just do those couple steps? 478 00:23:59,360 --> 00:23:59,920 No. 479 00:24:00,300 --> 00:24:04,460 So today's day and age, there's a bunch of issues with supply chain. 480 00:24:04,560 --> 00:24:06,440 Tariffs kind of screwed that up a little bit. 481 00:24:06,440 --> 00:24:09,940 Last minute part swaps, like, oh, cool, I've designed around this chip. 482 00:24:09,940 --> 00:24:11,140 That chip's not available anymore. 483 00:24:11,140 --> 00:24:11,480 Cool. 484 00:24:11,880 --> 00:24:13,240 What's similar? 485 00:24:13,840 --> 00:24:20,100 It gets a little difficult when you're saying, hey, you know, I'm using this something easy, like I'm using a button, dropping a different button. 486 00:24:20,100 --> 00:24:21,340 Doesn't really matter too much. 487 00:24:21,340 --> 00:24:23,960 But it's like, hey, I'm using this display driver. 488 00:24:23,960 --> 00:24:25,960 Now I have to have a completely different display driver. 489 00:24:25,960 --> 00:24:28,120 You got to make sure your libraries work, everything, et cetera. 490 00:24:29,340 --> 00:24:31,940 Data sheets misrepresented components. 491 00:24:32,080 --> 00:24:34,840 One of the issues I ran into once is I wanted a three-way switch. 492 00:24:34,840 --> 00:24:36,740 I wanted to essentially be power selector. 493 00:24:36,740 --> 00:24:38,360 It's off USB or battery. 494 00:24:38,420 --> 00:24:39,140 Really simple. 495 00:24:39,140 --> 00:24:41,180 I didn't want to do any power selection circuits or anything. 496 00:24:41,660 --> 00:24:42,980 And so I got a three-way switch. 497 00:24:42,980 --> 00:24:43,920 They come in. 498 00:24:44,380 --> 00:24:45,460 It wasn't a three-way switch. 499 00:24:45,460 --> 00:24:48,160 It was a two-way switch with a momentary three. 500 00:24:48,640 --> 00:24:53,760 Kind of like if you have those Bluetooth headphones where you, like, turn them on and then you hold it to pair type of thing. 501 00:24:53,760 --> 00:24:55,260 That's kind of what it was designed for. 502 00:24:55,260 --> 00:24:57,760 They didn't say anything like that in the schematics, the data sheet, nothing. 503 00:24:57,860 --> 00:24:58,140 All right. 504 00:24:58,140 --> 00:25:03,340 So you always make sure you have a prototype done and make sure you do your prototypes early because you will eventually find issues. 505 00:25:04,080 --> 00:25:05,100 And the manual cost of labor. 506 00:25:05,100 --> 00:25:06,820 That's one thing I really want to talk about. 507 00:25:06,820 --> 00:25:09,280 If you say I'm going to make 1,000 badges, everybody's going to have one. 508 00:25:09,280 --> 00:25:10,200 It's going to be great. 509 00:25:10,360 --> 00:25:13,000 And you have a screen on your badge and you have to attach that screen. 510 00:25:13,000 --> 00:25:15,180 Now you have to attach 1,000 screens. 511 00:25:15,180 --> 00:25:16,240 I've done this. 512 00:25:17,260 --> 00:25:20,260 So it's a bit of a pain. 513 00:25:20,260 --> 00:25:24,680 My buddy Doug in the back over there, he's helped me with one of those where I did about 750. 514 00:25:24,680 --> 00:25:27,880 He did about 200 of these screens for a conference we did. 515 00:25:28,020 --> 00:25:34,360 So it's just when you do a badge, make sure the cost of labor is in your head about how much time things are going to take. 516 00:25:35,140 --> 00:25:36,480 All parts fail. 517 00:25:36,480 --> 00:25:37,760 Plan to buy overages. 518 00:25:47,610 --> 00:25:50,630 There's always going to be a percentage of failure in parts. 519 00:25:50,650 --> 00:25:52,530 You could design this thing rock solid. 520 00:25:52,530 --> 00:25:59,210 You could design with really good tolerances in mind and then you'll just get a bad button or a bad screen or a bad whatever. 521 00:25:59,650 --> 00:26:00,710 I'll give you an example. 522 00:26:00,710 --> 00:26:03,310 This year I had the and the Frogstar badge. 523 00:26:03,350 --> 00:26:05,770 Both of those, the PCBs came out 100%. 524 00:26:05,770 --> 00:26:07,330 One had a bad button. 525 00:26:07,450 --> 00:26:08,430 One had a bad thing. 526 00:26:08,430 --> 00:26:09,610 One had a bad USB. 527 00:26:09,670 --> 00:26:10,670 One had a bad diode. 528 00:26:10,670 --> 00:26:11,950 And you'd have to replace those parts. 529 00:26:11,950 --> 00:26:15,670 So always make sure you, like let's say you're targeting 100, do 120. 530 00:26:15,810 --> 00:26:19,230 Let's say you're targeting 1,000, do like 1,100, right? 531 00:26:19,230 --> 00:26:22,590 You always have that little bit buffer, 10%-ish roughly to get in. 532 00:26:22,590 --> 00:26:24,110 And then if you have more, then you have more. 533 00:26:25,290 --> 00:26:25,890 All right. 534 00:26:25,890 --> 00:26:26,550 I did all that. 535 00:26:26,550 --> 00:26:27,410 Did I do good? 536 00:26:28,330 --> 00:26:29,570 Is it fun? 537 00:26:31,530 --> 00:26:33,710 My personal requirements for a badge. 538 00:26:34,630 --> 00:26:36,090 Awesome bling and light patterns. 539 00:26:36,090 --> 00:26:38,730 If it's not flashy, it's not badge life to me. 540 00:26:38,730 --> 00:26:39,950 At least that's my personal thing. 541 00:26:39,950 --> 00:26:43,310 Other people have other things, but you walk around and you say, oh, what's that flashy thing over there? 542 00:26:43,310 --> 00:26:44,930 I want to go make something like that. 543 00:26:45,190 --> 00:26:46,310 CTF challenges. 544 00:26:46,530 --> 00:26:47,450 It's a hacker con. 545 00:26:47,450 --> 00:26:48,370 These are hacker badges. 546 00:26:48,370 --> 00:26:50,190 You got to have some sort of puzzles in there. 547 00:26:50,190 --> 00:26:51,330 It's something I love doing. 548 00:26:51,330 --> 00:26:52,250 I love creating puzzles. 549 00:26:52,250 --> 00:26:53,150 I love solving puzzles. 550 00:26:53,150 --> 00:26:57,430 So every one of my badges, no matter how simple or complex, it's going to have at least like five puzzles in it. 551 00:26:57,430 --> 00:26:58,690 I just can't help myself. 552 00:26:59,250 --> 00:27:00,490 Prevent e-waste. 553 00:27:00,490 --> 00:27:08,590 This is one of the things that early on there's a lot like I have two bins of badges in my house just sitting there because a lot of them don't do anything besides light up. 554 00:27:08,590 --> 00:27:11,910 And they look really cool, but like, okay, they light up. 555 00:27:11,910 --> 00:27:12,130 Sure. 556 00:27:12,130 --> 00:27:13,290 So does every other badge. 557 00:27:13,690 --> 00:27:16,730 So make something fun and repeatable within your badge. 558 00:27:16,730 --> 00:27:21,070 So when designing your hardware, make sure that there's some purpose to it or a gimmick or something. 559 00:27:21,370 --> 00:27:23,290 For example, can it be a dev board? 560 00:27:23,290 --> 00:27:25,690 Can you just use this to build new things afterwards? 561 00:27:25,690 --> 00:27:31,290 You can expose your pins so they could plug in their headers and then use it to develop their own stuff. 562 00:27:31,470 --> 00:27:33,130 Does it do something besides blink? 563 00:27:33,210 --> 00:27:36,110 For example, my gunslinger is a TV be gone, right? 564 00:27:36,110 --> 00:27:41,030 So when you're done with the CTF and you're done shooting other people to conference, you go home, you just turn off your TV, right? 565 00:27:41,030 --> 00:27:47,730 So it's like just little things like that, where it's just, you know, it's something that you can use without just throwing it in the trash when you're done with it. 566 00:27:47,850 --> 00:27:49,830 My frog star has like a frogger game. 567 00:27:49,830 --> 00:27:55,370 The fight dystopia badge can detect certain BLE Mac addresses and alert you of their presence in case you're worried about that type of thing. 568 00:27:56,070 --> 00:27:58,630 Yeah, so when you're done with that, badge life achieved. 569 00:27:59,710 --> 00:28:01,510 With that, any questions? 570 00:28:12,740 --> 00:28:15,820 And real quick, you can see more of my work at bigtaro.net. 571 00:28:15,820 --> 00:28:17,480 You can see some of the badges I released. 572 00:28:17,620 --> 00:28:21,700 It's all blocked by me, of course, because I wasn't expecting this podium to be here. 573 00:28:24,180 --> 00:28:25,060 Yeah, you? 574 00:28:38,220 --> 00:28:39,980 Yeah, no, it depends. 575 00:28:39,980 --> 00:28:41,400 It depends on what stage you're in, right? 576 00:28:41,460 --> 00:28:51,320 So I would always target like 10 to 20 percent for anything, because that's a really safe number, because it's statistically improbable for all that stuff to fail unless you have a design flaw, right? 577 00:28:51,320 --> 00:28:53,980 So I think like 10 to 20 percent is a really good number. 578 00:28:53,980 --> 00:28:54,960 That's something I try to target. 579 00:28:54,960 --> 00:28:57,240 I always target like for badge life, I'll target 100. 580 00:28:57,240 --> 00:29:02,120 I'll do 120, 125, depending on what the manufacturer and type of board and things like that. 581 00:29:02,120 --> 00:29:07,900 They usually don't do numbers like you can do 100, but they'll offer the next one up as 120 or 125. 582 00:29:07,900 --> 00:29:09,380 So you say, yeah, good, do that. 583 00:29:09,960 --> 00:29:11,360 And that's kind of what I target. 584 00:29:11,360 --> 00:29:21,520 In terms of like large quantities, the larger you are, the more less buffer you kind of need, because if you say like, oh, let's say 10 badges are going to fail, you're making 10 badges and 10 fail, you're screwed, right? 585 00:29:21,520 --> 00:29:25,300 But if you're making a thousand badges and 10 are going to fail, you can get away with a little less. 586 00:29:25,440 --> 00:29:26,300 So it really depends. 587 00:29:26,300 --> 00:29:29,780 That's a really hard question to answer based on experience. 588 00:29:31,440 --> 00:29:33,000 Like I'll do a prototype run. 589 00:29:33,000 --> 00:29:35,440 My first prototype run, I'll always do 10, right? 590 00:29:35,440 --> 00:29:41,720 I'll never do five or anything, because if I have to bodge two or three of them, and then I screw up soldering the badge, I'm just going to throw that thing out. 591 00:29:41,720 --> 00:29:47,960 And so essentially I got to make sure I can do things, put extra test pads, put extra things when you're debugging. 592 00:29:48,140 --> 00:29:53,040 And that way you can get that second run down to pretty high confidence it's going to work, unless there's like part failures. 593 00:29:54,180 --> 00:29:54,980 Yep. 594 00:29:55,900 --> 00:29:57,220 Thank you. 595 00:30:07,580 --> 00:30:08,380 Yep. 596 00:30:12,920 --> 00:30:13,920 It's a good question. 597 00:30:13,920 --> 00:30:15,180 I've done all of those. 598 00:30:15,180 --> 00:30:16,740 I've done rechargeable batteries. 599 00:30:16,740 --> 00:30:18,960 I've done double A's, triple A's. 600 00:30:18,960 --> 00:30:23,720 If you want to keep it dead simple, I would just go with triple A batteries or double A batteries. 601 00:30:23,740 --> 00:30:26,600 That way you essentially have a certain amount of voltage. 602 00:30:26,600 --> 00:30:30,160 So usually batteries died around 0.9, 0.85 volts. 603 00:30:30,280 --> 00:30:35,740 So if you multiply that up, so if you do like two batteries, that'll be like 1.8 volts, do three batteries, right? 604 00:30:35,780 --> 00:30:42,660 And so you figure out a chip that'll essentially boost that battery to be your 3.3 or five or whatever you need. 605 00:30:42,660 --> 00:30:44,420 Most things are 3.3 these days. 606 00:30:44,960 --> 00:30:57,760 So you boost that up to 3.3 and you can get a chip that says I can boost power from 1.8 volts or two volts all the way up to 3.3, or I can buck down from five volts to 3.3. 607 00:30:57,760 --> 00:30:59,560 So that way you could plug into USB as well. 608 00:30:59,900 --> 00:31:06,420 We could talk a little after about how to design a circuit like that, but usually that's what I do is have some sort of power circuit where if it's coming from the battery, you're going to boost. 609 00:31:06,420 --> 00:31:11,500 If it's coming from USB, you're going to buck down and then you and then you get relatively stable power. 610 00:31:15,830 --> 00:31:16,470 Absolutely. 611 00:31:16,830 --> 00:31:19,970 Oh yeah, I can give a whole talk about how to do LiPo battery safety. 612 00:31:20,150 --> 00:31:22,490 I've talked with a bunch of people that have made batteries. 613 00:31:22,490 --> 00:31:24,230 The first time I did one, I was paranoid. 614 00:31:24,250 --> 00:31:28,750 I put every circuit protection you could possibly do on the chip. 615 00:31:29,110 --> 00:31:32,910 It was like we had overage, underage, we had detectors, we had a heat sensor, everything. 616 00:31:32,910 --> 00:31:35,710 It was like, I'm going to make sure this thing will not kill anybody, right? 617 00:31:35,710 --> 00:31:40,870 But once you start doing them, as long as you don't have those like soft pack batteries, because then you could puncture that and go on fire. 618 00:31:40,870 --> 00:31:47,190 I like to use hard batteries, like 18650s or something, which they use in like vapes and things like that. 619 00:31:47,190 --> 00:31:49,330 Those like bigger batteries, like flashlights and vapes. 620 00:31:49,350 --> 00:31:52,330 Yeah, like on those, they're hard-cased, right? 621 00:31:52,330 --> 00:31:54,670 So you could bang it in them and not worry too much. 622 00:31:55,910 --> 00:32:04,270 But at the end of it, yeah, we could talk afterwards about sort of things, but essentially you have overage protection, undervolting, so that way the battery doesn't die. 623 00:32:04,270 --> 00:32:08,310 Make sure you can't charge for the temperature, it gets too hot, turns off the circuit, things like that. 624 00:32:10,110 --> 00:32:10,470 Yep. 625 00:32:18,560 --> 00:32:19,760 They do. 626 00:32:20,320 --> 00:32:21,740 KiCads is not the best. 627 00:32:22,440 --> 00:32:29,260 So that's why I recommend prototyping with a breadboard, because if you blow an LED, you just get a new one out of the bag and you try again. 628 00:32:29,280 --> 00:32:36,620 But one thing you could do is look at the schematics of parts and the manufacturers as you recommend the minimum, maximum, like current going through, voltage, things like that. 629 00:32:36,620 --> 00:32:44,140 And then you can kind of do the basic math of like, okay, if I have this amount of current maximum, do I need a resistor that can drop it into that, things like that. 630 00:32:44,840 --> 00:32:45,180 Yep. 631 00:32:45,180 --> 00:32:49,500 I think I'm almost running out of time, but I'll take, who really wants the question? 632 00:32:50,600 --> 00:32:51,260 Correct. 633 00:32:52,800 --> 00:32:56,940 There will be a copy available on infocon.org once they put it up there. 634 00:32:58,340 --> 00:33:01,040 Infocon.org, the DEF CON archives, yeah. 635 00:33:10,000 --> 00:33:12,040 As many as I have sanity for. 636 00:33:12,440 --> 00:33:14,940 I like targeting 100. 637 00:33:14,940 --> 00:33:25,040 I think that's a nice number, especially at a con of this size, you know, you'll probably sell all of them so that way you're not like in the hole for thousands of dollars that you've got to like pay yourself. 638 00:33:26,140 --> 00:33:28,160 But it really depends what you want to do. 639 00:33:28,160 --> 00:33:34,280 You could do as little as like 10, 20, you know, just want to try it out and make something new, give it out to friends or whatever. 640 00:33:34,280 --> 00:33:37,980 Or you can go, I wouldn't got, would not go over 100 or so. 641 00:33:38,140 --> 00:33:39,300 It's just too much. 642 00:33:40,980 --> 00:33:41,620 All right. 643 00:33:41,620 --> 00:33:44,920 I was called time, thank you very much for coming to my presentation. 644 00:33:45,760 --> 00:33:46,740 Have a good day.