 Ciao ragazzi, ho disegnato la nuova versione del mio sensor Windows Smart Door e come potete vedere finalmente la consumazione di potenza è perfetta. La consumazione di potenza di questa nuova versione del sensor Smart Door è molto bassa. Ho mescolato l'accurso con il kit di Power Profiler per Nordic e ho notato che l'accurso detectato è sotto il range di mescolazione del profiler. Ho fatto diversi test per verificare l'accurso della data, in ogni caso l'accurso della data, la consumazione è sotto 200nm e questo è un risultato molto buono considerando l'accurso simile a una consumazione di 6-8 micromperi. Ora vuoi sapere come sviluppare questo smart device? Allora ragazzi, cominciamo! Questo progetto è possibile con l'help di PCB Way e sì, questo progetto è sponso da PCB Way. Puoi comprare i vostri PCBs per solo $5. Prendete il link sotto al posto, il vostro primo ordino. Questa serie di video è creata per mostrare che molti smart devices che sono avanti non sono disegnati bene e che solo prende un po' per rendere i loro prodotti migliori. La prima cosa che ho fatto è scegliere un smart device per redesign e ho deciso di redesignare un molto semplice smart door windows sensor. You will understand that this device most of the time is in deep sleep mode, Austin by mode, so, reducing its power consumption during this mode can greatly increase battery life. In deep sleep mode, this device consume an average between 6 and 8 micromperi. By powering this device with 2 AAA battery, the manufacturer claims an average battery life is about 1 and 2 years. Honestly, I don't know if it's true, in particular with Wi-Fi version. My goal is to extend the life of this device even longer, you may wonder why. For only two reasons for now, the first one is to reduce the battery replacement and the second reason is to improve the user experience of this smart device. So using the microcontroller deep sleep mode is not a very good idea because it does not allow us to maximize the power consumption. The only alternative I know is to develop an external power latch to turn on the microcontroller only when needed. In addition, we need to use only components that are easy to find, so not particular complex interesse circuit like TPL by Texas Instrument. In this way, we avoid possible shortage problems. The power latch I need to develop should start the microcontroller only when the signal from the red switch goes from I to L and vice versa. So as you can understand the way it works is different compared to a simple IOT button. So we can't use a classic power latch like this. The new power latch needs to know the previous state of the sensor by comparing it with the current state. So I could use the flip flops to store the previous state, as you can see the solution works. But the problem is to generate the clock signal of the flip flops, which would be require some microampere and extra components. And since our goal is to reduce the power consumption, this solution is not the best for low power application. The operating state of the power latch remind me a true table of a logic gate. And yes, I'm talking about the XOR. After some testing and research, I found a solution to store the bit, the state, the previous state, with true XOR. I found this circuit. The configuration of the XOR in this circuit is very interesting, but not complete from my point of view. I found an open source project on github that used the same circuit. The problem with this solution is the power consumption still remaining too high. This is because the output signal from the logic gates is used to activate the enable of the LDO. Why not use a MOSFET directly? And the wish and current of the LDO consumes some microampere and this is a waste of energy. So starting from this circuit, I designed this. And this is the schematic of the project. In particular I want to show you the power latch. As you can see, the circuit consists of several components. Come puoi vedere, there are even more components than necessary to perform some tests. The circuit is designed to work with different configurations, in particular with different type of batteries, like AAA, alkaline or LiPo battery. Signs I plan to use 2 AAA batteries, I don't even need the LDO. I also added Bosch BME 680 to detect the temperature, humidity and air quality. Allora, the door or window is open and closed. And this is the PCB render. So this version is not as a modular design, as previous version, because I try to simplify the design of the device as much as possible. Now it's time to assemble the first prototypes. As you can see, the quality of the PCB is perfect and also the PCB is only 0.8 mm of thickness. Instead, this is the case I designed for this device. I did not use screws to simplify the design. I printed this case with my 3D printer. If you don't have a 3D printer, I recommend you to try PCBWay new service that for a few dollars you can print your own parts with different materials. Ok guys, this is the final result of this first prototype. I'm very happy of this final result. It's not bad the design. So guys, let's get see in detail the first prototype. I have printed this in PLA plastic white, as you can see. So here we have the magnet with the object's logo. If I, exactly, as you can see the red LED is on and then off. Perfect. I now simulate the open door and closed door. It's work. Perfect. Ok, now I can open the case in this way. So with my finger, perfect. I can open the case. So here we have the 2 AAA batteries. For now they are not alkaline, but it's only for a test. So I can remove the batteries in this way. Ok, to remove this, so the socket of the battery, I can press here and perfect. I can remove this. So here we have the external cover of the product of this device. And here we have the PCBs. After soldering the 2 terminals, 2 battery terminals, I can't remove these PCBs from here, from this plastic. For now it's in this way the design. But if you open all smart door sensor, they are built in this way for this reason. So I can use 2 cables, but in this way the design, the final result is better in my opinion. By the way you can't remove the PCBs easily. So to program this, I use this. As you can see we have 6 plug-up pins. You can find this on Aliexpress or Amazon, I don't know. So after connect the plug-up pin, here we have my serial custom bridge. Serial bridge, so by objects always. So in this way we are ready to program and debug this sensor. It's so easy. Maybe I can improve this, I don't know how. Maybe remove this piece of plastic here. In this way it's more easy to put the plug-up pin, but for now it works. So guys, let's get started with upload the firmware. The firmware I uploaded is a simple test to make sure the hardware is working properly. In the next video I will show you how to integrate this sensor with Amazon AWS IoT Core. I also wanted to show you some measurement I made with my oscilloscope and power provider. As you can see the circuit seems to be working properly. So in conclusion there are many things that can be improved, such as the reset button because now don't work properly. I could improve the design of the project and reduce the size of the device or change the my controller like an RF by Nordic. Below in the description you can find a link to the repo of the project. Please let me know if you like the project. And thank you again to PCBWay for sponsoring this project. And thank you for watching until the end and see you later, next time.