Home Automation Hangout 2021-05-30: Comparators and multimeter hacks

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
please [Music] good morning and welcome to super house squirrel sunday uh someone just said oh some call it fun said looking forward to some squirrel wrangling uh first i acknowledge the traditional owners of this land i pay my respects to their elders past and present and to aboriginal elders and peoples from other communities who may be taking part in this live stream today and we have a whole bunch of people in the chat good morning to mitchell who was in in way too early station 240 dodgy's here some call it fun chip and chris cabletti peter and list goes on jax tech is back from his trip so jax tech has been in quarantine i hope that all went smoothly and you didn't go too crazy all right um my cotton awesome so there there is uh all right how to begin this i don't know how to begin this i've got all right we are going to do the pcb today i'm going to get back into fusion you can probably hear that dog barking in the background it's a neighbor's dog it barks all the time anyway um you can see me trying to figure out what i've got to say all right so i feel like this first part should come with a parental warning or something ah mitchell thank you for contributing to the squirrel fund what is zar um i have no idea what that currency is but it sounds cool zar it's very pirate-like um all right so not even sure how to talk about this first bit and i was wondering whether i should talk about it at all but i think i will it's a it's a serious squirrel it's a major deviation from anything home automation related or the normal sort of tech stuff that um that oh rand okay so they are so is it a for south africa of course an r for rand is it a r makes perfect sense thank you so okay where to begin with this i've got to set up a little bit of background now over the years uh something that i've i really don't even know how to talk about this so i'm just gonna bumble my way through and try my assessment of myself which of course is never going to be objective or anything else is that i have a reasonably even sort of level of emotional level i don't tend to get very upset or i get excited about things but i don't fluctuate very dramatically i tend to be reasonably even and one thing that some people say to me fairly regularly so hopefully it's a reflection of reality is that i'm very patient like when i'm dealing with situations things don't seem to bother me too much uh and dealing with people that could be frustrating i um don't ever tend to react to it and um and over the years i think i've developed a bit of a bit of a stoic approach to life and uh so i hesitate to call it a philosophy because i'm not qualified to talk about anything like that but i think people like marcus aurelius had some good ideas they're on the right track with some things and when you [Music] when you look at how you fit within the world or when i look at how i fit within the world i recognize that the vast majority of things are beyond my control other people have their reactions to things they will do things they think things there are events that happen and i can't influence them in any way whatsoever everybody has their own way of approaching things and the only thing that i have any control over is my own reaction to them so one of the side effects of that is that it's when people do things that i think are bad or ridiculous i don't tend to react very much because uh i can't necessarily change them and you might think that that means that it's a um it's giving up on everything but it's not that's not the right way to think about it either it's not a matter of just saying oh nothing matters i don't care about anything because i do care about things and i get excited about things and i want to achieve things and do things but it's just this recognition that there is my reaction to situations versus the things that i can control and this has changed over the years like the way i think about things has changed over the years hopefully everybody learns and grows and gets new things audio level is low okay let me see if i can fix that now i changed microphones right before the live stream because i yeah i'm pretty sure i can fix this because my camera setup has changed i'll show you that in a moment we'll get to that but in the meantime i'm just waiting for okay external microphone input volume i'm going to turn it up all right let's see if that is any better i've just cranked it up a little bit uh doji says super says control is an illusion yes yeah cool uh hopefully the volume is a bit better now so if someone can give me a thumbs up or whatever please let me know yeah so you're right dodgy control is an illusion ah thanks mitchell what i'm getting at here is i'm just trying to set some uh oh good thanks uh i'm trying to set some context for something stupid that i did on friday uh and it was a very childish reaction to a situation so over the last few weeks i've i've had things have been getting to me a little bit more than i have in the past and so i've been on you may have noticed i haven't been on discord and uh i haven't been doing much on twitter and facebook just posting a little bit occasionally maybe most of the time just scrolling through and reading it myself but i haven't been engaging much i've been kind of disconnected the last few weeks and i've had this thing where my if you think about patience as being like a fuel gauge my fuel tank has been getting closer and closer to empty until my patience was totally done by friday and i had nothing left and so friday evening i was in a situation that where my level of frustration boiled over and i had a reaction that was like a that was a tantrum like a four-year-old and um jacksec says running low on spoons yes exactly i just couldn't deal anymore and a certain um a certain situation that is recurring um or ongoing either way he could look at it was getting to me and uh this is the bit i'm trying to avoid getting to this point i should just get through it because it's um once i say it it'll be all over it's too late it's live stream so i can't take it back anyway i got to this point on friday where i got into that state where i just it's the classic thing of i saw red i was so frustrated that i just didn't know what to do it was like it was coming out in all directions and thank you very much so it was coming out in all directions and i didn't know what to do with it you know what it's like when little kids have tantrums and they're so angry and they don't know how to express themselves and they don't have the emotional control and that was me on friday um but i was on a phone call at the time it got to this point where i couldn't even think straight i was so frustrated and i just wanted to you know i wanted to smash something like it just came out that way and but i had to be quiet and this is the embarrassing bit i ended up punching myself in the head very hard several times like just one of those rage sort of things um and i kind of hurt the side of my head no i did not get any of this tantrum on video anyway trying to do self-analysis as to why this happened and my lack of ability to i think it was because there was no i i couldn't walk away from the situation there was no um pressure relief valve and eventually things just come out in whatever way happens at the time and uh there are so many implications to this it comes into like so i totally directed this at myself i didn't direct it at anybody else and so but this sort of situation oh i don't even know if i want to get into this this is um no i'm not going to go down that particular angle that i was thinking of talking about anyway i was out of spoons my patients tank was drained i took it out on myself physically and had a headache for about the next 16 hours um in fact there's they're still like bruising on the side of my head uh yes uh gerald says it's a great story i'm a bottler once things reach a peak pressure i lose it yeah uh yes all right paul says have kids and this will be a daily occurrence i have two kids my two kids are awesome um but they are old when i say old i mean um 16 and 20. so they uh it's it's beyond the stage where i've got little kids running around that make me lose it like that um oh oh james said i've been there done that mate no one's going to judge you for it i lost it at a random guy that honked me one day i can highly recommend the book the chimp paradox helped me a lot cool thanks james yeah road rage that's an interesting one as well that's that's one of those situations where this comes out a lot now i don't want to [Music] so yeah there are certain circumstances there's domestic violence that's the um that's the topic that i didn't want to get into road rage there are all these situations where people react in an emotional way or yeah i'm i'm not qualified to talk about any of this i'm i'm just i just wanted to convey to you something that i'd experienced and explain not really explain but part of the reason that i've been a little bit invisible the last few weeks but i'm doing better michael said i wrote commentate rather than road rage that's when you yes um yeah pancake so and andrew nielsen says i've been saying for many months that lockdowns will have long-term mental health problems this is a mental health crisis and it's not broadly talked about yes good point uh yeah if um if i hadn't been the thing is that most of the time all my pretty much every time this sort of thing has happened to me and i've got to the point where i've had this level of frustration in a situation there has been some way to deal with it like to really let that that pressure go and it could be you know going out and hitting the punching bag for a while or just just walking away is is great um remove yourself from the situation and that's generally what i do so if i get to the point where the frustration is too much and i'll think i'm not being productive i'm not reacting in a in a useful way then it's time for me to get out of that situation and then deal with it when i can be a bit more balanced about it it's just that in this particular case i could not leave the situation yeah um yes ah scott's a good tip for those times when punching inanimate objects becomes necessary high quality cabinetry will break fingers off yes you have to be careful about what you hit um and absolutely definitely do not ever hit someone else that is the number one cardinal rule okay uh yeah so way back when in fact when i started doing these regular weekly live streams it was when we went into the very first lockdown here in melbourne and it was a way of [Music] um i just look back at some of the some of the comments um dodgy says you're lucky you only have a bruise i have a hand that is cut to pieces because i punched a beer glass oh man that's um that's bad ooh i hope that healed up okay um and did you let go of your phone before you punched your head or was wasn't in your hand still it was the other hand i was holding the phone and i punched myself with the other hand um where was i going with this i've lost my train of thought totally uh oh this is interesting this is okay a couple of stories delane said many times i'll walk away before i throw a wrench yes um when i was maybe 19 or 20 i was with um my friend andy just sent me a message i saw a pop-up on my phone with some good advice yes andy we all follow your advice i'll get to that um and his advice was some communal hacking is a good way to get get past this sort of thing we will do that in just a moment so when i was about 19 or 20 uh my uh my very good friend adrian who i haven't seen for many many years he ended up moving to japan and then i think from japan moved to queensland lost contact with him and i haven't seen him for years but back when i was in uni we used to do all sorts of stuff mostly working on cars like doing engine swaps and that sort of thing and we used to do lots of stuff with rotaries like um anyway working on a car within one day one night i think it was one night so like dark in his driveway and there were this um there was a mazda rx3 that he was working on was it the rx3 might have been a different car i think it was his rx3 and he was trying to get um so the bonnet had been removed i think he was trying to remove him the exhaust manifold or something like that and he was in the in the engine bay with a wrench trying to get you know nuts off the um the exhaust manifold so you get it out and of course exhaust manifolds end up sort of rust welded on over time they can be a total pain to get off there because they go through such extreme heat cycles they just yeah if you've ever tried to get one off you know what i mean so he was frustrated he boiled over he was there leaning over the the engine bay of the car with this banner in his hand and he totally lost it and i just realized i probably shouldn't have said his name before i started telling this story because he may not want me to tell the story anyway he totally lost it and smashed the windscreen of the car with the spanner that was in his hand and um it's one of those situations where you're trying to make things better by fixing something and then you make things worse for yourself because you lash out and do damage that then becomes something that you have to repair when you didn't have to repair it before then new windscreen time great uh yes so michael wire says rotary equals vibration generation device yeah um particularly uh yeah this rx3 had a bridge port in it for a long time they had a br it had a few motors in it we ended up doing lots of motor swaps and rebuilds and uh but getting ahead of the peripheral ports just sound nasty they are they're really cool but like a fairly extreme bridgeport rotary when it's idling it just sounds awesome and the whole car shakes it's like right right anyway i've been talking for 23 minutes now about this so yes we're chasing squirrels there was one other story i wanted to tell what was that one yeah not so much a um not so much a story more like a counter observation many of you will not know although um chip who is in the chat here will know because he was at school with me right after school i ended up working for a company called new breed security doing uh doing security work a little bit of security guard sort of stuff but i hated that it was boring as hell just standing around in the dark for hours and hours mostly crowd control and a bit of personal protection for vips like um mostly muzos but also for sports people and i spent a lot of time hanging out in nightclubs and i've never really been one for drinking or anything never really been one for nightclubs so i would always be you know 100 stone cold sober standing around in a nightclub while everybody else is drunk and dancing and getting emotional and fights are breaking out and i'd be it's strange when you're when you work in nightclubs they totally lose their magic not that they ever had much magic for me anyway but uh it's like going to a circus in daylight and you see how crappy everything is like if you see a typical nightclub during the day with all the lights on and you see how broken stuff is and the paint coming off the walls at night when there's music and lights and things they seem like a magical mystery land but they're just nasty stinky rooms and so anyway the point of all of this is that there would regularly be situations like people would get into fights we'd have to break them up we'd throw people out and i was always stone cold level headed through everything never got i don't remember a situation where i ever got angry or frustrated or anything like that like i could be dealing with someone that was trying to punch my head in and it was just like well they're just they're there they're doing it so just got to deal with the situation grab them control them take them outside and yeah so i think and that was back when i was like 20 so 21 22. and i think i was i've been fairly level headed even back then it's not necessarily something that has developed as i've become old and gray and then lost my hair so anyway yeah scott miller said nightclubs always smell like puke during the day they do they've always got that smell they've got that stale beer and puke smell they're disgusting all right johnny bergdahl posted the office space printer scene yes take your age out on it all right now i think that is totally enough of that topic for now i partly wanted to cover that just to explain why i have been absent recently and also to maybe to it's a way of showing that everybody deals with this stuff it's it's easy when you're feeling bad in some way either depressed or angry or you know having some extreme emotional reaction to situations to to feel isolated and that you're going you're experiencing it but it's not normal or that there are other people that don't experience it but i probably wanted to share to show you that everybody experiences it they may not experience the same things but everybody goes through these sorts of things and has to deal with situations so if that's you uh please find someone to talk to about it i'm talking to you alright and so [Music] now now someone was wanting to post a link um and there is a problem that you have to be a mod to post a link but i think you [Music] um i gerald says we're people not statues yes that's right uh i think yeah sorry i'm thinking about the um posting url so i've missed a whole bunch of stuff in the chat i think someone you wanted to post a link but they couldn't because they're not a moderator and i've missed who it was actually that was wanting to post it sorted already awesome so i think the deal is if um you can you can post the link but it won't go live and then a moderator can approve it or something so all sorted very good now let's get into some nerdy hacking stuff and i'm going to start off with last week at the end when i was messing around with that comparator and it wasn't working properly there was a silly explanation it's one of those things where you can't where i couldn't see it because i was in the middle of trying to do the live stream and talk while i was doing stuff and it was because i had been messing around with that circuit previously i had swapped the capacitor in the rc network and the value of the capacitor was two orders of magnitude off what it needed to be for the frequency of what i was feeding into it so i fixed that it works now we can do it and we can look at it and you can see how the comparator works and uh i think it'll all go smoothly this time but just before we do that i'm just going to show you something i've just been rearranging things a little bit so i'm going to switch to droid cam go for a a mobile camera view because i've just been moving some stuff around in the past like if you're looking at my front camera now you would have seen the overhead camera sitting about here pointing straight down at the bench and it's not there anymore but if i go here you've got overhead camera and the reason is i'm going to go portable i'm going to back up slowly so that i don't make you seasick now i'm using a fixed microphone at the moment so as i get further away it's going to get quieter backing up backing up the camera is now right up there it's mounted much higher and it's got a different lens on it previously i had a four what was it a 1442 zoom lens now it's got a 45 to 150ml zoom lens i'm going to back way up over here and look you can see yourself you can see the uh so if i point yeah where there okay so workbench there the old position of the camera was about there pointing down so it was that distance now the camera is up here pointing down so it's much further away and the zoom range of that particular lens at that location is much better than the zoom range of the old lens at the other location so it now brackets the level of zoom that i want much better than it did before so so i'm now able to zoom in better on small things and i can also zoom out and get the whole bench and being higher it's out of my way when it was just here i kept bashing my head on it i would walk up here and the camera would be sitting right in this position and i reach over and you know knock it with my head now it's above head height it's improved um so if we go into overhead you are now looking at the view just gonna give the um the scope of kick in the guts and we're now looking at the view from the camera that is way up there now one thing that concerns me slightly is that because it's now a longer lens and it's further away and it zoomed in more it's going to accentuate any vibration so if there is anything that makes that camera move it's going to look like everything here is moving but just as an experiment i'm just going to try bashing the bench yeah you can see the camera wobble and that's being transmitted all the way through up to the bracket so i mean i hit the bench pretty hard then but still so i might have to do something to stabilize the camera mount all right so let's get this going we have the function generator here which is currently set to make a 10 kilohertz sine wave 2 volts peaked peak and that will be coming out on these two alligator clips right here so let's see what we can set up now i've got a couple of probes here i've got the the two probes coming off the scope all wrapped around each other of course oh great i just knocked the other camera alright let's fix this all right that's better so now we have scope cam and all right so what we have here is this um wemos lowland 32 is not actually being used for anything right now other than its its power supply all i'm doing with this is taking 3.3 volts off it there's a bunch of wires there most of those are actually doing nothing right now the only thing that matters is we're taking 3.3 volts and ground so that that is powering this comparator and that's it the rest of that circuit doesn't matter all that matters is the comparator the resistor and the capacitor and this doesn't matter either that's that's the input from the multimeter i'm not even using that not using any of that the whole point of this is just to show what the comparator does so what we've got is the input to the comparator is here and we've got a ground connection here so what we can do this is the output from the signal generator i'm going to connect ground and the signal generator output is going to the input of the comparator then from the oscilloscope uh channel 1 i'm going to plug in i'm going to connect i've got to connect ground and i'm going to stick that onto there as well so the idea is that all the first channel on the scope is going to do is show us the signal coming out of the signal generator so i'll turn that on and you can see now that there is this nice little sine wave excuse me this nice little sine wave coming in on channel one so we're generating it here if i um if i change settings on this we'll see it change on that but anyway it doesn't matter what it is so the point is that what we're doing is generating a sine wave which is representing a signal that is rising and falling but that is very noisy and so uh what we want to do is discover when is the signal rising and when is it falling and clean it up into a nice little square shape instead of having this yeah so the sine wave could be this is just a stand in for the data that comes from the multimeter so what we can do now is take the output where is the output oh here it is so this is the output pin from the comparator and i'll hook that up to the second channel and we'll see some signal coming out of that alright so we can see a signal on the second channel but it looks a little bit on the bizarre side now let's um i'm just going to scale that up so you can see it a little bit more clearly and i'm going to move it up the screen a bit [Music] there okay so these voltage scales are different on those two channels but that doesn't matter the point is to show how um how they correlate to each other so the yellow trace here is the one that we are reading from and analyzing and we want to turn that into a nice square wave now you can see that the blue is not a nice square wave it's doing some really weird things and if i um there is a perfectly good explanation for that that we'll get to in just a second so what we're expecting to see is where the yellow signal starts to rise we want our comparator to detect that as a high and go high which it does here so our signal goes up it begins to go up and it goes high and then it stays high and then the signal starts to go down and then the output of the comparator drops to a low level and it gets to here as the voltage here falls then it goes up it's got this weird little spike and then it goes back down again to where it should now what should be happening here is this blue trace should be high while the yellow is rising and then it should be low while the yellow is falling high while it's rising low while it's falling etc now the reason that it is doing that weird thing and we can fix it right now is that the input of the comparator is this is not it doesn't work fully rail to rail which means that if the um the value that is coming into it is not within a certain window of its input that it can deal with then um then you get this weird sort of artifact so what we can do is we can change um so we've got sine on here i'll change the offset value now if i go across to i'll move across one where are we so i'm trying to look at the other yeah so i'm going to work in millivolts i'm going to take that up a couple of millivolts there we go so i've taken it up 300 millivolts and at that point i'm going to take it up a little bit further 400 millivolts so beyond that point it looks like it pretty well matches what we expect so now you can see once the the yellow trace gets to its bottom point so it's no longer falling and it begins rising the output of the comparator goes well we're on a rising level so bang let's take it high and then it gets to the top as soon as it starts to falling it starts falling it says oh we're now on a falling slope so bang pulls it low and then holds it low so what that allows you to do is take um is take a a noisy signal or a signal that is sort of fluctuating and square it up it lets you get a a very clean signal coming out of it okay did that explanation make any sense uh yes all righty now when the second needs to be won't bounce off the camera yes scott ah true yeah so on dodgy set or an isolator bar so this is the conversation about the overhead camera the um there is there is actually a reason that it is very susceptible to vibrations and i know how to fix it so uh let's go back to uh portable is this gonna work yes all right now the way i'm trying to move this camera slightly because portable cameras make people feel really sick it's a it's a horrible effect so what you can see is this camera is mounted that's like a quick release mount like off a top of a tripod and then it's mounted onto this metal bracket which i just bent into an l shape that is screwed onto this drawer slide so this is a slide that is normally mounted horizontally to for drawers but i can push it in and out and that way i can adjust the position of the camera i can push it all the way in and then the camera is out of the way or i can just grab it drag it out and then it is over the position of the bench that i want but because it's only a single draw slide you can see if i get the camera right on the end here it has a tendency to rotate like that it's not very stable so if i do that and make it shake it will just keep penduluming for a little while so the way i can fix that is i can put a second draw slide beside this one put a plate across between them and then mount this so that it doesn't have this rotation and then the whole thing should be very stable but first i need to find the other drawer slide so this drawer slide which is the one that was mounted here under this bench is i bought it as a set of two i've got to switch back to the camera get rid of that motion sickness effect and um yeah so i just went down it was a few years ago i just went down to bunnings and bought two drawer slides like a they come in packs of two and i used one for the camera mount and the other one i left in its bag put it in the garage and thought if i ever need it i will have it uh i've spent a lot of time looking for it i've got no idea where that second draw slide went but it was years ago now it was a few years ago that i bought it if i can find it i am going to mount it beside the first one plate between them make a nice stable think bracket that can't rotate and then it should all be good so in my head i'm already starting to think about where could that thing be i was just about to go off and start looking for it note to self do not do that during a live stream ah right so uh gerald42 said which op amp are you using um it's a comparator as god said it's hiding behind the box of failed projects one box [Laughter] not just one box it's a comparator not an op-amp and well comparators and op-amps are very very strongly related to each other um so i can't even remember what the part number of this one is it's one of the super common ones check it under here so i can use the old mach 1 eyeball to figure it out um it is an lm393 which is a very common cheap dual channel comparator all right station 240 says shipping container refill projects that's more like it now you're talking okay um anyway that whole comparative thing has has occupied parts of the live stream for weeks it's gone on for so long and i think we can finally put it to finally put it behind us now turn off the scope so we don't get that that noise hang up the probes out of the way and i will clean up the rest of this mess after the live stream i think and put things away all right so now what were we doing we were going to make the pcb for [Music] uh okay i'm just gonna come on you go you can do it so all right drink time i bet a significant number of you that are watching this right now have these arnet drink bottles or have had them in the past australia's academic and research network how many of these have i got i think i have four of these drink bottles thanks aren't it yeah cable tie says but we learned something new that's a useful squirrel i love learning new stuff the problem is that i then forget it but it's um i like learning about new things that i can use to where will i move that i'm going to move that off well let's see projects project projects and it was ut wi-fi hardware this so this is where we left it last week and i've done a little bit of thinking about it uh move this over here um right manage libraries got to do an update come on all right so michael says it's usually evil steve's fault that we have our net bottles yes um oh frank said you must have the heating on john it's bloody freezing in melbourne today i had the heating on and i turned it off right before i hit go live on the live stream because it was kind of noisy i've got a reverse cycle air conditioner here in the lab and it's mounted up over the window there to my left blowing just straight out into the room but the fan noise is fairly loud and um so what am i doing uh super house resistors it's saying that they are not downloaded ah what's the deal okay why does that have a little library unavailable that's weird okay there's some weird stuff going on i don't know what's going on with that hopefully that's not going to impact what we're doing today we already have parts on here and i will resolve my argument with eagle a little bit later regarding its libraries uh johnny says you left no place for the antenna on that layout um this keep out in the middle here is to stop the copper paw where the um where the antenna is going to be so let's just get ourselves a view of this infusion as well and then pull in a d1 mini into the model and we can see how it's all going to fit together now there was some time a few months ago a few months ago i started trying to do a demo in eagle of silly tricks with the with the grid and setting the grid to strange values and uh and different units to what you normally use and it was one of those things where i wanted to demonstrate something and off the top of my head i couldn't figure out a neat way to demonstrate it but there are things we need to do on this pcb now that are going to involve those very self-same silly tricks so we may get a chance to um uh to play with it so johnny said the connector is where the antenna goes uh can yes i think you're right this is why doing a 3d version of this is very useful the um the antenna sticks off the end of the pcb so we're going to have to make this whole thing longer to clear the connector for the connector to clear the the antenna so if um just while we're waiting for fusion to open it's um it hasn't got to the um the splash screen yet oh there we go we've got to the splash screen so what i'm going to do is move to the overhead camera while we're waiting for fusion come on overhead all right struggle obs is struggling because it's too busy opening fusion so looking at oops looking at the d1 mini if it's oriented like this this is the same orientation as on that eagle layout you can see the usb connector is down at this end the reset button is here and you can see that the antenna sticks up beyond this portion so the the headers end there and then there is this distance here and this i believe is what johnny is talking about so um going back to back to the computer come on switch switch that's it all right coming back to here you can see that that's the end of the header that's the back of the other connector the antenna is going to come right through here and interfere with this connector so johnny is absolutely 100 correct we do not have enough clearance there for it ah scott said all the more reason to swap it for an esp12 module yes um the reason that i'm doing this with the d1 mini is that it provides the usb and all you know that sort of thing without me having to do anything because i'm being kind of lazy about this this is not something that um going to i'm not going to be making a lot of these it's uh it's not worth optimizing the design i want to make this as simple as possible i just want it to be a carrier board with the connector for the optical interface for the multimeter d1 mini on it and the minimum other parts that we need to make it work so that it's the sort of thing that can be assembled in five minutes i want to make it easy on myself uh yes and cable tie said what did i say last week about doing a full footprint for the d1 mini yes yes i that would be useful um now let's um what am i thinking about okay one i'm really i'm wanting to get fusion up and running because then it's easier i can do hand waves all day long and not really convey what i'm talking about but if i can pull this into fusion i can show you on the screen how things fit together and we can see clearances and all of that sort of thing and problems like the clearance of the antenna become super obvious and uh scott said then turn at 90 degrees yes i think that was mentioned last week as well but i tried i don't like the idea of things coming out we're going to have the cable going to the multimeter and we're going to have usb i want it to be in line i don't want it to be at a 90 degree angle because it just becomes awkward you end up with a thing that is awkward on the bench when the two cables come in at strange directions if they're directly opposing each other and they're in line then it makes things easier uh yeah good point johnny who said using a d1 mini also saves you from 54 weeks of waiting for the cereal chip to show up in stock yes um what i wonder what my d1 mini stocks are like these minis they're my kind of go-to i hear they're my kind of go-to little uh little board for these lots of projects i've got um yeah i've got plenty it's a treasure trove i've got a how many they're probably like 40 or 50 in there so i've got a whole box full of d1 minis enough for me for now oh okay back to here switch to desktop come on you can do it switch switch yes okay uh zero stick yes that's a different thing entirely which is cool and interesting and i could talk about that but i'm not going to right now now what i was just looking for was do i have no that's right resources is where i looked last time i wonder if i can find search all data d1 mini do you want mini do i have one maybe i am sure that i've used d1 minis in things before ah d1 that's a um that's a different project anyone zig ah it'll be annoying if i don't have come on give me the cursor it'll be annoying if i don't just have a d1 mini somewhere in my library come on delete tried what is wrong with this search d1 let's just do a search for d1 oh maybe it hadn't finished what how did the number are because mini found a match it must be search in fusion must be a it must be an or on the search terms that's really really silly all right well let's go back into [Music] resources where i have a raspberry pi this is where i would have expected to find something and let's uh go to good old grab cad not grab cab where am i going to end up with that url grab cad i do not want grab cab uh grab cab is for sale oh which reminds me do any of you want to buy a domain name because i own fiber fiberoptics.com amazingly enough and i've owned it for a very very long time what am i doing let's log in why not yes sign in and you've got to sign in anyway to be able to download nothing so back to library put a few models up on grab cad once i started making um custom things to go in to go in eagle i ended up uploading quite a few connectors and different bits and pieces what am i looking for d1 mini come on there's got to be a model of a d1 mini shield where's the where's a good model we must do one mini pro that model would do um d1 mini hmm that looks like it would do as well so what have they given us oh great only solidworks and jpegs that is useless come on at least give us a step file or an i just or something where is a d1 mini oh here we go d1 mini with um with step so [Music] d1 mini step yes i want that one please downloaded done upload now this is this is getting into tedious watch john click things territory which is not particularly fun i'm sure select files come on and okay downloads downloads where is the d1 mini step file wemos step that'll do that'll do don't care that'll do and upload all right so now at least we will be able to stick a um a d1 mini into our design and we'll be able to see all the clearances and how everything fits together now i've been thinking more about the types of connectors and how to attach these two boards to each other so the orientation of does the d1 mini go on upside down or does it go on the normal way does it go underneath the other board does it go on top and once we've got this in oh complete once we've got this in fusion 360 we'll be able to visualize that a whole lot better and one thing i've been thinking about is the the idea of just having them directly soldered together it's a pretty horrible model because it doesn't have because it came in as a step file we don't have low battery oh i'm gonna have to recharge my my space mouse so it doesn't have textures or materials or anything set on it because it just came in as a step file but it'll do for all our clearances and things so what we can do now is go back into i need to open where are we super house pinned at the top super house modules and this is where we will have ut 61e wi-fi and i am absolutely sure that i have a model of a d1 mini somewhere in this big concoction of things all right so as johnny pointed out there is no clearance here for the um the d1 mini's antenna so let's um come back into here go into resources and insert this into the current design why can't i insert it into the current design is that because it's in a different project as in a different folder that would be annoying let's make a um just in case that is the problem let's make a copy of it into super house why yep brain not particularly functional today back to super house modules and we should now have d1 mini in here why am i not seeing it what oh wemos there we go okay now can we do we can't do insert in the current design i wonder if that is because it is a um this is a design that has been synced from eagle all right let's fix this i am going to do something a little and okay what i'm going to do instead is come to new design here and i'm going to stick in going the wrong way and i'm going to insert that into the current design please save this design before inserting components of course ut 61e wi-fi assembly so what i'm going to do is make an assembly which consists of multiple other things saved and i'm going to insert that into the current design and i'm going to just accept its location the zero point can be [Music] that's not a very nice zero point this is all going to move around okay i am going to just accept that zero point that's because we made it wider and i'm going to insert this as well and this is all just for the purposes of moving stuff around and seeing how it fits so we'll spin that around there take it back 90 degrees take it up a bit now i can do all of this with to do this properly what i'll do is actually link the things together with joints so they're all perfectly aligned but we don't have the right headers in there we don't have anything yet this is just shoving things around in 3d space come on computer what are you doing so that we can see where things go and then i'm going to fix it on the pcb resync and everything should be all right now while i'm waiting for my computer to figure out that i want to move that part uh what have i been missing in the chat just going to move it across here a bit it's not quite aligned but this is um this is something that is done on an imperial uh yeah with imperial dimensions and it's on a metric grid right now so there's no way that it's ever going to be in the right place but as i said this is just to give us some idea of where things are going to fit ignore those um where are we board packages ignore those for now all right i'm just going to hit okay all right so now we have the board and as johnny pointed out there's no room for the antenna because it goes through the back of that connector if it sits right there it's not going to work so le yeah this is this is one of the reasons that i do like messing around with these sorts of things in a 3d view as well not just in a pcb view and as cable tie said if we'd made a footprint for this complete object that included the mechanical dimensions then when we put it down on the pcb it would be really obvious that we can't protrude into that area with the with the connector here so um hmm yes that would have been a proper way to do it now i'm my mind is all over the place at the moment i'm not even really thinking about what i'm doing properly uh okay so let's get back into this little area here no first i do want to look at this because what i want to think about is where the parts are going to go so you can see here we've got the mosfet and a couple of resistors that are sitting on the top of this pcb and then the d1 mini is going to fit on top of it that this is actually the whole point of why i wanted to do this model what i've been thinking about is soldering the d1 mini straight onto the uh the carrier board using pin headers without using a socket so the two of them just become permanently attached and you can't take them apart again and that means that the whole thing will be thinner and it won't stick up too much because if we have where were they these things so if we have that as the height of the headers that would go on here and then let's uh let's move this move so if we now move this imagine this had pin headers underneath it those pin headers have a plastic spacer that's about 2.54 millimeters thick so what would happen is that it would sit at about this height maybe even a little bit higher so the gap between the top of that header and the bottom of this pcb would be about 2.5 millimeters so let's take this up it's probably somewhere around there it'll be in about that region so what would end up happening is that the d1 mini is going to sit up high like that it's going to be significantly higher than in fact the funny thing is that that would make it clear oh i think i might have just changed my mind about this so what i had been thinking was to make the the carrier pcb longer and to attach this directly with pin headers so that it was much lower and make the whole thing low profile but the interesting thing is that if it's up at that height now we've got clearance it can sit over this connector which means [Music] which means i can use pin headers on that and i can use socket on this or vice versa which means the d1 mini could be upside down hmm i'm i'm kind of it means that it is removable okay things have been going through my head which i have not really conveyed to you very well or at all where i was thinking of going all right i'm going to follow this through logically so that you can understand why i was saying it i'm going to get rid of these two headers and i'm going to move the d1 mini yeah chip made a comment about putting it on the bottom yes so that ties into all of this as well now imagine that we had pin headers in between and what you would do is you put the pin headers in and solder them onto the carrier board then there is a plastic spacer and then what i would probably do is get a second plastic spacer and shove it onto the pin header so you end up with a five millimeter gap instead of a 2.5 millimeter gap and then solder this directly onto it so the two pcbs become permanently attached to each other and it would end up somewhere in this region where's i don't even know what's the distance between that and that it is 5.03 millimeters hey i eyeballed it almost perfectly so basically it would end up there ignore the fact that we're intersecting the connector for now but those two pcbs would end up about five millimeters apart and or 5.08 millimeters i think technically and they would be soldered together and what that means is see these little parts under here you can't get to them anymore they are totally inaccessible and if anything goes wrong not that anything should go wrong it's just impossible to do any rework or anything like that so this comes down to what chip was talking about with why not put it on the bottom and what i had in mind was maybe conceptually reversing all of this so that these parts are on the bottom here and then this is sold directly on with the pin headers and that way if anything you can rework the parts that are on the carrier board so without having to get anything apart the um what's on this face of the pcb it'll just be blank it'll be like the bottom of the pcb so you could consider it conceptually it'd be upside down like this what it would be like is this is the top of the carrier pcb and this would have the transistor and the resistors sitting on this side of the board so you know reorient yourselves we're standing on our heads now and imagine that this is the top of the pcb the connector the um the db9 connector is on the bottom of the pcb and the d1 mini is underneath so this is actually much more like what you would think of as like an arduino and a shield on top so in this case we've got the the d1 mini underneath and then a shield on top which is the adapter board even though it looks kind of weird because we've got the connector upside down here this is conceptually much more like how you would normally think of this sort of thing it's um it's the microcontroller underneath the adapter board on top it's just that the adapter board happens to overhang and it's got a connector stuck on the bottom of it just to use up that that cavity and to stop the whole thing from being too high so um oh scott says pin header spaces are only 2.6 millimeters yeah um or 2.54 i think because they're 0.1 inch but what i would do is put two of them on so i've i've actually done this many times and it works really well what i do is i'm going to switch to overhead camera in fact i might even have to switch to the microscope i'm going to turn the microscope on in anticipation let me see if i can find so this is my little local cache of pinheads oh look at this you can see here maybe you can't see here that is a plastic strip that doesn't of a pin header strip that doesn't have any pins in it and that's because i've pulled pins out and used them for other purposes and i keep these strips so and here is an eight-way pin header here's another 8-way pin header this is what i would do let me get some microscope action happening and where are we is that even working yes it is working okay um but i need far less zoom i need more like which way which way to focus uh it's getting worse not better keep going keep going keep going okay now we've got some kind of focus sort of so this is the the plastic strip out of a pin header and i do this fairly often what i do is just cut off the bits of the pin header and then stuff it over an existing pin header like that and now we've got a double height pin header and put one on the other end just for a bit of consistency so now we've got a pin header that has uh five millimeters gap and um just one plastic strip is not generally enough if you've got two pcbs and you want to sandwich them together if you just use a thing like this and you put one pcb on each side and then just solder them that 2.5 millimeter gap is generally not enough to have components on the two boards particularly if you've got things like oh 805 capacitors or all modules or whatever so uh yeah i do this trick often when i'm trying to sandwich two pcbs together and have enough room in between so that way you can have things like the um the usb connector so if we come back to the desktop view here so right now the gap in between these two boards is five millimeters like 5.03 or whatever in this model which represents that that spacing would give us that and that gives us room for things like the usb connector and any other parts that we might want to put in there cable ties it's sandwich your pcbs with this one weird trick yeah um when you're getting pin headers from factories in china if you're getting them done in bulk you can actually get them done to custom lengths with custom numbers of plastic spaces on them in fact i'm going to find you an example because this is actually where i i didn't even know this this um this okay i've heard about this from mark who did the board design on this freetronix and i've got to think about where it is where would i have one i think i have one ah no i know where i have one i know exactly where but i have to leave the room to get it so please enjoy this intermission and intermission is over and i'm just hoping that what i'm pulling out here does yes it does check this out this is really cool i'll give myself some space first and go to overhead so this is a um an lcd shield and there are multiple clever things about this design but it needs to sit down on top of an arduino and the so you can see that the lcd is mounted from the back of the pcb it's actually coming through a cutout so it's bolted together the two pcbs are sandwiched hard against each other and the lcd sticks through a slot in the front pcb you can see that there's a green pcb for the display blue pcb for the shield but the whole point of showing you this is look at these headers these are pin headers and if i get the light at just the right angle you can see that there are four rows of plastic spacers on them and then the pins protrude past there so the actual length of those i can't remember what they are 18.8 millimeters so the pins are 80.95 whatever it's um there's solder and stuff that's messing it up but about 18.8 millimeters is the total length of the pins and then there is um [Music] well basically 10 millimeters of plastic space is on it because there are four rows of plastic spaces so with the uh the production of these shields what we do is go to the the factory that makes the pin headers and just say we want pin headers that are 18.8 millimeters long with four rows of plastic on them and we want you know 10 000 of them or a thousand of them or whatever the quantity is and they produce them like that and then that allows you to plug it into a regular uh header like an arduino header and have clearance for all of the stuff which is on the bottom of the pcb so this was actually the first time i saw this done and it was because mark very cleverly specified this i didn't even know that you could specify pin headers in arbitrary uh num amounts of stacking and lengths and things but uh he did it and that was all very cool yes yeah uh steven said um i have had a 40 pin raspberry pi pin header with spacers to make it sit 20 millimeters off the board upside down with 20 millimeter standoffs to screw into yep cool uh yeah i've since then i've seen it with um with raspberry pi headers as well and the other place that i've so after seeing that uh i then did it actually in the argus in the arjusat so arjusat is even more complicated it's stacking headers with additional spaces in order to give it um now where [Music] yes i'm going to grab one of those because these are cool also it's another intermission time now these were custom made for me in a factory in china as well to suit the rgb the um the cubesat specifications because the this is the second cubesat bus header so cubesats commonly use the pc 104 industrial computer bus specification and this is a header that suits that and the specific header that is normally that's mentioned in the cubesat specification is very expensive so i talked to a factory in china and said can you make me some custom headers and this is what they made me so it's a i can't even remember how many pins it is now it's whatever is is used in the pc104 specification they're stacking headers so the pins come all the way down and you can see that there is an extra row of plastic spacing below the body so that when this goes into a pcb the top part protrudes further than a normal stacking header would and there is enough length in the pin section here that it still protrudes down the correct amount once it's in the pcb and yeah so if you're doing things in any sort of reasonable quantity it is quite feasible to go to the factories that make things that are off the shelf things like pin headers that you would normally think uh they're all the same they're standard everybody makes them the same but if you can find the factory that makes them and say give me a pin header that is stacking and it's two by what is it two by forty or whatever it is and i want extra spaces in here and i want to specify the pin length they can do it for you or you know bizarro pin headers like that it's all possible you just have to know that it is possible so dodgy said please straighten out the pin on the left which pin is this a bit of ocd kicking in um which pin is that the pin on the left ah you're right that one right there maybe i should leave this on the screen just just like this just to drive dodgy a little bit bonkers but no i won't do that i understand that frustration i feel that myself i know what you mean so i'm going to fix that so a bit of precision pin alignment here the one next to it has been slightly bent as well so we'll adjust all of those get them into a nice precise rows hopefully that makes everything feel calmer and the the rage is subsiding uh okay um so johnny says cdo yes where the letters are in order as god intended so station 240 says any tips finding out who the original supplier is um the original supplier of what i don't know what that what that's referring to original supplier of the cubesat headers um yeah don't know okay so here we are back here we're at 11 30. we don't have much time to finish this at least we can make some decisions i think we can we got half an hour i think we can kind of sort out what we want to do with this in the meantime all right so ah now so the decision is now back to what um longflair was saying earlier with putting the d1 mini underneath yeah so conceptually it could be underneath like this and in that situation what i would actually do is flip the um i would flip the d1 mini 180 degrees so that it is in the correct orientation so the normal orientation for d1 mini is with the uh the reset button on the left so like that if we were looking at this equivalent to an arduino it would be kind of like that well normally an arduino has no it this is the usual orientation if you look at pin out diagrams of a d1 mini this is how they show it with the reset button in the bottom left so this would be considered to be the top and then other things plug in on top of this and if we go back to our model you can see that we actually have this backwards at the moment because i just spun this to talk about this conceptually that is the way that it should be now how to fix this all right i think that i'm coming around to the idea of oh no but i'm totally thrown now okay so this is the um the tangent that i was going on was this what i'm showing you now is what was in my head for um for how this would all fit together and but with the um moving it out a little bit making a little bit longer so that this would clear so i would double stack the plastic on the pin headers solder it directly on and then we would end up with this nice little low profile thing and i would move it along but now the idea of making it thicker and overlapping it has kind of thrown me and i like that idea a little bit more it's going to end up thicker but shorter so [Music] if we come back to it being oriented like this however it is still what i would consider upside down because the connections under the uh under the um the d1 mini so i think no matter what whether this goes on connected with pin headers with narrow spacing or connected with headers and overlapping with the um the db9 connector in either case i think we're going to have to mirror the whole thing so i think that is our starting point that's the next step that we need to do um uh jax tech said flip the db9 and other components saves fixing the silk screen yes uh however hmm thinking about that yeah i i kind of considered that as well um but the problem is that from eagle's point of view that means that the parts will be on the bottom layer now part of this is me kind of being pedantic and what it would mean is that of course i'm going to be hand assembling a couple of these so it doesn't matter but i'm thinking about this from the point of view of if this was a more complicated project and we wanted to run this real pick and place machine we wanted to assemble a few of them ideally what we want is for the parts to be only on the top side and none on the bottom side now yes it makes no as long as you've got ammonia on one side it makes no difference you can say just assemble the bottom but it is an extra complication it is something where things could go wrong potentially and the convention with single-sided boards is that the parts go on layer one so i don't want to put the parts on the bottom layer and have no parts on the top layer even though mechanically and electrically it would be 100 correct so jax i do agree with what you're saying i i know what you're getting at there but i'm going instead okay let's uh let's do a one weird trick thing and do some messing around with grids and stuff inside eagle now the reason which one do i want i want i think i want the sockets on i want the socket to be on the d1 mini and i want pin headers on the carrier board so things are a little bit different anyway so let's um have a look at this what have we got here we have this one is my 1x8 header with uh i can't remember it's it's the one with the um the socket on the top of the pcb and what i want is pins on the bottom of the pcb but i also want to mirror everything all right just logically thinking through this i think there are a couple of steps to this the first step is to put the parts that i actually want on there then i'm going to mirror the geometry of the pcb and that's going to involve a little bit of messing around with the grid which is cool because it lets me demonstrate that little uh one weird trick thing so i'm going to add a part and we're going to add some pin headers instead of to replace the other headers now normally i would do this by just doing a part replacement not by adding a part and then deleting the original part because we're doing a one-for-one swap it's an 8-pin header being replaced with an 8-pin header you should be able to just go part replace and have it match all the pins up and everything work but there is a problem with that in this specific case and i'm going to show you why in just a moment now what am i looking for super house connectors and i want an 8 an m08 and i want it with pins i want the reason i've got multiple things here is that i've got so a 1x8 header i've got it as a version with pins that stick up above the pcb there's a version with pins below the pcb there's a plain one with nothing in it there's a one with a socket like that you can see there on the screen there is one with a stacking header and electrically they're identical the pads are identical the only difference is that i've got multiple parts in eagle for this so that i can match all these different 3d models to it and that just helps with the visualization when you pull it into fusion so i want the 1x8 pins below the pcb and if i stick that on there and i'm going to stick another one over there and i want to have i'm going to make it match that in fact what i should do is delete that and that so i don't confuse myself and i'm going to put that one let's just put it here for now mirror it so it's got the correct alignment okay so what we have is the header that is here so this is the existing one by header which is just the plain one and i want to replace it with this pin header which is going to have direct so pin 1 is going to be reset pin 2 is going to be a0 etc it's going to be exactly the same but i want to now the reason that i couldn't just do a part replacement is if you look at this one you'll see that the anchor is around pin four right there and the anchor on this one is behind pin one now this is partly oh and in fact there's a corresponding thing if we go into the physical model here and move stuff around i don't know which one's which but it doesn't really matter for now we'll look at that in just a second now this one on the right and it's locked let's unlock it this one on the right is the header that is on this existing design and you can see that the origin the anchor is right in the center of pin one now if you look at this new one the one on the left is the new one that i've just added this is the one with the model of the pin headers below and you can see that the origin is right in the center it's between pins four and five in fact that needs to be spun 180 to make pins one and one match up i don't even know if this is the right one we'll figure that out in a moment now this is because of a change that i made so this board that we cl we copied here this was done in 2017 and since then i have made major changes to the way that i do my parts in eagle and i've i've changed the point of origin to always be the mechanical center of the part and rather than pin one so a lot of models you will see have the point of origin as being pin one and what i found when doing pick and place is that with pin headers i don't pick and place them anyway i always just alter them in but this is just the general concept is what i'm explaining what you care about from a pick and place perspective is the center of mass of the part or to be more pedantic about it the center of a flat surface on which you can get a vacuum suction so if your pick and place head is grabbing the part to take it out of the tape or out of whatever the feeder is and put it down on your pcb you care about having a part on that so for example if you have well say you were picking placing a this is a this is actually a good example let's have a look at this d1 mini this d1 mini has an esp-12 module on it which has a big metal can now if you were picking placing this esp12 module to put it onto this pcb you need to be able to pick it up from somewhere and it's got this metal can which is going to be the obvious place to do it but it's not in the center of the object it's slightly offset so the optimal place to pick this up is going to depend on the size of the nozzle which in the case of a big module like this is going to be a large nozzle on the pick and place machine you can't have that nozzle overlap the edge of the metal pen or you're not going to get a vacuum seal the entire diameter of the nozzle has to be placed over a flat surface so you have to keep in consideration what size nozzle is the pick and place machine going to be running where do i need to make my pickup point so that that doesn't overlap any non-flat surfaces and you want it to be as close to the center of mass as possible so that as the pick and place machine picks it up and moves it around if it rotates it you don't get the effect where the parts slide sideways because its centre of mass is not aligned with the centre of rotation of the nozzle anyway this is squirrel chasing but that's what we do here so anyway all of this the reasoning behind this and needing to be able to pick parts up reliably in a pick and place machine is is why i've been rethinking how i designate the center point or the origin point of all of the parts in my library so i like consistency because i have cod or whatever um uh because i have cdo what i like to do is have simple rules for myself so that if something is done in a certain way then it is done that same way everywhere and i don't want to be thinking about oh do i do it from pin one in this particular situation or do i do it from the center of mass or do i in my in the case of the schematic do i have the pickup point always on pin one or do i have it near the center so the way i used to have things set up was that the point of origin for things in the schematic was in the center or close to the center which means that if you pick it up and you spin it it stays in the same place essentially like um or close to the same place it just rotates on the spot because the center of rotation is the origin point which is in the middle and in fact a good example of that is right over here look at this connector we've got this here this the origin is dead center and if i if i just select that and then if i just right click it's just going to spin on the spot you can see that the cursor isn't moving it's it's just moving around that center point and i can just put it down again with this one i've got the origin behind pin one and if i spin that so i'm just going to leave that still and right click to make it spin you can see that that it's going around and it's going up above and then to the left and then to below and then to the right so it's center it's spinning on that point behind pin one and anyway what i used to do and the problem is look how hard it is to find the origin on this part it's obscured by the um by the other parts of that part so anyway what i ended up doing was i decided to settle on um on making the origin of my schematic parts adjacent to pin one so that i could find it basically so every um well in the case of a transistor it's in like something like this is different that's in the center oops you can't quite see it right there the origin is in the dead center of the transistor the origin is in the center of the resistor so i don't have it pin one in that case but what i decided to do was for my connectors at least i would make the origin of the schematic symbol adjacent to pin one so that i could always find it the other reason for doing that is imagine i wanted to do a part swap now this is actually something that that happens quite frequently if say i've got a an eight pin header here in fact i'm going to duplicate i'm just going to duplicate this one because it's going to make it super obvious what's going on and you've got maybe you've got some nets coming off it so you've got nets connected to pins one to eight and now you realize hang on i want to change that to be a 10 pin connector so i'm going to go down to replace and i'm going to select a 10 pin connector and it's going to be the 10 pin uh version with pins below so it's the same as what i've got there except that now it's 10 pins if all i have to do is click on the origin and boom now i've got a 10 pin version pin one hasn't moved pin two hasn't moved so pins one to eight are still in the same position they can still be connected to the same nets you don't get that weird skew thing where you've moved apart and all of your nets are messed up it's just added two pins on the end and i find that this is a really neat way to work with stuff in schematics so having everything in schematics anchored to pin one as being the point of origin i find really really useful but in [Music] in fact but here so this is the um let's move that but this is the um the 10-pin thing that we've just created but for the parts that go on the pcb i make the origin the center of mass ah anyway i've probably lost your aux i've just been talking about a totally irrelevant thing for way too long okay now what were we doing back to here okay let's have a look at the schematic get rid of this i want to get them the basic mechanical sorted we've got 15 minutes i want to get the basic mechanical sorted anyway all right so this is where the little grid thing comes in what i want to do is take this pin header and replace it with this pin header and you know why is that grid what's going on with this grid thing here is this off-grid it is that's nasty look at this it's a 1.35 i'm going to make that 1.3 that i don't know how it ended up there it really shouldn't have because things should on the grid on the schematic should always end up on a 0.1 grid so yeah that must have been copied from something somewhere ages ago so i want to replace this part with this part so pin one connects to pin one pin two connects to pin two etc that's easy to do in the schematic but now if we come across to here in fact uh i just want to highlight it so i know whether i'm looking at the right one okay highlight that part come on there okay it is the right one so yeah so pin one is going to become reset and you can see reset is here but i want to put it into the exact same position as this one because i need the the pins to align with the d1 mini so how to achieve that well what we've got here is a position of it's a strange position it'll be a it's um it's a metric multiple no metric it's an imperial value so 1.27 millimeters is .05 of an inch converted to metric and i want to make the position of this one exactly match the position of this one and this is where funky grids come in so let's do this i'm going to set the origin of y so the y value here is 26.67 millimeters i'm going to set the origin of this one to exactly the same 26.67 millimeters so now you can see that we've got the two connectors that are offset and we've got the original one here with its origin on pin one and we've got the other one with its origin in the center and it needs to be offset so that it goes into the correct place here the correct vertical alignment to match the other one now this is where um [Music] this is where you could just do a bit of quick maths and type the value in and solve the problem this is not the best example because we do still have to do math because of this offset but all right pull out the trusty calculator most the thing is that most of the time this actually avoids you having to use a calculator but in this case we don't what i want to do is figure out how much distance there is between the offset the vertical offset of where it is now versus where it should be and um oh in fact i can do this no i can do this without the calculator all right now we are on a metric grid and i want to move it down so that it is aligned but we need to move it by a certain number of half multiples of the spacing of this connector so this connector is a 0.1 inch header so 2.54 millimeters forget millimeters for now we're going to go into like shekels and barrels and furlongs furlough yeah furlongs and stuff for a little while and talk about imperial measurements so we want to move it down to make it a line exactly normally you would have to mess around with conversions and calculations and things here this is the trick all you do is go into grid change it to inch i'm going to change it to 0.05 of an inch because that is half of the space between these these pins so that now is on a 0.05 inch offset from the center of a pad and that is on the center of a pad which means if i now simply grab this and drag it i can drag it down there boom it is now perfectly 100 aligned in the y-axis with the other connector no calculator required didn't even have to think about it just did it so now uh what i can do is go back to my normal millimeter i'll go back to a one millimeter grid and we've got our offset fixed so now what we can do to make it align vertically because we want to basically just sit at one on top of the other the y has to be offset by that amount but the x has to be the same so what i can do is just take okay we've got 1.27 millimeters there i'm going to click on this one make that one 1.27 millimeters and boom we now have two connectors that are perfectly corresponding even though we are on a metric grid and those connectors have their origins offset by an imperial distance compared to the um the relevant relative to the spacing between the pins my words were horrible then my explanation made no sense all right let's just um do the same thing over here so i'm going to spin this one around and i am going to give it the same origin point so it is oh this one's locked let's oops and up i clicked the wrong thing pog locked 26.67 so i want to set the origin of this one at 26.67 and then i'm going to go over here to my grid go to go to 19th century units and i can now just drag this down we have perfect alignment and then i can switch my grid back to sanity and i can find out what my x offset is here it is 24.13 and i can come in here and go 24.13 boom we have perfectly aligned parts so anyway my point with that is to was to say that you can by manipulating the grid and changing between different units you can avoid a whole lot of calculations you can avoid a whole lot of those multiply by 0.254 you know things and save getting the calculator out when you're wanting to take imperial spaced parts and align them perfectly using onto metric grid and vice versa so there is a variation on that trick that we will use in just a moment which is one thing i really like to do is set the grid to an unusual size which is the exact offset that i want to move something we will see that in just a moment but first let's fix this in the schematic what i'm going to do is come in here and just go delete and then i'm going to grab this other connector move it so that it's in the same place now it's connected to those same nets then come over this side and i want to delete where is the origin there it is see this is exactly my problem finding the origin so grab that take this part snap it into place so now we've replaced those two parts with the um the models that have the pins underneath and if we come through here so let's um let's save that go back to fusion 360 i'm going to close [Music] this project because i don't want it to block me doing any updates and come back to eagle push diffusion and now we should have pin headers underneath push which are going to be on the wrong side of the pcb and then we're going to have to do a mirror thing which is where that that little grid manipulation trick daniel says you could also just lay out the board in inches no um yeah so let's measure these things in whitworth what's what is whitworth as a unit of measure i have a bunch of whitworth hardware in the workshop what is whitworth i haven't heard of that pass because i had the board in parsecs per second we would be yeah i'm trying to think about what that unit would be um because a parsec is an incredibly big unit the second is very small we'd be dealing with lots of decimal points well with with a lot of offsets from the decimal all right so that's pushed to vision 360. so let's just refresh and we will see what changes in our design now i'm going to do a it says a component is out of date so i just click that to update it it's going to pull in the updated version of the component so we'll now have the board and as you can see it has the pins underneath which is what i was kind of getting towards so now what we can do is move the um yeah so now we can move the d1 mini down and we can invert the connector here and everything should align nicely so if i go to d1 mini i want to select that and move it and i'm going to drag it down straight down so i'm going to bring it down here now once that d1 mini has um has sockets mounted on it it's going to be it's going to fit somewhere around about here-ish anyway that can all be fixed later um that'll do for now and then once this connector is inverted it should fit into this space here and everything should be hunky-dory all right now okay what i'm going to do is fix the offset all right here we go because now you probably remember from last week this project that i copied it from was the width of the d1 mini it came to about here and here and i had to make the pcb wider to accommodate this db9 connector now i've been seeing people talking about connect about screw holes and things in here and um yes we should probably fit some screw holes in somewhere so that we can make a little 3d printed enclosure that clam shells around it and screws closed so there's going to need to be room for screws maybe notches out of the side would be helpful uh or a hole in here i'm not quite sure we'll have to think about that but we can get the basic layout done now anyway right so this is the thing now because i drag the sides out wider if we look at the um the origin look at this the origin is here and that is the width of what this used to be and then we dragged it out wider now this is currently at mine it'll be minus three millimeters i think yes it's minus three millimeters so this is going to be a kind of silly demonstration of what i'm talking about but this is just to to illustrate what i mean about setting the grid to something unusual to suit what you need now if this had been from in in many cases this value isn't as nice now here we need to move this whole project to the right by three millimeters because i want to put the origin to be right there where my crosshairs are i want x and y to be zero on those edges [Music] just because so the positions of all of the parts are set relative to the point of origin and i want the x and y values to be correct from that zero point once again it's just like a it's a pick and place thing i want the coordinates of the parts there shouldn't be any parts with negative coordinates and things that's annoying so what i do in this case is i go into the grid and i'm going to set the grid to three millimeters and that's because i want to move it to the right by three millimeters so if i in fact let's just make sure i've got all the layers turned on uh b place and t place there oops they're the critical ones i've got all the origins turned on other stuff tea finish for glue keep it out let's um turn everything turn all those on because we want to move them all together and now i can select that and go to move group and now when i move this it is going to move exact multiples of three millimeters so that is where it was before i move it one oops i'll move it one grid element to the right and boom it snaps into place and now it is perfectly on the origin and so that would have been trivial easy trivially easy to do i didn't need to change the grid to do that i changed it to three millimeters instead of one millimeter i could have just grabbed it dragged it across three millimeters put it down and we would have been done but what i was trying to illustrate was that sometimes you end up with a situation where you need to move something by a certain amount or you need to move a group of things this is where it's really useful if you've got a whole group of stuff you want to select it together and move it by some unusual amount which might be an imperial measurement converted to metric or whatever what you can do is just change your grid to be the exact amount that you want to move it in whatever units you want to move it select it all drag it it snaps into place and then just set your grid back again and everything will be spot on so yeah maybe something useful it might help you in the future uh yeah i it was one of those things where i got over the idea of like i used to set the grid in the early days and i used to do all of my designs in in imperial of course because that's just the way it was done and so the usual thing was that my grid was typically i would often work in in a multiple or a fraction of 0.1 of an inch because that's what everything comes in and so i would start the basic board design i would put my grid into 0.1 inch and draw the outlines and everything was a multiple of a 0.1 of an inch and then i kind of wouldn't change things and over recent years i've become much more flexible with using the grid and customizing it so i'm often changing either changing the units changing the grid size to unusual amounts which might be a specific offset of something and then moving things around and then changing the grid back again so yeah you don't have to stick with one with one grid size or even with one set of units you can change units all backwards and forwards as you go through the project and it really helps you get things in the right place so now we have the offset here from that edge and um now daniel says 0.1 inch header rolls off the tongue much better than 2.54 millimeter header it does and i still i call them 0.1 inch headers because uh kind of that is what they are they were designed as 0.1 inch even though manufacturing is has pretty much entirely moved to metric the um originally it was designed as a 0.1 inch now what to do next we're past 12 o'clock now all right let's press on for just a fraction i am going to mirror this connector so that's now mirrored and let's push this diffusion again i at least want to get this to the point where it's the basic shape is there and even i could spend ages messing around with optimizing silk screen and doing all those sorts of things i spend so much time doing that it's always the um yeah what's that saying um 80 percent of the job takes 80 percent of the time and then the other two the remaining 20 of the job takes the other 80 at the time it's the uh the last little bits messing around with silk screen and getting all the labels in the right place things that i can just sit here and fiddle with that for hours takes ages so [Music] come on you can do it um chris says decimal on imperial pick a lane no i don't want to pick a lane actually i have picked a lane and the line is uh metric but um oh i say decimal and imperial it's because imperial is often you know like sixteenths of an inch and things like um what yeah sorry chris i get it now i think i misunderstood your your comment at first all right so now we let's um refresh the components on here so what we should now have is the connector mirrored on the bottom of the pcb the um the offset is going to be wrong as well because our origin has now changed which means that our d1 mini is no longer aligned with the parts oh hang on i mirrored the wrong connector you know what there are actually two connectors on there if i go back to eagle look at this this is because i was messing around last week and i put two connectors in the same place and one is on the top of the board and one is on the bottom of the board so which one is which hang on i'm going to i'm going to hide b origin so that i cannot see the connector that i've already mirrored and then i'm going to mirror the connector that i haven't married there oh hang on what i'm making things hard for myself here because i've got mirror i think that's it all right we should be right now so i'm going to push that to fusion again yeah i'm making this hard for myself because i was trying to take a shortcut last week and i didn't have a 3d model of this specific db9 connector that we want so i use the opposite gender and i've got two footprints sitting physically in the same place on the pcb just to make the model look approximately right so that is something that i really need to fix because it's dodgy having two footprints in the same place and it's going to look stupid in the uh the schematic but what that means is when i mirrored it i married the footprint that didn't have a model and i didn't mirror the footprint that does have a model [Music] peter says what's for lunch john peter is the lunch police you peter for reminding me that i need to eat and it's probably because you need to eat so you're um you're saying john go and eat get off the live stream uh update update come on there we go so now we have the um see we've got parts on the top of the pcb we've got the connector on the bottom of the pcb and we've got the d1 mini sitting underneath it so the d1 mini is sitting oriented the way that it should oh except that the offset is wrong okay let's um let's select that d1 mini and move it and we wanted to move it we can actually move this an exact amount we want to move it by three millimeters which does not look right no it's not quite aligned anyway i'm not too concerned about that at the moment the idea is just to check now one thing i am a little worried about is clearance right here because what i need to do is pull in the model for the headers i have a feeling that this is not going to clear the distance in fact let's measure this this will be about the last thing we do before i go and get some lunch so that peter can also go and get some lunch i'm going to get the distance between that face come on zoom in between that face of the header and the pcb right here what is that distance it is 10.3 millimeters that is not the height of a typical stacking header or a like a pinhead body so if i grab my little header container i think it's normally about 8 or point eight millimeters if i put uh okay if that header is what goes on to the d1 mini and that is what is going to be plugged into the so the shield is going to be sitting on top of it what we care about is that distance there 8.4 millimeters so at the moment in the model it is 10.3 jumping back to here it is 10.3 you can see it the little dimension is over here 10.33 millimeters which means i need to raise that by let's see 8.5 no 10.33 minus 8.4 equals 1.93 so let's do this that and move i want to move it up by 1.93 millimeters and i think we're going to have a collision and we do look at that we have a collision hmm all right what this means is that i'm kind of inclined to go back to extending the pcb so that this fits in behind the connector i'm disappointed because i wanted yeah i thought it would be really nice and in fact the only reason that it doesn't clear is because the d1 mini is up this way and the module has this now the thing is that there are other models of d1 mini as well that don't have this esp-12 module on it but the thing is that some of them have antennas on there like some of them like the the d1 mini pro has a chip antenna which i think sits right in that location which is physically thick as well so that would also have a clearance problem so to be on the safe side where we don't really know how i'm i'm spending way too much time messing around with this i think to be on the safe side i'm going to make the pcb longer i'm going to drag this end up move the connector along so that the back of the connector clears the end of the d1 mini and that way it doesn't matter you can either solder it directly on with pin headers with double stacked plastic or you can use a socket and a pin header and you can have different versions of d1 mini you could even have like a one of the mini kit 32s which is the version of the d1 mini with an esp32 on it which is a bit wider and it would still fit so i think that what we're going to do is leave it here for today um station 240 says scott miller says flip it um [Music] i think we would still have issues because there are still versions of the d1 mini that have parts down in this area that if we flipped it it would then protrude into here so i don't think flipping it is going to solve the problem [Music] yeah the cable tie says for the sake of a few millimeters extend the pcb yes this is the thing is that i could spend ages trying to optimize this and it doesn't matter like who cares if the pcb is a few millimeters longer it's all it's all fine i wonder how much we do have to move it by all right i said earlier that that was the last thing i was going to do but um let's move it by three millimeters and i'm going to turn on the origins again and i've got to do a rip up to get rid of that let's um let's select all of this go for a move uh where are we move group yes so it was there and i want to go three millimeters that way boom and push that diffusion push push push all right ah oh okay johnny said i won but i don't know what that's in relation to i'm i've missed so much in this chat uh peter is still saying lunch time all right okay i'm not gonna do any more on this i'm just gonna see how this looks in fusion now and then i'm going to have lunch and you should too if you're in my time zone pushed thank you back to eagle uh update components and now we hopefully will have the connector far enough ahead that it will clear the back oh i didn't quite move it enough i need to move it another millimeter i was just eyeballing that dimension anyway i'm going to stop now because i could keep doing what just one more thing and we would be here till mid afternoon yes uh oh jacksec said lunch just got delivered in quarantine it's definitely lunch time and danielle said it's always just one more thing yes cool so i'm going to stop i'm gonna keep fiddling with this forever anyway i hope you had fun thank you for um for the distraction and hanging out with me on a sunday morning it's now sunday afternoon i'm going to put a few things away here i'll clean up later i'm going to go and eat first i need to so i will see you all later and i will try to be in discord a little bit more i recently oh just that thing um because i've been absent from discord i haven't seen all of the activity that's been going on with the light switch controller firmware and last night i jumped on and had a quick chat to ben and he told me about the usm alternative firmware so i pulled that down and i've loaded that on my light switch controller which is the one with the fancy so the um that's the firmware with the fancy stuff in it for the oled and everything and the embedded library i have not got the oled working properly with that but the other parts of it seem to work like it's um it's reporting button events and all that sort of thing so that's cool so thank you very much to all the people that have been working on the firmware for that project in the last few weeks it's uh yeah there's been really cool development on that and i like it i like it a lot and i'm going to be experimenting with it and i've pulled those changes into my own copy of the repo and i think the osm firmware is probably going to be the one that i will play with in future so i will see you all on discord hopefully and uh maybe soon back on video so thank you goodbye have a great weekend bye change change you
Info
Channel: SuperHouseTV
Views: 3,266
Rating: undefined out of 5
Keywords:
Id: 3Tl9yumy_Qc
Channel Id: undefined
Length: 139min 26sec (8366 seconds)
Published: Sat May 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.