走马观花

[Hangshun Training Camp] IoT timer clock based on Hangshun MCU & Tuya module

 
Overview

IoT timer clock based on Hangshun MCU & Tuya module

background


I DIYed the aquatic plant lamp for the small fish tank in the office, but the light control switch I made before was not very easy to use. The light sensitivity was seriously affected by turning on the light, and it was almost useless. Just when I was about to make a timer with a time switch, the training camp of Hangshun & Lichuang started, and I decisively signed up to get a timer for free.

Main components


  1. Hangshun MCU: HK32F030MF4P6 (activity designated device,In fact, it is not compatible with 32 advanced MCUs.)
  2. Tuya WiFi module
  3. 2.4-inch TFT_SPI color screen display
  4. XPT2046 resistive touch chip

Main functions


  • Verify its function by driving the TFT color screen through the SPI interface of Hangshun MCU
  • Through the UART of Hangshun MCU and the Tuya module communication, and the onboard USB to TTL circuit, communication with the PC can be realized.
  • Obtain network time through Tuya module connection platform to implement clock function
  • Realizing the IoT timing switch function through Tuya platform
  • 2 independent buttons on board, 2 independent LEDs for function expansion
  • In the future, I will implement the timer switch function and really use it in my small fish tank.

Physical picture

WeChat picture_20210329151051.jpgWeChat picture_20210329151056.jpg

Issues found in current version

1. The layout of the current-limiting resistors R2 and R3 of the LCD backlight power supply is too close. The patch is confusing and the two resistors are placed in the wrong direction. The backlight does not light up when the power is first turned on. Pay attention to the direction of welding. It is best to refer to the PCB drawing. 2. The two lines J1 and J2 on the back of the PCB indicate that the characters are too small. You can consider increasing the font size in subsequent versions. I'm not too busy to mess around with the program right now, so I'll come back to code when I have some free time.

Ideas for subsequent versions

Replace Hangshun's MCU with more IOs to realize onboard communication of touch ICs and relays. At present, the touch IC interface is only lead out and not connected to the MCU. The power pin under the PCB was originally conceived as a 3D printed base with a power socket inside. The LCD can be used as a vertical desktop clock. I will wait until the code is finished before considering it.

About the code

Currently I am busy with work and study and have no time to complete the code. I have to find another time to complete the coding. wait. expect!









参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-21 20:12:49

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号