#132 Using EasyEDA and KiCAD for Improved PCB (dog deterrent)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and welcome back now you may remember some time ago I actually had a PCB made by PCB way the sponsors of my video those people about their and this was the result it was pretty dire I used Eagle I've never used Eagle before in my life so it was a it was an educational experience to me believe me and it was pretty ropey that was even a couple of mistakes on here but at the end of the day we did see the thing actually working and I'm hoping this still works we go there we are look PCB way PCB prototyping the easy way new members get their first order absolutely free check out their online site now now that opened up my eyes to whole world of possibilities so if I thought well if I can get this working then I can probably get other things working as well with a bit of learning and you guys came up trumps you said well look forget Eagle that's really overly complicated why don't you try one of the other alternatives the two that you came up with mainly were easy eda which is like a web-based browser-based design well CAD system and then there was kicad some people call it Chi CAD ki CAD but it's pronounced kicad apparently and so I thought right I'm gonna have a go with both of those so I started with EZ EDA first and that's in fact what this board is created with this was the result of my ultrasonic one agency first of all it looks a bit better but then it's a little bit smoke-and-mirrors because I've added all these sort of would you call it prototyping points on here right sometimes with some ground and positive rails and whatnot but the actual circuit is just this bit in the middle the thing that took me the most time with this particular PCB so getting the size rikes as you can see it's a shield isn't it for an Arduino right there it is sitting in the back all nicely made and the best thing for me to be quiet is the thing I was most worried about is making sure that the spacing between these pin right now I did use if you like a template for that shield well though it wasn't it wasn't the best template in the world it wasn't a lot of information on it but anyway I found one used it and then created my own shield from it says you can see I've got the typical double row pins his you can have headers and pins if you like I've allowed be a good thing to do for the future not for this particular project but yeah just learning from it that's why I also did these prototyping areas as well I thought well I'd like to know how to do that how do I make the holes handle I connect them and how do I create those little white lines if you can see like the ground here they've got like these little connecting lines across I've seen that before and I wanted to do that as well so I learnt all that now would I change this design yes I would with a few more things I've learnt but that's neither here nor there now this is a pretty good layout it works there are no errors yeah that was a surprise as well and it's it's it's okay I mean this has been working now inside we do my dog for the best part of mine there must be two three weeks perhaps and it's working good there's a little problem with it low this is what I mean like if I if I were to do it again I'd certainly think about it the construction a little bit more as you think I'm just about to start mounting it on these acrylic panels now these acrylic panels are in fact transparent and you will have seen them before in my coffee cup colder that's the video on screen now which I'm still using is lilius at the back of my workshop over in that duration anyway these are transparent although they're not totally transparent the smoky Gray's are behind this protective you know I can get a corner off you can see there's smoky gray and very nice they look too so what I intend to do initially is just to mount the Arduino on this board so here's a typical Arduino I'm just getting the mounting right so that's going to go on there now just marks out a couple of holes I wish upon a stopped I thought oh I should be videoing this then what am I gonna do is put another one on top of that well what's that shield goes on top of the so let's do it right that goes on there this one will then go on top of there held apart by some spacers and on top of this is going to be the ultrasonic module so this one here will then just sit on top of there because that's it's big and chunky and I'm thinking at the back of my mind can I not replicate this myself and make it about a quarter of the size because we know that inside here all it is is a 555 timer and some kind of power transistor to drive this this Pizza loudspeaker or well high frequency loudspeaker anyway so I'm thinking maybe in due course I might in fact get rid of this if I can get the performance crate anyway that's that's for another day so that's gonna that's gonna sit on top of there but as you can see there's a problem and the media problem forget the LEDs because they they're just pushed in the moment so they come out nicely but to get this top one on or the first thing that's too high of course is the microphone thing that plugs in that's not a problem that's why I did it like this so I can run wires from here if need be to here okay so I can either put this somewhere else on on this base or arrange this differently so that it it sits down here perhaps somewhere like that and the second thing that's too high of course is the mosfet and there's not a lot I can do this particular design because I've got the output to the ultrasonic device so this device plugs into here and so I can't push that flat that's not a problem though because I've got different loads of these boards or about ten of them in total what I'm gonna do is build this again and this time put this this MOSFET underneath the board now if I put it underneath the board this flat plates the drain on here will not be up against the board and funnily enough I don't want it to be up against the board because you got the soldiering aspects of all this underneath so that's gonna be flipped underneath and that'll keep this nice and flat then which means this this top piece can literally sit right on top of that pretty much right just little tiny gap and the LEDs will be shortened so they're just pushed into these headers here they'll be shortened and they'll shine through because it's semi-transparent you don't really need the LEDs from day to day running but it's it's a nice thing to have is there so that's where I'm at at the moment rebuilding this I'll keep this one though because I'm going to put this into a project enclosure and boy they're expensive aren't they even from the Far East project boxes or whatever they they are a lot of money given it's just a bit of plastic I didn't realize they were quite so expensive I thought it might be useful to show you the program I used to actually create this board because regardless of where you originally get your board manufactured and obviously as I say mine was from PCB waiks they were cheap and quick there's an expose of my video so how did I create this and what have I learnt whilst doing this that I got wrong on that first one what what did i do so wrong on here compared to what did I do better on here let's have a look at that now so the first thing I did was go to EZ EDA which is just a website create an account which is free and well then they said but I want to create a new project which is that one there oh it's hot coating new projects here it is ultrasonic boxes Haring it goes okay so let's just open this up in the editor and you'll see what I've done so here this here's the schematic we should you just met him it just sense that a little bit what I like about easy EDA one of the things it's so good you can just right click and as you can see that the pointer goes to a fist and then you can just drag it around a lot some PDFs do anyway so that's my schematic as you can see it's simplicity itself but it hasn't changed an awful lot since you saw it in the previous video when I did it so basically we have the input here for the microphone the little tiny microphone unit which I did mention in the last one there it is got it this thing here that just plugs in and that was deliberately designed that way so I could plug it in all run wires to it so that comes in via this DC blocking capacitor then we have a Schottky diode and this caster these two together plus that resistor form a peak detector effectively let me zoom in on this no just mousewheel it in so basically the these three components here perform a peak detector so what happens in the noise comes in yes rectified by the diode charges up the capacitor which slowly bleeds off by this but you get this pulse that then slowly goes back down you saw this in the previous video the other part of this circuit it looks like it's part of this but it's not all this is is VCC goes through a 1k resistor and this one microfarad in fact it could be a 10 actually I'll go through now it doesn't matter it just smoothes out the noise and the rubbish on the VCC line into the microphone amplifier because it's obviously sensitive to noise and that's that's all that bit is and on the output output we have okay a couple of LEDs for a resistor not very difficult is it and the one what another one there as well and then the MOSFET here driven through a 120 just to be safe I don't think you should really connect an output pin from an Arduino directly to the gate of a MOSFET you know if something went wrong you could be pumping 20 to 40 milliamps through here or more and burn everything out so I always put a resistor in there just to stop that happening and then a little 2 pin socket here for the ultrasonic module fine so that's that is it now so what lesson did I learn first of all while doing this well first thing get this schematic 100% nailed down if you make changes of this what's that doing there well is that L where's that l1 component doing there I think I must have clicked on something well I don't want it anyway so if I click the component and then delete that's gone right yes get this absolutely nailed down so what you should be doing is designing this building on a breadboard making sure that everything works get your code right in the actual Arduino itself and then only when you think right that's absolutely nailed down do you then go to the next stage you've actually created a PCB because you making changes later is wow it's almost impossible for example on here I've chosen a one microfarad capacitor now a one microfarad capacitor footprint is probably about what four five millimeters wide and that's the holes that are going to be drilled in the PCB for this now if you suddenly think Oh made that wrong it should have been a hundred and 100 is now ten millimeters wide you're just never gonna get that to fear it's gonna be a shambles so you've really got to get this locked down tight okay lecture out the way let's have a look at the actual PCB what do you do when you create this you can then say right I now want to create my PCB I'm not gonna go into details so do that another time actually how to use easy EDA if we look up here at the arduino r3 shield here me up i just move a couple of things out of way i didn't mean to do that right just right so this this outlined the purple outline that's sort of flashing on and off as i scroll over it that's the bit that took me the most time to get that right and i first of all try to join myself then I thought and then I read on Google nope use a template so I found one and I've modified it extensively just just the outline plus these pins up here and I've added in all these numbers you can see my womb in on that you can see the numbers have added those in I added this second row what else did I do I think I was about AI didn't add is I did the measurements in and checked it and that was it these mounting oh but they're not mounting elves they don't get drilled they're just indicators where they would be they were on there and I left it there so everything else I had to place myself and it was a little bit of experimentation and you know once you've got the main thing on now what they say is if you were to give a circuit diagram this one to a hundred engineers PCB designers you know amateur professional whatever you'd get back 100 different boards different PCB layouts because whilst there might be some best practices in creating a PCB there's not necessarily right way to do it there's probably print away wrong ways today yeah but there's there's right way as well as six of one half a dozen the other what they do say is as you create your PCB lay it out pretty much like the circuit so if you can see this input bit here are these four components when I laid that out on here well starting with a header you got one two three four pretty much as it is on the circuit diagram because they need to be physically close you don't want to put you know the c2 we're over here somewhere when it has to be connected up to here so keep the components that logically need to be created together physically together on the PCB as well yeah and all these footprints the size of these components are in a library and you have to pick the right one it's no good choosing the footprint for an eighth what resistor if you're going to put a 1 watt resistor in there it's not gonna fit it'll be look really ugly when you're trying to do it so you've got to take time in doing this this isn't a 5-minute operation it took me to learn the easy da as far as I got with this one it probably took me two solid days of playing about making mistakes and deleting stuff and learning along the way the two days solid yeah probably five hours per day because I wanted to get you know some good solid practices behind me and that was included some googling time I watched a couple of videos I think if and if I watch any videos all of them bookmarking them and I'll put them at the bottom of this video for you as well okay so that's as far as I've lost at the moment this this then I produced my Gerber files which is as simple as clicking one of these up here comment which one it is now don't know know what whatever it is I'll tell you now the one of the good things we just went over actually one of the good things is the 3d view when you've when you've created this PCB like we have here on screen it's so nice about a click 3d view and lo and behold I hope this comes up on the video this goes there every single layer thinking about it and is there gonna be some magic yes there we are there's the board in 3d now that means I can click left click my mouse and move it about in real time so look 3d like that and you can prepared you can see you can zoom in on this just the same look and you can so basically that that board should look like the one that ends up and if we if we look at that and if I flip over very quickly to this one you'll see that they are not dissimilar although in fact they're exactly the same so that gives you confidence that what you've got is on the screen is what you're going to get through the post ok right that's as far as I got I just want to wanted to bring you up to date on there I'm gonna build as I say a version on here the same version that but put that MOSFET underneath and cut down the LEDs or perhaps even move them about I don't know yet just that I've got something on here and then we'll talk about kicad and see how far go along with that right so this is the kicad initial screen this is what's known as the easy schema it's just the control panel basically for kicad now as you can see on the screen I've already got some items creatives I've got the PCB the net the schemer and so forth because obvious I've done the project what you do initially is create the schema by clicking on that button there then you click that's a symbol library editor you probably I need to do that initially not not just to get scars started that's basically to create some more footprints and create your own emblems on screen that one which is the PCB layout editor you must definitely will be doing that eventually when you've got that schema layout really tied down and yes where else the there's a Gerber viewer as well actually that one there but let's let's not jump ahead right so we click this one here and create a circuit diagram basically a schema which I've already done so let's was over to that there it is now it looks similar to but not identical to the previous one that I did an easy EDA because the layout of this this board is a little bit different isn't it it's not physical layout this is logical layout because this shield this Arduino Uno shield was actually present in the kicad library so I just grabbed it put it in and there it was ready for me but it's as you see it's laid out in logical order not serial order so in fact the pins are different which is why some components from now in different places that aside it was pretty straightforward to do there's a couple of anomalies that I just can't get my head around really I guess the more experienced guys you've been using this for some while perhaps you can give me some pointers let's just whizz through okay so the input is pretty much the same here okay that's there's no different I've just noticed that I've got some of the values wrong even though that says 10 microfarad there you wouldn't want that well yeah peak detector would be on fit too long but I never actually met a board out of this this scheme or PCB having got to a certain point I thought well it's proving the point so the values aren't that's important you do that what am i press oh all right so zooming on here is just with the mouse wheel the you can't drag this though if I right-click this it's not right I got a little pop-up but it's not right what you need to do is do an F for place your cursor where you want the center of your image to be and then press f4 like that so if I wanted to move over here get this central would have to go over there like that and you can zoom in and out as you would normally this f4 bit I must admit that my head in a little bit she can't just right or at least after using easy easy EDA with the right click and that little fist that you just drank things about this seem a little bit harder now apart from that though it was pretty much the same with the wiring and all that and components the one anomaly then it just would not let go of and even now it's given me some errors you see on the screen here I've got things like power flag here set up and here and I've had to put a power flag marker there and a ground there and a ground here what I've done the the electrical connection check by clicking the little lady bird up there so you click that now I'm gonna have to switch over to monitor view because you're not getting all the popups now which is a bit of shame right let me switch over to monitor view and I'll be right back right I've switched over to the monitor view nature ecstasy in the whole monitor which M is not quite as good but they'll have to do so as I say do you click on the little ladybug to do the electrical connections to check we can delete all existing markers that's a little error flags one of which you can see down there so it'll error flag saying wait what's going on here so we'll delete those first and then we'll run this ERC as it's called electrical rules checker and we get the same errors back and for the life of me I can't clear these I'm sure one stage I did have them cleared but basically it says the pins not connected and no connect symbol found on this pin so maybe there's something I'll just I just need to add to this power flag if I didn't have this power flag here and I didn't have I didn't have the little power thing on here start give me errors on this because what it's saying is look you got a wire coming out of here going to nowhere what do you expect me to do with that not think I'm alive not really expecting you to do anything that it's just leave it be but it won't leave it be it'll moan it's just trying to get this centered and where I want to look at it is just that little bit more difficult with kicad so there's a century there's this funny power flag and ground flag and all these errors it doesn't seem to make any difference to the PCB that still works fine but we'll come on to that in just a sec the components are identical I never said on the other circuit diagram and this one the the resistor going into the white LEDs I've had one cane not the usual hundred eighty or whatever because that white LED is really bright I think they're they're the old-style LEDs that leads to put torches really want bright ones so I put a 1 K in other words it's ridiculously bright pop of not though everything is pretty much the same here so when you then want to create your PCB the first thing you have to do is export your net what's a net in this applies to both them both bits software here a net is any electrical connection between one components and another or between one component and several others so if we look over here let me Center it here so this bit of wire come out of a zero this war I'm going down now up there and a long here to there well I think it stops there actually that bit there that is one net one wire connection and then there's another one between say the back end of that Zener and the capacitor and then there's anyway and there's another one between the custer capacitor and pin three these are all individual nets and basically you click on the net symbol there generate netlist i'm not gonna do it right now cuz i might destroy what we did down it'll overwrite something but basically it just generates a file now you saw that when we looked at the previous window so in here well it's a bit small there was there let me make it a bit bigger so here you can just about see peak detector arduino shield net that is the file that I created and them it's just just it takes file really you don't have to do anything with it and indeed you shouldn't edit it because it's what's been generating that of your schema okay well circuit diagram but if we have a look at the PCB then that is also pretty much the way easy da did it basically get a a bunch of components you have to then straighten them all out and connect them up and yeah that it was similar but not quite the same as let me just expand this board and zoom in there we aren't right so there we have the once again the shield of the Arduino v3 outlined there is that one there these pins were already in place the outer set pins I didn't create a second set because I think I problems doing in it just got too long-winded so I gave up simple as that I know try and try again then give up no point in being a fool about it WC field sent that the LEDs they have standard fitment and the other components were pretty much the same I didn't find this I have to admit as intuitive as easy DDA I felt like I was pushing a boulder up a hill a lot of the time things I wanted to do it goes no no and then some esoteric message comes out I think what is it you're actually trying to tell me here where is the explanation of that error message and there wasn't one there's help but it's not quite the same you end up googling a lot of stuff and then of course as you know you have to sift through the flotsam and jetsam of the Google results to finally get something that's meaningful so this is slightly different layout as you can see it's not quite as nice but I must admit I was getting a bit fed up by this time but I think I pretty much got it the same ish you know in terms of electrical connections anyway and once again it does have a 3d viewer which is always good to do even partway through your board creation you'd get a 3d viewer just to make sure that you it's looking pretty much as you'd expect so if we go to the 3d viewer now the first thing you notice is I have two red LEDs instead of a red green and white that's because for loving the money I could not find a green LED they had a red they had a white in various sizes three millimeter five millimeter so no green oh I just do not understand why there's not every single color Under the Sun of LEDs in the standard library as a beginner I don't think I should be forced into creating a brand new component called green LED they're common enough and blue and purple I mean I don't understand what I've done wrong once again over to you guys if you know that there's an easy way of doing it you know import another library or something that'd be great but once again I was pushing this boulder up the hill and it just felt a little bit hmm but this 3d viewer is as good as the e ze da one there's a little bit bigger actually let me up now if you click and you can rotate to look so it even knows this make me laugh the leads on the MOSFET all long right that they do stick through the board like that until you trim them both 3d viewers knew that and it's quite funny but as you can see there you get a very very good idea of how your board will end up so both 3d viewers both on kicad and easy EDA there they're really worth looking at okay yeah so there we are and I didn't I didn't really finish this board off not to the state where I wouldn't want to send it off for manufacture because well one it was the second time I was doing the same circuit diagram B it was all just a bit hard work now that's possibly because I started on easy EDA first I've got a handle on how that works then I came to this and of course it didn't work quite the same way so I'm I'm hitting these these mini road bumps thinking come on why don't you do it the way yellow one did it which is the wrong attitude you don't know but even when I put that to one side it just seemed a little bit more difficult that said this product is supported by CERN CEI and you know from Switzerland with the old Hadron Collider project they're putting money into this so obviously the big industry thinks this is a good product to use so I'm definitely going to persevere with this so that I can get my head around some of the foibles of how to do things like creating new components or importing libraries or whatever it requires to do that and because obviously it's a well thought out project product right so basically the 3d view is great and definitely worth looking at when you get your PCB whichever product you use here it will look exactly like that 3d view no surprises so will be a letdown really you send it off comes back you go hang on that looks vaguely familiar we're not just vaguely he looks very familiar and lo behold yes is that 3d viewer image that you end up with on this particular board kicad there's an excellent series of videos it's from digi-key Sean the chappie with the bowtie does these and he wishes through them at some rate they are quite details he's been an all for a long time on the circuit diagram and how to create a new footprint for a component and all things like that but all that is important because you must get that circuit diagram really nailed down as I said before before you start on the PCB so what I'll do is put some links at the bottom I'll give you the links for episodes 1 & 2 of these videos and you can follow them on after that but they are good I must admit and that's from digi-key ok Shawn I'll do those and stick with him because he does eventually gets is like episode 5 & 6 of his videos and that's when the sort of the Metis put onto this framework and you start designing your PCB and stuff and all all the previous lessons suddenly come into one there's no shortcuts on this you really do have to sort of follow it step by step and you can go back to those videos of his to find out all the nitty-gritty how to do things in summary then I found key cared more work and I did find it a little bit like pushing that Boulder up the hill I'm gonna persevere with it because obviously it's a top-notch product and easy EDA I just found easier and more intuitive maybe though if I was to do a more complex board I might find there are some limitations but for a beginner like me it was plain sailing and as you saw the board it came back no errors brilliant that's why I like to see okay so that sort of brings us more or less to the end of this video oh you want to see the end products of course don't you all built let's do that next and this is the final product as you can see it's some in a temporary case at the moment I'll do another bomb shield on the top exactly as you saw in that video it'll work someone if I bang it just read and if I bang it again oh that's generating that noise is probably gonna drive everybody nuts yeah so it all works I am gonna put this well I was gonna put this or was gonna put this into a box but actually I quite like this actually if I could replace this thing on top there's something about a quart of the size I'll be very tempted to leave it is quite frankly so there we are okay so that's the piece be done with easy da this time but next time I'm gonna definitely try and use kicad okay that's it thanks for watching and see you in the next video I hope you're finding these videos useful and interesting there are plenty more videos to choose and a couple of shown below and if you'd like to subscribe to this channel just click on my picture below and enjoy the rest of the videos thanks for watching
Info
Channel: Ralph S Bacon
Views: 33,786
Rating: undefined out of 5
Keywords: pcb design, easyEDA, KiCAD, easy eda, keycad, pcb layout, printed circuit board design, printed circuit board design software, printed circuit board design beginner, how to make printed circuit board design, Beginners, Arduino, how to, electronics, microcontrollers
Id: 1PpKMSk9owc
Channel Id: undefined
Length: 31min 27sec (1887 seconds)
Published: Fri Feb 01 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.