start	end	text
0	1800	All right, welcome everybody.
1900	4160	My talk, my name is Jeff Geisberger.
4160	5140	I also go by BigTaro.
5140	6700	A little bit of self-docs there.
7200	8840	So my talk is you want to make a badge.
8840	12480	Badge creation 101 from SAO to hashtag badge life.
12960	16780	So first a little bit of legalese for this talk because I like my job.
16780	21020	The views expressed in this presentation are my own and do not necessarily reflect the views of my employer.
21020	22580	With that out of the way, let's have some fun.
22800	24900	So first off, who is this guy?
24900	28200	You can call me Jeff, El Jefe, BigTaro, BT, that badge guy, AU.
28200	29800	You know, I'll respond to anything.
30000	33140	My 9 to 5, I hack stuff as a security engineer.
33140	35480	I do devices about 15 years now.
35740	37580	And then my 5 to 9 a.m.
37580	39320	is love making blinky hardware.
39320	41060	Badge life for about four years.
41180	42580	That's the best part.
42880	47080	This year I released four and a half badges at DEF CON.
47080	48580	We're going to call it four plus one.
48580	52600	One is not 100% ready, but that's a whole another story for another time.
52840	55420	First up is the fight dystopia party badge.
56200	59040	Next up is the gunslinger be gone and sheriff SAO.
59220	63920	I also made a submarine badge and the frog star badge this year.
65120	69760	As my friend said, dude, when do you effing sleep?
70200	72000	Respectfully, what the eff is wrong with you?
72000	72760	Are you okay?
72760	74060	Do you need someone to talk to?
74500	77060	This about sums up badge life in a nutshell.
77060	79020	So if you're getting into it, be forewarned.
79020	82220	It is a huge time sink, but it's also a lot of fun.
82920	89260	So a little disclaimer, this talk is about building a badge from near zero knowledge, get it working and have fun.
89380	93680	This talk is not making an incredibly optimized, power efficient lead badge.
93680	94120	Okay?
94120	98400	This is a talk that says, here's how I get started with badge life and have fun doing it.
98400	101460	Not here's how I become a pro electrical engineer with 30 years of experience.
101460	103340	I just want to set that expectation right now.
103340	103920	Got it?
103920	104780	All right.
104900	107760	So the agenda, first off, what is an SAO?
107760	110400	We'll go over the definition if you're unfamiliar with that term.
110400	111780	Let's make one.
112340	115820	Then we'll prototype a working badge and turn it into a real badge.
115820	117700	And that's kind of the flow of this talk real here.
117700	119340	So first off, what's an SAO?
120100	125220	An SAO is a shitty now called simple to be more PC, simple add on.
125420	132180	These are some that I've personally created here on this stage, but essentially what they are is let you put a thing on a thing to get more bling.
132820	148600	So this was a community standard that let you essentially attach other PCBs to a host PCB to just become more flashy and do more fun and have some add on and people have made things that work together and whatnot and I'll get into that.
148660	158420	So for example, this is a badge that I did for another conference where the SAO with a hat was actually a full fledged badge and would talk to the host badge and synchronize RGB patterns and things like that.
158420	159680	So kind of fun stuff.
160120	161820	And it could be as simple as complex as you want.
161820	164900	So as I said, the one I made was a full on badge in itself.
164960	167040	This is one by someone named El Hefe.
167360	172380	Not me, I'm not El Hefe here, but essentially, oh, I was like really blocked by my podium.
172380	176380	Okay, well, it's essentially a single LED that lights up, right?
176380	179400	So you could go as simple as that to as complex as full blown hardware.
179400	181040	And I just wanted to give you the scale of this.
181040	184420	The whole point of it is, have fun, make something cool.
185220	186740	So why start with an SAO?
186740	192900	Why not just go right into badge life and just build some crazy complex thing that does a billion features and then you stay up until 3 a.m.
192900	195680	coding for six weeks straight, like I may have.
196740	199980	So SAOs are a really simple way to get into making hardware.
200760	201680	It's an easy simple way.
201680	203060	Hey, ma, look, I did a thing.
203060	204320	Here's a thing, right?
204320	206380	It blinks, it makes little flashy lights.
206380	207100	It's good.
207540	208640	And do you enjoy the process?
208640	212000	It's a really good way to say, hey, I'm getting my feet wet.
212060	215180	Am I going to actually enjoy doing this thing and pulling my hair out at 3 a.m.
215180	221740	trying to debug some hardware where, you know, the documentation says one thing and the hardware does something completely different because, you know, chips.
222600	224980	Also, SAOs will not break the bank.
225120	232800	200 SAOs, which for a conference like DEF CON is almost nothing, 250 bucks, give or take, you know, compared to thousands for badges.
232840	237420	We're talking about like $10,000 potentially for a run of a complex badge versus a couple hundred bucks.
237600	239320	You could probably afford that a little easier.
239960	240400	All right.
240400	241920	So let's start with that SAO.
241920	243120	How does it work?
246220	248440	The community standard, made for fun.
248600	249640	Funny names.
249720	252580	I translate a little bit for you because the standard is in mill horsepower.
253200	256920	It's a 3.3 volt standard, roughly 280 milliamps draw.
257060	259800	If you don't know anything about electrical engineering, don't worry about that.
259800	263840	Your badge is not going to draw that much more than that unless you're doing something crazy.
265760	267580	So here's kind of the standard pinout.
267580	270880	If you've seen any of the badges that have a little slot, there's six pins.
271180	273140	You can get the pictures online.
273140	274300	I'm just putting it here for reference.
274300	275540	I'm going to talk about it a little bit.
276080	279440	On the badge side, you have a female keyed connector.
279440	280760	It's a 2 by 3 socket.
281200	282600	I'm in the way of all these pictures.
282600	283820	This is going to be a rough presentation.
283820	284760	I'm sorry, guys.
285800	288300	And then this is the side that goes on the actual SAO.
288300	289600	It's the mailed keyed connector.
289600	295860	And the reason why we use the shrouded connector, some people don't like to use the keyed connectors because of cost, but they stay on.
295860	296920	Otherwise they'll just fall off.
296920	302900	The original standard, which was four pins, everybody was losing their SAOs everywhere if you guys remember older DEF CONs.
304480	308540	So the gist of this one, there's six pins for communicating with the host badge.
308540	309340	We're not doing that here.
309340	310400	We're starting real simple.
310400	311920	We're going to use power and ground.
313220	320260	And then over here in the bottom right, which you definitely cannot see, if you look at the slides later, there's some part numbers if you want to make your own later.
321620	322140	All right.
322140	323620	So what does it actually look like?
323740	326520	So let's start one with an LED that's just on.
326520	327520	Real basic, simple.
327520	329800	It just has a light and it looks cool.
330280	332540	So this is electrically essentially what it is.
332540	335300	You have a resistor, an LED, and a battery.
335760	337440	But in this case, we don't have a battery.
337560	340300	We have a SAO connector.
340600	341460	That's it.
341460	342860	That's the whole circuit right there.
342860	343380	Done.
343380	343620	All right.
343620	346340	You don't need any more electrical engineering for the rest of this part of the talk.
346980	347560	All right.
347560	348040	Circuit's done.
348040	348920	What's next?
349540	349820	All right.
349820	351640	So how do we actually make an SAO?
351640	353060	Start with an EDA.
353340	359440	EDA stands for Electronic Design Automation, and it makes you go from circuit to circuit board and everything in between.
359920	361440	Here's some EDAs.
361440	362900	KiCad, free, pretty decent.
362900	365040	It's what I use for a majority of my work.
365520	373680	Easy EDA is free, a little less featured than KiCad, but really tightly intertwined with JLCPCB, which is one of the major fab manufacturers.
373720	378980	And what that lets you do is you could just essentially pull from their parts library directly, but I'll show you workarounds to get around that.
378980	379920	But they are a little limited.
379920	383920	They don't allow very complex cutouts on your board shapes and stuff like that.
384400	386380	There's Autodesk Eagle and Altium Designer.
386380	387160	I have some text here.
387160	392440	You could read it, but essentially they cost money, and I don't want to do that for my hobby projects, right?
392440	393660	This is just for fun.
393760	396580	If you're a professional, Altium Designer is unbelievable.
396660	401180	It's got some amazing features for auto-routing and whatnot, but we're not going to do that here.
401180	402120	This is badge life.
403300	403920	All right.
403920	404820	Start off.
404920	406340	Start off with KiCad.
406340	407500	Create a project.
407900	409600	Here's the five easy steps.
409800	411020	Create a new project.
411080	412200	Build your schematic.
412520	413380	Assign footprints.
413380	414380	I'll get into all these.
414860	416100	Lay out your PCB.
416680	418040	Export to the factory.
418360	419160	You're done.
419300	419960	All right.
420100	421960	So let's recreate that circuit into KiCad.
421960	425080	So we have that circuit here with the resistor, the LED, and the SAO connector.
425540	426020	Boom.
426020	428140	Place the LED, resistor, and SAO symbols.
428660	429700	Connect the wires.
430680	432560	And everything is on the side that I'm on.
432560	435900	I apologize, guys, if you want to move over there to see a little bit better.
435900	439080	Um, so that's, that's, that's essentially it.
439080	442100	But where do I get the SAO symbol for KiCad, right?
442100	443900	That's a weird custom part.
443900	445340	You just download it.
445340	450680	Um, Twinkle Twinkie got some really, uh, good parts that are available online, open source.
450680	456680	You could just download it, put it in, drop it into your project, and they got the 3D model, the footprint, the schematic, everything.
456680	457760	So it's like Lego blocks, right?
457760	460600	If you guys know how to make Lego, just plug and play, you're done.
461420	461900	All right.
461900	463040	So I keep talking about this footprint.
463040	463980	What is a footprint?
463980	468380	Footprints are the pads and holes in a PC that let components electrically attach to it, right?
468380	478240	So every part has a shape, and then you essentially pick the right shape for that part, and then the part will, during the manufacturing process, stay on your board and then work.
478980	480500	But what footprint do I use?
480500	482300	Uh, excuse me, I have standards.
482800	486300	LEDs, capacitors, resistors, et cetera, they're mostly standard sizes.
486300	490900	I say mostly because every single manufacturer has some weird part that does not fit the mold.
490900	494140	Um, but for the most part, you're going to do some really standard sizes.
494140	495940	And again, pictures are right behind me, I apologize.
496740	498880	Design your layouts to be reworkable.
499100	501160	Make sure there's room for a soldering iron.
501160	505500	So like when you're laying out your parts and you're picking, oh, these parts fit really small and really intricate.
505500	506020	Cool.
506020	507740	How are you going to fix that when something goes wrong?
507900	513680	So you got to think of like, all right, make the largest part possible that will still fit your design.
513680	520460	Makes it a lot easier, especially in badge life, when you're sitting in a hotel room with a soldering iron you're not supposed to have and fixing little badges at like two in the morning.
520460	522760	It's really good to have some room to work on that.
523760	525900	Um, I recommend an 0603 or bigger.
526140	530700	That's just a standard part size, uh, for LEDs, resistors, capacitors, things like that.
530700	531840	You can always go smaller.
531840	535120	I have done in certain designs, but it just makes it a little easier to rework.
535340	535760	All right.
535760	536600	We picked our size.
536600	537380	Are we good?
537940	541340	Now we got to check your suppliers for availability, footprints, et cetera.
541380	541760	Right.
541760	549600	As I said before that every part's a little bit different, um, but some manufacturers like JLCPCB have a giant parts library and you can just pull parts from it.
549600	552420	And they also provide the footprints, which are mostly correct.
552960	556020	Um, so here is, you know, an example of that.
556020	562240	They give you the, the, the thing for the, uh, the schematic, they give you the footprint, um, a little warning though.
562240	563640	Sometimes those footprints are not great.
563640	571020	So I recommend doing prototypes of your boards first, because sometimes they're a little too small or the pins are not actually, uh, connected correctly.
571020	572440	And I've been burned by that in the past.
572480	574980	Uh, it happens, but it's, it's rare, but it does happen.
575620	582880	Um, there's a nice tool called EasyEDA2KiCAD, which, uh, JLCPCB has their own EasyEDA software and you could just run this thing.
582880	585980	You put in a part number and it pulls down all the files for you right in a KiCAD.
585980	587260	You don't got to do any extra work.
587340	591280	Um, so you just type in a part number, boom, it appears in your libraries and then you're good to go.
592900	596740	Um, so over here is an example of assigning footprints.
596740	605580	In our example, we have the simple add-on connector, which has the simple add-on footprint and then a resistor and a diode that all use a 603, uh, layout.
605580	607820	I said diodes and LED, but same thing.
608180	608860	All right.
608860	610320	So now we have the PCB editor.
610840	612300	We'll drop our parts in.
613240	615320	Uh, here's the command to actually do so.
615800	618940	Wire them up, you know, just connect everything in the electrical circuit.
618940	620380	If you notice here, I'm going to jump back.
620480	625260	Those little, uh, blue lines that connect KiCAD is really nice at just telling you what to do.
625260	630100	Um, so if you've done your circuit correctly, it's telling you how your needs to be connected here physically.
630360	631900	Um, so it's like the physical side of the PCB.
631900	632500	So it's really easy.
632500	633600	You just connect the lines.
633740	639740	Um, so wire them up and electrically you're done, but wait, what about the art?
640380	640920	All right.
640920	642760	The art, find license, create art.
642760	646860	That's the fun part of badge life, making these cool designs with funky features and whatnot.
647000	649480	Um, this is just an example I'm going to use for this demonstration.
649480	652340	I did not make this, uh, by Socko ST, but it's an open art.
653240	655320	SVG format, uh, has to be a vector format.
655320	660500	So that way it can, and we'll KiCAD will work with that.
660640	662320	You get about four colors.
662400	670700	Now that is a little bit wrong because now there's like full color PCB printing and screen printing and all these like new techniques, but they're relatively very new.
670720	672040	You're going to do four colors.
672040	673740	It's a lot easier when you're starting off.
674060	676660	So the four colors we got are essentially the solder mask.
676660	678240	It's usually one color.
678280	682840	Um, there are people in badge life village you could talk to that have made multiple of different colors, kind of cool stuff.
682840	690060	Um, but essentially you have one color, red, green, blue, purple, black, white, yellow, kind of like the standard colors.
690580	692520	You get silk screen, usually white or black.
692520	695780	Usually this is all dictated by the manufacturer, unless you're making boards in your house.
695780	697020	Uh, but this is an intro talk.
697020	698140	So you're going to use a manufacturer.
698240	707580	Um, so you find a manufacturer that has colors that you like, uh, PCB wage, LLC, PCB, Osh park, all those, they have different color mixes and whatnot, and they'll show you what's available.
708040	709240	You have metal.
709240	716300	Um, it's either copper unique, so it'll be either silver or gold, um, after being tinned by the flux, uh, sorry, by solder.
716300	723040	And so essentially you get another color there and then FR four is a semi-transparent yellowish color.
723120	726060	Uh, so that's kind of the colors you're working with when designing a PCB.
726060	730500	If you look down on any badge life you're currently wearing, you could pick out those four colors of what they are.
731000	737940	All right, so now let's go import that art into Kikad, import the SVG and break it apart into layers.
738040	739440	What are these layers?
739840	740140	Okay.
740140	744340	So the way Kikad works is essentially there's a layer for every single thing that's there.
744340	751560	There's the copper layer, there's the solder mask layer, there's the paste layer, the silk screen layer, um, all these things I was talking about, there's just different layers.
751560	755080	So what you do is you break up your art into those different layers.
755080	759280	So you can get those different colors, um, transparent areas.
759280	762900	You can create a rule area that says, Hey, don't put anything here.
763040	765720	Um, and that way it'll just show up as essentially nothing.
765720	771220	There won't be any, uh, solder mass or it'll just be an empty space, which makes that kind of ugly yellow color.
771400	773520	Um, but it is semi-transparent, which is good for LEDs.
774920	780920	Um, draw filled zones to the front and back, uh, let the front and back mass layers act as silver gold color.
780920	784220	So you essentially just say everywhere else, just dump copper, right?
784220	787860	And so that way it'll just fill in and I'll show you what it looks like in a second.
788620	792240	Uh, move your parts into the art for aesthetic positioning, right?
792240	795420	It's kind of the part of badge life is you want to make sure it looks kind of pretty and fun.
795580	798080	Um, so here we have this little hacker dude on a laptop.
798080	802480	We're going to have it connect at the bottom and we're going to have the led right on their eyes there.
803320	803780	All right.
803780	805020	You outline your image.
805400	807620	Um, I really like using illustrator for this.
807620	808820	You can also use Inkscape.
808820	811140	If you're into open source, uh, it's just a little bit easier.
811140	813880	Uh, in my workflow, you just use a pathfinder unite.
813880	816360	You take your complex shake shape and make it one shape.
816600	825120	Um, cause it has to be a single continuous line for the cutout of your board, um, import onto the edge cuts layer, um, fill all your zones again.
825120	828380	And we'll just say, Hey, okay, let's go refill your circuit board.
828540	829900	Um, and there you go.
829900	830620	There you're done.
830620	831920	Your SAO is right there.
832100	833160	Uh, that's what it looks like.
833160	835280	You give you in 3d and that's, that's basically it.
835280	836220	It's relatively simple.
836220	839100	It'll probably take you a couple hours the first time you do your first one.
839260	841480	And when you get into it, it's just a lot more fun.
841880	843820	All right, now we've got to manufacture this thing.
843820	845240	So we have our design files.
846140	849100	Um, for example, I keep mentioning JLCPCB.
849100	849780	I'm not sponsored.
849780	852280	I just abuse them a lot and I love and hate them.
852280	853900	They have more problems than not.
853900	861680	But anyway, um, there's some really cool plugins out there where essentially, uh, this one for KiCad will let you pick from their parts library.
861680	867740	Uh, you can assign parts to their part IDs and then generate the files that the manufacturer actually needs to create it.
868040	870840	Um, so you select your components, send off to a manufacturer.
871080	877180	Uh, and when you send something off to a manufacturer, I didn't write this in the slides here, but you have a bomb file on a CPL file.
877180	881400	So the bomb file is like what part is assigned to what like identifier.
881400	886820	So we had like D1, R1, and then we'll say, okay, this part is actually, you know, this model number.
886820	891140	And then my manufacturer's model number is like C1, 2, 3, 4, 5, 6 or something.
891140	891280	Right.
891280	892240	And so you get that list.
892240	898120	So the manufacturer knows what to create and CPL file is the positioning and rotation on the part.
898120	898720	Is it on the back?
898720	899620	Is it on the front?
899620	900680	How do you position it?
900680	903500	And so that way it knows where everything goes on your circuit board.
903500	905060	So these tools just take care of it all for you.
905060	906160	You don't got to do anything manual.
907000	911880	So now you send it off to manufacturer, wait three to five weeks, voila, badge life done.
911880	914140	You got a board and hopefully it works.
914640	915100	All right.
915100	916560	So now we're going to draw the rest of the owl.
917700	920760	So how do we go from a simple circuit to full on badge life?
920900	922460	The answer is open source.
923180	924620	Learn from the experts.
924620	926500	Remember this is a one-on-one talk, one-on-one talk.
926500	927720	We're not experts right here, right?
927720	929180	But we just learn from them.
929660	931760	Adafruit, SparkFun, et cetera.
931760	934400	They release all their schematics for their development boards.
934400	935380	It's phenomenal.
935380	941460	Especially if you're learning, you just say, hey, they have a circuit board, which has the part I want on it.
941460	943520	Let me just go look at how they made their circuit board.
943520	946400	You can pull their values for resistors, capacitors, whatever.
946400	947980	They've already done the work for you.
947980	951760	And if you're prototyping with that exact dev board, then it works.
953760	956400	They also have software libraries that are decent starting point.
956400	958500	I say decent because they're usually not full featured.
958500	962340	And if you're doing something esoteric with the hardware, you're probably going to write that code yourself.
962680	965500	But it's a really good starting point to just get off the ground and running.
966340	968320	And please, please support these folks.
968320	969340	I really mean it.
969340	973480	They create some unbelievable hardware release everything open and free.
973580	979260	And because they do that, there's a lot of manufacturers in countries that don't believe in copyright infringement and things like that.
979260	980240	And it is open hardware.
980240	981740	So it is allowed to be taken.
981740	988900	But then they'll resell those boards for a dollar or two versus the 20 or 30 that these people need to continue making cool stuff.
988900	990240	So please support them if you can.
991500	991800	All right.
991800	993520	So prototype the circuit on a breadboard.
994020	997520	This is an example of a badge I made last year.
997920	998820	I won't get into the badge.
998820	999680	It's not actually important.
999680	1005100	But I'm just showing you what it kind of looks like when you kind of hodgepodge all these development boards together on a breadboard.
1005740	1012020	There is a chip that you have to select is kind of the first thing you do is like who's going to be the brains of my badge.
1012460	1019520	I recommend one of the following starting out, an ESP32S3, an RP2040, RP2350.
1020480	1021060	Why?
1021060	1022300	Why would I pick those?
1022300	1024260	So first off, they all got built-in USB.
1024260	1025580	So it makes it really easy.
1025580	1029860	You don't have a special serial to USB chips or anything else you got to put on the board.
1030040	1031780	They're dead simple to flash.
1031960	1038140	The ESP32S3 requires some tool chains, but it's like built into the Arduino library, if you guys are familiar with that.
1039000	1043360	But the RP2350 and 2040 show up as a drive.
1043600	1045660	And then you just drag and drop your firmware onto it.
1045660	1047460	And it's ridiculous easy to flash.
1047460	1054920	For example, I did a conference badge for about 1,000 badges and trying to get 15 volunteers how to set up a tool chain to flash some hardware would be impossible.
1055000	1057560	But I was like, here's the file, just plug it in and drag and drop, right?
1057560	1059400	It's a lot easier for that type of work.
1060060	1062940	The other thing they have is solid Arduino library support.
1063280	1069960	So if you're unfamiliar with Arduino, it's kind of this like open hardware development ecosystem where everybody's made libraries for almost everything.
1070040	1075520	And so having compatibility with that is really important, because you could essentially say, hey, I want to do a thing with this funky hardware.
1075580	1079400	And sometimes even the manufacturers go, we wrote a small little library for you to do that, right?
1079400	1080900	And then you could just get off the ground running.
1081520	1085940	And these chips have more than enough peripherals in IO.
1085940	1088600	They can do pretty much whatever you want to do on a badge.
1088860	1091360	If you're doing something super funky, you're going to be way into it.
1091360	1096720	But starting out, more than enough to just click some buttons, run some LEDs, just drive a screen, things like that.
1098000	1102000	JLCPCB also has an RP2350 guide that I have a link here.
1102100	1105500	But essentially that's a way to say, hey, how do I get started with this chip?
1105500	1107320	What sort of considerations do I have to have?
1107840	1108340	All right.
1108340	1109320	I have the hardware.
1109320	1110260	I built my prototype.
1110260	1111160	Now the code.
1111760	1114540	There are kind of three schools of thought with developing a badge.
1114540	1117880	There's the Arduino and it's incredibly easy to get running.
1117880	1119220	You download the Arduino IDE.
1119280	1121580	You install your board files.
1121580	1124080	That's right from a searchable thing within the IDE.
1124080	1126700	And then you say, click compile and you're done, right?
1126860	1129620	It's very limited and it's a little slow.
1129620	1135640	And the way the compiler is set up, it's set up to be easy to use, not to be the most powerful.
1135880	1136940	So that's one consideration.
1136940	1138300	We're doing some more advanced stuff.
1138380	1146360	For example, I started on making a badge and it got to the point where compile times are up to like eight minutes a pop, which was just ridiculous and I had to move on to a different thing.
1147120	1151480	Platform IO and VS Code, it's a pain in the butt to set up.
1151480	1154580	Every time I have to do it, it's at least like 45 minutes to an hour.
1154580	1156320	Maybe I'm just really bad at computers.
1156800	1159180	But this is essentially like just a big pain in the butt.
1159180	1161300	But once it's set up, it's rock solid.
1161300	1163920	You can import Arduino libraries, raw code, whatever.
1163920	1168160	The tool chain is really mature and it's like the way to go in making advanced stuff.
1169700	1170900	Compile your own.
1170980	1175560	Then you can use manufacturer supplied tool chain for your MCU and do everything yourself.
1175820	1181080	I don't recommend doing this when starting out, but at some point we're doing some crazy chips, you're going to get into this.
1181880	1187100	All right, so now you kind of have the IDE and the compile things.
1187840	1192100	Here's some common Arduino libraries that we're going to go with for this example on what to do.
1192100	1193660	So first off, bling.
1193660	1195060	You want your badge to blink.
1195060	1197500	I see some people in the front that have some blinky badges.
1197720	1204360	Adafruit has a NeoPixel library, they call it, that works with WS2812Bs and some other type of LEDs.
1204360	1209760	It supports like almost every chip on the planet that is used in sort of the hobbyist community.
1210080	1215960	Some of it's really gross where it like bangs all the stuff out and some of it's really nice where it uses like your timers and everything.
1215960	1216880	But it just works.
1216880	1220360	You drop that on and you set the pin that you're going to use for your bling.
1220540	1221540	It just works.
1221540	1222600	It's really nice.
1223240	1229720	If you have a screen, there's a couple libraries I recommend Adafruit Graphics, TFTSPI, and LoveYan Graphics.
1229740	1233640	They're a Japanese group, so a lot of their documentation you got to Google Translate.
1233820	1237780	But three really cool libraries that support a whole ton of screens.
1237780	1244580	Every screen I've thrown at it, because essentially what happens is you have a screen and usually have a display controller chip that's on the screen itself.
1244600	1247820	And so you just make sure your library supports that display controller chip.
1249060	1249980	And then input.
1249980	1251460	You want buttons to do something , right?
1251460	1256000	So EasyButton is built into like Arduino, for example, and ButtonFever is another library I really love.
1256380	1259360	They support, like, you can pull the button state, like, is it pressed?
1259360	1260240	Is it not pressed?
1260240	1261400	You can also have interrupts.
1261400	1269060	So when a button is pressed, fire off this function, which is really, really nice when you're like, hey, you know, change my screen or change my bling or do something else.
1269060	1270720	It's just a nice, easy way to get started.
1271120	1271500	Cool.
1271500	1272620	So I got a working prototype.
1272620	1273420	What's next?
1274500	1281040	So how do I get from this breadboard thing to this ridiculously complex KiCad schematic, right?
1281040	1284600	So this is actually the schematic for that breadboard, but we'll get there.
1285080	1286720	So start with the brains.
1287000	1291020	The Raspberry Pi Foundation provides a working reference board for KiCad.
1291160	1295900	You can download this and they give you a fully working RP-2350 board.
1295900	1302860	You just download it and then you can send that to a manufacturer if you wanted to, as long as you assign, like, the BOM part files.
1303220	1304840	It has both the schematic and layout.
1304840	1305640	So it's really simple.
1305640	1313560	As you see here, it's got the MCU, it's got the flash, it's got the USB, it's got pretty much everything you need to get started.
1313560	1317440	So you just kind of start hodgepodging your peripherals on and then you're good to go.
1317740	1318860	Is it the best?
1318860	1319440	Eh.
1320200	1321220	But does it work?
1321220	1322180	Yeah, it does.
1322300	1328540	Which is super nice because now, as someone who's just starting out, you don't need to worry about the complex part of the brains of your device.
1329040	1330820	It works right out of the box.
1331020	1333500	All right, next, hodgepodge your open source in.
1333620	1339900	So for example, on the right here is Adafruit's schematic for the display breakout for a screen I was using.
1340200	1346280	I bought their device, I plugged it into my breadboard, and then I looked at their schematic and I said, oh, okay, that's all you need?
1346280	1346560	Cool.
1346560	1347660	And I just made my own.
1347820	1350500	And so now I don't have to use an add-on board for my badge.
1350500	1353600	I could just plop it right onto my badge and then have the screen plug right in.
1354920	1357140	This is another example of something I've done.
1357220	1361160	I needed sound on my badge to play tunes.
1361420	1363140	And so Adafruit had a really nice circuit.
1363140	1364280	I said, cool, look at that.
1364280	1365540	Everything works right out of the box.
1365540	1366720	It's relatively good.
1366780	1368600	I read the spec sheet because I was going a little deeper.
1368600	1369800	I tweaked it a little bit.
1370180	1373880	But just relatively copied right for right off the open source.
1373880	1374980	And then done.
1374980	1380140	You've got a working circuit for this peripheral that you just plug into a data line to your MCU.
1380980	1381820	All right.
1381820	1383020	You've got a working badge.
1383020	1391120	And to show you kind of how coming from that open source to the actual badge itself, anybody seen those frog badges this year that are around?
1391180	1392900	That's the badge here.
1392900	1396120	If you look on the right, there's the RP2350 reference design.
1396120	1401100	And you look on the left, there's my personal design for this badge besides the power stuff, which I've done myself.
1401100	1405380	The rest of it is relatively copied straight from theirs because it works.
1405560	1408360	Why do extra work when you're just trying to have fun, right?
1409200	1410080	All right.
1410080	1414280	So we started out with basically a breadboard.
1414280	1418480	Those are all those kind of components and whatnot I just plugged into wires.
1419040	1420480	We threw it into KiCad.
1420480	1421720	We built up a schematic.
1422380	1423900	We laid out the board.
1424620	1425680	It's right behind me.
1425680	1427740	So I'm sorry if you guys can't see some of that.
1427980	1429780	And then the final badge.
1429780	1434540	And then we get a working badge that we can deliver for DEF CON and everybody can have fun playing with it.
1434760	1435080	All right.
1435080	1436120	So is it that easy?
1436180	1436740	That's it?
1436740	1437160	It's done?
1437160	1438560	You just do those couple steps?
1439360	1439920	No.
1440300	1444460	So today's day and age, there's a bunch of issues with supply chain.
1444560	1446440	Tariffs kind of screwed that up a little bit.
1446440	1449940	Last minute part swaps, like, oh, cool, I've designed around this chip.
1449940	1451140	That chip's not available anymore.
1451140	1451480	Cool.
1451880	1453240	What's similar?
1453840	1460100	It gets a little difficult when you're saying, hey, you know, I'm using this something easy, like I'm using a button, dropping a different button.
1460100	1461340	Doesn't really matter too much.
1461340	1463960	But it's like, hey, I'm using this display driver.
1463960	1465960	Now I have to have a completely different display driver.
1465960	1468120	You got to make sure your libraries work, everything, et cetera.
1469340	1471940	Data sheets misrepresented components.
1472080	1474840	One of the issues I ran into once is I wanted a three-way switch.
1474840	1476740	I wanted to essentially be power selector.
1476740	1478360	It's off USB or battery.
1478420	1479140	Really simple.
1479140	1481180	I didn't want to do any power selection circuits or anything.
1481660	1482980	And so I got a three-way switch.
1482980	1483920	They come in.
1484380	1485460	It wasn't a three-way switch.
1485460	1488160	It was a two-way switch with a momentary three.
1488640	1493760	Kind of like if you have those Bluetooth headphones where you, like, turn them on and then you hold it to pair type of thing.
1493760	1495260	That's kind of what it was designed for.
1495260	1497760	They didn't say anything like that in the schematics, the data sheet, nothing.
1497860	1498140	All right.
1498140	1503340	So you always make sure you have a prototype done and make sure you do your prototypes early because you will eventually find issues.
1504080	1505100	And the manual cost of labor.
1505100	1506820	That's one thing I really want to talk about.
1506820	1509280	If you say I'm going to make 1,000 badges, everybody's going to have one.
1509280	1510200	It's going to be great.
1510360	1513000	And you have a screen on your badge and you have to attach that screen.
1513000	1515180	Now you have to attach 1,000 screens.
1515180	1516240	I've done this.
1517260	1520260	So it's a bit of a pain.
1520260	1524680	My buddy Doug in the back over there, he's helped me with one of those where I did about 750.
1524680	1527880	He did about 200 of these screens for a conference we did.
1528020	1534360	So it's just when you do a badge, make sure the cost of labor is in your head about how much time things are going to take.
1535140	1536480	All parts fail.
1536480	1537760	Plan to buy overages.
1547610	1550630	There's always going to be a percentage of failure in parts.
1550650	1552530	You could design this thing rock solid.
1552530	1559210	You could design with really good tolerances in mind and then you'll just get a bad button or a bad screen or a bad whatever.
1559650	1560710	I'll give you an example.
1560710	1563310	This year I had the and the Frogstar badge.
1563350	1565770	Both of those, the PCBs came out 100%.
1565770	1567330	One had a bad button.
1567450	1568430	One had a bad thing.
1568430	1569610	One had a bad USB.
1569670	1570670	One had a bad diode.
1570670	1571950	And you'd have to replace those parts.
1571950	1575670	So always make sure you, like let's say you're targeting 100, do 120.
1575810	1579230	Let's say you're targeting 1,000, do like 1,100, right?
1579230	1582590	You always have that little bit buffer, 10%-ish roughly to get in.
1582590	1584110	And then if you have more, then you have more.
1585290	1585890	All right.
1585890	1586550	I did all that.
1586550	1587410	Did I do good?
1588330	1589570	Is it fun?
1591530	1593710	My personal requirements for a badge.
1594630	1596090	Awesome bling and light patterns.
1596090	1598730	If it's not flashy, it's not badge life to me.
1598730	1599950	At least that's my personal thing.
1599950	1603310	Other people have other things, but you walk around and you say, oh, what's that flashy thing over there?
1603310	1604930	I want to go make something like that.
1605190	1606310	CTF challenges.
1606530	1607450	It's a hacker con.
1607450	1608370	These are hacker badges.
1608370	1610190	You got to have some sort of puzzles in there.
1610190	1611330	It's something I love doing.
1611330	1612250	I love creating puzzles.
1612250	1613150	I love solving puzzles.
1613150	1617430	So every one of my badges, no matter how simple or complex, it's going to have at least like five puzzles in it.
1617430	1618690	I just can't help myself.
1619250	1620490	Prevent e-waste.
1620490	1628590	This is one of the things that early on there's a lot like I have two bins of badges in my house just sitting there because a lot of them don't do anything besides light up.
1628590	1631910	And they look really cool, but like, okay, they light up.
1631910	1632130	Sure.
1632130	1633290	So does every other badge.
1633690	1636730	So make something fun and repeatable within your badge.
1636730	1641070	So when designing your hardware, make sure that there's some purpose to it or a gimmick or something.
1641370	1643290	For example, can it be a dev board?
1643290	1645690	Can you just use this to build new things afterwards?
1645690	1651290	You can expose your pins so they could plug in their headers and then use it to develop their own stuff.
1651470	1653130	Does it do something besides blink?
1653210	1656110	For example, my gunslinger is a TV be gone, right?
1656110	1661030	So when you're done with the CTF and you're done shooting other people to conference, you go home, you just turn off your TV, right?
1661030	1667730	So it's like just little things like that, where it's just, you know, it's something that you can use without just throwing it in the trash when you're done with it.
1667850	1669830	My frog star has like a frogger game.
1669830	1675370	The fight dystopia badge can detect certain BLE Mac addresses and alert you of their presence in case you're worried about that type of thing.
1676070	1678630	Yeah, so when you're done with that, badge life achieved.
1679710	1681510	With that, any questions?
1692740	1695820	And real quick, you can see more of my work at bigtaro.net.
1695820	1697480	You can see some of the badges I released.
1697620	1701700	It's all blocked by me, of course, because I wasn't expecting this podium to be here.
1704180	1705060	Yeah, you?
1718220	1719980	Yeah, no, it depends.
1719980	1721400	It depends on what stage you're in, right?
1721460	1731320	So I would always target like 10 to 20 percent for anything, because that's a really safe number, because it's statistically improbable for all that stuff to fail unless you have a design flaw, right?
1731320	1733980	So I think like 10 to 20 percent is a really good number.
1733980	1734960	That's something I try to target.
1734960	1737240	I always target like for badge life, I'll target 100.
1737240	1742120	I'll do 120, 125, depending on what the manufacturer and type of board and things like that.
1742120	1747900	They usually don't do numbers like you can do 100, but they'll offer the next one up as 120 or 125.
1747900	1749380	So you say, yeah, good, do that.
1749960	1751360	And that's kind of what I target.
1751360	1761520	In terms of like large quantities, the larger you are, the more less buffer you kind of need, because if you say like, oh, let's say 10 badges are going to fail, you're making 10 badges and 10 fail, you're screwed, right?
1761520	1765300	But if you're making a thousand badges and 10 are going to fail, you can get away with a little less.
1765440	1766300	So it really depends.
1766300	1769780	That's a really hard question to answer based on experience.
1771440	1773000	Like I'll do a prototype run.
1773000	1775440	My first prototype run, I'll always do 10, right?
1775440	1781720	I'll never do five or anything, because if I have to bodge two or three of them, and then I screw up soldering the badge, I'm just going to throw that thing out.
1781720	1787960	And so essentially I got to make sure I can do things, put extra test pads, put extra things when you're debugging.
1788140	1793040	And that way you can get that second run down to pretty high confidence it's going to work, unless there's like part failures.
1794180	1794980	Yep.
1795900	1797220	Thank you.
1807580	1808380	Yep.
1812920	1813920	It's a good question.
1813920	1815180	I've done all of those.
1815180	1816740	I've done rechargeable batteries.
1816740	1818960	I've done double A's, triple A's.
1818960	1823720	If you want to keep it dead simple, I would just go with triple A batteries or double A batteries.
1823740	1826600	That way you essentially have a certain amount of voltage.
1826600	1830160	So usually batteries died around 0.9, 0.85 volts.
1830280	1835740	So if you multiply that up, so if you do like two batteries, that'll be like 1.8 volts, do three batteries, right?
1835780	1842660	And so you figure out a chip that'll essentially boost that battery to be your 3.3 or five or whatever you need.
1842660	1844420	Most things are 3.3 these days.
1844960	1857760	So you boost that up to 3.3 and you can get a chip that says I can boost power from 1.8 volts or two volts all the way up to 3.3, or I can buck down from five volts to 3.3.
1857760	1859560	So that way you could plug into USB as well.
1859900	1866420	We could talk a little after about how to design a circuit like that, but usually that's what I do is have some sort of power circuit where if it's coming from the battery, you're going to boost.
1866420	1871500	If it's coming from USB, you're going to buck down and then you and then you get relatively stable power.
1875830	1876470	Absolutely.
1876830	1879970	Oh yeah, I can give a whole talk about how to do LiPo battery safety.
1880150	1882490	I've talked with a bunch of people that have made batteries.
1882490	1884230	The first time I did one, I was paranoid.
1884250	1888750	I put every circuit protection you could possibly do on the chip.
1889110	1892910	It was like we had overage, underage, we had detectors, we had a heat sensor, everything.
1892910	1895710	It was like, I'm going to make sure this thing will not kill anybody, right?
1895710	1900870	But once you start doing them, as long as you don't have those like soft pack batteries, because then you could puncture that and go on fire.
1900870	1907190	I like to use hard batteries, like 18650s or something, which they use in like vapes and things like that.
1907190	1909330	Those like bigger batteries, like flashlights and vapes.
1909350	1912330	Yeah, like on those, they're hard-cased, right?
1912330	1914670	So you could bang it in them and not worry too much.
1915910	1924270	But at the end of it, yeah, we could talk afterwards about sort of things, but essentially you have overage protection, undervolting, so that way the battery doesn't die.
1924270	1928310	Make sure you can't charge for the temperature, it gets too hot, turns off the circuit, things like that.
1930110	1930470	Yep.
1938560	1939760	They do.
1940320	1941740	KiCads is not the best.
1942440	1949260	So that's why I recommend prototyping with a breadboard, because if you blow an LED, you just get a new one out of the bag and you try again.
1949280	1956620	But one thing you could do is look at the schematics of parts and the manufacturers as you recommend the minimum, maximum, like current going through, voltage, things like that.
1956620	1964140	And then you can kind of do the basic math of like, okay, if I have this amount of current maximum, do I need a resistor that can drop it into that, things like that.
1964840	1965180	Yep.
1965180	1969500	I think I'm almost running out of time, but I'll take, who really wants the question?
1970600	1971260	Correct.
1972800	1976940	There will be a copy available on infocon.org once they put it up there.
1978340	1981040	Infocon.org, the DEF CON archives, yeah.
1990000	1992040	As many as I have sanity for.
1992440	1994940	I like targeting 100.
1994940	2005040	I think that's a nice number, especially at a con of this size, you know, you'll probably sell all of them so that way you're not like in the hole for thousands of dollars that you've got to like pay yourself.
2006140	2008160	But it really depends what you want to do.
2008160	2014280	You could do as little as like 10, 20, you know, just want to try it out and make something new, give it out to friends or whatever.
2014280	2017980	Or you can go, I wouldn't got, would not go over 100 or so.
2018140	2019300	It's just too much.
2020980	2021620	All right.
2021620	2024920	I was called time, thank you very much for coming to my presentation.
2025760	2026740	Have a good day.
