The engineering power supply interface adopts TYPE-C interface, and a high-current voltage regulator chip AMS1117-3.3 is used to ensure that the WIFI module has sufficient current. The MCU part uses APM32F103C8T6, which is cheap and can directly replace STM32. Most of the pins of the MCU are tapped out to facilitate access to other peripherals.
This circuit does not have a serial port to TTL circuit, but only provides a downloader interface for downloading programs, and the USB interface is only used for power supply. There is a green LED light on the power supply. If the light is on, it means that the power supply part is working normally.
Next is the Tuya module. This part is relatively simple. Because it uses an MCU development solution, the Tuya module only functions to communicate with the cloud, so it only needs the IO port of the serial port. However, for convenience, I additionally add RST The port is led into the button to facilitate resetting the Tuya module. The serial port first passes through a horn connector, which is convenient for debugging after soldering the circuit. When communicating with the MCU, it only needs to be short-circuited. The two 100 ohm resistors on RX and TX are used to unify the levels to prevent errors caused by inconsistent levels during communication between the MCU and Tuya (this error should not occur often).
I won’t go into details about the MCU part. It is actually the core circuit of STM32, but the MCU is replaced by AMP32. I personally tested the two and they can be directly replaced. There may be some differences in advanced functions. For example, when others use it, it seems to read and write FLASH. There is a little difference, but it is not used in this project, so we use it as STM32. Both the standard library and the HAL library can be used.
The last is the circuit of the SHT30 temperature and humidity sensor. It is actually more convenient to design here, just make slight modifications according to the chip manual.
The resistors and capacitors on the circuit are all in 0603 packages. On the one hand, I can exercise my welding skills, but on the other hand, if they are too large, the board will become larger.
I have already written all the programs for the HAL library, and I just need to connect to the Tuya module. However, there is a problem with the configuration of the serial port. I really can’t figure out where to put the uart_receive_input() function. For the sake of convenience, I just changed it. It has become a standard library, and it is actually easier to convert between the two. After using the standard library, it is easier. Following Tuya's transplant tutorial (although it is based on the HAL library), the MCU and Tuya modules are quickly connected together.
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