In order to explore the working principle and internal structure of the smart door sensor, the author recently purchased a white-brand smart door sensor, and evaluated and disassembled it.
Smart Door Magnetic Basic Function Evaluation
By looking at the instruction manual, we know that this is a smart door sensor based on the NB-IOT network, which is mainly used to monitor a switch status of the current door and window. When the door is opened, the smart door sensor will immediately give an audible and visual alarm, and establish a connection with the cloud control system platform through the built-in NB-IOT module, and make calls, text messages, and WeChat messages to the user to inform the device of the current alarm situation.
After testing, it is known that when the door magnetic strip is removed to simulate the door opening operation, the smart door magnetic device will immediately give an audible and visual alarm, and can connect with the mobile phone in a short time of 1 to 2 seconds to ensure the timeliness of the notification. The first one received is the push from the WeChat platform, followed by phone calls and text messages, and the content of the notifications on these three platforms will clearly inform the device number that triggered the alarm, so that users can quickly locate.
Intelligent door magnetic dismantling and working principle analysis
In terms of device fixing, only two screws and 4 fixing clips are used, and no rubber ring or other adhesive is used to seal the connection between the two shells of the device. Therefore, this device is not waterproof and should not be used in outdoor scenes.
The interior of the door magnetic is mainly composed of two parts: the main board and the speaker. Among them, the main board adopts the design of double-layer board, the first-layer board is mainly used for placement of SMD components, and the bottom-layer board is used for laying the wires that are staggered with the first-layer board.
The main board of the intelligent door sensor is composed of four parts: the main control single-chip microcomputer, the magnetic Hall switch, the sound and light alarm control circuit and the Internet of Things communication module.
The microcontroller is the HC89S003A-001A of Shengxin. It is an enhanced 8-bit microcontroller designed and developed by using high-speed and low-power CMOS technology. It has 16KBytesFLASH program memory, 256BytesIRAM+768BytesXRAM, up to 18 bidirectional I/O ports, 5 16-bit timer/counter, 3 groups of 12-bit complementary PWM with dead-time control, 1 8-bit PWM, 2 UARTs, 1 SPI, 1 IIC, 16 external interrupts, 16+2 12-bit ADCs, 1 A low-voltage detection module, four system operating modes and multiple interrupt sources.
Among them, the four custom pins 6, 10, 11, and 12 are respectively connected to the LED lamp beads to control the turn-on and turn-off of the light-emitting circuit to realize the light alarm. And each LED lamp bead is connected in series with a 470Ω ballast resistor to minimize the current difference and avoid the problem of uneven brightness or high current breakdown.
The 20th pin of the single-chip microcomputer is connected to the sound alarm circuit of the intelligent door sensor, and this part of the circuit is composed of a pull-up resistor, a triode and a boost inductor. Among them, the pull-up resistor is used to ensure that when the magnetic Hall element detects that the magnetic field becomes larger, the Q2 transistor will be in a completely off state and block the sound of the speaker. Only when the magnetic Hall element detects that the magnetic field becomes smaller, the sound alarm circuit can be turned on and drive the horn to sound.
At the output end of the sound alarm circuit, an in-line three-pin inductor is used in parallel with the speaker. When I first saw this inductor, I thought it was just a frequency dividing inductor. By connecting it in parallel with the speaker, the low-frequency signal was bypassed and filtered before the audio signal entered the speaker to reduce the interference of the high-frequency signal. After comprehensive analysis later, this is a boost inductor commonly used in applications such as alarms and buzzers. It has the characteristics of low loss and low cost.
Magnetic Hall switch is a sensor that detects the switch status of doors and windows in door magnetic applications, and is also the triggering condition for the device to perform sound and light alarms. In this device, it is placed on the edge of the circuit board. The working principle is shown in the figure above.
The picture above shows the wireless communication module used by the smart door sensor. It is displayed through the information labeling on the surface of the module and the mobile phone management platform. This is a wireless communication module that supports the NB-IOT protocol and supports low-power standby mode. , but the specific program information is not displayed on the official website of Jiulian Technology.
On the left side of the communication module is an eSIM card, which is also a virtual card. Unlike traditional SIM cards, it can directly access network services provided by operators without inserting a physical SIM card, and supports over-the-air card writing. Through the remote air writing number to the inside of the chip, so as to achieve the purpose of binding the operator identification mark to the device.
Epilogue
From the dismantling point of view, this device is not very eye-catching. At the same time, in order to save costs, the rechargeable design has also been cut off, and the overall hardware cost will not be too high. However, in terms of software, the device’s multi-platform real-time push and responsiveness are all worthy of recognition.