 All right next up we have a longtime friend of the community fun-sized giving a talk on electronic harmony drawing better circuits schematics Please give them a warm welcome. Thank you. So This talk is basically what I Have been doing for the past two years. So What I want to talk about today is how you can draw better circuit schematics So the majority of time when you see these schematics online, they are You know if you look at Arduino raspberry pi any of the major open-source tools That the schematics are available. You can look at them. They're completely open, but they're often difficult to decipher So what I want to do today is present a better way of doing that So why should this community care about a better way of drawing schematics? One is because they're the lifeblood of hybrid hardware design and reverse engineering. So It's it's where the project starts and the less Confusion and issues that you have in that schematic The less issues you'll have down the line with PCB design with debugging and then finally with communicating what you've done to other people in the community why Am I up here? Why am I talking about this because I am an electrical engineer by day? This is my job Hopefully, I'm not terrible at my job. Although it's possible. You can judge after this talk So I work for a company where we do really high reliability electronics they are things that Cannot fail and we go to great lengths to make sure that those boards and boxes that they go in are incredibly well Built to to not have any of the issues when you're working in large teams and rapidly developing those types of schematics You can't have confusing schematics So I spend a lot of time throughout my day reviewing other people's schematics and improving my schematics so that they're more easily understood also The way that I'm going to present to you is very much My way of doing things so if you think that you have a better idea for how to communicate those ideas Or you have a very specific way that you like to do things. It's Do that don't follow my way, but I just want to give you some ideas on the best way to build some of those schematics so What is the purpose of a schematic for those of you who are new to hardware design or maybe you've been doing this for a while a schematic is the drawing of the electrical idea It is Specifically to communicate that idea and it's to show circuit flow and to show the data path The most important takeaway from this presentation that you can have is that a schematic is not the layout. So a layout is the copper design that you give to the board manufacturer and that board Manufacturer will take that copper design and etch it out or mill it out and that's what becomes your PCB That's a really important component, but that's not what schematics are for schematics are for the the designers and The designers are trying to communicate a circuit idea not a copper layout Sometimes those are the same person right so where I work I do schematics and then I actually hand those schematics off to a CAD designer and then that CAD designer Translates that circuit idea into the copper files that we send off to the board house A lot of that is because they spend all day every day using the CAD tools that we have to To to build those boards they're really fast at it They're much better at it than I could be if I spent if I if I didn't spend 40 hours a week working on it but what that means is that it's incredibly crucial for me to take that idea and communicate it clearly because I Oftentimes either the CAD guys are not engineers or if my idea is poorly communicated They're not gonna know what I was trying to accomplish. So a Schematic is not a layout. So let's dig into what is a schematic and what are some of the best practices for how that should work? So some basic rules a Schematics laid out on a sheet Personally, I really like 11 by 17 most people are switching towards eight and a half On a by 11 inches on their scale. These things don't matter What does matter is that as you're flowing from left to right you want your inputs and your outputs of your idea to to have a logical pattern in the same way that we read sentences or Translate text right so Sometimes you have inputs that are both inputs and outputs then what do you do? Then you want to start grouping them by function So if these rules seem really abstract, don't worry. I'm gonna get to pretty pictures in a little bit I just want to quickly go over some of the rules We're gonna talk about them and then I'm actually gonna go through an example of a schematic that I've redone so Discrete inputs would be things like sensors buttons Oscillators crystals those are things that only have one purpose They're flowing either power or data into the rest of your circuit outputs This is things like screen outputs One-way data buses those types LEDs right that's that is an output So those you want on the right side of your schematic. I keep gesturing To my right and left so I'm sorry you're just gonna have to conform to my standard now So then bi-directional things are Most communication protocols are bi-directional so I to see SPI You know Ethernet all of those you can't nail down a single signal to yes That's only flows one direction So then you have to go to what is the intent of that pin So if I have an Arduino board that reads in an Ethernet packet and spits out that status on an LED My input are the Ethernet pins even though the Arduino could be communicating with the computer. That's bi-directional But that will go on the left side of my schematic and then on the right side of my schematic the output is the LED so one particularly irksome thing for electrical engineers is when Microphones fall no is when Grounds are not drawn down It guys it really hurts me please don't do it So When we're communicating voltages inside of a schematic You want this to make sense so current flows from high voltage to low voltage, right? So if you have a high voltage source and a ground the high voltage source to go up high The ground should go on the bottom of the schematic you should always draw things in the direction of the voltage as they're descending and I actually have some particularly well drawn examples of this so Conversely if you have a pull-down resistor so if sometimes in a circuit you want the ability to win a Pin on an integrated circuit is not being used. You want to make sure that it's it's well grounded. So you use a pull-down Pulldowns should always go down because you're trying to communicate It's just a resistor, right, but it has a very fundamental task inside of a schematic so Make sure that your pull downs go down make sure conversely that your pull ups go up and you want your voltage pins to also go up I've seen grounds drawn sideways. I've seen voltage pins drawn sideways I've seen grounds drawn up and down on the same pin. Don't do it Don't do it Another thing that's really important is I'm going to show you an example of a single page schematic that I expanded out to a multi-page schematic the reason this is really important is because When you try to cram everything onto one page it becomes unreadable so When you have signals that go between pages if you don't label where those signals are going You're gonna get lost very quickly so Not only do you want to label all of your nets? That's the word for Win a signal runs off of the page and goes on to another page and you want to make sure that any place that net is used is Numbered right next to where that net runs off most CAD tools will do this for you if you configure them properly But I've seen so many schematics where the line just ends. I I don't know where that goes That doesn't help me so always put page numbers at the end of your nets and then This should kind of go without saying but please be consistent in how you name things and how you use symbols because you would be amazed at how clearly you can communicate something if the format stays inside of Those traditional like I always use this symbol for a resistor then if you use a different symbol it means something different It doesn't just confuse your audience So the other thing is you want to clearly label your nets with function So in a lot of CAD tools, you have a certain number of characters that you can use to describe the net You don't have to get crazy. You don't have to say Ethernet for red box to that's too long of a name and it's not helpful and you're not gonna want to type that over and Other but if you say ETH to that's incredibly more descriptive than a variable name that is Either random characters or random numbers so in in the same way that you need good variables in software You need good variables in your schematic design and then This this one is another one of those soul crushing things Please orient your nets so that they all face normally. They're not 90 degrees off. They're not upside down Yes, I understand that maybe you're trying to if you have a line that goes up and down And you want to put a net there. It's tempting to angle it like that. You shouldn't have to do this with your schematic When you're writing it out, and then you want to differentiate between Bypass caps and filter caps kind of by the same reason so when I'm looking at a schematic And I'm tilting my head to try to figure out what your capacitor is doing That means that you haven't been consistent with how you've been using them So for a lot of integrated circuits, you need a certain amount of capacitance To keep filtered noise out You are essentially using those as a buffer for when you have a noisy power signal or Startup conditions that are causing your current to fluctuate. Those are called bypass capacitors bypass capacitors Should always be drawn down similar to grounds because what you're doing is you're using that to pull the AC ripple in your circuit Hopefully to zero or within some acceptable tolerance But then if you have a bunch of capacitors that are for filtration It doesn't make as much sense to draw them down unless your schematic is drawn in such a way where it makes a lot of sense And we'll see an example of this when I pull up the schematic that I've read done And then sort of alluding back to the last thing that I spoke about don't crowd your pages too much When You're having trouble fitting everything onto a single page It means that everyone else is gonna have trouble reading what you squeezed in there So another thing that I see on almost every open source hardware project is They want to draw their integrated circuits the exact same way that it's laid out on the page Excuse me the way that it's laid out Pinwise in the real world and I understand where you're coming from which is you want to be able to see Like here's an IC. It's got 20 pins Five per side and you you would expect to see those pins in order around your square, right? But this is goes back to a schematic is not a layout So if we follow the rules that we spoke about earlier and the convention of flowing your voltages down You'd put your power pins on top You put your ground pins on bottom and then you'd have your input pins on the left and your output pins on the right So we can see here with my my highly professional drawing that The five volt is on top if I have multiple voltages I put them all on top and I draw the Label for those things at heights respective to their voltages if I have multiple grounds inside of a circuit You are gonna either draw those grounds at different levels or much better is you should use the conventional Nomenclature for varying types of grounds and we'll cover that in just a little bit Okay, so I covered a bunch of rules. So what I wanted to do was an audience exercise. I'm gonna need some participation from you This is the Arduino rev 3 I know on this screen that it's super itty-bitty if you bear with me for a moment I'm gonna zoom in and what I'd like to do so on the left I have the rules that we just talked about and I would really like it if people in the audience would call out things that are wrong with this schematic my goal is not to Make fun of Arduino They are an excellent product that gets people into the circuitry and I'm all about that. I think that's very exciting But this is not the way to do schematics and it at the further that I got into this schematic The more it hurt me so let's take a look here. So let's start maybe at the top So does anybody see anything that could be improved? Maybe okay, so The the one of the things pointed out is what's with the nets on the top left? So there's some pins and They're labeled and They don't go anywhere. They don't go to an IC. There's a number there that doesn't I Genuinely do not know what those are supposed to go to now I'm this is some sort of bypass capacitor because of its size and because it's attached between three volt and ground excuse me five volt and ground but It doesn't tell me what I need. How about anything anything else? What else do you see? Yeah, so the text is is sideways. It's going up. It's confusing Let's step down. So that's that's just the power section. Let's take a look at this USB microcontroller That's that's as close as we're gonna get folks um so There's there's some grounds buried and drawn down in here there are What else we got going on? Can you can you read this? Now some of that is because of the text or the the size of the image But that's not really the core root of the problem here The core root of the problem is that they jammed their entire schematic onto one page and you can't see what's going on so um for brevity I made some of my own red lines and I just want to show you what those looked like so There's more red on this page than there is schematic and on this is I'm I may be Slightly OCD about these things, but the company that I work at I'm considered to be somewhat lackadaisical The my team if they if they spent more than five minutes on this could find at least 20 more problems Four-way junctions exactly This okay, so this is I'm so glad that the younger members of the audience are know what they're talking about So let's dive into this a little bit So the pin numbers are there twice it doesn't clearly communicate what's going on in in the middle I Actually have a laser pointer that I can use so Over on here. There are three circles. I have no idea what their circles are. They're probably mounting holes It's not labeled. I don't know they could be transports to another dimension In here is These are voltage transformers they they they take it from a higher voltage to a lower voltage They're not in order it According to this schematic the way it works is it steps from V in which is generally Somewhere around 12 volt to 3.3 volt back down to 5 volt and then it jumps back out to V in so Then they've got their their power Pins buried in there very hard to see very hard to read Here they have they're using a whole bunch of pins that are unlabeled They are crowding up the box You can't like right in this area That's where the power is. I can't I if I looked at this circuit. I would immediately be lost it took me longer than 20 minutes to really sit down and figure out what they were trying to do with this so Here they have unnecessary jogs Here is what the young gentleman in the front was talking about it's a four-way So this is something that we really like to avoid in schematics is when you have two lines and they cross and they connect you don't ever want that to be a four-way intersection and the reason for that is Because we're gonna we're following a nomenclature here, which is now the standard nomenclature of when a trace When a trace crosses another trace It doesn't jump over that was a 1960s Style jump it's bad. It makes it hard to read So now when two lines cross they just cross if they connect if there is an electrical connection at that point You have a dot so the way you get around having four ways is You turn them into three ways that are right next to one another. I'm gonna show an example of this in just a second Okay, so here's what I did. I redid it in a Tool agnostic setting so I didn't want people to say oh well because he did that in Eagle or because he did that in pads That's why it was so easy. I actually did this in the most irritating software known to mankind, which is Visio, so We're gonna zoom in and take a look at this What I did is this is where power comes into the circuit. So this is page one of my circuit There's the barrel adapter There's the voltage regulator and oh look I labeled what each functionality does with a text box We're gonna come over here we now can see I've got my five volt rail and my 3.3 rail I didn't have to dig for this. It's really obvious and more importantly the grounds are all at exactly the same height Which is one of those things where you don't have to do it, but it does make me twitchy so Things that are good about this schematic. There's no four ways These are all three ways. Here's an example of where you can break a four way into two three ways Where you just put them right next to each other You'll notice that my V in is drawn the highest and then five volt and then three three volt when you look at this You can immediately tell what voltages those are just by looking at the heights Down below. I have another grouping. So these were sort of the The weird little addendum circuits that they have they're not necessarily core functionality But the very first one if you take a look it's five volt USB and then it's a V in power selector So it's a comparator that's figuring out whether or not you have the device plugged into five volt This is completely unintelligible in the previous schematic here You can tell immediately that this is a comparator and It is feeding into a gate that will allow current to flow. I Made a mistake here. I have a net that goes off page, and I don't number it This is fixed on the next page. I believe but You know Please if you catch stuff, I want you to practice with me So if you see errors in my schematics calm out and we'll red line them So that's page one of my schematic all I did was Redraw it in a clean way, and I didn't cram anything together and you can immediately tell how much more visually pleasing and flowing that is Okay, so this is the ICs redrawn you can see here Five volt comes in. There's a bypass capacitor. There's some reverse voltage protection There's a pull up for the reset pin. There's some power LEDs like it's It's much much more readable and I've got my my VCC and my AVC Tied up top. They're tied together. So this means that my analog Reference is always gonna be the same as my VCC Which is pretty standard, but here I can actually tell rather than having to guess Just just look at how clean this oscillator is. I'm really proud of this in case you couldn't tell You can tell exactly what's going on with this oscillator Notice how clean my pins are They come out in the right direction. There's no jogs because I expanded my Square for my IC. I didn't have to cram everything really tight and you can actually tell what each pin is doing. I Have nets Here that go just to the other side of the page. All it does is go from here to here But it meant that I didn't have to draw stuff down and under my ground because these are signal lines And they're definitely not lower than ground and then they come back up Okay, so I wanted to give you a side-by-side comparison exhibit a Does this one look more readable? With a little bit of practice You will be able to just look at this and know inherently what that chip is doing This is the USB Right here that was contained here before I like there are there are nets in this Area that I don't know what they go to Here I know exactly where everything's going and how it's formatted Same thing on the other side it once you clean up those those power pins and your oscillators and your communication pins It all flows really nicely Okay, one last little tidbit When you have an IC that has a bunch of Pins that you're not using You want to make sure that you List those as spares on the last page so This is really just demonstrating there was you know, there was some number of spares for the first at mega chip and Now when I'm redoing my schematic. It's like oh, I need that additional functionality I can just jump to the last page and look at exactly why I need that Or you know what pins are left available to me, so that's it. Thank you very much for listening to me rant I hope that you had fun. I hope that you learned some things today Are there any questions about schematic design before I go so It's if you are either copying your schematics or you are like on a Copy machine or even it's just an image You don't have access to the original schematic and you're you're copying pasting that a P&G and you get Artifacting that artifacting when it's across a point like that can actually build up and it begins to look like an electrical connection And so it's a it's a way of very safely making sure that not only are you clearly communicating when there is and when there is Not across, but also you don't get artifacting from later All right, thanks everyone if you want to get a hold of me the slides will be available and that's my contact info Thank you very much. Oh, sorry I really like I cad It's that's kilo India Charlie alpha that's the Charlie alpha delta Eagle is no longer a community favorite, but it's still very popular Pretty much anything's better than physio