Recently, a friend of mine needed to create a DEMO related to image recognition. This friend, who holds a PhD, developed a fire alarm detection device. As we all know, our residential community has a surveillance system that allows us to see video images from various corners of the area. Based on this, my friend developed a leading fire alarm recognition algorithm that is currently unparalleled in speed and accuracy in the industry.
However, to implement this algorithm, it needed to be embedded, so we designed a small system. The functional modules of this small system are as follows:
The fire detection algorithm was developed by another friend, and we have already sent the product to him for debugging. We will continue to iterate and update as needed.
In this system, the main function of the Tuya module is to communicate with the Lora module via serial port, and it requires two GPIOs to control the Lora module, as well as one GPIO to control the relay, which is used to turn the alarm on and off.
I initially intended to use the 51 microcontroller to implement this function and bought several 51 microcontrollers, but I eventually encountered issues.
-
Many 51 microcontrollers only have one serial port, which means you can’t debug while controlling the Lora module at the same time.
-
The GPIO level of the 51 microcontroller is 5V, but the serial port level of the Lora module on the market is 3.3V, which necessitates adding a power chip.
-
The 51 microcontroller lacks a mature SDK, so if we need to upgrade after assembling the product, we can only disassemble it.
-
Developing a mobile interface control, compared to creating a mobile application from scratch, using the Tuya SDK for the product requires significantly less effort.
As a result, we created it like this
-
Upper computer control software interface
-
Appearance of the main transmitter before assembly
-
Appearance of the assembled alarm device
Appearance before assembly
Here is a complete video introduction:
In the demonstration video, the module was not placed very far away, but we have specifically tested this part, and we will continue to update the status. We welcome everyone to stay tuned.
The Tuya module and Tuya SDK have greatly assisted our development. My friend from Tuya even guided me during the debugging process while on vacation. For small to medium-sized products, especially control-related ones, I recommend everyone to give it a try.
Author: Basketball Enthusiast Who Codes, Source: Embedded Linux
Disclaimer: This article is reprinted with permission from the “Embedded Linux” public account. The reprint is for learning reference only and does not represent this account’s endorsement of its views. This account also does not assume any infringement responsibility for its content, text, or images.
♥Click 👇 the business card to follow me♥
1. Onboard Antenna Adjustment for Wireless Modules
2. PCB Design for DCDC Power Modules
3. Microcontroller Basics: Do You Understand LED Driving?