Using the 4G Network to Save my Friends Treasures!

Do You Remember This Project?

If not, let me tell you that a big spider had a guest part in it and if you are still not sure then let me clarify that it is the SMS Alarm system I built for my friend's garage 8 years ago. Now this thing worked pretty well but due to older mobile network technologies slowly shutting down and because you have to pay a bit of money for every SMS, it is not the ideal solution anymore.

Going 4G makes sense because coverage is good and I only need to send a couple of bytes of data that will cost me pretty much nothing for a long time to come. And this nRF9160 development board from Nordic Semiconductor should do the trick since its supports LTE-M which is kind of like a 4G LTE Network but with a bigger range and lower data transfer rate.

According to the Network coverage map given by iBasis which actually supplies a working SIM card with the board, I should have LTE-M coverage here in Germany. The first thing to do for me here was to see whether this network really works and that meant creating an nRF cloud account, registering my SIM card, adding the board to the cloud and ultimately installing a bit of software to update to the latest firmware and also upload the given example GPS tracker code.

After waiting for a few seconds after the upload, it seems like everything works fine because my exact GPS position with some other data got successfully published to my cloud, lovely. Next I dug through the Nordic Developer Academy courses to learn how to use this board and there I found what I was looking for and that was an MQTT example to push data to an MQTT broker.

Sounds complicated; but in a nutshell: by pushing a button on the board we can send out data to the network and thus MQTT broker which we can listen to, with for example a smartphone, and then get immediately notified when new data got published. For the broker I went mosquitto.org that was also used in the given example code and simply went with the MQTT dashboard app for my phone.

By the way programming is done through the Visual Studio software that simply requires an expansion that Nordic Semiconductor created for it. Anyway, after configuring the app the way it got described by the tutorial and then uploading the fitting example code to the board, you can see that by pressing a button we pretty much immediately get notified, awesome.

To make this example work with the radar, I simply had to add a transistor to a specific pin of the nRF board and connect its base through a resistor to the radar's output. This way the transistor pulls the pin low to GND when the radar detects something which is the same thing the push button does to this pin as well.

And as expected now we get an alarm when the radar detects something, success! Here comes the hard part though because inorder to control all the other additional hardware inputs and outputs with the nRF board, I would have to write my own code and let's just say that I am not a software guy and it would have taken me forever to got through all the given courses and learn coding for this microcontroller.

So instead, I went the easy route and used an additional Arduino microcontroller. I know, total overkill but what counts for me in the end is whether my project works and with this final hardware design according to this schematic and the new code I created for it all, it should hopefully do that.

To prove that let's do a live test, when I flip the arm switch, the system tells me through the siren that it is now armed and after a few seconds I am not allowed to stand in its detection range because otherwise the system will notice that, send out an alarm and will turn on the siren for 3 minutes. Meaning everything works fine and as planned.

And in case you wondered I powered everything with 12V which got converted down to 5V for the microcontrollers, meaning this 12V 1A power supply should be sufficient to power every thing in the garage.

With that out of the way it was finally time to finish this project meaning I designed a fitting enclosure for it, 3D printed that, mounted all of the components inside of it which ultimately looked rather nice and then secured it in my friend's garage. And after doing a bit of testing we could also confirm that this thing works without a problem.

So all in all I personally think this project turned out awesome and 4G and Radar human presence sensors are definitely something I would recommend others to try out as well.

If you enjoyed the video then as always don't forget to like, share, subscribe and hit the notification bell. Stay creative and I will see you next time.

WEBVTTKind: captionsLanguage: enDo you remember this project of mine?If not, let me tell you that a big spiderhad a guest part in it and if you are stillnot sure then let me clarify that it is theSMS Alarm system I built for my friends garage8 years ago.Now this thing worked pretty flawlessly foraround half a decade but at some point itjust stopped working for reasons unknown.The only problem now is that sadly crime rateis increasing around here which I can definitelyconfirm because someone attempted to steala moped out of my garage as well and onlythanks to my own loud alarm system they gotscared off.And my friend of course also has treasuresin his garage that he wants to protect whichis why it is time to build a new alarm system.But this time upgraded with the newest technologymeaning a 4G LTE connection to send alarmnotifications to a smartphone super quickly,a radar for human presence detection and ofcourse an industrial grade siren that willscare off anyone who hears it.Let's get started!This video is sponsored by Nordic Semiconductor.Nordic provided the 4G LTE development boardfor this project – the nRF9160 developmentkit.And for those of you who don't know Nordic,they are one of the world's leading providersof low-power wireless microcontrollers, withproducts, development tools and solutionsacross Bluetooth LE, Wi-Fi, Cellular, PowerManagement and more.Now first off, let me present you the gameplan which I already partly spoilered by revealingthe 3 big components/features, which includesthe 4G LTE Board, the Radar Human PresenceSensor and the Siren.Besides those 3 things though we also needa custom designed enclosure, think about howto power everything and how we can controlit all with a microcontroller and some complementarycomponents.But let's start off with the big three andlet's go from easy to a bit difficult meaningwe start with the siren.Now truth be told my friend gave me this sirenand I have no idea where he got it from.But it appears to be quite expensive and thusit also came with a pretty decent datasheet.To use it all we have to do is apply +12Vto one of the upper 2 terminals and GND toone of the following two terminals and therewe go, pretty simple.What is noteworthy is that this siren drawsvery little power and you can set this DIPSwitch in order to change the play-backedtone.So all in all a great piece of hardware whichwill be a perfect fit for the new alarm system.Moving on to the Radar Human Presence sensorwhich looks like this and you can get it forpretty cheap from the internet.You might recognize it because I revieweda similar unit in a previous AliExpress HiddenGem video and back then I was very happy withits capabilities.To use it we simply have to connect its pinsto a USB to Serial Converter like shown here,plug this converter into a computer and openthe software given by the manufacturer.And after then pressing connect and start,the two graphs on the right start going crazywhich indicates that this thing works correctly.But for mounting the sensor later on; I thistime planned to install it inside the mainenclosure because the product descriptionclaims that it should be capable of penetratingthrough it.So to properly test this I went into the futureand got myself the final lid for the enclosureonto which I can secure the Radar to testit out.Now besides the serial communication the sensorcomes with, which is responsible for the datatransfer, we also got an OUT pin that pullsup to 3.3V when someone gets detected.That is of course way easier to use for thealarm system and the only problem at thispoint was that the sensor pulled this pinhigh pretty much continuously because it wasnot fine adjusted yet.To do that I firstly defined the moving andmotionless max rg to 2 which basically meansthat the sensor only triggers when someonegets detected within a range of 2 times 0.75maka 1.5m.Then I also set all the sensitivity levelsto 60, that the measured values need to beabove to trigger.And after doing quite a bit of testing withthese values, it seems to work pretty well.As you can see when I am farther away theoutput stays low, but as soon as I get inrange it reacts quickly and even stays onwhen I am not moving which is the big pluspoint of such a radar.Only if I move away the output returns tolow again which not only means that thesesetting fit but also that the sensor worksflawlessly behind its lid and thus we canfinally move on to the hardest part aka the4G LTE data connection.Now don't get me wrong the old way I did thingswith a prepaid SIM card and a GSM 2G boarddid work pretty well.But of course due to older mobile networktechnologies slowly shutting down and becauseyou have to pay a bit of money for every SMS,it is not the ideal solution anymore.So going 4G makes sense because coverage isgood and I only need to send a couple of bytesof data that will cost me pretty much nothingfor a long time to come.And this nRF9160 development board from NordicSemiconductor should do the trick since itsupports LTE-M which is kind of like a 4GLTE Network but with a bigger range and lowerdata transfer rate.And according to the Network coverage mapgiven by iBasis which actually supplies aworking SIM card with the board, I shouldhave LTE-M coverage here in Germany.So the first thing to do for me here was tosee whether this network really works andthat meant creating an nRF cloud account,registering my SIM card, adding the boardto the cloud and ultimately installing a bitof software to update to the latest firmwareand also upload the given example GPS trackercode, because yes, this thing also comes withGPS.And after waiting for a few seconds afterthe upload, it seems like everything worksfine because my exact GPS position with someother data got successfully published to mycloud, lovely.So next I dug through the Nordic DeveloperAcademy courses to learn how to use this boardand there I found what I was looking for andthat was an MQTT example to push data to anMQTT broker.Sounds complicated; but in a nutshell: bypushing a button on the board we can sendout data to the network and thus MQTT brokerwhich we can listen to, with for example asmartphone, and then get immediately notifiedwhen new data got published.For the broker I went mosquitto.org that wasalso used in the given example code and simplywent with the MQTT dashboard app for my phone.And by the way programming is done throughthe Visual Studio software that simply requiresan expansion that Nordic Semiconductor createdfor it.But anyway, after configuring the app theway it got described by the tutorial and thenuploading the fitting example code to theboard, you can see that by pressing a buttonwe pretty much immediately get notified, awesome.Now to make this example work with the radar,I simply had to add a transistor to a specificpin of the nRF board and connect its basethrough a resistor to the radars output.This way the transistor pulls the pin lowto GND when the radar detects something whichis the same thing the push button does tothis pin as well.And as expected now we get an alarm when theradar detects something, success!Here comes the hard part though because inorder to control all the other additionalhardware inputs and outputs with the nRF board,I would have to write my own code and let'sjust say that I am not a software guy andit would have taken me forever to got throughall the given courses and learn coding forthis microcontroller.So instead, I went the easy route and usedan additional Arduino microcontroller.I know, total overkill but what counts forme in the end is whether my project worksand with this final hardware design accordingto this schematic and the new code I createdfor it all, it should hopefully do that.To prove that let's do a live test, when Iflip the arm switch, the system tells me throughthe siren that it is now armed and after afew seconds I am not allowed to stand in itsdetection range because otherwise the systemwill notice that, send out an alarm and willturn on the siren for 3 minutes; meaning everythingworks fine and as planned.And in case you wondered I powered everythingwith 12V which got converted down to 5V forthe microcontrollers, meaning this 12V 1Apower supply should be sufficient to powereverything in the garage.And with that out of the way it was finallytime to finish this project meaning I designeda fitting enclosure for it, 3D printed that,mounted all of the components inside of itwhich ultimately looked rather nice and thensecured it in my friends garage.And after doing a bit of testing we couldalso confirm that this thing works withouta problem.So all in all I personally think this projectturned out awesome and 4G and Radar humanpresence sensors are definitely somethingI would recommend others to try out as well.If you enjoyed the video then as always don'tforget to like, share, subscribe and hit thenotification bell.Stay creative and I will see you next time.