This week we are talking about Breadboards. Is breadboarding a circuit or design still applicable in today's SMT component dominated world?
What lore have you discovered in component datasheets? On this episode, Parker talks about how he picks electrical components and risk management.
Ever have PCBs that solder just will not wet and solder to? You probably thought it was improper soldering technique but that was probably not it!
PCB design rules for clearances
Stephen’s thoughts on the AND!XOR hardware puzzle
Parker is an Electrical Engineer with backgrounds in Embedded System Design and Digital Signal Processing. He got his start in 2005 by hacking Nintendo consoles into portable gaming units. The following year he designed and produced an Atari 2600 video mod to allow the Atari to display a crisp, RF fuzz free picture on newer TVs. Over a thousand Atari video mods where produced by Parker from 2006 to 2011 and the mod is still made by other enthusiasts in the Atari community.
In 2006, Parker enrolled at The University of Texas at Austin as a Petroleum Engineer. After realizing electronics was his passion he switched majors in 2007 to Electrical and Computer Engineering. Following his previous background in making the Atari 2600 video mod, Parker decided to take more board layout classes and circuit design classes. Other areas of study include robotics, microcontroller theory and design, FPGA development with VHDL and Verilog, and image and signal processing with DSPs. In 2010, Parker won a Ti sponsored Launchpad programming and design contest that was held by the IEEE CS chapter at the University. Parker graduated with a BS in Electrical and Computer Engineering in the Spring of 2012.
In the Summer of 2012, Parker was hired on as an Electrical Engineer at Dynamic Perception to design and prototype new electronic products. Here, Parker learned about full product development cycles and honed his board layout skills. Seeing the difficulties in managing operations and FCC/CE compliance testing, Parker thought there had to be a better way for small electronic companies to get their product out in customer's hands.
Parker also runs the blog, longhornengineer.com, where he posts his personal projects, technical guides, and appnotes about board layout design and components.
Stephen Kraig began his electronics career by building musical oriented circuits in 2003. Stephen is an avid guitar player and, in his down time, manufactures audio electronics including guitar amplifiers, pedals, and pro audio gear. Stephen graduated with a BS in Electrical Engineering from Texas A&M University.
Special thanks to whixr over at Tymkrs for the intro and outro!
Hello and welcome to the Mac fat engineering podcast. We're your hosts Parker, Dolman.
And Steven Craig.
This is episode 288. So where we left off last week is we talked a little bit about Anna x ors newest badge life hacker thing for DEF CON. Steven, got one over the weekend. Whoo. And he's been messing around with it a bit. So what's your initial thoughts, Stephen?
Well, okay, let me describe it first. Because the Okay, so gosh, how many? How many badges have we talked about on this podcast? Five different badges?
Probably enough to where people are sick, appealing hearing about it?
Well, okay, so the whole point of calling out that number is that this is the most different out of all the NX or badges that we've talked about. Oh, for sure. Because this one is less shall, shall we say, like, digital coding. This one is a lot more physical hands on, which is kind of cool. I'm not kinda cool. It is cool. I'm super kind of stoked about this. So.
Okay, so let's see here, the main portion of this puzzle. And it's funny because I'm describing it to the people who have designed it here. Well, okay, in terms of Parker and and that XOR is in our Twitch chat right now. But, but for everyone else, okay. So, inside this delicious package of silicon apple chips that that comes from and not XOR. We've got let me see here.
A just straight up baggie of SMD parts, like clips of cut tape, cut tape, eight, you know, eight millimeter cut tape,
I think they're, oh, 603 size packages, are they Oh, no fives,
they look like a way to fives to me,
and then there's some diodes
will Okay, so that you will there's, there's parts, they don't necessarily tell you what those parts are. There's just cut tapes of stuff. And then there's a handful of PCBs, one of which is a main PCB. And this PCB has plenty of delicious text on it and silkscreen information that you would expect from an aeronautics or badge. But it's just an unpopulated circuit board. It looks like NX source mentioning in the chat that the LEDs, which yes, there are LEDs in here, they're 1206. And the resistors are all the way to five because it
is a DEF CON badge. So you have to have the LED blink,
right? Well, no. Okay, so there is one capacitor in the bag. And then there are two strips of SOT 23 Something's in there. So so this the main PCB is just entirely unpopulated. It's just an integrated PCB. And I guess that is, from what I've gathered, the main point of the puzzle is, well, actually, I shouldn't even say that. Okay, so the thing is, if you go and read the information, which about this badge, which is I guess it's a hackaday.io?
Yeah, there's a heck of a project. That explains that has all like the hints, right? Everything you kind of need to know to start solving this badge.
Well, okay. So there's, there's a lot of information in this Hackaday article. It seems like it was very specifically well crafted to give lots or little information in that's typical of these kinds of badges, right. So
well, it's typical of an XOR badges know that
Yeah, right. Right. Well, that's what I'm getting at
all the so much documentation without the actual answers, you're looking
for what zero which is the point. So there's different levels of which you can participate with this badge. Which can be just, I guess, I don't have it pulled up right now. But the but the levels, if I recall correctly, are like, Hey, I have the badge that's level zero or level one. And then there's solder up for fun, but it doesn't function and then there's some levels beyond that. Leading to like the final puzzle break which is, you know, a functional circuit that you have
reverse engineered effectively through a good handful of methods. I say that because this isn't just like, oh, he are one goes here are two goes here and whatnot.
And what are you Seems like putting up like this resistor or this capacitor, or this component goes at this designator with rice spot on the board.
There's no instructions on how to build this whatsoever. And in fact, it's quite cryptic, like, on on purpose. Above and beyond that, there's there's an additional layer of difficulty. So I guess, gosh, maybe we should back up? No, no, I'll just keep going with it. So I said, there's multiple PCBs in the board in the bag that comes along with this. The main PCB is where you solder all your SMD parts, but there's five other or four other guess daughter boards that have capsulated edges on them. And these four boards, if you look on the front side of the board, they have nice silkscreen on them, but on the rear side of the board, they have traces. And you can pretty easily tell the direction that the traces go, I mean, some of them are straight across some of them criss cross. So just looking at the back of these boards, you can determine which capsulated pin on one edge of the board connects to which capsulated pin on the other edge of the board. The thing about these four boards is there's no direct, immediate information as to how these daughter boards get soldered to the main board. So given a ton of clues, and a bunch of reverse engineering, of just the main board is not enough to get the main board to function. You have to, in addition, do something with these daughter boards, you have to solder them correctly, onto the main board. To get everything to function.
Yeah, to make the connections Correct.
Make the right to complete the schematic effectively. The thing about it that's interesting is the end result of what you're going for isn't even known, like I don't know, specifically what this thing is supposed to do. It's not like I was given a blank slate and the answer and said connect the dots, I was just given a blank slate. And you have to figure out basically what what the overall function is. By, oh gosh, I don't know, reverse engineering. That's all I can. That's all I can think of that that is going to work for this is to basically trace it out, figure out the schematic, figure out how the schematic could work given limited information that you know, and then tying everything together to make something function on here. So given the information that I know on this, I've got resistors. I've got basically a capacitor and the reason I can fairly confidently say a capacitor, there's one pad that looks big enough for a capacitor. And on the hackaday.io article, there's a 3d render of the of the board and it shows a capacitor populated in that location. So and the kit came with two capacitors and there's only one pad large enough for it. So So I'm thinking, Okay, there's one, one capacitor that goes on here. Unless, unless, and our XOR was super evil, and they they decided to make you solder a larger capacitor onto smaller pads, which I don't think that that's the case. So
know if a part doesn't feel like it fits onto a pad.
It's I think that's safe to assume, right? Yeah. Yeah. Okay, so I've got resistors I've got capacitors. I've got two strips of SOT 23 Something's LEDs
on his 20 threes are like a package. Right? So components,
it's not 20 threes. There are so many parts that could be in a SOT 23 package. So the and then and then there's some LEDs, right? And, and having been to DEF CON and haven't seen a bunch of a bunch of badges, LEDs and bling are enough of a thing to assume that the purpose of this at least just for me like gathering information. The purpose of this is to have LEDs do something on this board. There's two pads on the front side of the board the board that I believe you would wear on your chest facing anyone who wants to look at you. There are two pads that seem led ish. And they have silkscreen information that make me think led ish. So my guess is those are LED pads. This device is probably
Guada they make you think led
ish. They're the right size and they have they have silkscreen that could indicate a polarity on it. And they both have very similar silkscreen that could indicate polarity also like there's some via in pad in here that I'm like it's totally fine. Like, especially because it's hand soldered. But there's, there's yeah, there's a good. And there's okay. So there's a lot of reverse engineering that could be done from the trace level. In fact, that's, that's effectively where I started on this was just, I started looking at symbols on the board, looking at trace traces, following them to parts, and then just, I actually started building up a schematic in dip trace. And then I was going to move pieces around until it made sense as to what it could do electrically. Of course, I'm approaching this entirely from electrical engineering standpoint. I guess one thing that I haven't mentioned, above and beyond all of this, there is a coded cipher that goes along with with everything on the board, so the board doesn't have reference designators that, that make sense? Directly. There's a cipher on there. So all the reference designators have codes, I guess you could say, or symbols that represent them. Things like car poker chip, raindrop, or pizza, or things of that sort.
And so we call it you know what we call that cipher? What's that? I think, oh, keep talking. I want to make sure it's on the Hackaday IO because I don't want to give away Oh, the name of the cipher I you given away stuff. Yeah. Because the name of the cipher is is a heads
up? Ah, okay. Well, it's an it's an all capitals to I believe that the name is on there, right? in all caps. I don't look that up. So yeah, there are symbols all over the board. So if you wanted to see like, a resistor name, or resistor value, you'd have to crack this cipher first. I, frankly, I'm just not really interested in spending a bunch of time cracking that at this moment, I'm more interested in the electrical stuff, I'm kind of a little bit more confident that I can just build the schematic look at my values, and then make it work given the values that I have. So maybe I'm cheating a little bit in that sense. And I'll probably come back to the cipher but I'm a little bit more interested in the in the circuit side of things.
Oh, interesting. We did not put that as a hint in there. Oh, well,
maybe you'll have to select that to me later. Yeah,
well, actually, since they are in chat. Could I give out that hits?
Ooh. Well, let's see what Okay,
well hit that you can only get on the macro engineering podcasts.
Ooh. So, one Okay, so one of the first things I did was I busted out my SMD part tester. And I I tested the SOT 23 parts because, okay, so many different types of parts can be in a SOT 23 package. But one thing I noticed is that the SOT 23 pads on the boards tend to come in clumps, and the symbols that are next to them represent multiples, like the there's not there's not a reference designator or a part type on every single SOT 23 pad on here. So my initial thought is these are either diodes or their transistors that's that's sort of my guess on there and I put these on a on my SMD tester, and I found that one strip of the parts were PNP transistors and one strip was NPN transistors. So cool, like just from kind of a glance at this at the beginning like it would either have to be some kind of diode logic circuit or some kind of active transistor circuit and I, I was right about the active transistor circuit. And then one of the things that kind of makes that stand out a little bit is like all of the SOT 23 pads on the board have car poker chip raindrop or car poker chip pizza next to them. And since I only have two strips of those like it, it makes sense. And the way I've been kind of I haven't determined what's what yet I haven't gotten that far. But I have like been reverse engineering the traces, just following things and then building that and putting dummy schematic parts down. Like, I guess this is an NPN I guess this is a PNP and they're starting to show me that like, oh, this circuit wouldn't work if raindrop was this and if pizza was that, so I had to flip them and stuff. So I'm pretty close to cracking which one is which based off of just like, well, this circuit wouldn't work if they were the other type. I haven't gotten significantly further than than that, however. So I don't know it's kind of fun. Now Now the funny thing is I mentioned this to Parker. Whenever Whenever before we started the recording of the podcast, right when I Oh In the bag, I look at this board and kind of read the rules of things. And I'm like, Okay, what is this board? God I can see. There's there's LEDs, there's transistors, resistors and the capacitor. What can this thing even do with just that? Those components? Right? So the very first thing I think of is I go and I count all the SOT 23 pads, this is even before I know that they're transistors, I just count the total number of SOT 23 pads. And I go right to Google, and I find a 555 timer schematic. And I count the number of transistors in a five by five, because I'm like this, this, this is probably a 555 timer discrete that blinks the LEDs that's like, before I even start digging into things like it's got to be something of that sort. I haven't fully determined that yet, or determined exactly what it does. But that's that's my, like, my initial gut feel the first time I looked at the board.
So I for some reason, we discussed this as like being a hint, and I don't know why it's not a hint. Might be on the bag somewhere. But anyways, so the cipher is the CDC. Ah, crazy Damond cipher. Got it. So that's a that's a hit. So yeah, this is, I won't comment on your theories of what you've discovered so far, though. But I like the approach like a strict electrical engineering approach to it. Like not even looking at the puzzles or anything like that, like you're looking at like, I have a I have a hand full of components that I don't even know fully what they are. I don't even know their values. And I have a layout slash. Basically, I have a netlist.
I have a netlist. How can I combine these to make it do something
but your netlist isn't full, because you have four boards that can be shuffled around on the front?
Well, okay, so I started building those boards in dip trace, actually, such that I can, I can move them around on my schematic, and I can see how it connects the rest of the schematic and then like, like the schematic will just speak to me and probably and it will, it will tell me because, like the thing about electronics is like, once once you get a feeling for what electronics like do, there's there's only so many ways that things can be connected. Like of course there's infinite ways things can be connected, but like like I really doubt that you guys are doing something like super uber wacko crazy on this. So when I see like a transistor connected to a base of another transistor that's connected to power, like I can see inversion going on and I can see other like bit flipping and those kinds of things going on. So I just need to keep going with the reverse engineering, connect the dots. I might even be able to build this whole thing without the cipher.
Like, you know, actually, if you could pull that off, it'd be really impressive.
Yeah. And I bet you I could get the cipher it's just like I looked at it like I don't want to start there. I want to start
well, it's just different ways of attacking the puzzle.
Right right. Now and once one schematic I can hot rod it and I can I
can well, I was gonna say one is something that you can just think really hard about the solve. And the other you need four years of education at electrical engineering college. Yeah. And also being doing like a decade and a half of analog engineering.
You know, okay, these boards, these are OSHPark boards. And they are what clear solder mask the black? Will Black fr for clear mask, right. So the traces are really easy to see. So yeah, that's their thumbs up. Thanks, guys. Sir, after dark,
I think option. Yeah.
The one thing I noticed about this board that is really convenient, is I guess the mask is actually not super thick. On this. I can probe vias from the top side, like I can just stick a probe in vias and I can beat test pretty easily, which is super nice. So I don't have to, like hold the board at weird angles and look, you know, top and top and bottom, you know, actually, I wish I had an x ray. Like, like Barker, one of the things I had thought about doing was putting this on my scanner, scanning top and bottom and then doing opacity in, like Inkscape or something like that, such that I could trace it on the computer as I because I've been doing all just by hand. Yeah, beep testing everything out. Yeah. And then Okay, so there's, there's, I didn't mention, but there's pads on the side. There's eight pads on the side that that are clearly like probe points or test points or something like that. And they of course, they all have symbols like we'd plant Christmas tree horseshoe. They've got But they've got their symbols next to it. So like I legitimately have stuff in dip trace that's just like Christmas tree and weed. So but yeah, probing probing out from from these points. I mean, this board is pretty straightforward to probe. It's just, I don't know, the layouts kind of psycho, but I think
it will we wanted to, like, we what it is we wanted to make it so that if at first glance, it wasn't the obvious what it was what the circuit is. Yeah, so the Yeah, it's all over the place.
Right, right. Yeah. Because if you if you did it well, and Sneaky, sneaky, there are also traces that go to nowhere. and things of that for it. So maybe that's a hint to some people. Nikki? Well, and there are two pads that are clearly intended for a battery clip that's included in the bag. And power and ground are not immediately clear. Well, there's no indication in the house no indication so So yeah, you have to you have to back. The funny thing is if Okay, so if you know, I've got PNP. And I've got NPN transistors, and then you start like getting some portions of the circuits of the circuit going, you can say, okay, cool, great, I can see how these transistors are arranged. But if you don't know which way power and ground go, then you don't have a good enough. Like it doesn't NPN and PNP doesn't really mean anything if you don't know which one is power and ground. So like, that's not enough information for you to like, put the puzzle together there. So I don't know. It's kind of fun. And now the part that I'm most curious about is, How much easier would my life be if I had cracked the cipher already? And what was that? How much easier would my life be if I have already cracked the cipher?
Um, so if you could figure out what components are in your bag, the cipher would help a lot. Got it? Got it.
I don't think I want to, because this is this is way more fun. The funny thing is like this is okay. For anyone who does failure analysis in electrical circuits for your job, like, this is like the kind of the bad kind of failure analysis where you're trying to figure out why something doesn't work. And this isn't even built, right. Like, yeah, no. But like, I do this all the time at work. And I actually kind of really enjoy failure analysis, it's really fun to figure out why it doesn't work. The one The one nice part about failure analysis, for the most part, I should say, especially on mature products, is that you can start with the assumption that it works, or that the circuit should work. And I can start with the assumption that this circuit should work. But most of the time with failure analysis. I know what the end goal is, with this, I have no clue what the goal is. I just have some like hunches. Yeah, it's a fun, I don't know, as I make progress. It's just gonna take a lot of time to reverse engineer. Yeah.
I like how we never I think I never I think I expected people to actually try to do it that way. But I would, I would assume that people would have tried to crack the site like that would be like, try three attacking the board, not the first thing you do, which is like, I am going to reverse from an electrical standpoint, this entire badge.
The reason I chose that is because it just sounds like more fun. You know? Yeah.
for crazy people.
Yeah, I suppose I suppose there is the nuclear option too. You could just guess, like, you could guess solder things on?
Oh, my. That sounds super tedious.
Well, okay, so the capacitor you kind of get for free. Okay, train the transistors. You got a 5050 chance of getting them. Right. That's true. Yeah. And then all the resistors like, My day job is, is soldering and desoldering. Things like you could look at the frequency of the ciphers on there. And then place components based off of the frequency of what was provided to you and get some kind of functionality out of it. Right.
Just one way attack guessing things.
And if it doesn't work replace the flip the transistors That's a lot of desoldering. But I suppose that's like an extreme brute force. Let's like, the lowest bottom of the barrel brute force version of this like, because there's potential damage to the board that you could do by doing that.
Yeah. And the thing is, what if you had some resistor values wrong? And you swapped all your transistors around?
Ah, uh, yeah, yeah, I suppose. Well, okay. If you wanted to do that, right, you'd current limit your power supply and make sure you're looking at that properly. Right? I don't know. I'm probably not going to handle it that way. Oh, there's also a potentiometer on the board. That's that's one thing that I didn't mention, or
does tell you the designator for that, though.
Oh, yeah. Right, right. Time dot hack. Which, which? Another another reason why I would, my hypothesis of some kind of a blinky timer is what this thing is. Because also, you can populate that, I guess you could populate the potentiometer on either side of the board. But it makes sense to populate it on the side that most likely faces other people. So you can turn the pot and change the rate at which LEDs blink? That's a guesstimate. So probably a good one. Probably a good one. I mean, how many things how many things could this do? Other than that, perhaps
it can be? It can be a toaster? Well,
okay, so one thing that I'm, it could just increase entropy. One thing I want to try once, once this thing is all built up, there are eight pads on the side of the board that have the symbols on them, I want to probe them with a scope to see if there's anything unique or special about those. If I look at them on an oscilloscope, or if I probe all eight of these with a DLA do I get something unique in the pulses that come out of this. So eight is a it's a very electrical number, you know, so eight pads, eight signals, it's just with this many discrete analog components. I'm not sure how much features you guys could pack into it other than like, it blinks an LED at a rate. But who knows, maybe you guys got some really cool fancy schmancy stuff going on in there? Or maybe maybe these eight pads are for me to inject something into this and modify it somehow. I don't know.
I think you're the first person even mentioned those eight pads. So well, they're pretty obvious, right? I think a lot of people are just trying to get the board to do what it's supposed to do.
So okay, I'm gonna ask you a question, you can plead the fifth on this, or you can do whatever, or maybe even in Nadex. Or can can throw this into the Twitch chat here. In everything that I've I've said here, if you were to kind of like, rank or rate, what I've been talking about on this, like, zero to 100 zero being like your wacko 100 Being you've got 100% of everything you said is correct on this, where might you rank me? Or are you not gonna say,
um, you're going down the right path. For for a lot of things, or for your younger law things and the way you're going about it, okay? It's definitely unique The way you're going about it, because you're not paying attention to the cipher or any of the hints. Obviously, I want to see if you can actually complete the puzzle that way.
Just crack it without knowing any just brute force engineering, reverse engineering. Yeah, I'll give it a shot. Yeah, I mean, I may I may even, like not even try at the cipher. Yeah.
You didn't use the cipher a bit in terms of just getting the frequency components and stuff.
I actually, I haven't done the frequency components at all. I just know that the free like, I can see it on there. But I haven't like written a list of any components or anything. Like the only thing I have used the cipher for so far, is just to indicate that one of the transistors is car poker chip raindrop. And the other type of transistor is car poker chip pizza. That's the only thing I've lost. So like, I actually, if you look at my schematic right now, like I don't have like our one I have like, pizza Doge you know, the rest as of each resistor that you know that kind of stuff.
So, okay, well, I guess I'm on a path.
It's Definitely a path you probably will walk alone.
Yeah, I mean, it's, yeah, I? Yeah, this this puzzle wasn't necessarily, I don't know, it's it's intended for anyone, right? Anyone who wants to have fun with it, right. But
what we tried to design something that could be solved multiple different ways, either through cracking a cipher, but cracking a cipher in different ways, either by going through the hints of what the cipher is, but you can also brute force the cipher. The idea of like, you just do it by the logical standpoint, we wanted. I wanted to make sure that you could kind of do that as well.
Well, I'm the psycho trying to do it.
That's awesome. Yeah. So we'll see
if it if it comes out. Yep. It's good. The problem with it is it's just going to take a ton of time, like Yeah,
and if you're wondering how to get one, the problem is, well, I guess is the problem. So annex source sold them as a pre sale like, two months ago. It's like that. So basically, the only ones that are left are you had to come to DEF CON to get them.
Well, drive on out to Vegas in like, tomorrow, tomorrow.
Which is kind of I guess that's kind of unfortunate. But it's one of those we did like tweet that we were selling them a while ago. So. Yeah. Or you can buy them on on eBay. For someone who saw money by
somebody well, even though the package says where is it? Says it on here somewhere? Oh, illegal to sell on eBay. Right up at the top.
Just cover that over, cover that over with some tape.
All right. So I've got I've got another topic that I want to I want to bring out I've been thinking about talking about this for a while, because it's it's affecting some projects that I'm working on right now. But I realized like, it's kind of not well known. I should. And this is quite
a departure from what we just talked about. Yeah, hacking. DEFCON badges.
Okay, so I wanted to talk about PCB design rules for clearances. Because I think I think there's a lot of like, I mean, it's pretty straightforward, what we're talking about with with clearances, but when you start digging into what's required, and what's necessary for your circuit to operate, things start to get really sticky, and they start to get really, regulatory, and in the regulatory land it gets, there's tables and charts galore, let's just put it that way. So okay, clearances in your PCBs are basically how far things are apart from each other, and boiled all the way down to its like, minimal, most minimal level. And there's two two kinds of terms that reference your clearances, there's the word clearance, and then there's creepage. So the thing about it, that's that's funny is, most EDA tools, and most of the time, when we talk about clearance, we actually mean the word creepage. In on our PCBs. And so I think it's important to define those terms real quick, you got clearance, which is the shortest path between two conductive parts, or between conductive parts and the boundary surface of the equipment measured through the air. So that's kind of the key word, there is the air
is the electrons, clear? The electron crow flies,
right. And then there's creepage. And creepage is is what we run into more, but we call it clearance. creepage is the shortest path between two conductive parts, or between a conductive part and the bounding surface of the equipment measured along the surface of the insulation. So creepage basically is the shortest distance. If you were to touch the PCB, all the way
from part had your finger on the board and you couldn't lift your finger up. Right. Now, most of the time clearance and Creek Bridge would be the same, right? But there's some instances where it's not
theirs, right. And they both affect different things. So when you talk about clearances on PCBs, you have to you have to think about both of them. In fact, a great example is if you have a part on on a PCB, or you let's say you have two parts on a PCB that are adjacent to each other And they, they extend up into the air a bit, and they have heat sinks on them that actually are closer to each other. Well, your creepage distance between the parts is the distance between the parts, but your clearance between them is shorter because the heat sinks of the actual package are closer to each other. So that's a situation where the clearance is less than the creepage. And you'd have to pay attention to that. But there are other situations where the clearance can be, or the creepage can be less than the clearance. It's sort of the opposite of what I just have the example I just gave. So there's, there's a great website that I have used for calculating these things, it's snps.us. And then they have a bunch of information on creepage and clearance, and they have some calculators that are on there, I kind of wanted to just briefly talk about a little bit of what goes into that and what to consider about that. But we'll have those links up in case anyone is interested in them, they're really easy to use calculators that just give you some some numbers based off of the inputs that are mainly just what my voltages because voltage is kind of the main factor on what dictates how far your parts or your traces or your pads need to be away from each other. But there's a handful more things to take into account if, depending on what what environment your design is going to be in. So if you're designing for, like mains voltage in the US, or if you're specifically designing your circuit to meet safety standards, IEC ul 60950 dash one is the document you want to be looking at, that's the one that basically gives all the safety standards for both mains, but voltage on any tracks, primary secondary transformer windings, all everything of this sort. So of course, it's a lovely UL document that's behind a paywall. So I don't have tons of information that I can just spout out about it. But if you're if you are designing a product that connects to mains, and you want to get UL certified for safety, those that document that's where you need to go. There is a another document that if if you're not going for safety regulations, and you're not going for you well, you can look at IPC 2221, which that is just generic PCB design rules that also covers creepage. I'm sorry, it covers clearances, but not creepage. And that gives a pretty decent. Actually, what's interesting is the IPC 2221 document has stronger requirements than the safety document. So it's a good place to at least start your design. Like if you're thinking about how you want to lay out your board, you can always check the IPC 2222 or 2221. And then that gives you ballpark numbers as to what you need to set up in your DRC and things like that. So okay, so in the in the UL document that 60950 dash one, there's a handful of basic inputs that you use effectively, they have tables that say if you're working voltages, this and a handful of other things, this is what your your requirements are. So those other things are your insulation material group, your pollution degree, your working voltage, but also your appliance insulation class, and your altitude, and elevation of the product. So all of those things affect the PCB clearances and creepage that you need to look out for. So inside of the insulation material group, there's a there's a number called the comparative tracking index the CTI, which is basically a number used to measure the electrical breakdown of insulating materials like wire and wire jackets and things like that. So, the coatings basically yeah, yeah, exactly. So, they said they use the word tracking, replacement in replace of the word breakdown. So instead of electrical breakdown and say electrical tracking here, and according to the CTI, they say tracking is an electrical breakdown on the surface of an insulating material, wherein an initial exposure to electrical arcing heat carbonizes The material, the carbonized area flow areas are more conductive than the pristine insulator, increasing current flow resulting in increased heat generation and eventually the insulation becomes completely conductive. And you've probably seen that before where something starts to turn black and then it and then it shines brightly and then a fuse pops right like that is
or it pops,
well one or the other or catches on fire, right. So so in that permitting your creepage and clearance is you have to know your your CTI index of everything that is in related to the, I guess the nets that you're you're dealing with. So there's four categories on that there's, there's 123, a and three B. And they basically range from 100 volts up to 600 volts. And the general rule of thumb is, if you don't know the CTI of everything, then you just assume three B, which is the most stringent, and that is 100 275. And all of this just references lookup tables in, in the UL standards here. So the second thing to keep in mind is or not only like, Okay, so first of all, when you're designing something you can design in or change your insulation material group. But you also have to keep in mind where your product is going to go, what environment it's going to be in, and that determines its pollution degree. So pollution is the way they consider pollution is degree one is no pollution whatsoever, pollution being something that can become conductive. So if something is in contact with the board, or if it's in an atmosphere that can become conductive, then your distances between parts, needs to be expanded effectively. degree two of pollution is non conductive contamination that might temporarily become conductive due to condensation.
And like being outside and Houston.
Honestly, I bet you do sin is degree too, you know, like if like, okay, so say a PCB gets really dusty, and then it gets really humid, you now have an extra conducting path that's on your PCB, right? Then degree three is conductive pollution, effectively. So if you go on to the on to these websites and run these calculators, they end up just spitting out numbers there. But you got to like, say, you're designing a product, you have to know like, where is this thing going is this just going to go in somebody's living room will your pollution degree is probably going to be pretty minimal, right? But if it's going to go into an environment that's wet or humid, and very dusty, then you might need to adjust your pollution degree to prevent issues of this sort. Now, if you go to get UL certified, you're going to have to call all this stuff out. So you're going to have to declare what all of these things are. In your test documentation. So
this is this is more of degree one.
Oh, yeah. Easiest stuff, highest CTI index and the and degree one pollution, right? So then the last thing in that in that thing, in the UL, chart stuff is working voltage, that so that's the one that basically, the higher the voltage, the wider things need to be spaced apart to be safe, right? So the whole purpose of going through this is not so that like, we can give you all the information. It's more about just letting you know what what you need to keep in mind, if you're starting a design and you're like, hey, I need to know what clearances are for safety. Or if you're putting mains on your PCB. Like, here's the things to keep in mind. And unfortunately, it's not as simple as just saying, oh, you know, air has, has a breakdown of 40 volts per mil, therefore it needs to be x mils apart, done. Like it's more complex than that. And at the same time, it's worth considering I had mentioned altitude and elevation. The higher up you go, the pressure drops, and you have the insulation, you need wider installation. So
is that because I want to guess electrons can more easily reach arc across with less air in between them? I don't know exactly. The that makes sense. Because I believe so. Yeah. Because there will be less your insulation.
air dielectric in between let's break down, right. So in general,
I think I'm sorry, I'm interrupting. I wonder how prominent that is like the difference between, let's say here in Houston, which is sea level to Denver.
I can tell you because I had an issue with it. About three weeks ago, I had a board that art and carbonize. And I am in Denver, so I am exactly one mile up. And my buddy has the exact same board in Connecticut, and he's at sea level. And he's never once had a problem with it. And I had arcing on my board. So and here's the thing, I had used a calculator. In fact, one of the reasons why I'm talking about that is because I had some marking. And the funny thing is what I did with it With this board at art, I saw the board carbonize. And the board got really hot there and it started glowing. So I let it go for a little bit and just char itself up. And then I took a drill bit and I just drilled that section of the board out, and it fired up, it would work fine. So I shouldn't laugh, because the I mean, that is a safety issue. But that was at the most extreme vaulted portion of the PCB. So I'm confident that it's fine. It had Arkwright there. But like I said, I think altitude had something to do with that. And, and I've adjusted clearances since and now I had used a calculator and and put in my max total voltage on there. So I don't think it's entirely just altitude based, I think that the PCB manufacturer didn't do as good of a job in making this board and got a little too close. So I didn't have a high enough safety margin, the altitude was off, and I think the PCB was not amazing. So okay, so then the sort of the last thing to kind of touch on real quick is that say, you're not gonna, you're not looking for the UL safety standards, you can easily just go online and find calculators that do the IPC to two to one requirements, and they give you instead of creepage distances, they just give you straight up clearance distances, which most of the time creepage and clearance are the same thing. So you can kind of just rely on that. So you can use these calculators and and just get like a baseline number and then add whatever safety margin you want. It's just typically these calculators give you some information for external conductors, internal conductors, and coated conductors, external conductors being like fr for with raw copper on the outside, like there's enough leads from components, correct? Yeah, like if you have through hole components, this will be from lead to lead. Internal is you know, any, any layer beyond two layer boards, this is the spacing in between internals, and then coded. The, it's confusing because they don't define it. But coded is actually boards with solder mask count as coded, even though they have exposed pads, they actually, if you look at a cross section, they have coding in between the pads. So that actually adds a little bit so so that that technically counts. But yeah, I had to I had to do some research on that, because it seems confusing, because it's like, well, these pads are exposed, shouldn't they be considered external? But if it has automatic, technically, it's considered coded. So my suggestion on it is, is if you if you're working with higher voltages, and I would, I would honestly do this for anything above say, like 12 volts is just make sure you're you're because because any voltage can arc, right, it doesn't. Like it doesn't matter, like high voltage is not different than low voltage in terms of its arcing capability. over longer distance. Right, right, exactly. So it's not not a bad idea to make sure your power rails have proper spacing, just, I would say, run these calculators on the IPC to two to one and then add some fat to that margin. And then you should be good. But if you're looking to actually design a product that connects to mains, or you're designing a product that has potential safety issues with with being in contact with the human, then it's worth looking at the IEC ul 60950 dash one, or at least just doing some research on Google as to what is contained within that because that can that can give you the place to begin your design.
I look at all this stuff. I was designing this latest text test fixture at work. Oh, is it deals with 300 volt DC?
Yep, yep. Well, and yeah, there's, there's a lot more to it above and beyond that, like just 300 volt DC is its working voltage, but that's not a peak, right? Like it can, it can go higher than that. And so you got to, you have to know what your design is capable of. And then you will will require I don't remember what the what the margin is. But but sometimes you have to do it has to be able to withstand like 3x voltage spikes and things like that. So yeah, just keep all of that in mind. This is all good stuff to research before you start laying out a poor. Yeah,
I did. I did IPC. 2221 Because it's a test fixture. Yeah. And I did pollution degree too. Yeah. Because it's,
it's Houston. That's Houston. Yeah, yep. Yeah, moist air is probably fairly conductive. Yeah. And it's moist air 100% of the time,
all the time, even when the air conditioners running. Oh, yeah. Yeah. Or you just get someone standing next to it just talking a lot about hot air. So yeah, I think yeah, did what CTI 204
All the insulation. Yeah, yeah.
Mainly for, like, three a would have been enough but I was like, Yeah, you know, two is probably okay to
and that yeah, the insulation material group two would be 400 to 600 volts?
Yeah. Yeah, because it's only going to up to 300. But it could spike higher. I don't know how much higher, but it could.
So you know, and okay, so one one trick I've done this before, if you have, if you have the space on your PCB, one way to easily artificially increase your creepage distance is to cut slots in your board Safety Safety slots that I know that can help with mains as well in terms of passing you well. If you need to run traces closer together, then you can cut slots in the board and get away with it. In fact, on one of my most recent tube designs to vamp designs, I put slots between all the pins on the sockets, such that it's just the creepage distance is now like 2x, or something like that between pins, because one of the one of the pins has the capability of going up to 1000 volts, but I'm not going to have any problems with the creepage it's more the clearance, that is the problem because adding slots doesn't change your clearance, it just changes creepage. But that also so arcing is different than carbonizing your board and creepage has a much higher chance of carbonizing your board. And once you carbonize your board, you've made a conductive path that doesn't go away. Unless you did my trick where you drill out the port, remove it. Yeah, just get rid of it. So I've seen
I mainly use the slot method. Because usually when you your your let's say you're writing mains on your board, on your printed circuit board, you can keep them pretty far apart until you have to reach a component. assign those components or like a relay. And those pins are closer together. And then you start looking at like the what what your your spacing should be like, Well, you can't hit that spacing because those pins are closer than that spacing.
Oh, you know, what's, what's the biggest culprit of that is to 220 packages. Like you'll find a MOSFET in a to 220 packages like I can handle 800 volts. Yeah, sure you can, but your pins are 30 mils apart from each across this right? Yeah, like cool, like the dye can handle it, I suppose or whatever.
I wonder they made make them in different packages so the dye can handle it. But like a to 220 package can't.
Yeah, well, I mean, oh, boy, it just will never pass safety.
Or you just take the pins in the you spread them out.
Well that Yeah. In fact, I read one article earlier where it was like a to 220 package where you spread the pins and you still adhere to PCB design rolls. You can only move that up to like 50 mil difference, because the pins are 30 mils or whatever apart. Right at the baggage right. Yeah,
I see encapsulation. Yeah. Right.
So there's only so much you can get away with
a Tod 20. Right. I think that's gonna wrap up our podcast. Yeah, I think that's it. So that was what Yep,
that that was the macro fab engineering podcast. We were your host, Stephen Craig
and Parker Dolman.
Take it easy.
Later one. Stay creepage or clearance. I forgot already.
Ever have PCBs that solder just will not wet and solder to? You probably thought it was improper soldering technique but that was probably not it!
What lore have you discovered in component datasheets? On this episode, Parker talks about how he picks electrical components and risk management.
This week we are talking about Breadboards. Is breadboarding a circuit or design still applicable in today's SMT component dominated world?