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.
2. Tuya Smart’s networking module uses the WBR3D communication module
3. Low-cost 5V to 3.3V linear power supply module, using the very common AMS1117 circuit.
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.
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.
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.
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.
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