The winter in the north is really cold, but the company's heating pipes have been broken since I started working. I only rely on an air conditioner for heating. When it snows, the office becomes even colder. I had no choice but to buy a small air heater and put it under my feet. Now my legs are no longer cold, but a new problem has arisen. Every time after get off work, I always worry about whether the hot air blower is turned off. I have driven back to the company several times to confirm whether the hot air blower has been turned off after get off work. Now it happens that Lichuang EDA is conducting an advanced version of summer training to train people on Internet of Things related knowledge. Therefore, making a remote-controlled socket can come in handy this winter. I can use the mobile phone APP to remotely view and control my small hot air blower, so I don’t have to drive back to the company to confirm whether it is turned off and whether it is safe. Isn’t it wonderful?
Choose STMicroelectronics STM32F030C8T6. STM32F030 uses ARM Cortex core with operating speed up to 48 MHz. STM32F030 is the lowest-priced product in the STM32 series, with extremely high cost performance, FLAS capacity of 64K, RAM 8K, and supports online simulation functions. I have used it in many projects and its performance is stable and reliable.
Since I have no foundation in cloud platforms, I followed the training group to choose the Qingke module EMW3080 and the ILOP.A236 Alibaba Cloud Feiyan firmware.
Choose the affordable Songle relay model: SRD-05VDC-SL-C
Use DHT11 humidity measurement range 5-95%RH Resolution: 16Bit Temperature range -20-60 degrees Resolution: 16Bit
Heli chose the HLW8032 fuel gauge chip, which has excellent performance, high precision, simple circuit and no need for transformer sampling. It can measure active power, apparent power, current and voltage effective value. The active energy pulse PF pin output is within the dynamic range of 1000: 1. The measurement error of active power reaches 0.2%. Within the dynamic range of 1000: 1, the effective current is The measurement error reaches 0.5%. Within the dynamic range of 1000: 1, the measurement error of the effective voltage reaches 0.5%. UART communication, convenient access * SOP8 package type
Since the control part is the weak point, and the sampling part uses strong electricity and needs to be isolated, the DCDC module of Hailink HLK-1D0505 is used to power the power measurement part. Rongpai π121U31 isolated communication is used for power module data to be sent to MCU for sampling after being electrically isolated.
Using Zhongjingyuan IPS0.96 color screen module, the display is clear and the resolution is high.
The code shared by Mr. Lingyao is 51. I use STM32F030 so I need to transplant the key parts of the code. Mainly need to transplant two parts of code, one part is the timer, and the other part is the serial port.
The timer interrupt service program performs timing operations for each task.
Configure serial port 0 to 115200, 1,8,N,1 mode to connect to the WIFI module.
The main bottom part of the serial port 1 interrupt processing WIFI business logic has been transplanted.
On August 15, there were still two days before the deadline for the job, and the PCB was still on the way. I called SF Express several times, and the PCB was finally delivered in the afternoon.
Before the PCB came back, the program had already done some preliminary work, and the subsequent debugging was mainly about adding functions.
Key configuration of DMA part
After the program was completely transplanted, the device could work normally. It was already 2 o'clock at night.
Click to create a new project, enter the project name, and click Confirm. After selecting the project, add the required functions and custom functions . Record each identifier. The program must correspond to each identifier, otherwise the APP and the physical object cannot correspond. Choose to use the public APP to choose the sharing method . The preferred network distribution method is one-click network distribution, and the backup method is AP network distribution. There is a compatibility issue with some routers and the configuration cannot be successful. I can easily configure the network at home and at work. But in the hotel where I am on a business trip, the configuration cannot be successful. Maybe the router has been set up. I do not understand! Scroll to the end of the multilingual list and click Save, because it is not for foreigners.
I started to choose the panel design function. It took a lot of time here. The panel I made could not control the device. Later I found out that the identifier did not correspond to the program. After many attempts and code modifications, I finally found the problem.
Open the Tmall Elf option
and design the APP myself. For me, who is weak in color, the design panel is a nightmare. Fortunately, the functions can be realized normally, haha. . . .
Select the next step of device debugging,
add a new test device
, then record the triplet
and add the triplet to your own device, and you can exchange messages with Alibaba Cloud.
Now comes the shell. The 3D printed one is a bit ugly, but at least it has some clothes, hehe.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet