1 00:00:00,000 --> 00:00:03,760 I haven't spoken at DEF CON in quite a while, so I'm kind of excited to be here. 2 00:00:03,760 --> 00:00:07,240 I'm glad that we're in this room and not one of those other big ones. 3 00:00:08,160 --> 00:00:09,940 How many of you have made badges before? 4 00:00:10,900 --> 00:00:13,460 How many of you have used badges before? 5 00:00:13,700 --> 00:00:15,200 How many of you like badges? 6 00:00:15,340 --> 00:00:17,180 How many of you like badges that work? 7 00:00:17,500 --> 00:00:19,060 How many of you have badges that work? 8 00:00:19,500 --> 00:00:21,760 How many of you have badges that don't work? 9 00:00:21,760 --> 00:00:25,060 Not necessarily this conference, but have you ever been at a conference and you get a badge and it doesn't work? 10 00:00:25,440 --> 00:00:26,480 Yeah, me too. 11 00:00:27,340 --> 00:00:30,380 How many of you didn't even bother turning it on because you weren't sure it was going to work anyway? 12 00:00:31,840 --> 00:00:42,900 So the point of this talk is because I have made a few badges and I have a habit of reusing as much as absolutely possible because the chief virtue of an engineer is laziness, right? 13 00:00:43,140 --> 00:00:49,460 So if I'm going to put the effort into making a badge that I can reuse, I want to make sure other people know that it's available and they can do that too. 14 00:00:49,620 --> 00:00:53,940 I know there's tons of badges, but like, and many of them are open hardware, open source. 15 00:00:54,240 --> 00:00:59,700 And rather than, of course, you know, just taking an existing open source one, I figured why not do another open source one? 16 00:00:59,960 --> 00:01:02,380 Because, you know, so that's how it goes. 17 00:01:02,400 --> 00:01:11,280 So I'm going to tell you about an open hardware badge design that I've worked on and that I think will be useful because it's been tested, been through two conferences already. 18 00:01:11,280 --> 00:01:13,300 It's going to be on track for a third one. 19 00:01:13,520 --> 00:01:18,220 And I want it to be open hardware so that anybody who wants to make a badge doesn't have to start from scratch. 20 00:01:18,220 --> 00:01:22,400 You can just take this open hardware, change it how you want, however you want to do. 21 00:01:22,440 --> 00:01:23,680 Just change the artwork. 22 00:01:23,680 --> 00:01:24,640 You can change software. 23 00:01:24,640 --> 00:01:26,080 You could keep it exactly the same. 24 00:01:26,080 --> 00:01:27,760 Just like change the conference name. 25 00:01:28,140 --> 00:01:29,080 And you've got a badge. 26 00:01:30,060 --> 00:01:33,680 So a little bit about badges, or me, I'm Joe, hi. 27 00:01:34,480 --> 00:01:36,800 I teach classes on hardware hacking and reverse engineering. 28 00:01:36,800 --> 00:01:40,360 I've been in Las Vegas for a week already because I was doing training at Black Hat. 29 00:01:40,400 --> 00:01:41,560 So I'm a little bit exhausted. 30 00:01:41,740 --> 00:01:46,080 But after this, I'm going to go hang around the pool, which is what I've been looking forward to for the past week. 31 00:01:47,680 --> 00:01:49,440 Yeah, I do hardware stuff. 32 00:01:52,240 --> 00:02:02,240 So let's talk about, this is what I'm going to talk about today, why we have badges, what this thing is that I'm talking about, what my vision for it is, what we can do today, and some logistics and pitfalls. 33 00:02:03,240 --> 00:02:10,800 And it started out as kind of like a workshop-y thing, but the space and the venue worked better for us to do kind of more of a talk slash demo. 34 00:02:11,280 --> 00:02:14,500 So I'm going to talk a bit, and then I'm going to show you some software and hardware. 35 00:02:14,800 --> 00:02:16,900 And then we'll have some time for questions. 36 00:02:16,900 --> 00:02:17,560 Sound good? 37 00:02:17,720 --> 00:02:18,840 Any questions? 38 00:02:19,120 --> 00:02:19,920 Everybody ready? 39 00:02:20,220 --> 00:02:21,420 Okay, listen carefully. 40 00:02:22,640 --> 00:02:23,740 What are badges? 41 00:02:24,240 --> 00:02:25,240 Why do we have badges? 42 00:02:25,240 --> 00:02:26,240 Well , it's pretty much access. 43 00:02:26,480 --> 00:02:35,700 Whether it's a wristband or a badge or something that hangs around your neck or something you tattoo on your forehead, we need a way to know who's supposed to be here, who's not, who paid, who didn't, who gets free drinks, and who doesn't. 44 00:02:36,220 --> 00:02:37,740 So we're going to have them anyway. 45 00:02:37,740 --> 00:02:39,320 We might as well make use of them. 46 00:02:39,640 --> 00:02:41,520 So we want the cool factor. 47 00:02:41,920 --> 00:02:43,700 This is a handful of badges that I designed. 48 00:02:43,700 --> 00:02:46,520 My first one over here was for B-Sides Portland ten years ago. 49 00:02:47,160 --> 00:02:52,680 It was a bus pirate, but the PCB shape was changed, so it was the shape of a Nyan cat. 50 00:02:52,680 --> 00:02:58,740 So the rainbow ribbon cables that come out of the bus pirate were like the trail of rainbow behind it. 51 00:02:59,440 --> 00:03:10,460 And a couple of these were B-Sides Portland, some 503 Party badges, 44Con in London, TRCon, which has kind of evolved into the Dan Initiative now. 52 00:03:11,380 --> 00:03:12,980 So yeah, they look cool. 53 00:03:12,980 --> 00:03:14,480 And you want them to look cool. 54 00:03:14,480 --> 00:03:22,180 And as a conference organizer, you want people to say, oh, this is a cool badge, take pictures of it, post it on social media, say, I can't wait until I come back next year. 55 00:03:22,180 --> 00:03:24,880 Conference organizers get more people coming and yada, yada, yada. 56 00:03:26,800 --> 00:03:28,200 Why else do we want badges? 57 00:03:28,200 --> 00:03:31,740 Electronic badges hopefully have some sort of interaction. 58 00:03:31,820 --> 00:03:35,780 And you can do interaction with a paper badge, but electronic badges are a little bit cooler. 59 00:03:39,780 --> 00:03:48,620 So this is a few years ago, Joe Grand's previous DEF CON badge, magic tokens, they had a piece of stone on the front. 60 00:03:48,620 --> 00:03:56,620 And he used a type of NFC, not like standard NFC, but like a near field communication, inductive communication method, which is pretty cool. 61 00:03:56,860 --> 00:04:02,480 But what happens, people go around, they go up to people they don't know, they interact with the badge, they meet people. 62 00:04:02,740 --> 00:04:05,840 That's kind of like the best part about an electronic badge. 63 00:04:07,160 --> 00:04:11,540 And also, like hopefully there's a lot, how many of you have ever designed a PCB before? 64 00:04:11,880 --> 00:04:16,840 How many of you have ever written embedded microcontroller code before, right? 65 00:04:16,840 --> 00:04:19,980 How many of you have hacked on a badge, an electronic badge? 66 00:04:19,980 --> 00:04:24,980 So hopefully the badge is an opportunity for you to get your hands on some hardware that you might not have otherwise done. 67 00:04:25,100 --> 00:04:31,380 So this one required a somewhat pricey programmer, but like once you had that, you could do whatever you want. 68 00:04:31,380 --> 00:04:38,420 There was also a serial port that you could interact with it, but like getting people to interact with tools and learn something is kind of a great goal. 69 00:04:39,620 --> 00:04:41,440 So why OpenTaxus? 70 00:04:41,640 --> 00:04:44,440 So anybody know what a badger is? 71 00:04:44,440 --> 00:04:47,720 The American badger, Taxidea Taxus. 72 00:04:47,820 --> 00:04:51,100 So this is the open badge, open badger, OpenTaxus. 73 00:04:51,680 --> 00:04:57,220 Not tax is like, you know, things you pay, not tax as the big state, but like taxes. 74 00:04:58,200 --> 00:05:07,100 And at some point I'm going to have a cool logo and it's going to be like a badger with a badge on that says OpenTaxus, but you can just visualize that right now. 75 00:05:07,520 --> 00:05:11,480 Or you know, go ask Dolly to make that during the talk and we can post it up there. 76 00:05:11,480 --> 00:05:12,700 You can do a pull request. 77 00:05:13,180 --> 00:05:14,880 So it's open, right? 78 00:05:15,020 --> 00:05:17,880 This is the URL right now, OpenTaxus. 79 00:05:17,880 --> 00:05:25,860 And that is kind of like the sanitized, cleaned up version that has like all the strings for specific events and all the logos and stuff removed. 80 00:05:25,860 --> 00:05:33,680 So you can go and like copy this and make it and not have to worry about like infringing on anyone's artwork, copyright, or all these detailed crappy things. 81 00:05:34,960 --> 00:05:41,600 So yeah, I'll put this URL up later, but I think it's the only thing on GitHub called OpenTaxus right now. 82 00:05:42,800 --> 00:05:44,420 So it's custom, right? 83 00:05:45,160 --> 00:05:50,640 Off the shelf is kind of cool, like if you have something interesting, but there's really not a lot of off the shelf options. 84 00:05:50,640 --> 00:05:58,340 And one cool one we did a few years ago for besides, for 503, DC503's badge was we had these little devices. 85 00:05:58,340 --> 00:06:00,660 They were like this big. 86 00:06:00,660 --> 00:06:07,100 They were smart response things, so they're made for classrooms where you like you answer questions , the teacher pops up on the screen. 87 00:06:07,100 --> 00:06:07,920 But we took them. 88 00:06:07,920 --> 00:06:11,100 We've reflashed the firmware with a couple games and use that as a badge. 89 00:06:11,100 --> 00:06:12,540 So we didn't design hardware. 90 00:06:12,540 --> 00:06:15,820 We just took pre-made hardware and programmed it, which is kind of cool. 91 00:06:16,620 --> 00:06:17,640 But this is the process. 92 00:06:17,640 --> 00:06:20,040 I mean, we go through prototyping phases. 93 00:06:20,040 --> 00:06:23,460 We, you know, have an actual badge and then like we have a second iteration. 94 00:06:23,460 --> 00:06:26,480 This is besides San Francisco's badge, which is essentially the same hardware. 95 00:06:27,460 --> 00:06:34,460 But, you know, like two conferences, two badges, somewhat similar, but it's okay because there's a lot of conferences and there's a lot of badges. 96 00:06:36,040 --> 00:06:38,800 So open, custom, and we also want it to be cheap. 97 00:06:39,980 --> 00:06:44,680 My objective is that, like, there's a lot of change in the microcontroller world lately. 98 00:06:44,680 --> 00:06:50,240 This uses the RP2040, which is the predecessor to the fancy chip that's on a Defcon badge. 99 00:06:50,380 --> 00:06:52,060 It's amazing because it's dirt cheap. 100 00:06:52,060 --> 00:06:57,360 In quantity, it's like 60 cents, and that includes, like, USB interface. 101 00:06:57,360 --> 00:07:03,420 So, like, there's a lot of extra chips you need sometimes to interface with the badge easily, and this doesn't need them. 102 00:07:03,420 --> 00:07:05,040 So it is extra cheap. 103 00:07:05,920 --> 00:07:15,220 Something else I've learned is when you get stuff assembled overseas, you know, if you go to a manufacturer that, like, does a lot of it, you know, if you wanted to assemble 100 badges, you need 100 chips. 104 00:07:15,220 --> 00:07:17,580 You buy those chips, you get the 100-chip price. 105 00:07:17,820 --> 00:07:30,720 If you go and get them assembled and you get 100 badges assembled, they get the chips at the 1,000 or 10,000 or real price, right, real R-E-E-L, which is also the R-E-A-L price that, you know, manufacturers get to pay. 106 00:07:30,720 --> 00:07:43,560 And so I've actually found that, like, for prototyping, it's cheaper for me to get a prototype assembled than it is for me to get the PCBs and buy the parts and assemble it myself , which is kind of a weird world we're in. 107 00:07:44,580 --> 00:07:46,980 So , yeah, right now, this is the last iteration. 108 00:07:46,980 --> 00:07:55,400 These were $5.70 each plus some engineering costs, which I think is pretty cool. 109 00:07:55,400 --> 00:07:59,280 $6 for a hardware badge that interacts is kind of a nice target. 110 00:07:59,280 --> 00:08:00,140 I was aiming for $5. 111 00:08:00,140 --> 00:08:07,480 Actually, I started aiming for $10, and then I went and did some cost reduction and managed to swap out some cheaper components and got it down to almost $5. 112 00:08:07,480 --> 00:08:09,360 So long run, $5 is the goal. 113 00:08:09,600 --> 00:08:12,500 Oops, cancel, cancel. 114 00:08:14,380 --> 00:08:16,500 Apologies for the AV situation. 115 00:08:16,500 --> 00:08:18,120 It's a little bit interesting. 116 00:08:18,460 --> 00:08:20,900 So I want to encourage interaction. 117 00:08:20,900 --> 00:08:23,160 So a badge has to have a way to communicate. 118 00:08:23,760 --> 00:08:26,380 However, we're hackers, we're privacy-minded people. 119 00:08:26,380 --> 00:08:28,800 We don't want these things broadcasting all the time, right? 120 00:08:28,800 --> 00:08:31,880 So what I opted for was infrared communication. 121 00:08:31,880 --> 00:08:36,420 What I like about infrared is that you can make it pretty short range, right? 122 00:08:36,420 --> 00:08:42,220 You can have it only work when you need it to work, and you can, like, you know, not use it if you don't want to. 123 00:08:42,300 --> 00:08:49,740 So this device has a little IR LED, right, right here, and an IR receiver right here. 124 00:08:49,740 --> 00:08:53,620 So when you line badges up, they, like, kind of flash lights at each other. 125 00:08:55,240 --> 00:08:59,760 And yeah, bill of material costs for the communication on this badge, $0.08. 126 00:09:01,140 --> 00:09:06,940 So compare that to, like, an antenna, which is going to be more than $0.08, or yeah, anything else. 127 00:09:07,000 --> 00:09:11,420 So I thought that was kind of awesome that I was able to get it that cheap. 128 00:09:11,820 --> 00:09:14,120 Braden Lane, he has done, like, e-challenge coins. 129 00:09:14,120 --> 00:09:20,340 He actually designed this IR circuit, and I asked him for a schematic and parts, and he shared it with me. 130 00:09:20,340 --> 00:09:24,760 So, you know, I appreciate his contribution to this, because, like, yeah, he was in the same boat. 131 00:09:24,760 --> 00:09:26,900 He wanted IR communications, but he wanted it to be cheap. 132 00:09:27,660 --> 00:09:31,260 I literally just got my DEF CON badge, like, an hour ago. 133 00:09:31,280 --> 00:09:36,040 So I haven't poked at this infrared communication, so I don't know what it is, whether it's modulated. 134 00:09:36,060 --> 00:09:38,240 But what this does is it basically speaks, it's a UART connection. 135 00:09:38,240 --> 00:09:39,120 You know what UART is? 136 00:09:39,140 --> 00:09:40,220 Serial connection. 137 00:09:40,540 --> 00:09:46,100 And, like, nothing fancy, just spit that UART over an LED, and it goes up and down, none of the modulation, no extra transceivers. 138 00:09:46,240 --> 00:09:48,200 And in the other end, you just have to do a little bit of cleanup. 139 00:09:48,200 --> 00:09:50,240 Downside, it's wicked slow. 140 00:09:50,520 --> 00:09:52,200 Upside, it's dirt cheap. 141 00:09:52,400 --> 00:09:53,280 Tradeoffs. 142 00:09:55,520 --> 00:09:57,700 So I want to encourage learning. 143 00:09:58,040 --> 00:10:09,560 And the original idea for this badge came from B-Love, Brandon Levine, and he wanted to do something in CircuitPython, because he was not an embedded programmer, but he knew Python. 144 00:10:09,560 --> 00:10:12,860 I had never used CircuitPython before, and so I was introduced. 145 00:10:12,860 --> 00:10:15,920 At first, I was like, yeah, that's a little high overhead for an embedded system. 146 00:10:15,920 --> 00:10:19,160 We're going to do, like, C, and we're going to maybe do some hand-coded assembly. 147 00:10:19,380 --> 00:10:23,000 But that's because I started doing microcontrollers 20 years ago, when that's the way to do it. 148 00:10:24,260 --> 00:10:27,720 25, 30 years ago, when, you know, you had to pay for a compiler. 149 00:10:28,200 --> 00:10:35,760 And then, you know, I kind of did work for a while, and then when I left work, it's like, oh, I can play electronics for fun, and Arduino happens, right? 150 00:10:35,760 --> 00:10:41,060 So now we could plug things in with a USB cable, download one thing, get our compiler and all our tools, and that was great. 151 00:10:41,060 --> 00:10:53,920 But now, CircuitPython, you don't need a compiler, you don't need anything, you just plug in a USB cable, you have a USB flash drive that shows up, and there's a code.py file, and you edit it, and it runs, right? 152 00:10:53,920 --> 00:11:00,280 So your IDE is whatever text editor you want, and, yeah, you don't have to download or install anything. 153 00:11:00,280 --> 00:11:01,860 I think it's amazing and wonderful. 154 00:11:02,200 --> 00:11:06,960 It does have tradeoffs, but, like, objective here is something accessible, something that gets people playing with stuff. 155 00:11:06,960 --> 00:11:08,340 How many of you know Python? 156 00:11:08,880 --> 00:11:14,560 How many of you can hack your way through and, like, edit something in Python, even if you don't call yourself someone who knows Python? 157 00:11:14,720 --> 00:11:18,460 Well, how many of you have used CircuitPython or MacroPython on an embedded device? 158 00:11:18,600 --> 00:11:20,000 Okay, give it a try. 159 00:11:20,000 --> 00:11:24,740 I actually, so I've only got, like, 80 of these with me, but I'll give them out afterwards. 160 00:11:24,740 --> 00:11:31,420 And so if you feel like you want to either tinker with this or think you might have interest in contributing anything to this project, I've got them for you. 161 00:11:31,420 --> 00:11:38,300 If you just want something to, like, hang on your neck, then, like, let people who want to work on them first get them first, and then we'll have the rest available. 162 00:11:38,300 --> 00:11:38,940 Sound good? 163 00:11:41,000 --> 00:11:43,060 So, easy. 164 00:11:43,380 --> 00:11:44,780 Badges are not easy. 165 00:11:44,780 --> 00:11:46,080 Hardware is not easy. 166 00:11:46,080 --> 00:11:49,160 It's not called easy-ware, okay? 167 00:11:49,160 --> 00:11:50,880 So, it's hard. 168 00:11:50,880 --> 00:11:52,200 It's going to be difficult. 169 00:11:52,200 --> 00:11:54,260 You need to go through multiple revisions. 170 00:11:54,440 --> 00:11:56,300 And, yeah, so you should do that. 171 00:11:56,560 --> 00:12:00,280 So, here is, so, actually, the background story for this one. 172 00:12:00,280 --> 00:12:02,180 This is the LabsCon 2023. 173 00:12:02,180 --> 00:12:05,600 LabsCon is a threat intelligence conference down in Phoenix. 174 00:12:05,600 --> 00:12:06,920 It's pretty cool. 175 00:12:06,960 --> 00:12:08,700 It's very unique and niche. 176 00:12:09,880 --> 00:12:17,280 But, I got home from DEF CON at, like, August 16th or 15th or something. 177 00:12:17,280 --> 00:12:18,440 I don't know when it was. 178 00:12:18,440 --> 00:12:20,440 And it's like, okay, we've got five weeks. 179 00:12:21,020 --> 00:12:22,060 We can do this. 180 00:12:22,820 --> 00:12:24,280 And we did, right? 181 00:12:24,300 --> 00:12:28,080 So, we've got the cardboard mock-up to kind of, like, figure out what we're going to do. 182 00:12:28,080 --> 00:12:30,360 We've got the little PCB mock-up. 183 00:12:30,360 --> 00:12:32,760 This is the IR communication circuit that I prototyped. 184 00:12:32,760 --> 00:12:36,080 I'm like, okay, I know I can get a RP2040 working. 185 00:12:36,080 --> 00:12:37,740 I can get an IR communication working. 186 00:12:37,740 --> 00:12:41,340 I did a PCB layout and I milled a sample one. 187 00:12:41,340 --> 00:12:43,660 I didn't actually mill a functional prototype. 188 00:12:43,660 --> 00:12:46,860 I just kind of used it to make sure I got the sizes and placement right. 189 00:12:47,420 --> 00:12:52,960 And then a quick turn prototyping from, I believe, this one was JLCPCB. 190 00:12:53,120 --> 00:12:55,860 So, for, I think these were, like, under 10 bucks each. 191 00:12:56,340 --> 00:12:58,520 I ordered them on Monday. 192 00:12:58,520 --> 00:13:00,340 No, Sunday night, so Monday in China. 193 00:13:00,340 --> 00:13:01,820 I received them Friday. 194 00:13:01,920 --> 00:13:03,460 I was kind of, like, amazed. 195 00:13:03,880 --> 00:13:07,200 Of course, during that time, I did, like, you know, like, little updating tweaks here and there. 196 00:13:07,200 --> 00:13:08,180 I added some artwork. 197 00:13:09,020 --> 00:13:09,580 But, yeah. 198 00:13:09,920 --> 00:13:12,820 And, of course, you see, you will make mistakes. 199 00:13:12,820 --> 00:13:16,440 So, like you see here, I've got that little blue wire that happens to be black. 200 00:13:16,780 --> 00:13:17,640 Because, oops. 201 00:13:19,180 --> 00:13:20,680 And DRC is your friend. 202 00:13:21,700 --> 00:13:22,560 Unless you're lazy. 203 00:13:22,560 --> 00:13:23,160 Then you skip it. 204 00:13:23,160 --> 00:13:23,720 But, whatever. 205 00:13:23,960 --> 00:13:28,540 And, actually, you can see up here, I had a pinout wrong for what I was using at the time, which was an IR transceiver. 206 00:13:29,740 --> 00:13:31,500 And, yeah. 207 00:13:31,960 --> 00:13:34,900 So, I had to add that, change it a little bit. 208 00:13:34,900 --> 00:13:35,900 Screen goes on top. 209 00:13:35,900 --> 00:13:37,720 I like it because it hides all the components. 210 00:13:38,740 --> 00:13:40,500 And that was the prototype. 211 00:13:40,500 --> 00:13:41,140 And it worked. 212 00:13:41,140 --> 00:13:41,900 Which was kind of amazing. 213 00:13:41,900 --> 00:13:43,560 Just one blue wire and one component. 214 00:13:43,560 --> 00:13:44,880 So, we cleaned up that component. 215 00:13:45,700 --> 00:13:46,860 Got the PCBs made. 216 00:13:46,860 --> 00:13:50,860 So, what I did at the same time is I did the bulk order from JLCPCB. 217 00:13:51,420 --> 00:13:54,280 As well as, like, a small batch order. 218 00:13:54,500 --> 00:13:58,120 So, what happened is I got the small batch prototypes a week later. 219 00:13:58,420 --> 00:13:59,120 You know, I ordered. 220 00:13:59,140 --> 00:14:00,380 So, I received Friday. 221 00:14:00,380 --> 00:14:01,560 Spent all weekend working on it. 222 00:14:01,560 --> 00:14:05,740 Monday, ordered the second batch of prototypes. 223 00:14:05,740 --> 00:14:08,800 Thinking they're going to be perfect and just work. 224 00:14:09,300 --> 00:14:10,840 And those came the following Friday. 225 00:14:10,840 --> 00:14:12,080 Which, again, is amazing. 226 00:14:12,960 --> 00:14:18,440 And in the meantime, finalized all the artwork and everything for the actual, like, production run. 227 00:14:18,600 --> 00:14:20,440 I did make a couple other tiny tweaks. 228 00:14:20,680 --> 00:14:23,020 Turned out we got the production run in. 229 00:14:23,060 --> 00:14:24,800 Took them two weeks. 230 00:14:24,800 --> 00:14:27,280 Was kind of incredible for a few hundred badges. 231 00:14:27,600 --> 00:14:28,820 And they shipped. 232 00:14:28,820 --> 00:14:33,520 And, actually, we had room for a week of customs holdup on these badges. 233 00:14:33,640 --> 00:14:37,320 Because I was renovating my house, so we were living somewhere else. 234 00:14:37,360 --> 00:14:46,120 So , apparently, it was a unique address that I don't know, maybe customs just let stuff go to my home address and thought that this was a different address, so it's not Joe. 235 00:14:46,120 --> 00:14:46,820 I don't know. 236 00:14:47,540 --> 00:14:50,320 That, or they put too high a price on the invoice. 237 00:14:50,980 --> 00:14:52,680 So, but that's the badge we got. 238 00:14:52,680 --> 00:14:56,000 I did have to manually solder on the battery holders and the screens. 239 00:14:56,000 --> 00:14:57,560 That was a time constraint issue. 240 00:14:57,600 --> 00:15:00,180 I really am frustrated by screens. 241 00:15:00,180 --> 00:15:04,880 It's very difficult to get screens that are quality and reliable and consistent. 242 00:15:05,000 --> 00:15:06,440 So I use modules, right? 243 00:15:06,440 --> 00:15:10,300 You can get the modules cheaper than you can get the bare LCD OLED displays. 244 00:15:10,320 --> 00:15:13,040 So I might as well just use those, right? 245 00:15:13,080 --> 00:15:22,460 And the second iteration, so we went from this prototype for what was LabsCon, and then B-Side San Francisco was looking for a badge. 246 00:15:22,460 --> 00:15:26,100 And I had a conversation which roped me into another project. 247 00:15:26,280 --> 00:15:31,240 And so, basically, the only change in the circuit had to do with the IR circuit. 248 00:15:31,240 --> 00:15:33,980 I took off that transceiver that was up here. 249 00:15:33,980 --> 00:15:36,000 That was an IRDA transceiver. 250 00:15:36,000 --> 00:15:38,720 It was a $3 part. 251 00:15:38,740 --> 00:15:41,540 It was there because I had it and tested it and it worked. 252 00:15:41,760 --> 00:15:45,760 And that's when I changed it to these $0.08 of components, which were great. 253 00:15:46,520 --> 00:15:47,160 So, yeah. 254 00:15:47,160 --> 00:15:48,760 The prototype was pretty quick. 255 00:15:48,760 --> 00:15:52,440 The production badges took a little longer than expected. 256 00:15:52,440 --> 00:15:55,820 I used a contract manufacturer that I use regularly for Tigard. 257 00:15:55,980 --> 00:15:59,840 Shameless plug, Tigard is a little orange PCB that does JTAG, UART, and SPI. 258 00:15:59,840 --> 00:16:01,840 And I make it and use it for my classes. 259 00:16:02,420 --> 00:16:03,760 But, apparently, other people like it, too. 260 00:16:03,760 --> 00:16:05,580 So, you can get it on a crowd supply. 261 00:16:07,380 --> 00:16:14,240 So, I had that manufacturer do it because I've worked with them in the past and they will do stuff like custom solder mask color. 262 00:16:14,440 --> 00:16:16,440 And what they did for this badge... Oops. 263 00:16:16,640 --> 00:16:17,780 Do I not have a picture of it? 264 00:16:17,780 --> 00:16:18,660 Oh, no. 265 00:16:18,820 --> 00:16:27,240 So, what they did for us for the B-Side San Francisco badges, we had two different colors of silkscreen. 266 00:16:27,620 --> 00:16:29,460 So, they lined up perfectly. 267 00:16:29,580 --> 00:16:31,960 Actually, I want to do something silly. 268 00:16:31,960 --> 00:16:35,540 I'm going to modify my presentation on the fly. 269 00:16:35,660 --> 00:16:37,640 I'm going to take a picture. 270 00:16:41,390 --> 00:16:43,090 You don't see this on the screen yet, but... 271 00:16:46,950 --> 00:16:48,030 There we go. 272 00:16:51,110 --> 00:16:52,090 Can you see it? 273 00:16:53,330 --> 00:16:54,290 How come you can't see it? 274 00:16:54,290 --> 00:16:55,130 It's right there on the screen. 275 00:16:55,130 --> 00:16:56,530 Maybe I have to go back and forth. 276 00:16:57,310 --> 00:16:58,230 No? 277 00:16:59,210 --> 00:17:01,570 I see it right here on my slides. 278 00:17:02,150 --> 00:17:02,790 Oh. 279 00:17:03,210 --> 00:17:05,190 I'm very confused right now. 280 00:17:12,070 --> 00:17:17,490 I hope that you've been seeing the same thing as me all along because I'm literally looking at my slides right now and it's different 281 00:17:21,970 --> 00:17:22,430 from... 282 00:17:22,430 --> 00:17:23,470 Sorry. 283 00:17:25,830 --> 00:17:27,370 Oh, well. 284 00:17:28,050 --> 00:17:31,630 This badge is cool because it's got two different colors of silkscreen. 285 00:17:31,690 --> 00:17:35,910 It's like a cream, kind of off-white, grayish solder mask. 286 00:17:35,910 --> 00:17:37,710 And then a red and a black silkscreen. 287 00:17:38,610 --> 00:17:39,670 We'll talk about it in a second. 288 00:17:39,670 --> 00:17:46,030 The reason you pay for a contract manufacturer instead of a quick turn place is they'll do things like make sure those colors line up perfectly. 289 00:17:46,030 --> 00:17:47,590 And they did an amazing job. 290 00:17:47,590 --> 00:17:49,010 It was better than I expected. 291 00:17:49,230 --> 00:17:51,790 We have to realize that PCBs are precision things. 292 00:17:51,990 --> 00:17:54,150 There is some effort to make things precise. 293 00:17:55,330 --> 00:17:58,230 Silkscreen is kind of like the last thing and it's usually only documentation. 294 00:17:58,230 --> 00:17:59,690 It's not functional. 295 00:17:59,870 --> 00:18:05,230 There's some more slop in the silkscreen than there is in the solder mask and metal layers. 296 00:18:05,830 --> 00:18:09,490 Anyway, afterwards you can come up and see some of these badges. 297 00:18:09,490 --> 00:18:10,630 There's a bunch here. 298 00:18:10,630 --> 00:18:13,050 You can ogle the artwork. 299 00:18:13,790 --> 00:18:15,190 So what's my vision? 300 00:18:15,210 --> 00:18:18,030 I mentioned before I don't like doing this over again. 301 00:18:18,330 --> 00:18:21,310 And people are frequently asking me for badges and others. 302 00:18:21,310 --> 00:18:26,950 And rather than have to be involved in the loop, it'd be really cool if I had a website. 303 00:18:26,950 --> 00:18:29,350 You go to the website and you type in your conference name. 304 00:18:29,730 --> 00:18:33,410 You upload the logo for the conference. 305 00:18:34,790 --> 00:18:36,070 And you click go. 306 00:18:36,070 --> 00:18:40,370 You get your board files, your bill of materials, your code, everything ready to go. 307 00:18:40,370 --> 00:18:41,390 Does that sound cool? 308 00:18:42,250 --> 00:18:51,210 So what you can do then is instead of having to start from scratch and go through three iterations of prototypes and test everything and find the right components, you start with something that works. 309 00:18:51,490 --> 00:18:53,010 And change what you want to. 310 00:18:53,010 --> 00:18:57,930 If you want to do board changes and layout changes or add components, you do that. 311 00:18:57,930 --> 00:19:00,210 But you start with a board file that's functional and works. 312 00:19:01,050 --> 00:19:03,550 You want to make just artwork changes, you can do that. 313 00:19:03,550 --> 00:19:05,110 But you've already got a board that works. 314 00:19:05,130 --> 00:19:10,750 If you want to keep the hardware exactly the same and change the game that it plays or whatever, how it interacts, you can do that. 315 00:19:10,990 --> 00:19:16,030 And that's actually what, besides Portland's going to likely use the same hardware, but they're going to have a completely different game that it plays. 316 00:19:16,270 --> 00:19:20,690 So customize what you want to do and keep what you want to keep. 317 00:19:20,690 --> 00:19:21,550 Make sense? 318 00:19:21,570 --> 00:19:24,690 Again, chief virtue of an engineer is laziness. 319 00:19:24,890 --> 00:19:31,310 So be as lazy as you think is appropriate and you'll be able to spend your time doing the things you want to do. 320 00:19:31,310 --> 00:19:34,290 So how many of you like PCB design? 321 00:19:34,990 --> 00:19:37,110 How many of you like embedded software? 322 00:19:37,610 --> 00:19:42,230 So you can go meet up with each other and work together or do one or the other. 323 00:19:42,230 --> 00:19:43,130 Make sense? 324 00:19:43,710 --> 00:19:44,370 Cool. 325 00:19:44,650 --> 00:19:45,970 So what can we do today? 326 00:19:45,970 --> 00:19:53,150 Because of the AV stuff, I'm going to finish my slides first and then I'll flip over to my laptop and do some walkthrough demo-y stuff. 327 00:19:53,210 --> 00:19:58,590 I'm not going to build a badge from scratch because it's not there yet, but maybe someone will submit a pull request and we can do that. 328 00:19:59,930 --> 00:20:01,070 So what can we do today? 329 00:20:01,070 --> 00:20:04,070 If you are a hardware person, you can just change the logo. 330 00:20:04,070 --> 00:20:04,870 That's easy. 331 00:20:04,950 --> 00:20:06,570 You can adjust the board footprint. 332 00:20:06,890 --> 00:20:12,790 I find the cutout shape of the board is really a neat thing to customize a badge because it looks neat. 333 00:20:13,930 --> 00:20:15,270 You can rearrange the layout. 334 00:20:15,270 --> 00:20:18,150 As it is right now, it's kind of ergonomically designed. 335 00:20:18,230 --> 00:20:25,750 I happen to be left-handed, but I wanted righties to be okay with it too so I put the button in the middle so all you people can use it. 336 00:20:26,830 --> 00:20:32,710 And also it hangs down so you see the logo and if you want to use it... okay. 337 00:20:33,110 --> 00:20:34,690 I still have power. 338 00:20:35,050 --> 00:20:36,250 I'm going to keep talking. 339 00:20:36,910 --> 00:20:40,510 You grab it and you point it at someone else and you trade. 340 00:20:42,350 --> 00:20:44,530 Ergonomically they hold each other edge-to-edge. 341 00:20:45,110 --> 00:20:46,690 Just making sure the screen is still on. 342 00:20:46,690 --> 00:20:49,170 You hold them edge-to-edge and they communicate. 343 00:20:49,530 --> 00:20:57,470 One of the flaws of the current design is I need to tune the IR transmission a little more because you literally have to hold them together like that for them to communicate. 344 00:20:57,470 --> 00:21:01,430 Maybe like a half an inch, but if they're more like an inch or more they don't work. 345 00:21:01,630 --> 00:21:06,310 Which is kind of good because then you're not transmitting and receiving noise and other people's stuff and whatever. 346 00:21:06,630 --> 00:21:16,610 Also by using a module, the module kind of shades the IR stuff so even if there happen to be lights, something crazy like that, you don't have some interference from that. 347 00:21:17,130 --> 00:21:17,650 Cool. 348 00:21:17,950 --> 00:21:21,470 If anybody's got any questions as I ramble on, please, yeah, what's up? 349 00:21:23,490 --> 00:21:24,850 Maybe we'll do that later. 350 00:21:24,850 --> 00:21:25,470 Sorry. 351 00:21:25,950 --> 00:21:27,250 Unless there's another mic. 352 00:21:27,690 --> 00:21:28,070 Nah. 353 00:21:28,070 --> 00:21:28,410 Okay. 354 00:21:28,410 --> 00:21:29,050 Sorry. 355 00:21:29,650 --> 00:21:32,290 I'll repeat your question if I could hear it, but I hear that more. 356 00:21:32,290 --> 00:21:34,690 I don't think he's asking any questions about boards. 357 00:21:35,010 --> 00:21:35,510 So what can we do? 358 00:21:35,510 --> 00:21:37,930 Change the logo, adjust the footprint. 359 00:21:37,990 --> 00:21:39,550 We can re-arrange the layout. 360 00:21:39,550 --> 00:21:46,610 So if we wanted to have it wider or different layout or if you really wanted to change the infrared to something else, you totally could do that. 361 00:21:46,750 --> 00:21:47,990 And you can hack it to pieces. 362 00:21:48,030 --> 00:21:56,390 The way I did the layout, I'll show you when I look through a key cad, is I have a bundle that's the microcontroller, I have a bundle that's the power circuit, I have a bundle that's the, what's it called? 363 00:21:56,730 --> 00:21:57,710 Infrared circuits. 364 00:21:57,710 --> 00:22:03,990 So you can drag those blocks around and route those blocks together or you can drag every single little resistor and component together. 365 00:22:04,810 --> 00:22:16,470 So, if you're a software person, you could change strings, you take the badge, instead of being open to access, you call it besides Gallifrey or something like that. 366 00:22:16,650 --> 00:22:18,510 And you can change the game text. 367 00:22:18,510 --> 00:22:21,210 Right now the game it plays, ever played Clue? 368 00:22:22,230 --> 00:22:28,130 So in Clue you have a deck of suspects, weapons, and locations. 369 00:22:28,370 --> 00:22:31,950 And you shuffle them, you draw one of each and you put them in an envelope to the side. 370 00:22:31,950 --> 00:22:33,830 And then you deal the rest out to everyone. 371 00:22:33,830 --> 00:22:37,910 In the process of the game, you're trying to figure out what everybody else has so you know what's missing. 372 00:22:38,330 --> 00:22:42,090 Same thing, what it does right now is it deals one clue to each person. 373 00:22:42,650 --> 00:22:48,870 And you can trade those around, you meet people, it trades the handle that you put into the badge as well as your clue. 374 00:22:48,990 --> 00:22:51,750 And when you get them all but one, you know the solution. 375 00:22:52,250 --> 00:22:55,910 Right now it's set up for eight games, but we won't go into the details of that. 376 00:22:56,210 --> 00:22:59,610 Besides, Portland's going to do a slightly different game as well. 377 00:23:00,230 --> 00:23:01,990 You can change all the game text. 378 00:23:02,130 --> 00:23:21,250 Right now, besides San Francisco, the AI theme they used, so it was a bunch of AI, it was a bunch of doomsday scenarios and it was a bunch of fixes, so you randomly put those together like T-800 saved something from Whopper or some weird thing like that. 379 00:23:23,110 --> 00:23:24,470 So, badge logistics. 380 00:23:24,770 --> 00:23:26,630 This can be very interesting, right? 381 00:23:27,010 --> 00:23:28,310 Did I miss a slide there? 382 00:23:28,670 --> 00:23:30,150 No, I think I got it. 383 00:23:31,750 --> 00:23:32,630 Sorry. 384 00:23:32,630 --> 00:23:36,250 So, who likes hand soldering? 385 00:23:36,390 --> 00:23:40,250 Who likes hand soldering a hundred badges? 386 00:23:40,290 --> 00:23:43,810 Who likes hand soldering a thousand badges? 387 00:23:44,270 --> 00:23:53,470 When I solder, I design around 0603 surface mount components because I used to be able to see them and do it by hand. 388 00:23:54,030 --> 00:23:56,470 I can't anymore because I'm old. 389 00:23:57,530 --> 00:24:00,390 So I use a microscope and I can still do them by hand. 390 00:24:00,390 --> 00:24:04,250 But if you're going to do something this is designed for mass manufacturing. 391 00:24:04,250 --> 00:24:05,950 This is not designed for hand soldering. 392 00:24:05,950 --> 00:24:08,610 So I use 0402 components, the really tiny ones. 393 00:24:08,790 --> 00:24:15,470 Which means I can fit them all on there easily and they're small and 0402 is a pretty reliable size. 394 00:24:15,470 --> 00:24:18,510 It gets smaller than that and sometimes you get a higher failure rate. 395 00:24:19,270 --> 00:24:27,590 So if you're going to hand solder what I often do is I actually will get the prototypes with all the small components assembled , right? 396 00:24:27,590 --> 00:24:30,310 And then I get those prototypes and I solder on the big stuff. 397 00:24:30,890 --> 00:24:36,630 For example, if I'm like trying to fine tune which microcontroller or I get parts locally that I want to use. 398 00:24:37,430 --> 00:24:38,550 Next is small batch. 399 00:24:38,550 --> 00:24:42,230 This is like JLCPCB, PCBWay and others. 400 00:24:42,670 --> 00:24:44,010 Macrofab in the United States. 401 00:24:44,210 --> 00:24:50,790 You just give them your design and tell them a little bit about the parts and they'll make the PCBs, assemble them for you and ship them to you. 402 00:24:51,230 --> 00:24:52,490 Which is pretty cool. 403 00:24:52,850 --> 00:25:01,210 And like I said before, sometimes it's cheaper for me to do that than it is for me to just buy boards and buy parts and waste my time assembling them. 404 00:25:02,370 --> 00:25:04,310 And then last is contract manufacturing. 405 00:25:04,310 --> 00:25:13,170 This is, you know, basically there's a weakening line between the small batch stuff and the contract manufacturing because a lot of the same companies do the same thing or outsource it to each other. 406 00:25:13,310 --> 00:25:18,210 Again, I have a contract manufacturer I've used for Tigard and also BitMagic's the logic analyzer. 407 00:25:18,230 --> 00:25:24,250 If you've heard of like NETV or the FOMU, like mini FPGA, those were all done by the same folks. 408 00:25:24,250 --> 00:25:28,710 The reason why I chose them is because they'll do custom solder mask colors for me. 409 00:25:28,750 --> 00:25:29,630 Yay! 410 00:25:30,930 --> 00:25:35,850 But yeah, once you're hitting a threshold of more than 100 you probably want to consider this. 411 00:25:35,850 --> 00:25:42,350 It will take you longer, it will cost more but it's more likely to get it right the first time which is really what you want to do. 412 00:25:43,370 --> 00:25:48,310 100 badges in a contract manufacturer with one mistake is 100 badges you need to rework. 413 00:25:49,870 --> 00:25:51,030 And finally, flashing. 414 00:25:51,030 --> 00:25:55,670 Once we've got these badges even if we didn't change anything we still have to provision them. 415 00:25:55,990 --> 00:26:10,710 I've got a flashing rig here which basically you slot the badges in it pops into a USB port and they're all connected to a 7 port USB hub and I've got a couple scripts in there that will go through wait for a device to be attached and flash it. 416 00:26:11,350 --> 00:26:17,610 There was a small bug in that though because what it does is it's a Linux script and it goes, okay you've attached a device , let's mount it. 417 00:26:17,610 --> 00:26:18,790 What's the mount point ? 418 00:26:18,810 --> 00:26:20,710 Okay, and now we want to wipe it first. 419 00:26:20,710 --> 00:26:21,590 So rm 420 00:26:25,050 --> 00:26:30,030 mount point slash star and then dash rf. 421 00:26:30,030 --> 00:26:33,870 So you want to remove everything on that drive and force it. 422 00:26:34,010 --> 00:26:36,970 Which is great until mount point for some reason doesn't exist. 423 00:26:36,970 --> 00:26:39,950 You pulled it out before you got the mount point and so that string is blank. 424 00:26:39,950 --> 00:26:44,970 So it's rm dash rf rm slash star dash rf. 425 00:26:46,090 --> 00:26:47,590 You know what I'm saying. 426 00:26:47,590 --> 00:26:48,550 It was bad. 427 00:26:48,550 --> 00:26:59,390 Luckily I was using a utility called p mount which runs as a user as opposed to having escalated privileges and running it as root and mounting because that would have been a much worse rm dash rf slash star. 428 00:26:59,950 --> 00:27:05,270 For those of you who are like more in the Windows world, that basically slash star is your root directory and everything on your system. 429 00:27:05,270 --> 00:27:07,910 So like it basically would hose your system if you did that. 430 00:27:08,470 --> 00:27:10,690 Yeah, that could have been a lot worse. 431 00:27:10,690 --> 00:27:16,150 Luckily it was discovered and found and fixed before we flashed all of our laptops instead of the badges. 432 00:27:18,630 --> 00:27:19,230 Flashing. 433 00:27:19,230 --> 00:27:20,670 We just talked about flashing. 434 00:27:20,890 --> 00:27:22,490 So common pitfalls. 435 00:27:22,690 --> 00:27:30,990 We got about halfway in which means I have about half the time to go and either look at questions or walk through the designs. 436 00:27:30,990 --> 00:27:32,210 Common pitfalls. 437 00:27:32,210 --> 00:27:34,050 I'm really going to emphasize one. 438 00:27:34,130 --> 00:27:35,170 Schedule. 439 00:27:35,290 --> 00:27:37,190 Give yourself more time than you need. 440 00:27:37,190 --> 00:27:39,470 Once you've done that, give yourself even more time. 441 00:27:39,470 --> 00:27:41,970 Add some buffer for manufacturing issues. 442 00:27:41,970 --> 00:27:43,970 Add buffer for an extra prototype run. 443 00:27:43,970 --> 00:27:48,610 Add buffer for testing and software and flashing and whatever. 444 00:27:48,930 --> 00:27:49,910 You'll use them. 445 00:27:49,970 --> 00:27:52,230 You'll make good use of them, but you'll use them. 446 00:27:52,830 --> 00:28:02,170 Part of the idea here is if you're starting with a known good badge, you can go get those started and get the badges manufactured and work on the software in parallel. 447 00:28:02,450 --> 00:28:06,290 Then you don't have to worry about getting your hardware, testing it, making sure it works. 448 00:28:06,470 --> 00:28:09,150 Just remove the steps you don't want to have to deal with. 449 00:28:09,690 --> 00:28:10,250 Cool. 450 00:28:11,350 --> 00:28:15,750 So, I'm going to go back and for those of you who wanted where did I put it? 451 00:28:15,910 --> 00:28:16,790 The URL. 452 00:28:18,410 --> 00:28:19,050 Somewhere. 453 00:28:19,050 --> 00:28:20,010 I put a URL. 454 00:28:20,430 --> 00:28:21,270 It's GitHub. 455 00:28:21,370 --> 00:28:22,090 Forget it. 456 00:28:22,150 --> 00:28:23,890 I'm going to switch over to my laptop now. 457 00:28:24,070 --> 00:28:25,330 I'll get that set up. 458 00:28:25,330 --> 00:28:28,350 I have some hardware design and code I can walk through. 459 00:28:29,230 --> 00:28:35,470 If any of you have questions, just come on up here and you can ask a question and I'll repeat it and then answer it as I do the walkthrough. 460 00:28:35,490 --> 00:28:37,030 Give me a moment and I'll swap up. 461 00:29:03,510 --> 00:29:06,310 Cool. 462 00:29:37,590 --> 00:29:38,310 Okay. 463 00:29:40,690 --> 00:29:42,830 I'm connected to this wire which goes straight to the TV. 464 00:29:42,830 --> 00:29:44,290 It was just where I was on a second ago. 465 00:29:46,330 --> 00:29:47,350 First device. 466 00:29:52,790 --> 00:29:53,790 Ah, checking that. 467 00:29:53,790 --> 00:29:54,550 Looks good. 468 00:29:56,190 --> 00:29:56,790 1080p. 469 00:30:04,410 --> 00:30:06,530 Input 1, I'm outputting to it right now. 470 00:30:11,770 --> 00:30:14,850 It's on the internal Google TV right now. 471 00:30:15,590 --> 00:30:17,290 It's showing a Google TV. 472 00:30:37,110 --> 00:30:40,610 Well, that's not what I want to show you. 473 00:30:40,970 --> 00:30:42,490 We know the TV works. 474 00:30:42,550 --> 00:30:44,090 So, fingers crossed one more time. 475 00:30:55,010 --> 00:30:57,310 More and more. 476 00:31:01,490 --> 00:31:03,070 Thank you for your patience. 477 00:31:28,310 --> 00:31:32,230 Well, that's what I get for using Linux. 478 00:31:39,740 --> 00:31:42,100 So, I'm going to try something. 479 00:31:42,180 --> 00:31:44,840 If we can get this back up on the screen. 480 00:31:48,560 --> 00:31:51,600 So, let's see. 481 00:31:52,320 --> 00:31:53,320 Nope. 482 00:31:53,320 --> 00:31:53,880 No, we're good. 483 00:31:53,880 --> 00:31:54,460 We're good. 484 00:31:54,740 --> 00:31:55,760 Okay. 485 00:31:56,040 --> 00:31:57,860 We're doing it live. 486 00:32:02,040 --> 00:32:04,100 So, where am I? 487 00:32:04,200 --> 00:32:05,800 Can I get a volunteer? 488 00:32:06,860 --> 00:32:08,760 Jake, come on up. 489 00:32:15,040 --> 00:32:17,960 Do you want to just hold it and show my screen? 490 00:32:18,000 --> 00:32:18,560 Just hold it? 491 00:32:18,560 --> 00:32:19,940 Just hold it so we see the screen. 492 00:32:19,960 --> 00:32:20,660 Thanks. 493 00:32:20,660 --> 00:32:21,560 Everybody see that? 494 00:32:21,560 --> 00:32:22,600 I'll make it bigger. 495 00:32:23,080 --> 00:32:25,160 So, there's the slides. 496 00:32:25,340 --> 00:32:30,080 First, let's look at... can you hear me good? 497 00:32:31,620 --> 00:32:35,940 First, let's look at the B-side San Francisco badge so you can kind of see what's going on. 498 00:32:36,240 --> 00:32:37,360 We've got a schematic. 499 00:32:37,360 --> 00:32:39,200 I'm not going to go into the details of the schematic. 500 00:32:39,200 --> 00:32:42,140 We've got... can you see anything at all? 501 00:32:42,620 --> 00:32:45,340 We've got the RP2040, right? 502 00:32:45,340 --> 00:32:46,820 We've got some flash. 503 00:32:46,820 --> 00:32:48,000 We've got some IO pins. 504 00:32:48,000 --> 00:32:51,620 We've got our IR circuit that, you know, just kind of works. 505 00:32:51,660 --> 00:32:54,340 And we've got a USB interface that works. 506 00:32:54,340 --> 00:32:57,040 USB-C, which is great because everything should be USB-C. 507 00:32:58,020 --> 00:33:04,380 But, let's look also... so this is what the finished badge looked like. 508 00:33:05,500 --> 00:33:10,300 So, this is just in black because that's what I usually do, but you see it... 509 00:33:10,700 --> 00:33:14,400 Silk screen on the front, no components, makes it really easy to see, you know... 510 00:33:14,400 --> 00:33:15,460 Can you look closer? 511 00:33:16,140 --> 00:33:17,160 Yeah, there we go. 512 00:33:17,380 --> 00:33:21,380 Makes it easy to customize it because we don't have to worry about stuff. 513 00:33:21,380 --> 00:33:23,280 There are a few holes, like through holes. 514 00:33:23,280 --> 00:33:24,320 That's where the battery connector is. 515 00:33:24,320 --> 00:33:25,740 That's where the USB connector is. 516 00:33:25,740 --> 00:33:26,900 And that's where the string goes on. 517 00:33:26,900 --> 00:33:28,940 But I try to keep them near the edge to make it a little better. 518 00:33:30,280 --> 00:33:34,680 One thing B-Side San Francisco does is they use stickers to differentiate their badge types, which is kind of cool. 519 00:33:34,680 --> 00:33:40,380 So, if you really just want to fab this badge as is and just make stickers for your conference, like, you can totally do that. 520 00:33:40,380 --> 00:33:43,100 Like, you literally don't even need a logo when you go and order the boards. 521 00:33:43,420 --> 00:33:47,000 But, what we've got here is the controller in the middle. 522 00:33:47,200 --> 00:33:54,340 Up here, we've got the Raspberry Pi 2040, some flash, an I2C connector so you can, like, attach things to it. 523 00:33:54,380 --> 00:33:56,480 And then, yeah, IR circuits. 524 00:33:56,480 --> 00:34:00,660 So, let's look at the layout. 525 00:34:00,780 --> 00:34:02,400 How many of you have used KiCad before? 526 00:34:02,440 --> 00:34:06,060 How many of you have used any circuit board design software, CAD software? 527 00:34:06,560 --> 00:34:09,580 So, basically, it's a whole bunch of layers, right? 528 00:34:09,580 --> 00:34:14,140 And you make a schematic and then you make it into the layers of the board. 529 00:34:14,140 --> 00:34:16,440 And you actually physically place stuff around. 530 00:34:16,520 --> 00:34:19,420 I had mentioned before we have, oh, I de-grouped it. 531 00:34:20,840 --> 00:34:22,560 I have most of the things in groups. 532 00:34:23,600 --> 00:34:26,400 Here, we've got the IR, TX, and RX. 533 00:34:26,400 --> 00:34:32,400 So, if you wanted to move that around, you can move this whole bundle at once instead of having to go and move every single component and lay it out. 534 00:34:32,520 --> 00:34:36,560 And we'll flip the board over, view, flip board view. 535 00:34:37,160 --> 00:34:41,540 Oops, and then we'll, oh boy, the resolution is just kind of making this wild. 536 00:34:45,820 --> 00:34:50,400 Anyway, what we see here, footprint back, there we go. 537 00:34:50,400 --> 00:34:51,540 So, that's the silkscreen. 538 00:34:51,540 --> 00:34:55,500 That's the layer that we would want to remove and replace. 539 00:34:55,500 --> 00:34:57,800 If you wanted to see one example of what it looks like. 540 00:34:57,800 --> 00:35:03,080 Of course, boards are kind of looking top-down, so it gets flipped and rotated a lot. 541 00:35:03,540 --> 00:35:05,100 But, yeah, that's what you do. 542 00:35:06,140 --> 00:35:06,940 Next. 543 00:35:09,440 --> 00:35:14,860 Let's go over to, this is OpenTaxus straight out of the repository. 544 00:35:14,880 --> 00:35:17,020 The question before was what the URL is. 545 00:35:18,220 --> 00:35:20,740 GitHub slash securely fits slash OpenTaxus. 546 00:35:20,740 --> 00:35:23,860 But if you just search GitHub for OpenTaxus, you should get it. 547 00:35:23,860 --> 00:35:25,040 T-A-X-U-S. 548 00:35:25,800 --> 00:35:27,100 What's the difference here? 549 00:35:27,400 --> 00:35:28,820 There's none of the logos. 550 00:35:28,820 --> 00:35:30,020 My logo is not on there. 551 00:35:30,020 --> 00:35:31,800 The open hardware is on there. 552 00:35:32,880 --> 00:35:34,760 The conference logo isn't on there. 553 00:35:34,760 --> 00:35:35,900 There is the URL. 554 00:35:36,780 --> 00:35:37,860 So we can see it. 555 00:35:39,900 --> 00:35:41,100 Take a picture if you want. 556 00:35:41,100 --> 00:35:41,980 I'll wait a second. 557 00:35:43,440 --> 00:35:52,120 Take a picture of the screen, showing the tablet, taking a picture of my laptop, showing a device that happens to have the URL text rendered as an image. 558 00:35:52,800 --> 00:35:54,420 I mean, I think we need to do this anyway. 559 00:35:54,440 --> 00:35:57,280 I would take a picture with my phone right now, but I cracked the screen yesterday. 560 00:35:57,280 --> 00:35:57,820 So , oops. 561 00:35:59,060 --> 00:36:01,680 But, yeah, you can see it's the same layout, same design. 562 00:36:01,680 --> 00:36:04,380 And besides, Portland is literally going to use this exactly the same. 563 00:36:04,380 --> 00:36:05,200 Actually, that's not true. 564 00:36:05,200 --> 00:36:09,920 We're going to change R11 to a slightly different resistor value. 565 00:36:11,340 --> 00:36:14,220 But we don't need to worry about that right now. 566 00:36:14,220 --> 00:36:17,680 So, yeah, and then, again, this should look very similar. 567 00:36:17,680 --> 00:36:21,860 This is the... get it nice and close so we get the screen as the whole screen. 568 00:36:21,920 --> 00:36:22,540 There we go. 569 00:36:22,540 --> 00:36:23,120 Perfect. 570 00:36:23,300 --> 00:36:25,400 So, yeah, here is the board. 571 00:36:26,640 --> 00:36:29,160 Blank on the back and stuff on the front. 572 00:36:30,080 --> 00:36:34,560 One thing I'll mention, some people kind of like to shortcut and sometimes... 573 00:36:34,560 --> 00:36:35,880 Oh, you can see me in there, too. 574 00:36:37,440 --> 00:36:41,940 You try and shortcut and say, oh, well, you know, it's cheaper if we just get the plain boards. 575 00:36:42,300 --> 00:36:46,120 And the default selection is HASL. 576 00:36:46,120 --> 00:36:50,240 It's a leaded kind of metal cover, so it makes it easier to solder on the copper. 577 00:36:50,720 --> 00:36:51,960 But that's leaded. 578 00:36:51,960 --> 00:36:56,040 And if you're doing these badges and you're handing them out to people, don't use lead. 579 00:36:56,140 --> 00:36:56,740 Okay? 580 00:36:56,960 --> 00:36:59,180 There are a lot of people who will be like, oh, yeah, I'm old school. 581 00:36:59,180 --> 00:37:01,260 I'm just going to use leaded solder because, you know, whatever. 582 00:37:01,260 --> 00:37:03,080 It tastes salty when you eat it, but too bad. 583 00:37:03,960 --> 00:37:04,780 Use unleaded. 584 00:37:04,780 --> 00:37:12,520 It exists for a reason, and especially if you're going to be handing this to people and kids, and they're going to hang it around their neck and show it to their kids when they get home, and they'll put it in their mouth. 585 00:37:12,780 --> 00:37:16,240 You may want to put a bit of it on there just to make it like game cartridges. 586 00:37:16,240 --> 00:37:18,640 But , yeah, don't use lead. 587 00:37:18,720 --> 00:37:19,700 Figure it out. 588 00:37:19,700 --> 00:37:21,460 Get the equipment and learn how. 589 00:37:21,460 --> 00:37:29,160 I use SAC 305 solder, which is 3% silver and 0.5% lead tin. 590 00:37:29,160 --> 00:37:30,120 No, not lead. 591 00:37:30,120 --> 00:37:30,460 Tin. 592 00:37:30,460 --> 00:37:31,320 I don't know. 593 00:37:31,320 --> 00:37:32,840 But just do it. 594 00:37:32,840 --> 00:37:41,660 Get practice doing it if you're a soldering person, because it's the right thing to do for people who would otherwise get injured by lead. 595 00:37:41,820 --> 00:37:44,860 Anyway, so let's look next. 596 00:37:45,320 --> 00:37:47,600 Actually, I'll skip over because it's a little more visual. 597 00:37:47,600 --> 00:37:50,640 This is the dock, right? 598 00:37:50,640 --> 00:37:53,880 And so let me try and change it so you can see the dock better. 599 00:37:53,880 --> 00:37:56,360 Has anybody ever used OpenSCAD before? 600 00:37:57,120 --> 00:38:04,820 I love OpenSCAD because I'm like a console person, and OpenSCAD is like CAD for console people. 601 00:38:04,820 --> 00:38:05,560 There we go. 602 00:38:05,560 --> 00:38:06,140 So here... 603 00:38:06,140 --> 00:38:10,460 What do I do now? 604 00:38:14,540 --> 00:38:16,580 Oh, there's a button down here. 605 00:38:17,260 --> 00:38:20,320 No, that was the wrong button. 606 00:38:20,580 --> 00:38:21,940 There we go. 607 00:38:21,940 --> 00:38:27,580 So OpenSCAD lets you just basically draw boxes and spheres and all that stuff. 608 00:38:27,580 --> 00:38:30,720 And what you can see here is I've got... oh, why is it doing this? 609 00:38:31,200 --> 00:38:33,560 I must have a sticky key or something. 610 00:38:33,560 --> 00:38:35,300 So we'll look at it sideways. 611 00:38:35,340 --> 00:38:37,920 I've got a groove for each of the badges to slot in there. 612 00:38:38,140 --> 00:38:43,660 What I also have is it's parametric, so we can change the badge size right here without having to worry. 613 00:38:43,660 --> 00:38:45,860 So if we change the PCB, it's pretty straightforward. 614 00:38:45,860 --> 00:38:47,640 I like to put the USB port in the middle. 615 00:38:47,640 --> 00:38:48,600 It just makes it easy. 616 00:38:48,780 --> 00:38:54,440 And if we wanted to do a two-column version of it, not 23, we can go do that. 617 00:38:54,440 --> 00:38:56,240 And bam, you've got two columns. 618 00:38:56,240 --> 00:39:03,580 If we only wanted to do a double one, we can do two columns and one row. 619 00:39:04,580 --> 00:39:06,660 Bam, just a skinny one. 620 00:39:07,020 --> 00:39:07,820 Make sense? 621 00:39:09,120 --> 00:39:13,800 I've got that up here, so when I'm done talking, y'all can come up and take a peek at it. 622 00:39:13,980 --> 00:39:21,800 And again, I've got badges, so if you stick out all the way to the end and you're interested in contributing something or even just want to try these things out, come on up. 623 00:39:21,800 --> 00:39:22,800 I didn't bring batteries. 624 00:39:22,800 --> 00:39:23,520 I'm sorry. 625 00:39:25,120 --> 00:39:28,980 And actually, now I'm realizing that there's something in my slides I forgot to mention. 626 00:39:29,000 --> 00:39:30,360 But I'll get back to that in a minute. 627 00:39:30,360 --> 00:39:32,560 The last thing I want to talk about is code. 628 00:39:33,080 --> 00:39:34,600 It's all Python. 629 00:39:34,620 --> 00:39:38,120 Anybody who's used Python, you look at this like, okay, we import stuff. 630 00:39:38,180 --> 00:39:42,060 I have a bunch of libraries that I use specifically for this game. 631 00:39:42,060 --> 00:39:44,400 And then it's Python, right? 632 00:39:44,400 --> 00:39:47,740 We write Python code, and it actually works on hardware. 633 00:39:47,740 --> 00:39:49,140 And it's pretty awesome. 634 00:39:49,140 --> 00:39:53,700 The downsides of Python on embedded hardware is it sucks power. 635 00:39:53,740 --> 00:39:55,400 It uses a lot of battery. 636 00:39:55,880 --> 00:40:00,420 Which is why I used AA batteries. 637 00:40:02,020 --> 00:40:04,180 Yeah, no, I'll go back to that later. 638 00:40:04,220 --> 00:40:08,000 I used AA batteries because they're cheap. 639 00:40:08,740 --> 00:40:12,280 And because they have a battery holder that's inexpensive. 640 00:40:12,280 --> 00:40:16,840 You can ship them, you can transport them, you can take them through TSA. 641 00:40:16,840 --> 00:40:20,760 You don't have to worry about accidentally puncturing them and starting a fire. 642 00:40:21,200 --> 00:40:25,980 So unless you really know what you're doing, stay away from lithium batteries on badges. 643 00:40:26,620 --> 00:40:31,140 It's not as bad as lead on PCBs, but I feel like... 644 00:40:31,140 --> 00:40:34,240 We've got a badge here that was well done. 645 00:40:34,240 --> 00:40:37,020 Where they actually made an enclosure and protected the battery. 646 00:40:37,020 --> 00:40:41,500 If you aren't enclosing your lipos, then be extra super careful. 647 00:40:41,880 --> 00:40:44,220 Anyway, AA battery. 648 00:40:44,220 --> 00:40:46,500 Actually, I started out with a triple A. 649 00:40:46,500 --> 00:40:50,300 I used a double A because it didn't last very long the first time I did it. 650 00:40:50,300 --> 00:40:53,440 But then I've added some power save features. 651 00:40:53,440 --> 00:40:55,980 Somehow I should be able to look down here. 652 00:40:56,560 --> 00:41:01,280 Right there, tiny, maybe you can see it, is some circuitry. 653 00:41:01,520 --> 00:41:04,540 And what this does is it takes the 5 volts in over USB and boosts... 654 00:41:04,540 --> 00:41:07,600 Sorry, the 1.5 volts from the battery. 655 00:41:07,760 --> 00:41:13,740 And boosts it up to 3.3, which means you can use that battery all the way down to 0.8 volts before the thing cuts out. 656 00:41:13,740 --> 00:41:16,100 Use your whole battery. 657 00:41:16,100 --> 00:41:18,180 I used a lot of coin cells in the past. 658 00:41:19,000 --> 00:41:20,460 Which is great if you have a very small thing. 659 00:41:20,460 --> 00:41:22,680 If you're not running CircuitPython, 10 minutes, cool. 660 00:41:23,220 --> 00:41:26,040 Let me wrap this up and we'll chat. 661 00:41:26,640 --> 00:41:27,760 It's Python code. 662 00:41:27,760 --> 00:41:31,240 If you know Python, you can learn it pretty quickly. 663 00:41:32,060 --> 00:41:34,100 CircuitPython is made by Adafruit. 664 00:41:34,100 --> 00:41:37,320 They're a hobbyist electronics company based out of New York. 665 00:41:37,620 --> 00:41:41,480 And they make reference boards, development boards, all sorts of stuff. 666 00:41:41,480 --> 00:41:43,640 If you want to prototype something, that's where we started. 667 00:41:43,640 --> 00:41:48,220 We started with a bunch of Adafruit components, prototyped on breadboards. 668 00:41:48,360 --> 00:41:51,100 And ended up here with a custom PCB. 669 00:41:52,160 --> 00:41:54,880 And the last thing I'm going to show you is... 670 00:41:55,860 --> 00:41:57,600 Yeah, so let's skim through this. 671 00:41:57,600 --> 00:41:59,960 This is basically the provisioning. 672 00:42:04,930 --> 00:42:05,930 Not LSD. 673 00:42:05,930 --> 00:42:06,670 There we go. 674 00:42:06,850 --> 00:42:07,950 So this is the configuration. 675 00:42:07,950 --> 00:42:11,470 We've got a check.sh, which actually checks when you've got a solution. 676 00:42:11,470 --> 00:42:14,470 The genfiles.py is what... 677 00:42:16,810 --> 00:42:19,190 basically generates all the files for the game. 678 00:42:19,190 --> 00:42:22,830 So down below, you can see we have our strings. 679 00:42:22,870 --> 00:42:23,950 So our company options. 680 00:42:23,950 --> 00:42:26,710 Terral Corporation, Neodym Pulsion, Weyland-Yutani. 681 00:42:27,010 --> 00:42:30,150 The startup is Algify, iTech, whatever. 682 00:42:30,150 --> 00:42:31,690 And the tool is something else. 683 00:42:31,690 --> 00:42:37,970 And the string is, blank company has just announced an intent to acquire a startup to build the industry's most advanced AI-powered tool. 684 00:42:37,970 --> 00:42:41,030 And the solution is randomly chosen. 685 00:42:41,130 --> 00:42:42,730 And it comes out here. 686 00:42:42,910 --> 00:42:51,450 The way it does that is, basically, it goes through the options, randomly chooses one, generates a bunch of files that go on the badges, and then it signs the clues. 687 00:42:51,950 --> 00:42:59,110 And gives the public key out, with RSA-512, because just enough to last you a day, without someone wasting a few grand. 688 00:43:00,190 --> 00:43:05,510 And that'll let you make sure that people don't mess with your game by giving out fake clues, which could screw everything up. 689 00:43:05,510 --> 00:43:07,850 So, I'm going to stop here. 690 00:43:08,430 --> 00:43:10,450 I've said all the things I think I wanted to say. 691 00:43:10,450 --> 00:43:12,390 If you've got some questions, come on up here. 692 00:43:12,850 --> 00:43:15,130 And I can continue to talk to those out loud. 693 00:43:15,150 --> 00:43:17,590 But you can also come on up and grab some badges if you want. 694 00:43:18,170 --> 00:43:19,210 So, yeah, go for it. 695 00:43:19,210 --> 00:43:19,750 Thank you.