You can connect to WIFI and upload temperature, humidity and brightness information to the Tuya IoT platform. The microcontroller uses the domestic CKS 32F031K6T6 , which is low-priced and has many pins. It is fully compatible with the same model of ST microcontroller. The temperature and humidity sensor uses SHT30 , and the brightness information is collected through a photoresistor. The infrared sensor can be matched with the OLED screen for low power consumption management. The OLED will only display when someone walks by or waves in front of the module. OLED uses a pin header + female header connection method, which is more convenient for DIY. The battery power supply uses a high-current, low-voltage drop chip. The external lithium battery can be equipped with an integrated charging and discharging module, supporting up to 6V. The lithium battery pack can be placed under the OLED screen. OLED screens can display various information, such as temperature, humidity, brightness, etc.
After welding and burning are completed, power on, information can be displayed on the OLED, and the network is automatically configured in the Tuya APP. After the network configuration is completed according to the prompts, the values can be viewed in the APP.
At present, the code has completed reporting the temperature, humidity, and brightness information. Because there is no lithium battery for the time being, there is no battery information to report. The interface and location have been reserved, and the lithium battery can be reported directly. The OLED library encapsulates some functions. Currently, the values of each sensor are displayed. Users can directly modify the format they want in while(1). An additional set of IIC and serial ports are introduced, which can add other things and facilitate debugging.However, the infrared sensor is a bit insufficient, because the ADC and DMA acquisition and channel switching take too long, so the ADC data refreshes every 0.5 seconds, which does not matter for the photosensitive, but it takes a little longer for the infrared sensor.(There were some configuration problems, which have been overcome). This is my first time making a board and doing a project. I have tried my best. The qaq
code is written using STM32Cube IDE. Just open .project.
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