2162 views|1 replies

973

Posts

15

Resources
The OP
 

【Qinheng Trial】Four overall system designs (1/2)——Function integration of ch549 modules [Copy link]

 This post was last edited by a newbie on 2019-7-11 01:15

System introduction: With CH549 board as the main control, a remote control system is made, which receives commands and sends data from some sensors at home. Peripheral switches control home appliances, including 1. Lights (forget to turn off the lights or turn off the lights when you don’t get out of bed in winter), 2. Water heaters (turn on the water heater after work and take a shower when you get home), 3. Air conditioners (turn on the air conditioner before going home, so it’s cool when you get home), and 4. Water valves (for watering flowers). Sensors use the ADC built into the microcontroller to measure soil moisture (can you recommend electrodes? Taobao has quite cheap ones, but they seem to rust) to determine whether to water the flowers.

Server, use the existing Alibaba Cloud server to build a network service to send control commands to the CH549 board and receive its data; in addition, make a web page for viewing information and performing remote operations.

Step 1: The planning of each module of the CH549 chip on the board is as follows:

(Among them, UART3 is used for testing instructions, receiving computer serial port data and sending it to UART1, and receiving UART1 data and sending it to the computer)

The planning of each module has been completed.

Step 2: Program writing, omitted. The microcontroller code can be found at the end of the article. The server code involves its own IP domain name and other things that have not been sorted out yet and will not be released in the next version.

Step 3: Plug in the wires:

Step 4: Power on:

Step 5: Debug the communication with the server with the help of UART3. Start the server service (currently in test mode, when the interface is accessed, the current date and time will be returned to the development board if the user name is correct).

Step 6: The board controls the WiFi module to connect to the Internet and the server:

Step 7: Access the board interface and obtain data (the black background below is the message of the server console, and the serial port assistant prints the message of the microcontroller serial port):

In summary, the overall framework is basically completed. The next version will be completed in the next few days and all functions will be completed. The main points are as follows:

The test version uses an extra UART3, which is used to forward data between the computer and UART1 and for debugging instructions. It will be removed in the next official version.

In addition, the watchdog has not yet been added, and will be added;

Communication protocol between MCU and server; writing of server and control interface;

Touch button control switch, currently it is on time,


this content is created by a netizen Xiaobai from EEWORLD forum , if you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate
the source Release time, change to touch to change state.

Code for this article (for other information, see the previous post):

Main.C (5.69 KB, downloads: 6)

ADC.C (2.94 KB, downloads: 0)

TouchKey.C (3.5 KB, downloads: 0)

UART.C (7.06 KB, downloads: 6)




This content is originally created by a netizen named Xiaobai from EEWORLD forum . If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source.

This post is from Domestic Chip Exchange

Latest reply

Thanks for sharing   Details Published on 2021-4-22 17:36
Personal signature我来到这个世界,就是为了遇见你。在某天我们会相遇,然后在一起,直到最后一起离去。
 
 

661

Posts

0

Resources
2
 

Thanks for sharing

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list