start	end	text
0	4960	All right. So today we're going to talk about how to make badges. So you're probably wondering
4960	12080	who am I? My name is Coldbrew. I am a solutions architect at my day job. The founder and lead
12080	17900	hacker at ROT13 Labs. And I am the organizer of HyRollerCon, or one of the organizers.
18260	23560	If you see those little ducks everywhere for HyRollerCon, those were us. I'm also a hardware
23560	28920	hacker noob. And why do I say that? I say that because I am not an electrical engineer. I am
28920	33340	not someone who's been doing this for ten years. I'm just a dude who figured out how to do it by
33340	38020	tinkering. And that means that all of you can do it, too. This is not something that requires you
38020	42660	to be some kind of crazy wizard. It's stuff that anybody can do if you just take the time and
42660	48080	tinker with it. And that's kind of what a lot of this talk is about. If you'd like to follow me on
48080	52220	things, this is kind of a list of all the social networks I'm on, basically in order of how often
52220	56460	I'm on them. So if you're trying to hit me up on Discord, I may not respond for a week or two.
62960	66500	All right. So what are we going to talk about during this talk? I'm going to try to go through
66500	70500	as much of it as I can because we've got a live demo at the end and I really want to get to that.
71580	74940	First we're going to talk about how to come up with an idea. If you're going to make a badge,
74940	78460	you've got to have an idea for it. The next thing is planning out the hardware,
78460	82900	making sure that you know exactly how it's going to work and all of those kind of things.
83120	86400	Planning out your firmware to make sure that the hardware can actually do the things you want it
86400	91520	to do. Coming up with packaging and accessories if you want to include things like that with it.
91980	96920	Planning out the budget, making sure that you've got kind of all your T's crossed and all your
96920	101740	I's dots. And then making the badge. So we're going to try and get through as much of this as
101740	108340	we can. So a quick disclaimer before we dive into this too much. This is not like the right way to
108340	113220	make a badge. There is no right way. Everyone has a different way they like to make badges.
113260	118200	Every time I talk to a badge maker, I learn some new way to do it. This is just how I make them.
118200	122240	I have a lot of people after DEF CON usually coming up and asking me about how I do it.
122460	128240	This is how I do it. Okay. So the first thing is coming up with the idea.
129420	133560	In a conversation with Alt Beer about a year ago, we were talking about badges and he said
133560	139680	the hardest part of making badges is coming up with a good idea. And this just stuck with me.
139680	144840	Because this is so true. This is the hardest part. Once you know what you're going to build,
144840	149220	rest of the steps happen easily. You can read documentation. You can figure things out. You
149220	154640	can tinker. However you're going to do it, you can make the badge. But the idea, that's the part
154640	158280	that you really have to work on and make sure it's something you're really going to be excited to
158280	164560	build. So some things to think about when you're coming up with your design. How do you want it to
164560	168180	look? What shape do you want it to be in? Do you want it to be abstract? Do you want it to look
168180	172960	like a dog? Whatever you want it to be. Once you know that, then you're going to have to figure
172960	177760	out, okay, the shape, the color, the size of it. Do you want it to be huge? Do you want it to be a
177760	183000	little tiny thing? Maybe an SAO? Where's the lanyard going to go? If it's going to have a
183000	187500	lanyard. Do you want to do the dual hook ones or do you want to do the single hooks? All of these
187500	192640	things are going to affect your design on this. The next thing is what do you want it to actually
192640	195820	do? Or do you want it to do anything at all? Sometimes people just like the blinky. And
195820	200660	that's fine, too. Sometimes they want it to have really, really intense features. Whatever it is,
200660	204360	you need to know what it's going to do before you start really diving into this.
205080	208900	How are you going to power all this? You might need a big lipo. You might be able to get away
208900	213560	with the little 2032s. And the last thing is what's your budget? You got to make sure that
213560	217760	whatever you're trying to build is realistic for that budget. And think about the fact that you're
217760	221300	not, or probably not at least, just going to be making one or two of these. You might be making
221300	226520	hundreds of them. So these are all things to consider. And the last thing about that is be
226520	231480	prepared to dump some money into this. It's not cheap. I'm not trying to scare you away from it
231480	236360	or anything, because you can do it on a budget. But if you're trying to make something really
236360	240480	intense, and you might have to iterate a few times, and usually places don't like to fulfill
240480	244100	orders of just one badge. So you're probably making five at a time. And when it comes to
244100	248100	your house and it doesn't work, all that money is down the drain. You got to figure out how it
248100	253160	should work and then order another batch and hope that one works. So make sure that you're ready
253160	258780	to actually put some money into this. Okay, so these are some of the badges that I've made in
258780	263380	the past, just to kind of give you some idea of things. I mean, some of these are, I try to get
263380	267660	kind of a good range of like different sizes, different styles, different things. But it's
267660	272560	something where you got to think about the coloring, the size, the shape, all of that.
272700	276840	And these are some good examples of things that I've made. We can kind of get into them as we
276840	284280	keep going, but just a few ideas. So now that you've got your idea, you've decided exactly what
284280	288680	you're going to make. Now you can start to plan out that hardware. Is it just going to blink?
289320	294880	If so, all you need is some LEDs and the CH2032 is probably enough for you.
295460	299140	Those are the little coin cells that sometimes the DEF CON badges run off of.
300120	303840	You got to think about your LEDs. They have those self blinking LEDs,
303840	309160	they're dead simple to use. I love using those in badges because it gives you some functionality.
309160	314040	It gives you something that's blinking or flashing or whatever without having to use a microcontroller.
315020	319260	Those usually also have a built-in resistor. So that's another part that you don't have to use.
319260	323100	It makes your bomb tiny. It makes the amount of parts you have to acquire tiny.
323140	327460	It just makes your life a lot easier, especially if you're trying to build something simple.
329000	335120	SMD versus through-hole. SMD is surface mount devices. Those are the ones that mount on the surface.
335180	337700	Through-hole is the ones that are actually going through the board.
338160	342840	These can kind of change your design pretty wildly. For the little duck SAOs this year,
342840	346340	we did the through-hole ones because we thought it'd be easier for people to solder on their own.
346340	352100	But now when it comes time for us to solder 30,000 of these, you know, we just can't do it easily.
352100	357220	So we end up only soldering 1,000 of them ourselves. But 1,000 ducks is a lot to solder.
357220	361020	So we're kind of regretting that decision. But it's something to think about.
361780	365260	If you're doing the SMD stuff, you can also do things like reverse mounting.
365440	370880	So this badge here is a perfect example where we did reverse mount LEDs on the back of the board
370880	374920	so that it shines through the board and kind of gives you that little effect you can see there
374920	378240	with the blue and the red. And those were the self-blinking ones, so we couldn't catch all
378240	383020	four of them lit up at the same time. But you get the idea. You can do a lot with just LEDs
383020	388000	and still make a really cool badge. Another thing I always tell people is that if you're
388000	392580	making a very, very simple badge but you want to give it a little more flexibility or give it just
393060	399860	a little something extra, consider an SAO port. Technically the SAO standard is supposed to have
399860	404820	all six pins doing different things, but if you just put power and ground, that's all most
404820	409900	SAOs use in the first place anyway. So it gives you a very easy way to add a little extra
409900	416700	functionality for people to expand upon your badge. Okay, so if you do want to go with
416700	421280	functionality, you want it to do something, you want it to have Wi-Fi, Bluetooth, whatever it is,
421280	424720	you got to think about how much processing power you're going to need for this.
426240	430040	There's tons and tons of MCUs out there. I'm not going to talk about all of them.
430180	434720	But the ones that I like to use for the larger power things where I need more processing power
434720	440720	is something like the ATmega328P or the RPi2040. These are really, I'm just giving these examples
440720	444440	so you've got at least an idea in your head if you're starting to look into these things. Those
444440	448640	are the ones that I have found are very easy to work with. They're very simple, they're beginner
448640	453560	friendly, but they give you a lot of power. The next thing to think about is things like
453560	458400	Wi-Fi and Bluetooth. A lot of badges these days have those things. Something like that,
458400	464480	you're going to have to go for something like the ESP8266 or the ESP32 series. The 8266 is going to
464480	469820	give you Wi-Fi, the 32 will usually give you Wi-Fi and Bluetooth. Make sure you're checking the
469820	475160	documentation though, because not all of them are going to give you those exact things. You've got
475160	479520	to make sure you check the documentation. I have done this before where I ordered a chip thinking
479520	484320	it had something, ordered the boards, got them in, soldered it all up. Turns out it doesn't work
484320	489560	because I ordered the wrong chips. So learn from my mistakes and make sure you're reading the docs
489560	497160	on these things. The last thing to think about is how many GPIO do you need? So on that one,
497160	503460	if you're going to need a lot of GPIO, something like the ATmega32 or that CH32V003, that's the
503460	509700	new RISC-V chip. It gives you a ton of GPIO for like 10 cents a chip or something like that.
509700	514000	They're super cheap, but they're pretty new. So they're a little bit harder to work with,
514000	518200	which is another thing you want to consider when you're picking your MCU is how long has this been
518200	523740	around? Is there a lot of documentation? Is there a lot of community support? Those are the big things
523740	531360	you want to be looking at. Okay, so what is a GPIO? I know someone's going to be asking this.
531360	536360	That is a general purpose input output. Those are the pins on the MCU. Those are the things
536360	540490	that actually do something. So if you want to put a sensor or you want to blink an LED,
541040	546980	anything that is an input or an output, you're going to need a GPIO for that. You can do some
546980	552300	tricky things to get extra GPIO out of your badges, but realistically you want to have one
552300	561940	GPIO per thing that you want it to do. Here's some quick examples of pins that have a lot of GPIO.
561940	566080	Some of those are through holes. Some of those are surface mount, but it at least gives you an idea
566080	571440	of all those pins are different things you can do. For these keyboards here, you have to use
571440	578920	one GPIO for each row of keys and for each column of keys. And that way you can pinpoint which key
578920	584020	was clicked. So obviously for the larger keyboards, you're going to need a lot more GPIO.
584620	588240	So it's just something to think about if you're building something that has a lot of functionality.
590500	594620	Okay, so you've got your idea. You can plan out your hardware now.
594840	599260	Now you can look at the power. Okay, so how long do you want it to run for?
599260	606640	My rule of thumb is usually if it's rechargeable, I want it to last at least 24 hours so that people
606640	610660	can play with it at the con. They can go home at night when they're about to pass out and plug it
610660	616960	in to recharge it and have it for the full next day. If it's not going to be a rechargeable battery,
616960	621860	I want it to last the whole con. I want people to be able to leave it on, forget about it,
621860	625220	fall asleep with it turned on, and still be running the next day.
625220	630140	Okay. I mean, realistically, you could make things that power for months. I really doubt
630140	637080	you need that, but it's an option. When it comes to using power, the heavy hitters are usually
637080	642400	things like NeoPixels and Wi-Fi. NeoPixels, there's a lot of tricks you can do to make them
642400	646760	use a little bit less power, but if you really want that color cycling where you control what
646760	652860	colors they are and how they move, it's going to cost you a bit of power. The last thing to
652860	656400	think about is, do you need a charge circuit? And that's going to be if you're doing the
656400	662000	LiPo batteries and you want to be able to recharge that. Some MCUs will have that built in. So again,
662000	665740	you'll have to read the documentation and see, is this something that I need to build on my own,
665740	673380	or is this something that my MCU comes with? Now, I chose this badge for this slide because this is
673380	678260	one of the spaces where I really screwed up and I really regretted it. So this is a lesson for
678260	684860	y'all to learn from my mistake here. I used one of these, I think it was called a CH123 battery,
684860	688220	and they're not rechargeable, so you have to click it out and click a new one in every time
688220	695560	you want to use it. I was using Wi-Fi and NeoPixels on this badge, and it did not last a day. And once
695560	700940	it died, where are you supposed to get one of these? So this was for Wild West Hack'n Fest.
700940	705380	Those who have been to that, you know there's not a lot of places to get batteries out there in the
705380	712180	Deadwood. So when these badges died, you were just kind of out of luck. So I included an extra
712180	718220	battery with each one, but you know, it was an area where I regret that. So make sure if you're
718220	722080	going to use a battery that can be swapped out, make sure you're using something that people can
722080	727200	actually get their hands on when they want to get new, you know, replace that battery.
729660	733280	Okay, so we're ready to build our thing, whatever it may be.
734880	741460	So I usually skip this part. You should not skip this part. This is just me being lazy and not
741460	747240	wanting to do it, but just for full disclosure, I usually end up skipping this. I do regret it
747240	752540	later most of the time. This is going to save you a lot of headaches, and this is going to allow you
752540	756260	to be able to send your circuit to other badge makers or other, you know, electrical engineers
756260	762700	or whatever and say, hey, why is this not working? Or hey, is this going to work? So we'll talk a
762700	766760	bit more about these later on, but you're going to want to draw it out, okay? And this is something
766760	773800	where you can see there is the ATtiny85, and it's going to some resistors, and it's going to a USB
773800	777880	port, and it allows you to actually check out what your circuit's going to do and how it's going to
777880	786770	do it to make sure all the connections are there, you know, and it's going to work. So shameless
786770	793150	plug, a buddy of mine, RelayMoth, he actually sells t-shirts of that circuit, so I've got one
793150	798290	right here. We have a few of them over at the Cyber Swamplord's booth, but most of them are
798290	803190	sold out, but you can get them online if that's something that you guys like. So once you have
803190	807550	built out your circuit, now is when you're going to want to breadboard that. So you're going to
807550	812630	build it with actual parts, but without a PCB. You're just jamming wires into a breadboard and
812630	817710	connecting everything up to make sure that it works. You can kind of do little tricks like
817710	822650	just touching wires together to simulate clicking a button. You can start to build out your firmware
822650	826930	at this phase if it actually needs firmware, like if you're using an MCU and you want it to have
826930	831250	Wi-Fi or Bluetooth or whatever, this is when you can start building that and make sure that the
831250	838590	hardware that you're choosing can actually do the things you want it to do. Also, I usually skip
838590	848050	this step, too. So don't listen to me. Just do what you're supposed to do. So that leads into
848050	853950	planning out the firmware. Usually Arduino IDE is a great place to start for this. They have
853950	858410	ways to be able to test out all kinds of functionality on all kinds of different chipsets.
858750	862710	They just make it a lot easier to develop on, especially if you're just getting started.
863710	868030	What I always tell people is if you just Google the functionality that you want, chances are
868030	873210	someone else has done something that's very close to that. Even if it's not super close to it,
873210	877410	even if it's kind of a little bit off, you can usually just steal chunks of that and start
877410	882310	mashing things together to build out the firmware you want. Those Fox badges that I built a few
882310	887650	years ago, if anybody knows about those, they were really just a hop gobble of a bunch of other
887650	893690	people's code that I was able to string together and make it work. It's a simple way to start,
893690	898110	especially if you're not great with writing firmware like me. It's a good way to get it going.
898970	903290	So as long as you're using an MCU, some other ideas to think about adding in there is things
903290	909910	like a CTF, things like feature flags, things like a debug mode, and again, the SAO. Things
909910	916090	like that are a great way to add functionality onto your badge without really needing to change
916090	922890	the hardware at all. So we had talked before about how SAO is a standard. This is the actual
922890	927630	pinout for it. So you've got your 3 volt in your ground, then you've got a data and clock,
927630	932430	and then you've got two GPIO. And that's just something where this is if you want it to be a
932430	937210	full SAO, this is what people are referring to. But again, you can just do that 3 volt in the
937210	943250	ground and you're probably going to be just fine. Also, some badge makers do not necessarily do 3.3
943250	949090	volt. I've seen badges that are sending 6 volt here. Maybe don't do that because that might
949090	957170	blow up someone's SAO, but people do it. Okay, so packaging and accessories. This is an area
957170	962090	where I always like to do a lot more. I know some badge makers, they just like to hand you a bag
962090	968250	and that's fine too. But I always think it's a lot more fun when badges come with really cool
968250	973550	packaging and they come with cool accessories. It's this whole experience that you've built for
973550	977970	someone rather than just handing them the badge. I always like doing that, so I always encourage
977970	982810	others to do the same thing. If you're going to do this, the thing to think about when you're
982810	987890	doing it is what do you actually need to use this badge? Like if I handed you the badge,
987890	992690	what would you need to just turn it on and use it right now? And then there's things like what
992690	998250	would you want to get with this badge? So the needs, I have things like USB cable, batteries,
998250	1003370	antenna, any of those kinds of things where it's like to be able to use this badge straight out
1003370	1008570	the gate, those are the kinds of things you would need. The things that are wants are things like
1008570	1014110	the sticker or, you know, an extra SAO that comes with the badge or the case for it or whatever.
1014110	1018990	Any of those things are things that it would be great to have that but you don't really need it.
1020810	1024710	Okay, so you've got all your ideas, you know what parts you're going to use, you know what
1024710	1029570	accessories you're going to include and all that, where the hell do you find it all? So I always
1029570	1034870	tell people there's basically three tiers that you can go through to actually get this. There's your
1034870	1040870	fast shipping kind of highest cost tier and obviously that's Amazon. These are the kind
1040870	1046670	of parts where you don't want to be buying your production parts off of Amazon. You're going to
1046670	1050330	pay an arm and a leg. You're going to get them tomorrow but you're going to pay an arm and a leg
1050330	1056830	for it. But these are perfect if you get in a jam or when you're prototyping. When you're prototyping
1056830	1060590	you probably don't want to have to sit around waiting two weeks to get some parts just to try
1060590	1065790	them out and be like oh that wasn't what I needed. Use Amazon, get them on there real quick because
1065790	1071870	you're only buying one or two of them. The mid-tier stuff is usually takes around a week of shipping.
1071910	1075910	You can get them faster but it's usually going to be sometime around a week. And these are things
1075910	1081210	like Digikey, Mouser, Aero. I know there's plenty more but those are the ones that I've used and had
1081210	1087790	good luck with. These ones are going to be very reliable parts distributors but they do take a
1087790	1091510	little bit more time. You're going to get bulk pricing and things like that and the more you buy
1091510	1097450	the more you're going to save on those ones. Those are usually where you want to go for things like
1097450	1103730	MCUs where it needs to be solid, it needs to work, it needs to be authentic. And the final one is the
1103730	1110370	low cost long ship times and this is things like AliExpress. You can also use Teemu or Alibaba or
1110370	1115030	any of those as well but any of these you're going to have to wait for these parts but they're going
1115030	1122010	to be dirt cheap no matter how many you're buying. The one problem with this tier is that they're not
1122010	1127130	necessarily authentic. I've had friends that have ordered a bunch of parts from AliExpress, they get
1127130	1132630	them and three quarters of them don't work and they're obvious fakes. This is something where
1132630	1140650	to me I like to order simple things that are like resistors or LEDs or things like that. I like to
1140650	1146930	order those from AliExpress to get the better deal on them but anything like an MCU where I need it to be
1146930	1151370	good, I need it to work, and I need it to be authentic, I'll order that from that mid tier.
1151890	1155550	You can kind of choose to slice this however you want, that's just how I like to do it.
1157150	1163270	Okay, so what is all this going to actually cost you? I've drawn out the way that I plan budgets
1163870	1168570	and these numbers are just made up but this is how I like to do it is I like to get all of my
1168570	1172750	different things that I'm going to buy, so the PCBs, the components, batteries, lanyards,
1172750	1179230	accessories, cases, whatever, and put down how much the complete order of that thing is going to cost.
1179690	1184470	Then how many units I'm going to make and the total cost to make it. So that is like
1184470	1190590	if I had to invest, you know, in this case $325 to prototype this out, you know,
1190590	1195250	I ordered that many parts and boards and, you know, whatever to build this thing.
1196190	1200650	Oh, whoops, sorry, that's time spent on dev. Total cost to make would be all of those items
1200650	1206270	totaled up, which gives me that cost per unit. From there you can kind of estimate your shipping
1206270	1210610	if you want to include that, put what price you're planning on charging, and have this calculate like
1210610	1215770	how much profit are you going to make off of these badges if you sell all of them. And also what is
1215770	1221430	your break-even point? How many of these badges do you have to sell to just offset the cost that
1221430	1230350	you spent to make it? Let's see here. Yeah, so another thing is kind of your prototyping and
1230350	1234790	discovery costs, but also your equipment costs. Some people like to include that. I usually
1234790	1238990	consider equipment that I bought to build a badge something that I would probably buy anyway for my
1238990	1246790	hobbies. So I don't usually include them, but it is something to think about. Okay, so we're finally
1246790	1251410	about to get to the demo here soon, but there's a couple things we want to go over before we do that.
1252630	1256690	So I had mentioned we'd come back to designing the circuit. So this is the circuit that we're going to
1257290	1261870	try to kind of get as far into as we can with building. So with this one, we're going to use
1261870	1269170	the ESP-01S. This is kind of a very small ESP unit that gets us just a few I.O., but it gets us
1269170	1274550	Wi-Fi, which is what we're going to do with this. It's easy to work with. It's very simple to solder,
1274550	1279090	especially for first-time solderers. So we're going to go with that one. We're going to go with a
1279090	1283490	little one-inch OLED screen so we can actually see what we're working with. We're going to go
1283490	1289070	with the AAA batteries because they're simple. AAA batteries are going to give us 4.5 volts.
1289070	1293730	All of this stuff we're using needs 3.3 volts. So we're going to have to use a linear regulator
1293730	1301310	to cut that power down from 4.5 to that 3.3 that we need. Then we're going to include a little
1301310	1306630	header so that we can actually program this thing and, you know, simple things like buttons, LED,
1306630	1313470	and switch. Okay. So you're probably thinking, how do I know which of those GPIO I need to be
1313470	1319890	using to do this? And the answer is simple. It's the documentation. Okay. So when you're
1319890	1324910	looking through this documentation for your MCU or whatever it is that you're going to actually
1324910	1330370	be using, they are very long documents. And especially if you're just getting started,
1330370	1338030	they can be really, really overwhelming to look at. So even if you skip 99% of it,
1338030	1343830	the things that you really need to look at is the pin definitions. This is going to show you
1343830	1350170	what each pin does and what it or I should say what it can do. Because not every pin can do
1350170	1356610	everything. So this shows you all the pins that your board offers or your MCU offers.
1356610	1361410	And then the list of things that it can do. But it also shows you what they call the active and
1361410	1366550	the boot time for those pins. These are important because it's going to say high or low. And that
1366550	1373130	tells you that it's going to be putting out power or not putting out power during the boot time or
1373130	1379990	while it's turned on. So this is important because if it's supposed to be held high at boot time,
1379990	1385910	but you have it cut off, that it's not going to boot. So make sure that you're paying attention
1385910	1390410	to these things and understanding how they're going to work. The next thing you need to pay
1390410	1396130	attention to in this is the typical application section. Usually it's going to show a more
1396130	1400770	circuit diagram, kind of like that bottom left there. But it could also show just a picture
1400770	1406990	of the unit itself. But what this is going to show you is what you need to provide to this chip
1406990	1413190	just to make it work. You can add your own stuff after this to make it do whatever it is you need
1413190	1418710	it to do. But these are the bare minimum of what you need to make this thing turn on. So you'll
1418710	1425050	see in the top one there, which is the ESP-01, they've got a couple resistors there going from
1425050	1432450	enable and reset to that 3.3 volt. But on the ESP-01S, which is the one that we're going to use,
1432450	1436870	they've eliminated those. They built those internally on the MCU, so you no longer need
1436870	1442510	those. So for us, our minimal circuit is literally just that ground and the 3 volt,
1442510	1446310	and then we need the RX and TX to be able to program it. That is all we need to make this
1446310	1451850	thing work. Now they also have a recommended circuit section sometimes. This is not always
1451850	1456790	there, but in this particular one, they had that recommended circuit there of that power supply
1456790	1462330	reference design. That's how we know that we're going to need that 3.3 volts if we're giving our
1462330	1467650	badge significantly over that, which we are. So we essentially lifted out that one as well that
1467650	1474010	we're going to use for this badge. Okay, so when you design a PCB, there's going to be tons of
1474010	1480150	layers that it shows on here. And we'll show this once we get to the demo, but the layers,
1480150	1484150	some of them are additive and some of them are subtractive. And so this is kind of the
1484150	1489070	hardest part to get used to when you start using something like EasyEDA, which is the one that I'm
1489070	1493670	going to be showing you guys today. So there's the top and bottom layer, and this is the actual
1493670	1499330	copper layer on your board. These are additive, which means that whatever I draw on my board on
1499330	1504790	the top and bottom layers, they're going to put copper in that shape or in that design or
1504790	1510530	connecting those things. Then there's the top silk and bottom silk layer. These are the silk screen,
1510530	1515330	so if you have the traditional green PCB with the white writing on it, the silk screen is that white
1515330	1520090	writing. And this one is additive as well, so anything that I write or draw or whatever, it's
1520090	1526010	all going to show up in white or whatever my silk screen layer is. Then there's the top paste mask
1526010	1530570	and bottom paste mask layers. These are what's known as the stencil layer. This is where if you
1530570	1536470	were ordering a stencil for SMT, so you could just squeegee your solder paste on there,
1536470	1541590	this is the layer that they would cut out for that. So this is when you want to expose the
1541590	1547150	copper or expose the PCB itself. These are subtractive, so anything that you draw on these
1547150	1554630	layers, it's going to cut that off of the stencil layer. Top solder mask and bottom solder mask
1554630	1560290	is very similar to this. This is the actual solder mask, so on the green and white PCB, this is the
1560290	1566750	green part. Usually in EasyEDA, if you draw something on either the top paste mask or top
1566750	1570590	solder mask, they're just going to cut it out anyway, so they effectively work the same way,
1570590	1574870	but they are separate layers. So this one is also subtractive. It's going to cut out whatever you
1574870	1580390	draw. Then there's a couple of different layers that are kind of more used for like the actual
1580390	1586370	building of the PCB itself. So this is the board outline layer, where that's actually the shape of
1586370	1591130	your badge. And there's multi-layer, which is things like through-hole components or if you
1591130	1596450	drill a hole in the badge or things like that. Then there's the RAT lines. RAT lines is if you
1596450	1601790	have all of your pins set up in such a way where you have labeled the nets, so if you have a ground
1601790	1606190	pin over here and a ground pin over here, but you didn't connect them, a RAT line is where it's
1606190	1610110	going to draw a big blue line across your screen saying, hey, these are supposed to be connected,
1610110	1614230	but you haven't connected them yet. So that's just to help you. It's not going to be printed
1614230	1619050	on the board or anything. It's just to help you design it. And that's same with the document layer.
1619050	1624490	The document layer is there so that you can make labels for things that will not be printed onto
1624490	1630950	the board. Now, a special note about that one. It's not supposed to be printed on the board.
1630950	1635550	That doesn't mean that your FAB will not screw up and accidentally print it on the board.
1635690	1641730	So make sure before you click go on a massive order that they have not put the document layer
1641730	1645370	on there because I've had some friends that it just happened to recently.
1647010	1651450	Okay, so here's the demo time. We're going to see if this works. Everyone pray to the demo gods.
1651550	1657070	We're going to try and crank through as much of this badge as possible. And yeah, we'll see how
1657070	1669330	it goes. Okay, so I said earlier that the program that I like to use to build these is called EasyEDA.
1669350	1672850	I usually use the online one, but just so I wouldn't have to worry about internet.
1674110	1682830	I've got the local one here. So when you're first starting out, you're going to come in here and
1682830	1686890	you're going to say you want a new project. We're going to call this Nibbler because we're going to
1686890	1692430	build Nibbler from Futurama. So the first thing it's going to give you is this to draw your circuit
1692430	1695870	diagram. We've already done that, so we're just going to go ahead and skip past that.
1696030	1700650	We're going to come over here and say that we want a new PCB. Now it's going to show you
1701370	1705130	a lot of things here about, okay, how do you want this PCB to look? So it's going to tell us that
1705130	1709130	we're doing millimeters. We're going to do two layers. This means there's copper on the top and
1709130	1713690	on the bottom. You can actually do tons of layers if you want. And it's going to put those copper
1713690	1720010	layers in the middle. This gets really, really expensive really quick. Most people that I know
1720010	1724910	of just do the top and bottom layers. I know there is some badge makers out there that go crazy and
1724910	1731250	do like eight layers and things. I stick with two. That's just me. So board outline, this is where
1731250	1736170	you can pick if you want it to be a circle, round, rectangle, whatever. I just start out by leaving
1736170	1740470	this as rectangular. I'm going to tinker with it in just a bit and you'll see how I do that, but
1740470	1744970	I leave it as rectangular. And because of that, I leave these the same way too.
1744970	1748290	I'm going to mess around with that board on my own. I don't care what they make.
1749090	1751150	Oops, I think I just clicked cancel on that.
1752890	1759150	So we'll just leave these as defaults for now. So now we have our pink board outline here.
1760390	1764410	Okay, so we're going to go to the document layer real quick.
1766430	1769230	And we're going to click that we want to add an image.
1770130	1773070	Now on the desktop, I've got this Nibbler folder here where I've kind of
1773070	1778890	picked out all of these. So we've got our document layer file that I've kind of preset to this.
1780450	1783590	And there it shows us our little picture of Nibbler. So this is what our badge is going to
1783590	1788350	look like. I'm going to set this to 150 because I've already tested this out and that seems to
1788350	1794370	be a pretty good size for us. So now we have our Nibbler and we put it on here. So we want this
1794370	1800810	board to match that Nibbler. Now again, there are lots of ways to do this in lots of different
1800810	1806730	editors. This is just how I do it. I have been told this is the absolute caveman method, which
1806730	1813590	it does kind of seem that way. But this is what I do. I just start dragging and dropping. I usually
1813590	1820590	start out by making it pretty extreme like this where it doesn't go very close. But you can just
1820590	1825790	drag these things and pull them all the way to where you want them to go. So I'm going to pull
1825790	1835700	them all super gnarly right now just so we can at least see it. But then once we get this kind of
1835700	1840040	close to how we want it, then we can start getting it tighter and tighter and we'll go over that too.
1840040	1846260	But I'll just try and do this as quickly as I can. Now one of these is not actually connected
1846260	1850540	and we're about to reach it right now. So this one here is the one to look at because now I've
1850540	1857140	opened it up. If I try and print this, JLCPCB is going to get real mad. So when we do this, we got
1857140	1863060	to make sure that we connect these two properly and zoom in here to make sure they're actually
1863060	1869950	touching. Okay, so let's say that's good enough. We're going to call it good enough for now.
1870130	1876610	Once it is close, that's when I zoom in and start making this really close.
1878170	1885410	So I've had people ask me like, hey how good do you need to make this? The answer is as good as you want it to be.
1885990	1894210	The tighter you make it and the closer you make it to exactly how your design looks, the better
1894210	1899370	those angles are going to look when you print that PCB. So right there you can see there's tons of
1899370	1904450	little dots there. And it's really just how extreme do you want to take this. That's really
1904450	1909010	all it is. So let's say that we had that thing all done. We can come over here to view and click
1909010	1915070	3D view. And now it shows us there is our PCB. Right now they call it blue apparently. We can
1915070	1919290	make it green, we can make it purple, whatever we want. And we can select the surface finish here
1919290	1925630	too if we want it to be gold or silver. But for now, this is our PCB. So let's come back here
1926750	1930710	and now we can say, okay we want to add another layer. This time we're going to add the top layer.
1931670	1934830	So we come over here and we go to copper.
1936190	1941030	And these are all just files where I took a picture of Nibbler and I put it into GIMP and I
1941030	1945450	colored in each layer with like say green or something like that. Selected everything that
1945450	1950430	was green, chopped out everything else, and just saved just that one part. Okay, so that's how I
1950430	1955150	made these things. Once we have this, I've already forgotten the name that I selected or the number.
1955690	1959630	So this one says 62 and I'll show you how I got to that one as well.
1959630	1964550	Is when I'm putting these in here, I essentially just guess at first. I say, okay, how about 60?
1964730	1967610	And I put it over here and I say, well, that's a little bit too small.
1968090	1972570	Now I can place it like that and I can readjust it over here and just say like, you know, okay,
1972570	1978930	that's pretty close. Let's try 84 and just kind of adjust slowly that way. Or I can just delete
1978930	1989790	that and re-enter it as a slightly different size. And this time I'll put in 62 and now it fits.
1990830	1994790	Okay. So you really just kind of slowly adjust these things until they look the way you want.
1996050	2002270	Okay. So now if I was to, I'm going to cancel out of this. Now if I'm to go over here and go
2002270	2008510	to my 3d view, you can kind of vaguely see his little cape there because that is covered copper.
2008750	2013190	We've added that copper layer. So now they're going to add copper in that spot on just the
2013190	2017350	front. So on the back, there's nothing, but on the front we can see that copper.
2018330	2020750	So let's say we want to expose that copper.
2021930	2025190	So let's come back here and we do another copper layer.
2026610	2032850	Actually, well, yeah, so you can do it like this and just make it match the same size.
2034030	2039590	And now we're going to change this from the top layer to the top solder mask layer.
2039830	2046590	Now it becomes subtractive. So if we put this on there and we go to our 3d view,
2047010	2053130	now we've exposed that copper. So this is how you start designing out how you want that thing to
2053130	2059730	look. Okay, so the next one we're going to do is we come in here and we go to our FR4 layer. This
2059730	2064110	is the one where we're going to expose all of this as well. So it's still going to be that top silk.
2064130	2066830	Let me cancel this so I can actually go to the right thing.
2068570	2072050	So we come over here and we change this to the top solder mask layer.
2073210	2079330	We come back, we go back to that FR4 and this one says 94. So I'm going to set that.
2081110	2088810	Okay, we're going to go ahead and put this right here. And now when we view that again,
2089290	2093490	there he goes. Now he's starting to look a little bit more like Nibbler.
2094410	2097630	So the last one we're going to add is that top silk layer.
2099150	2100590	Okay, so now once we add this...
2102650	2106070	Oh, I didn't look at the number... 142.
2107690	2111090	And again, each one of these, I just found the numbers ahead of time because I didn't
2111090	2114430	want to sit there adjusting in front of y'all and have it be really, really boring.
2115550	2121410	But once we slap that in there, now we've got our Nibbler. Now this document layer,
2121410	2127310	we can come in here and we can turn that off. And this is what our badge looks like.
2127750	2134210	Now when we go to that 3D view, let's make this black. And now we've got a vague shape
2134210	2139430	of what Nibbler is going to look like. Okay, so now that we have the art and we're going to call
2139430	2147070	that done, now we can start adding components. So we need that ESP-01S. So we're going to come
2147070	2161190	over here and say place footprint. And we can do ESP-01S. Now, once you do this, there's a
2162630	2167610	user contributed section. And these are things that other people have made and submitted their
2167610	2173610	own footprints that they use. This isn't really that sketchy. I haven't had any of these that
2173610	2178850	were bad yet, but they are all a little different. And some people do make some of these very,
2178850	2184110	custom, where it's obvious that they were using this in some very unique way that is not how you
2184110	2189290	want to use it. So just be careful to look at these and make sure it makes sense. The better
2189290	2194410	one that I like to use is this one over here, JLCPCB Assembled, because these are the ones that
2194410	2199290	are actually from JLC. And this is where if you change your mind about soldering it yourself,
2199290	2204550	and you say, no, no, I want them to do it, you have to be using these footprints. So make sure
2204550	2208050	that if you're going to have them populate this for you, that these are the ones you're using.
2209050	2213490	Also, these tend to be a little higher quality, in my opinion. So we're going to choose this one
2213490	2218290	here and we're going to place it. So it shows it right here. So we're going to pop it down here.
2218730	2223670	We're going to kind of zoom in a little bit. So once we grab this, we can kind of rotate it
2223670	2229290	however we want. You can move it wherever you want. So let's put this right here. So it kind
2229290	2235690	of stays in these lines here and makes it look like it's part of our design. So now let's take
2235690	2238990	this and let's put it on the back layer because we don't want this to be showing,
2239610	2246130	which means I got to rearrange it again. Okay, so now if we go to our 3D view, we've got our
2246130	2249670	nibbler just the way we saw them before. You can see those little holes there. But when we turn
2249670	2255370	them around, oh, I guess this one doesn't do it. Some of them will actually show. There it is.
2256030	2259390	So now we can see, okay, this is how it's going to look. There's our little part
2259730	2262510	exactly where it's going to be if we put it there.
2264850	2284720	Okay, so now we're going to add a 0.96 LED. Just trying to make sure this is the right
2284720	2291580	part before I actually place it. Yep, that, no, we want the four-pin version. There we go.
2292760	2297180	Okay, so now this screen, we want this to be on the front side. Now if I put it right here,
2297180	2301360	you see it's on that red. That's the copper layer. So we're going to be bridging those
2301360	2304580	pins together. So we've got to be careful where we put this to make sure we're not touching any
2304580	2311040	copper. So I'm going to place that over here. We'll go ahead and rotate it a little bit.
2312120	2321810	Nope, don't want to do that. There we go. Let's put it right about there.
2323050	2327950	Okay, so I can't remember for sure what these pins are, but let's say that this pin right here
2327950	2333650	is a ground pin. So we come over here to net, and we can put that we want that to be part of ground.
2334510	2337910	Let's say that this one right here is our 3.3 volt.
2339230	2345010	So on this one, let's say that this one is ground. That next one is 3.3 volt.
2347930	2352350	Okay, now if we turn on RAT lines, you can see, hopefully you can see,
2352350	2356250	there's those blue lines showing me, hey, you haven't connected these yet.
2356810	2363110	So let's go ahead and go over how to connect those. So we're going to start on the back layer
2363110	2367490	here, because we've got this red copper here, so we can't go through that with a front layer.
2368090	2373230	So we'll go from the back, and we're going to come over here, and this one right here,
2373230	2378410	it says track. So we want to build a track, and it kind of snaps on here.
2378490	2385270	We're going to build a track that comes up, comes over, and then comes down.
2385830	2392290	Now we need one over here. So we're going to come like this, pull that over,
2392290	2397330	and connect it like that. And now our RAT lines are gone, because now we've connected all ground
2397330	2402670	nets to all other grounds, and all of our 3 volt nets to all of the other ones.
2402950	2410350	Now let's say that this right here was our data line, and this one here is our data line.
2412290	2416750	And we still want to stay on the back there, but now when we go to connect this,
2417830	2421430	we can't actually make it through here, because if we do that, we're now connecting
2422210	2427950	those two. They're going to become one net. So how do we get around that? Well, realistically,
2427950	2431270	I should have just started from the front on this, but if we weren't going to go that route,
2431270	2435950	we can stop this right here. We're going to stop it shy of where we're trying to go,
2435950	2441010	and we can come over here to this one here. This one says via, and what this is, is this says,
2441010	2446070	I want to build a little tiny hole that goes from the front of the board to the back of the board.
2446510	2453670	So now I can go on the red, and I can start at my via, and move it over here,
2454330	2460330	and connect it like that. So these vias are how you can get around all of the other lines you've
2460330	2464530	built, or the design that you've built, because now you're able to swap between that front layer
2464530	2475890	and that back layer. All right, I'm trying to think if there was anything else that was
2475890	2483470	major to be showing on this. But so, anyway, I guess, actually, let's look at this real quick.
2483470	2490990	So there is now our badge, as far as that goes. So let's say, okay, let's say this was done. We
2490990	2494650	put on the rest of the components. We were happy with this. We like the way it looks. We like the
2494650	2501710	way the functionality is looking. We want to print it. So we'd come over here, and we would go
2501710	2508870	to, well, first we have to save it. Then we come over here and say generate Gerber file.
2510050	2514330	When you do this, it's going to ask you if you want to check the DRC. This is your design rule
2514330	2520510	checking. These are the rules where they tell you how close you can put things to each other,
2520510	2526750	and how large you can drill or how small you can drill, but also things like, are you crossing
2526750	2532050	nets? It's going to check for all of that kind of stuff. So you can say, yes, you want to do it.
2532190	2537630	And in our case, we passed. All of our nets are not bridging and nothing like that. But when you
2537630	2541710	get to that step, there is sometimes when that design rule checking is going to show you something
2541710	2546370	and say, hey, this is wrong. You can't do this. But you know that it's what you're trying to do,
2546370	2551350	and you don't care. You can just click that no and just say, YOLO, I want to order it anyway.
2551550	2557090	And they'll let you. So from here, you can select how many you want and what color you want. But
2557090	2562310	really, that's going to be more, it's going to show you that once you get into JLC. Now, again,
2562310	2567950	you can order these from anywhere you want. I like using JLCPCB. I've always had good luck with them.
2567950	2572790	They do great work. They have good prices. And they can do the fab for you if you want them to.
2572790	2577990	But you can send them off to anywhere by clicking this generate Gerber button. This one right here
2577990	2581790	is just going to download the files for you and ask you where you want to put them. And now you
2581790	2585730	can send those out to someone else. You can share them with friends. You can send them to any fab
2585730	2590870	shop, and they'll be able to build those boards for you. Okay, so let's say we had clicked to
2590870	2599030	have JLC do that for us. Let's come back here. We'll go ahead and click go. So this is what it's
2599030	2604530	going to show you in JLCPCB. It also shows you a little picture of your board up there at the top.
2604530	2610110	But this is what you're going to see. There's a lot to go over on here. But the big ones to look
2610110	2615190	at is checking the dimensions to make sure it looks like what you built. Sometimes those can
2615190	2621270	be wildly off, especially if you didn't connect those two board outlines together. PCB quantity,
2621270	2627270	obviously, you're going to want to look at that. The next big ones to look at is down a little bit
2627270	2632990	further there, where it says PCB thickness and PCB color. So the thickness is literally just how
2632990	2637670	thick the board is. If you leave that at 1.6, that's your standard badge. That's pretty much
2637670	2641530	what everybody uses. You're really only going to want to adjust that if you're trying to do
2641530	2645590	something special with the PCB, where it needs to be significantly thinner or significantly thicker
2645590	2650750	for whatever reason. But it is going to adjust the cost pretty heavily if you change that.
2651590	2656550	PCB color, obviously, that's the color of your actual badge itself that you're creating. And
2656550	2661110	in Silkscreen on JLC, they don't usually have any other option other than white, unless you're
2661110	2665850	printing a white PCB, in which case your only option is black. More than likely, you won't
2665850	2671810	need to adjust that because you can't. The next one under that is surface finish. This is what's
2671810	2676850	going to determine the color of that copper layer. If you want to do a black and gold badge, then you
2676850	2682150	need to do that ENIG. That is immersion gold. I can't remember what ENIG actually stands for, but
2682810	2686990	if you want the silver, that's where you're going to go with either the hassle or the lead-free
2686990	2691190	hassle. Either one of those two is going to be that silver color that you see on PCBs.
2691990	2696690	Now, the last one that you need to make sure you look at is that remove order number.
2696950	2704170	This one, I don't know why they do not click yes by default, but they do not. The default is no.
2704170	2708870	They're going to print your PCB number directly on it. And the reason for this is that they want
2708870	2713450	you to be able to reorder that exact batch. So later on when they say, you know, would you like
2713450	2717190	to reprint, you know, your previous batch, you can look at the badge and you can say, okay, this is
2717190	2722430	the batch number from the one that I made. Yes, I want that exact one. Realistically, you don't want
2722430	2726670	that, especially because they're going to put it in the worst possible spot. They're going to put
2726670	2732770	it dead center front and center of your badge. Just check that box. It does add, like, I think
2732770	2738550	it's $1.50 to remove the order number from your badge. It's worth it. Just do that one.
2741900	2747440	So that's all I've got for you, but go out there and make some badges. Seriously, it's not that
2747440	2752160	hard. It's a lot of fun. We wouldn't keep doing this year after year after year if it wasn't.
2752540	2757340	So anyway, feel free to reach out to me. If you have any questions whatsoever after this,
2757340	2760660	feel free to come chat with me in the vendor booth. I love meeting new people.
2760840	2764620	Do not hesitate to ask. Hope you guys all have a good DEF CON.
