Hi everyone, welcome to today's video FME alarm switch. The aim of this video is to provide you with assembly instructions on how to build your own alarm switch, so that if a corresponding message is received on your pager, this signal is forwarded to this alarm switch and this is then followed by a smart home routine, for example with an Amazon Alexa, and so, for example, the garage door can be opened, the light can be controlled, any announcement, etc. With us today is Chrigu, a good colleague of mine. Chrigu, you are cool there. Thank you very much for the invitation. I am happy that I can support you with my specialist knowledge. Excellent! With that in mind, I would say we're starting right away. As an introduction I will show you which components are needed to build this alarm switch. We might start right away with the simplest one, this is your pager, which hopefully everyone of you who wants to build this alarm switch has.
You will certainly need it, so that the message that comes on the pager can be passed on, you need a corresponding charging station. Here it is important to take a charging station that has an integrated relay on the one hand , but which also has a DIN 5 socket so that the signal can be passed on to our newly programmed microcontroller. Let's get to this microcontroller in a moment: In our case we have a WEMOS D1 mini as the microcontroller that we are using. It is important here that it has an integrated wifi chip on it , it already has a USB connection that the firmware can be programmed accordingly. Actually everything is already ready , all you have to do here is load the firmware on it, program it and solder the correct cables and pins. What we also used here for this version So for the DI 900 pager with the charger LGRA300.4.29 There it is important that you also install a voltage regulator. This voltage regulator must also be on it. Between the microcontroller and the connection , i.e. the DIN5 socket in this case , a DIN 5-pin socket is the connection that you can see here.
In between we have an ordinary cable. We used a PS 2 mouse / keyboard cable as an example that can be used for this. With the appropriate cables that are required for this. We'll get to that later with more details. Last but not least, we still have the housing, where we tidily tidy everything away at the end so that the components are protected from dust, etc. Finally, maybe an important note: There is a difference between the s.QUAD, in this case it is the X15 and the DE900. There are two differences that you have to keep in mind, but you can really use these assembly instructions that we have made here use for both or for each pager.
There are just small differences that you have to remember. With the s.QUAD you don't need a voltage regulator because the charger delivers a constant 5 volts to it. For this reason you don't need a voltage regulator. Another difference is that we have a 5-pin DIN socket for the DE 900, while the S-Quad is a 6-pin DIN socket. That is the second difference. But we only need 4 cables or pins that we solder on, which we use as contacts, which are identical in this case. It is really only the connection itself that makes the difference. That would have been the starting point. Now I'll get the specialist, my specialist advisor, Chrigu. And now let's go into the details. I will now show you the structure of this whole construct, based on how we also did it. We start with the power supply, of course.
It is important to know that there are 3 ways of outputting voltage to this pin with this charging station and only one works effectively. On the one hand, we can output 6 volts alternating current. We can output 6 volts DC. And 3 volts DC stabilized. The variant we need is 6 volts direct current. To do this, we have to solder a bridge in the device, on the circuit board, that would be with our scheme , you will also see that , bridge 5, which you have to connect. so that there is 6 volts DC on the pin. The WEMOS ultimately needs a stabilized 5 volts, so, as already mentioned, we need a voltage regulator. After we have soldered the bridge in, we first test whether the correct voltage is actually applied to the corresponding pins. For this purpose we have to measure the DC voltage between pins 2 and 4, from this total of around 6 volts.
I am now going to pins 2 and 4, Voilà! We have this voltage on the measuring device accordingly. There is a slightly higher tension here now. It showed around 9 volts, contrary to the data sheet, but this does not matter in this sense, we have, as mentioned, afterwards the voltage regulator on the microcontroller, which then regulates this voltage down to a stabilized 5 volts DC voltage. In the diagram, the socket with the pins is always labeled. It's like this situation, if you look at the charger from behind, and in this case turn it upside down, you can see the pin assignment 1: 1 according to the diagram.
Let's go further, we measured the power supply, it is available. So the next item we need is this DIN 5 connector. Which we solder on with this PS2 cable. Basically, the colors do not play a major role. It is important that you also solder the color that you solder to the connector on the corresponding contact on the back of the microcontroller. I will now explain the pin assignment to you. You have the same view here as when you look into the socket of the connector assignment at the back. We start at the bottom left. We have this one relay contact with the yellow cable. at pin 1 we have the second relay contact at the bottom right in green . That is the pin 3 between these two pins is switched in the charger. With the red cable at pin 4 we have the positive pole of this direct current voltage source out of the charger.
And with the black cable the negative pole, from now on we refer to this as "Ground" the ground is also the one that we ultimately need for switching it is the one that is switched via the relay contact in the charger. All the cables that we don't need from this PS2 cable. That’s the 2 remaining ones that we have simply shortened. We are now on the microcontroller side. I'll start with the power supply for the whole thing. You can see it here, this voltage regulator that we have soldered on here is responsible for turning these 6, 9 volts, whatever this charging station brings, into a clean, even 5 volt voltage. We saw with the pin assignment that we have the black ground and that we have the positive pole of the direct current voltage source in red. We connect these according to the data sheet of the voltage regulator. We have already mentioned that we ultimately also switch the microcontroller to ground, which is why we switched or soldered the yellow cable to the ground of this voltage regulator at the same time.
The green one is the one relay contact. this is soldered onto the D1, this is printed on the circuit board. Now we would have soldered all 4 cables on the microcontroller and on the voltage regulator. Now perhaps to the practice of soldering and arranging these electronic components so that this can be done as compactly as possible.We have the two contacts with the voltage regulator , on the one hand the ground, on the other hand the contact with the 5 volt output voltage.
Angled at 90 degrees and soldered directly onto the microcontroller. namely to the contacts G for ground and 5 V for 5 volts the contact of the positive pole of the DC voltage source, which we just let protrude, cut to length and soldered the red cable directly to it. Now something else to protect against any short circuits: On the one hand, we have attached a shrink tube here to the positive pole. and on the other hand, also glued a small piece of insulating material to the underside of the voltage regulator.
So that we make sure there is no short circuit on the microcontroller if we want to make the whole thing as compact as possible. Well, I will briefly summarize the individual components of this assembly that we will now see here. We have seen the connection, the plug that is then plugged into the charger, the cable, how these components are soldered together Microcontroller on it and the microcontroller itself, to which the cable is soldered accordingly. The next step is actually important now, we plug it into the charger and then we see whether we have this voltage, which is also an important point to look at , I have the correct voltage on the microcontroller afterwards. When the WEMOS D1 Mini, the microcontroller, glows blue, that's a good sign that we've got enough voltage back here.
In our first attempt with this charger , which we honestly did not deal with enough and did not look at the instructions , we soldered the wrong jumper, we only had 3 volts back here. Accordingly, this diode did not light up either. So that's a pretty good sign. Nevertheless, we would like to show you quickly that it makes sense to measure quickly and cleanly if you already have a measuring device in order to check whether you have the correct voltage back here. Chrigu is doing that now. We had already measured the 9 volts at the charger output before, and we want to find that again here. With the red cable we have the positive pole of the DC voltage source of the charger and with the black cable we have the negative pole, which means that if we measure between these two contacts, then we should determine the 9 volts again.
Now this is plus, minus so. Here it is, because power is drawn, only about 7.6 volts and on the output side we should now have the stabilized 5 volts. that would then be between the contact with the black cable, i.e. the ground, and the output contact of this voltage converter , we should now have this 5 volts. Exactly, perfect. I agree. The next step is now, we have measured it, we know we have the right voltage back here, now the task is to bring intelligence to this microcontroller, on which nothing is actually running yet. For this we want to load a firmware on it now. Important! Under no circumstances connect the USB cable at the same time while you have connected your microcontroller to the charger. So we want voltage to be applied to this controller from only one side. That means, now the diode is no longer lit, so now we have no more voltage on it either.
And now you can connect this microcontroller to a computer using a classic micro-USB cable to USB . In this case, to my notebook. that's already hanging on the doking station over here. Well, let's take this USB port. Voilà! You will receive afterwards in the device manager, if the driver, if you have already programmed or connected a WEMOS D1 mini, you have already installed the driver, then you see the corresponding com-interface
in this case it is now com-5-interface, that I have on my device. If you have never used it, then it is important that you install the driver on this device beforehand so that the driver is on Windows.
And the microcontroller and the port are also recognized accordingly. Afterwards it is relatively simple, Markus Stefan Rickert wrote a special firmware that, if you connect it correctly, that means, switch via D1, voltage, ground exactly as Chrigu explained earlier , then the firmware 1 works: 1 and you don't have to program anything yourself. But you can also go to the Arduino page, this is a tool that helps you to program such a firmware yourself relatively easily, but I recommend you here because Markus was so nice and provides this firmware.
Uses this firmware from Markus Stefan Rickert. Afterwards you select the correct COM interface in the Easyflash program. The firmware that is inside and with "Flash" I can start flashing and the firmware is written to this microcontroller. That takes a moment, we let it run and afterwards, when it has been written on it cleanly, there is a message "complete" then you can disconnect it again
and then the firmware is already on the microcontroller and as soon as it is on the wifi is called "Alarm switch" published and then as the next step you can connect the notebook to the WiFi and then we come to the next step where we program that the WiFi, i.e. your home network, we integrate this microcontroller into your home network and connect us to the virtual IoT gate. Voilà, Flash complete. Now we can see, up here The Wifi "alarm switch" That means this firmware is clean on it and it works. What we have just seen now is that we have firmware loaded onto the microcontroller. The next step is now that we configure our virtual IoT gateway.
We use Sinric Pro for this, so you can set up an account for free, and there we actually store our microcontroller as a corresponding sensor that only transmits a signal. This is important for data protection reasons, the only state that is transferred to this cloud, to the virtual gateway, is precisely the "closed" state of this sensor. Nothing of the report is passed on, that is a very important point. So the text that is in the message is never passed on from the pager to any component behind it. As soon as you have set up the account on Sinric Pro, you have recorded this sensor, you have a corresponding app key with a shared key that is a private key, that is a relatively long key that we have to use afterwards that we in can go back to the microcontroller in a next step.
That means we go to the microcontroller, connect to the WLAN, the "alarm switch" means with the password "Feuer112" we connect to this microcontroller and there we can store our home network afterwards so that this microcontroller connects to the virtual IoT via our home network Gateway can build. In this context, we will also specify the corresponding keys directly below , you will see afterwards what exactly and how it has to be stored. This is actually the last step so that your sensor, the microcontroller as a sensor, works with the charger and the pager as an entire construct and then can trigger a routine on the Alexa, where you can, for example, switch on the light or open the garage door and so on Afterwards, all doors are actually open to you for all routines.
In this video you have received detailed instructions on how to get from a connection, from a cable from a microcontroller, with a charger and pager to a finished alarm switch. The next steps are actually only "IT technical steps". You have to set up the Sinric Pro account, you have to set up a virtual IoT gateway, the sensor, which in this case is the microcontroller that you set up, and then you have to set up Alexa Configure routine, for example if you use the Alexa Smarthomes. We won't deal with that in this video, because Markus Stefan Rickert, whom I have already mentioned many times, who also wrote the firmware and made it available, would like to take this opportunity to thank you again, Markus, me For example, in the first video that we saw , I used the instructions and the instructions for it, I was very grateful that I already had these instructions, and that's why we thought we'd also do something contribute to this, and with this video we have created assembly instructions on how you can solder these components together so that you can get this far.
Everything else, how your Sinric Pro is configured, how the Alexa routines are configured , can be found in the video by Markus Stefan Rickert. he also has step by step instructions. So a Word document is included, where you can read it in detail. I hope we were able to really help you with this video at this point, also Chrigu, our specialist advisor, thank you very much for your support. You're welcome, it was fun, gladly again. Excellent! In this sense, do it well, you switched on nicely, Ciao everyone..