#154 ESP8266 Wemos D1 Mini HOME 🏠 ALONE monitoring project

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and welcome back now today we're going to be talking about this little collection of modules here collectively known as the home alone project otherwise perhaps known as a vulnerable person monitor because my mum asked me to make this would you believe and she knows nothing about technology but here we are and during the course of creating all this I designed or created at least that PCB at the back there and this one and this one is in fact a four layer PCB indeed don't get too excited though it's about as simple as a four layer PCB can be and still be called that hmm first things first then home alone project what's it all about well a number of you have written to me in the comments because I've mentioned it on and off we've had a few videos about various aspects of it over the last few weeks really in months and I've sort of hint is of what it might be but we've never actually gone into any great depth mainly because it's just a big project and even though you might think well there's only a few components on there what could be so difficult about it well let's start the beginning then shall we so it's firing up even as we speak connecting to Wi-Fi when it does that it goes to the network Time Protocol servers and grabs the time and then it says ok everything's fine I'm monitoring according all the parameters on that SD card in there so for example I'm uploading to the cloud every 15 minutes or thereabouts and the 15 minutes is a parameter that's on that SD card as is the things speak URL the things speak channel name has stuff like that now if you've never heard of things speak you really ought to get into this because it's IOT at its very simplest and it's free free and easy to do for beginners now we've talked about it a little bit for in previous videos but this time we'll just have a see what exactly I'm doing with that data and how it's helping my mum over in Germany hundreds of miles from where I live okay more about all this and a very special offer from Jo CPCB after this I want to have a big shout out from my sponsor of this video JL CPCB custom PCBs made simple now I've just ordered some PCBs and they've arrived a couple of days ago it took about three four days for them to arrive I chose the DHL shipping option because it was nice and quick let's then look on the order page see what it looks like so here we are these are all my orders and there's the order that we're looking at here this one here this is the PCB that arrived just the other day brilliant excellent quality nothing I can say about it except good things and we'll be looking at this in a future video as I build up a little circuit so remember it's two dollars for five pieces five dollars for ten quick shipping but there are many options you can choose from quality second to none why don't you try them out now now the special offer from jlc PCB is if you send me your user name that is the one you've registered with with jl CPC b.com i'll forward those on to my sponsor and you'll get five dollars off your first order now prices on jlc are two dollars for five boards five dollars for ten boards but each of those is plus shipping so you can't have to lots of five I think you can get better deal all right and the shipping is is the bit that costs the money as you can imagine from China I use DHL most of the time and that costs around about twenty dollars and there's various other options you have to go onto the website to have a look I've just shown you and make your own mind up per se send me your user name and you'll get five dollars off your order right now I'd like to talked about the four layer PCB but we'll leave that for a little bit towards the end of the video because this video is really about the home alone project and what it's all about now there's a formal description I've put together so if you're into formal descriptions about how old all hangs together on what each of these little modules plug-in modules do as you can see they will plug in look I've got little things on them that's coming up next but if you want to skip that go to the time on the screen now and we'll catch up with a bit more generic information right here's a very quick overview then of that what the home alone system that I'm building for my mum really consists of and as it says there's an esp8266 solution fine what does that mean well the we must do one mini is at the heart of the system the d1 mini as its name implies is small lots and lots of different types of shields if you come if they're not ones available there's a bar you can make your own that's pretty good but that's not the only reason that I chose this number one not chose this because it's got Wi-Fi built in without that I couldn't upload stuff to the things speak IOT repository so that was a no-no so I had to have something with that otherwise we will be done on an Arduino quite frankly secondly I needed a fast processor because it's quite a bit of stuff it's doing 80 megahertz the esp8266 camera at 160 but I don't know if that's supportive it's just a hack many won't keep in mind 80 megahertz so now many many times faster than the Arduino on my head and it's got quite a few GPIO pins available unfortunately rather fewer than I thought perhaps it would have but there's still quite a few and I've managed to use them all up now so I hope I don't need any more for that and finally it uses the standard Arduino code an IDE now as it uses a standard Arduino code an IDE means that millions of millions of people can use the esp8266 pretty much as though it were an Arduino Uno or nano whatever and it's a no-brainer quite frankly so yeah let's let's stick with that and see how far we go now apart from those those main reasons there what other things do I need around this supporting infrastructure if you'd like to make this work well the because this is movement base the first thing I'm gonna need is a PIR now the PIR small as you'll see in the actual technical stuff in a minute and it delivers a pulse whenever there's movement the pulse goes high for about about 2 or 3 seconds and then goes low so if you wave your hand in rather so it won't detect you know 10 movements is 1 until you stop and there's been no movement as I say 2 to 3 seconds and then the pulse goes low again which is great exactly what I want now we do need a delayed start up though precisely because of that the pin to which the PIR is connected on the we mas has to be low in order for the we must to boot well when I designed all this are just beginning pins at random really so having picked the wrong pin almost they just weren't that many duties or I can tell you but the one I picked if that went high wouldn't boot so I've had a delayed start only about a second to second one and our second something like that just to make sure the PIR doesn't work immediately upon switch on to give the we lost time to just spring into life and then it's away and then it doesn't matter so a little tiny delay startup now that was easy enough all that required was a capacitor a resistor and a transistor and it was all be shown what else do we need well we need that SSD 1306 OLED screen that's very nice and it's been an absolute lifesaver for this and it comes on a little tiny shield that you just plug in or by itself you can see details of a very similar one in video one for one the touchpad we covered in the video one for three absolutely Gold Miner is it's so easy and it's the capacitive one and it's self adjusting so that you can put things between it and you and sensor panels and all that and it just it just works basically you really have to watch that video now we need an exit movement before we don't need the movement beeper out that is to say when the PIR delivers it's a little pulse cause it's firm movement what I've done is optionally have the beeper go just beep just it's fairly quiet and it's very short and it's good fitted bugging whether or not it stays on in real life or what it just drives mama mad I don't know we're gonna have to find that help but the exit beeping we definitely need so that as she leaves the apartment she touches something a little round disc and you'll get 30 seconds of whatever to leave and whilst that's going it just won't accepts anymore PIR movements or anything else in fact the net after the exit has happened and it's gone quiet the PIR serves to deactivate it again should there be any movements that's all very nice resetting we need an early flasher because the one on the we must board is now covered by other shields you can't see it so there's a bit of a shame I won't be nice about user led so I'll just brought it out on the same pins use the same pins and everything but just got a separate led for that you'll see that working as well power in now if you use the USB input as I said before sometimes it just won't start up because it needs quite a quite a surge of current initially to connect to your Wi-Fi and things like that and I found that certainly on my machine the u.s. beetus isn't powerful enough it needs to be a powered hub or something like that I don't think so I'll know we'll have a little power in it shield for that which you can buy in this wonderfully well and you need an SD card for premises now the SD card for appearances for things like SSID and password and things like that as a no-brainer but also this thing like beeper exit delay how many seconds do you need or rather does my mum need from the time pressing it to get into the front door and shutting it well I don't know I've just I've just guessed it sort of 30 seconds aren't know I don't know quick she would she's not that quick things might not be enough it might be you know 40 seconds is a much more sensible or 50 seconds so that's on an SD card as a parameter that we can just tweak in text it's just a standard text file we can edit it and it will immediately reboot it and it'll immediately pick it up but there are loads and loads and loads of parameters on there it's probably a good dozen on there now things do you think hmm I nobody want to hard-code that value what else can I do things like the things speak Channel and the things speak field number that you're using and things like that you know it's um all those things you just don't want a hard code the object is never to have to recompile the program unless you're changing the function oh I see the program okay now that's that's pretty much it apart from one little thing which I'm already I'm thinking about ahead really thinking about the layout of mums apartment and all that and I think yeah what we might need and I'm hoping not but we might need a remote sensor because we're the sensor that we MOS sensor is gonna be the PIR might not be enough to cover all bases I don't mean it's gonna cover the entire apartment it was never designed to do that it counts you know movement over a period which is also on that SD card by the way you know how many minutes in a period are we gonna allocate in which we count individual movements and then determine you know it's fine you know if there was ten movements or four or twenty-eight whatever that's all in the SD card but if it doesn't cover it because she's aren't I've been in the kitchen for a you know an hour or two making cakes or I wish she does even at 91 I think well maybe we do need this remote sensor or two or three I don't know but I'm already thinking ahead and I'm thinking NRF 24 l0 1 / which I covered in a video previously its simplicity itself to implement but I haven't got time to do it this time around but I might have to do that when I go back later this year so that's it now I'm hoping we don't need that remote sense so I hope it just works the way is without that but mm-hmm we'll see I'll let you know when I come back so there we are that's a general overview of what it looks like ah you're back right now things speak then what does it look like well if we have a look at the browser here we are this is my live things speak Channel and this bit over here is data that's actually being collective collected as we speak from my mum's flat so uh I upload every 15 minutes which is what each one of these little red dots is um the value it's uploading is how many activity events did I record in the last you know 15 minutes and you say it's three five - there's a zero one so it's pretty low stuff although this morning like she was much more active 25 25 and I've got this set to a certain number of hours if you can do it for days weeks and months now that is fine and it's useful but not as useful as the app that I have on my phone so surely you have a look at what's the data looked like on my phone which is a free app from Google Play I didn't have to write it I thought I would I don't so let's go and have a look at that now right so this is the app in the center of my screen here's a widget effectively that sits in the middle here I'll put the details of where I got the widget from free from Google Play I've got it set up so it displays their activity in the middle which I think it does automatically but see that little graph symbol down there that will switch to that same graph that we just saw on the web so if I touch that Your Honor that's charting what a custom chart I've got down here which I've got for things like eight hours or there abouts so there's the bit where she went out this is activity which is obviously doing quite a lot of activity and this bit down here where it's all zeros that was overnight okay so it still monitors but obviously because there's a quiet period that I've got as a parameter this entire module to say between eleven and seven don't notify anybody about anything because it's sleep time so yes it still monitors on things speak every 15 minutes and then there's shove as you woke up now this also displays a little little data points a bit difficult to do in the phone with my touch one there that one up there activity twenty five that's obviously capped down here so this morning she was up and about four really at 6:28 pretty good thing so as you can see this is a really good way of monitoring activity to make sure everybody's okay but it's not intrusive I don't know what she's doing I've no idea all I know is that she's moving in that area of the flat the apartment and everything's alright if this afternoon this were to go or any time this supposed to go to zero and stay there longer than 90 minutes so that module would say right I'm going to detect now whether there's been sufficient movement over the last 90 minutes and it would add up all these points to that make up the last 90 minutes ago but there's been four movements and you've said a minimum of five so I'm going to send you an email to say check it well checking it is three seconds work and say just look on here and this is always with me so that you're welcome check the activity anytime I like now it's not just me that's got this there's that people over in Germany family brothers people like that who also monitoring it and I think it's an excellent way to go right some more information about the actual hardware on here then as I say these are all we must do mini modules and they will plug into each other you can get loads from places like banggood that's what I bought mine because it's quick and they were cheap let's have a look on the browser see well there is so what I did is in the search box I just typed in we must e1 mini and as you can see lots of stuff came up the bits I'm using are the tripleb ace well we'll come onto that again in a minute so that allows you to plug three things in the base there look and you get a selection of headers and sockets and whatnot so you can decide whether you want things to plug into that unit you want to plug that thing into other units or both okay what else there's oh you can get five of them obviously a lot cheaper if you buy five I probably bought that many because I was playing about quite a bit there's modules that easily do things like the SD card I bought three of those that takes that tiny little mini SD card it's great for a parameters and stuff why didn't I use EEPROM well it's just a lot lot easier to stick an SD card in here and whip it out again and put it into a PC to edit the parameters the muck about with anything in EEPROM and oh yes these are the little tiny prototyping boards then so you can build your own things on here and user any one of those headers as I say to connect to other modules now let's just go back to this triplet vase oh there's a doubler as well it does in a while okay the trigger base which is this one here now I had trouble with this prototype that one of my desk at the moment the one my mum's got is that a slightly improved one so let's think about what the problem was and how I overcame it thanks to jlc PCB so the base of this entire module down here is one of these right this is a we Maas triple there is we must tripleb ace version one bla bla bla and I say they're two dollars 23 from banggood as we speak right now and that sort of worked okay except I noticed that the connections between these modules wasn't particularly stable that you'd only got to move something and suddenly the screen a disconnect it's always start beeping I think what is going on so there were two problems one the sold ring on those headers was intoxicate what headers let me show you so this header here which is the ones you you poked through this is in fact from an Arduino so it won't fit in here there's too many pins on it but if I just put it through here as an example so that goes through all the way sticks out the other side which means you can plug further modules in this side and plug this into receiving sockets on the underneath if you've got PI or Raspberry Pi will run even well even Arduino shields of course plug into things like this don't they so it's all very flexible but what I found was the soldering of these pins so these brass pins - these little pads was poor and there were a number that weren't soldered correctly now yes we could all make mistakes but I've been soldiering for a long time you know through-hole stuff like this and it was just not good I had to redo quite a few because when you discover one problem you think there might be others so you basically have to resold it the whole lore again so I was unhappy with that for one and secondly because this board it must be one of the thinnest PCBs I've ever seen look how thin those it's certainly not 1.6 millimeter this must be 1 mil at the very most and what happens is if you look like I can bend it and because I've been playing about with it a long time on am pushing things in and out and turning upside down basically abusing it a little bit I was worried that maybe some of these interconnecting tracks on here were now damaged and split you can just about make out the tracks look in darker blue on here now I don't know how much flexibility they've got if you bend the board like that trying to get it out without even realizing you're doing it but I just thought yeah it's all a bit it's all a bit worrying given that if this ball goes wrong I'm not around to fix it okay but my mum certainly wouldn't know what to do so I went to jail see and I said I'd like him to do a better board they said yeah go ahead so here it is this is the triple base almost a copy of this one the only difference I made was I moved the five volt from down here which is pretty inaccessible frankly and I've put it at the top now this row here we can get hold of it although ironically I'm not sure I actually use 5 volts anymore but the best thing about it is of course it's a decent 1.6 millimeter thick and this does not bend look I missed it's if I bent that it probably snap the entire board so that is solid and I'm really really pleased with it and that's what my mum's got in the flat as the baseboard underneath all these now obviously I can't change the PCBs on things like this but I don't think they need to be either because they are modules in their own right like this one here the power one for example now I've soldered the wrong headers on on here to be able to plug it into something but as you can see it's small it's all soldered up nicely there's nothing to bend or flex on it quite frankly so I haven't had a problem with the power socket at all apart from as I say these these head of things so I've made the current one with this and it's all working okay but I did think okay I want to improve the sensitivity of that PIR that PIR is okay but because her flat is sort of open-plan arrangement she can be sitting quite away good six meters away perhaps I don't know is it six probably this but whatever and this won't detect that won't detect her sort of waving her arms about yes actually stand up and walk towards the kitchen before it detects her so I thought I wonder if the bigger ones detect movement easier so I've been experimenting with one like this so you can see it's physically bigger one of the plastic built on top is anyway and it's also got adjustments here for sensitivity and the time it stays on the four so I've been playing about with that and yes it does have a better range unfortunately the pin arrangement would you believe it is not the same as that one so I can't just extend these pins using some DuPont cables and plug it in I'd have to create a whole new board to do that so I thought hmmm not something I can do very easily remotely but I do want to build this again for when I go over in October and I thought well if I'm going to build that middle bit again using one of these and perhaps make a few other changes to this as well fundamentally it'll stay the same but there might be a few changes like look at that warrior looks tidied isn't it why don't I make a better board so this hex bass is basically two of these the design anyway is two of these at around the right way the other way right so it's two of these like that just one there and one there now you might think that'd be pretty easy to do because I did it an easy EDA and of course yes it's fine to put two like that but all these pins are connected on this board as you can see you see the yellow traces connecting you know all these pins here are connected to all these pins here and similarly all the ones here are connected to all the ones here you get it so they're all running in parallel so for a triple thats okay could you do one lot on the top and then you do another lot on the bottom and everything's fine and that's really easy to do and right however once you put two lots like this it suddenly becomes very difficult please give it you've been now got to connect all these pins here to these ones here to keep the continuity going and all the ones on this side down here so there's two ways of approaching this and I've done it both ways just to show you you can probably just about make out there look tracks on the outside of this board now well coming from those pins at the top running down then diving through the board by little tiny veers and then joining up to these pins here and I thought okay that's not bad way dunno I've seen computer boards doing similar things you know big long busses of wires I thought well I can do the same here but I can't why let me show you I'm building this device onto this coaster it's a plastic coaster look little tiny feet and it looks very nice it sort of smoked gray looks nice in real life but this board now is as wide as I can possibly make it oh yeah and fit nicely so if I was to try to extend this side the same as I did that side it's just well it would just fall off the edge of the board so I was a bit stumped really and I try to think what would it be better if I just did four of these together and put them in the middle not make six neither well that's hardly worth the effort and then of course it occurred to me that maybe having an extra layer inside so sandwiched inside here is effectively another board I can run traces now from all these wires through that middle trace down to here and that's exactly what I've done so this side is all connected internally inside this board and you don't see the traces at all which is a bit spooky really because I know they are connected I've done a test for the multimeter just to make absolutely sure and yes they are all connected whereas this side here you can see the trace is just about yeah it's a bit bit spooky having these on the inside now being mat black it looks the I think this board looks really good I'll boil away jlc PCB do the same color this matte black for the same price as green yellow red and all the rest of it it just takes a little bit longer to make but if you prepare to wait another day or so you'll get a matte black board as well I think it looks pretty good actually and it's only aesthetic there's nothing different about to the board itself is just the the solder mask they use on top anyway so I've left it like this then I've left this side exposed so you can see how the traces run down there and all these little tiny vias that go through the board to this side and then connect to the pins you can just make them out there look in the light that's one way of doing it but this side as I say it's like magic they're all inside here somewhere I don't have to go back to the easy eda PCB designer to find out exactly where I've routed them not that makes any difference I can't do anything about it now so that's my hex base that I intend now then I intend to put this on this board to mount it on the board as I did before with little spaces and their nylon hex spacers look very nice I've got some pictures which I'll show you in a minute and then space these out a bit more so rather being stacked up like this two three hi it probably only has to be too high so there be stuff here and then too high and then another one of these boards on tops as its life sandwiched in between and it looks alright well it looks very nice in my humble opinion however we still have the problem of these horrible connectors not connecting particularly well and as I said I don't know the reason for it but they didn't want to solder well so the fact they didn't want to solder well makes me think well and not connecting well either so what I might do is abandon these and actually solder things all six modules directly to this board so not to use this prototyping area at all in here just forget about that sold of those boards directly onto here using not these but standard header pins which you can just make out in parallel and there's no pack see there's standard header pins this incidentally is a pack of one of those development board to all the different headers they give you so that's my options and I've got until well September to do it so I better get my skates on because it always takes longer than you think but at least the codes done so the code we didn't have a brief look at various bits of it over the last few months I'm gonna load this into my github the code that is and you can have a look at it I'll take out any personal information in there I'm not gonna walk through it all cuz it's about 2009 now it's quite a bit and I almost considered rewriting it for ESP 32 because as you know ESP 32 is more powerful dual core means I could create tasks one of the things that this does as an example is when it uploads the date/time display stops displaying or it freezes I should say because it's this is doing something else isn't it so it can't possibly update this whilst I've asked it to update stuff to think that two things speak because it's busy talking two things speak and there's nothing I can do about that now that's only aesthetic really the fact that this stops and then comes back into play and that's not an issue but whilst it is uploading things big it's not to take into account anymore movement it's not doing anything apart from talking to things speak at that point or indeed sending an email it can only do one thing at a time and these things take a little bit of time so everything else stops whereas if that was an ESP 30 - I could do them all at the same time effectively in fact some of them are could do at the same time if I put them on different cords but I doubt whether I have the time to do that right what's next pictures are promised you some pictures of while stars constructing it and this is the I believe this is the original prototype but with the yellow board so you'll see it pretty much how it was being built from the mums flat so here the pitches coming up right I've only got a few pictures of that this is them the underneath now when I first started to make it and that's the same picture on top from the front this is what the middle bit is where the PIR plugs into and on the left-hand side there's where a little beeper plugs into pretty cool right and of course it works that's the main thing and don't forget send me your user name that you've registered with Jael CPCB and I'll forward them on to my sponsor and you'll get a a $5 discount off your order also don't forget if you place an order with jlc you also get a discount off LCSC comm components warehouse you've got to read up this stuff on the website and it'll be all be my github so there's plenty to see do have fun and four layer PCBs not as difficult as you might think I might discuss that in more detail in a future video exactly how I did it but I think we've done more than that for now okay if you'd like to leave a comment please do so if you think it's worth a thumbs up please do so don't forget to read the github because there's lots of stuff out there that I can't I've got room for in the video description below and thanks for watching see you in the next video I hope you're finding these videos useful and interesting there are plenty more videos to choose and a couple of shown below and if you'd like to subscribe to this channel just click on my picture below and enjoy the rest of the video thanks for watching
Info
Channel: Ralph S Bacon
Views: 15,897
Rating: undefined out of 5
Keywords: ESP8266, D1 Mini, Vulnerable Person Monitor, person monitor, monitor, Home Alone, Wemos D1, Wemos D Mini, Thingspeak, PIR, JLCPCB, 4 layer PCB, 4-layer PCB, Four layer PCB, Matt black PCB, esp8266 projects, wemos d1 mini, internet of things, d1 esp8266, d1 mini arduino, esp8266 arduino, Arduino, Beginners, C++, electronics, programming, gadgets, microcontrollers, touch switch, esp8266 wifi
Id: 5IxOUxZFfnk
Channel Id: undefined
Length: 31min 18sec (1878 seconds)
Published: Fri Jul 19 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.