newrudeman

[Tuya Smart] Mini Fish Tank__Smart Heating Controller +1073058A

 
Overview

Mini fish tank_intelligent heating controller mainly implements the following functions: 1. Realizes the collection of temperature and humidity of the fish tank. 2. Uploads the collected data of ambient temperature and humidity through Tuya Smart's networking module. 3. The main control terminal issues control instructions through Tuya Smart’s networking module, gives control signals, and turns on the electric heating wire to heat the fish tank. 4. Automatic mode, after setting the temperature, the fish tank temperature is automatically controlled. 5. Use mobile APP to realize network control. 6. USB interface power supply, designed with current limiting protection, safe and reliable.

Circuit introduction: 1. Circuit of SHT30 temperature and humidity sensor. It is more convenient to implement temperature collection. image.png

2. Tuya Smart’s networking module uses the WBR3D communication module image.png

3. Low-cost 5V to 3.3V linear power supply module, using the very common AMS1117 circuit. image.png

4. The heating module uses USB power supply for heating. Considering safety, a current-limiting switch with over-temperature protection is added to the USB current, limiting the current to 1.5A to avoid safety issues. A 0 ohm resistor is used in the circuit to represent the heating wire. In fact, it is a 7W waterproof heating wire purchased online, which can be placed directly into a small fish tank. image.png

image.png Waterproof heating wire

5. The MCU control module uses the low-cost STM32L031F6P6 circuit. In addition to controlling the temperature acquisition and wifi communication modules, it can also monitor the overcurrent protection module. image.png

programming

       Based on the development environment of STM32cubeIDE, first of all, it is very convenient to configure MCU resources. Secondly, STM32 has many sample programs for reference. The powerful HAL library, such as the implementation of I2C, LPUART control, is very convenient, including ready-made HAL_Delay() and other commonly used functions. The Tuya module provides MCU_sdk, but debugging is not very smooth. Perhaps it would be better to provide more MCU interface samples for reference. Configuring the serial port is prone to problems. If you lack experience, you cannot succeed in one step by following Tuya's transplant tutorial. After referring to the examples of many experts, I connected the MCU and Tuya module together.        After the network is configured, the program control is relatively simple. The MCU obtains temperature and other information and reports it to the mobile APP. At the same time, it compares the temperature value sent by the mobile APP. If the temperature value is not reached, the switch is turned on for heating. When an overcurrent condition occurs during the heating process, the current limiting switch is closed. After receiving the error detection signal, the MCU stops heating and waits for ten seconds before starting heating again. If there are three consecutive errors, manual reset is required.


Video demonstration of work

Project summary

Overall, this project has basically achieved its design goals. But the project only realized the basic idea, and a lot of work still needs to be done before it can be practical. There are still some areas that need improvement: 1. The PCB board is obviously not compact enough, too large, and not mini enough. If placed together with the small fish tank, it will affect the overall effect. 2. The temperature sensor is placed on the PCB. The temperature of the fish tank collected is not accurate enough. We will consider placing it in the heating wire and putting it into the water together. 3. The functions of the controller can be richer, such as providing lighting control. Through the project, I experienced various products and services of Lichuang and Tuya, which greatly improved myself.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-21 14:13:42

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号