toothache

#the4thLichuangcompetition#Nongtian automatic flowerpot

 
Overview

Note: * is required.

[Please fill in during the registration stage↓] Nongtian automatic flowerpot is an automated smart flowerpot that combines hardware design, structural design, software design and agricultural design concepts. It can cultivate plant types according to the WeChat client settings and carry out micro-planting environments. Non-contact safety monitoring, collects water volume, soil moisture, temperature, light, etc., interacts with the server through one-click WIFI to interact with plant data, performs watering and irrigation based on prior breeding experience, and supports user binding and unbinding. Equipped with rechargeable lithium battery power supply and low power consumption strategy of software and hardware. WeChat breeding situation warning, friend sharing and other functions.


[Please fill in during the competition stage↓] * 1. Details of the work; In the preparation stage of the competition, we design the software and hardware principles of the flowerpot and conduct program demonstration. Through purchasing components from Lichuang Mall and several rounds of PCB proofing, the basic functional requirements were finally realized. ( 1) Resource introduction: 1. Processor: ST STM32F103C8T6 2. DCDC chip: Richtek RT9013-33GB 3. Temperature sensor: TI TMP112AIDRLR 4. Light sensor: Rohm BH1750 5. Liquid level sensor: Self-developed FPC single layer Flat capacitor model 6. Soil moisture sensing: self-developed PCB multi-layer flat capacitor model 7. Water pump motor driver: FM TC118S 8. WIFI chip: Espressif ESP8266 ( 2) The flowerpot hardware structure is shown in the figure below: The flowerpot hardware structure It is composed of 6 PCB boards: 1.  Top board : including light sensor and temperature sensor, which are welded to the motherboard through pin headers, and the interfaces are all IIC. Place it on the top of the product to collect light and temperature. 2.  Side panel : includes a button, a two-color LED, and a MicroUSB port, which are welded to the motherboard through pin headers. The button is used for user reset; the LED is used to indicate product functions or networking status, and guides light through light guide columns; the USB port is used for power supply and lithium battery charging 3.  Mainboard : including processing chip, WiFi chip and various sensors, water pumps, The interface for power connection. The humidity sensor is independently developed. The PCB ring trace is calculated and designed to be integrated with the main board to form an L-shaped frame. The soil needs to be inserted under the white line, and the soil needs to be compacted as much as possible to wrap the sensor. 4.  FPC : The liquid level sensor is independently developed. It uses a flat capacitor model to calculate and design the FPC wiring so that the liquid level sensor can be attached to the inner wall of the flowerpot. It is suitable for sinks in various special-shaped flowerpots, especially in small spaces. For liquid level detection, this design is being considered for patent application. 5. Battery compartment and charging board : The square lithium battery and charging board are placed in the battery compartment, and the charging board is connected to the motherboard through the interface. (Due to time reasons, the lithium battery charging part is not included in the design this time) 6.  Lichuang Logo Baffle : Innovatively design a baffle with the Jialichuang Logo, which is used to fix the motherboard after it is inserted into the soil. image.png ( 3) Introduction to software resources 1. Overall network architecture of the system The overall network architecture of Nongtian automatic flowerpot is shown in the figure, including Nongtian technology server and WeChat server, mobile WeChat terminal, and flowerpot motherboard terminal. The communication process mainly has two parts. The first is the process of configuring the network for the flowerpot motherboard. The Airkiss protocol is used, and the LAN configures the network for the flowerpot motherboard. The second is the communication process of successfully configuring the network. The flowerpot actively reports the heartbeat to the Nongtian Technology server. The mobile WeChat terminal obtains the flowerpot setting data from the WeChat server and the Nongtian server and performs user binding. This will not be explained here. ff.png

2.STM32 resource application The STM32 resources and corresponding functions applied in this project are shown in the figure below. The main application resources include two UARTs, three timers (including system tick timer), two analog IICs, and several GPIOs. The UART serial port mainly has two functions. Serial port 1 is responsible for software debugging. Of course, during the debugging process It is applied to the jlink debugger, but the serial port output is more intuitive. Serial port 2 is mainly responsible for communicating with the ESP8266 WiFi module and controlling the connection and communication between the esp8266 and the server. The data information returned by the server may also be printed out through the serial port 1, so that it can be understood in real time. The working status of the flowerpot motherboard STM32. The tick timer is responsible for the delay applied by the system, and the timer 3 is responsible for the timing calculation of communication with the server, including the calculation of heartbeat and data upload time. Timer 2 needs to be set and entered in capture mode. By calculating the frequency of the water level sensing circuit, the software converts it into water level. The temperature and light sensors are both IIC protocol chips. Since the IIC protocol is convenient for simulation, two analog IICs are used. At the same time, the automatic watering function provided on the flowerpot motherboard is realized through the GPIO output high and low levels. The reset button is a multi-functional button that can configure the network and restore the system to factory settings by pressing the button for a long time. At this time, the LED status will have corresponding indications. f.png3.STM32 software resource corresponding pin list

resource GPIO Function
UART1 PA9 PA10 Debug serial port
UART2 PA2 PA3 ESP8266WiFi module
SysTick -- Tick ​​timer system delay
Timer3 -- Data upload timing
Timer2 -- Measure water level
GPIO PA8 reset button
GPIO PB4 led
GPIO PA11 PA12 Simulate IIC and measure illumination
GPIO PB8 PB9 Analog IIC, measure temperature
GPIO PB12 PB13 motor
ADC PB0 Measure humidity

(4) Introduction to product requirements 1. Initial stage: (1) Equipment power-on self-test: The equipment performs self-test after power-on, including checking connectivity and working conditions (water volume, electricity, etc.) with sensors and WIFI modules, and obtaining WIFI Module MAC address. Check whether the indicator light flashes normally. After completing the above process, the MCU puts the WIFI module into a low-power sleep state. (2) Button trigger: The APP prompts you to press the button to configure the network. Press and hold the button for 3 seconds, and the MCU activates the WIFI module. (Indicators flash in conjunction with each other) (3) Configure WIFI (mobile phone): This process is implemented by the mobile APP and WIFI module, and the MCU does not participate. (4) Check WIFI connectivity: After the WIFI module is activated, the MCU begins to continuously check the WIFI module and routing Connectivity until the connection to the router is successful. (Indicators flash in conjunction with each other). (5) Configure server and port number (MCU side): MCU configures the server address and port number for the WIFI module. (The indicator lights flash together) (6) Handshake signal: MCU sends handshake signal until confirmation from the server is received. (The indicator lights flash in conjunction with each other) (7) Validity verification: MCU sends the ID to the server until it receives confirmation from the server that it is valid. (The indicator lights flash together) (8) Request time: MCU requests the current time from the server, and the local RTC starts timing 2. Running stage (1) Upload data: (table below)

content unit scope
ambient temperature 0-55(+/-1℃)
soil moisture %SH 0-99(+/-10%)
light intensity Lux 0-65535(+/-100lx)
Water volume L 0.1-2(+/-0.1L)
Power - -
time yyyy-MM-dd hh:mm:ss.ff 2019-07-22 07:45:01.234
Fault 1. Sensor failure: When the sensor is out of range or cannot communicate, an indication byte is given. 2. Timeout retransmission/communication error: The communication waiting time is 1s, and the number of retransmissions after timeout is 3 times. Accumulated sum of 3 consecutive times 3. Network disconnection: When the number of timeout retransmissions exceeds 3 times, the network is disconnected and the handshake is re-(repeated) until the network is restored.

(2)Download data: (table below)

content unit scope
watering - 0: No action 1: Watering
Time synchronization yyyy-MM-dd hh:mm:ss.ff 2019-07-22 07:45:01.234
heartbeat Send heartbeat packets at intervals when uploading data to maintain connection with the server Default frequency: 10s

(3) Other functions: (Table below) * 2. Describe the challenges faced by the work and the problems it solves; The target group of this entry is young people who like to grow flowers and do not have much time and are busy with work. By automatically obtaining the plant growth environment status, uploading it to the server, and interface with the WeChat server. Users can obtain these statuses through WeChat and share them. Users can also irrigate and water plants on WeChat. During the development and design process, we mainly solved the problem of water level measurement in the water tank in the micro-planting environment, which will be introduced in detail in the next section. This design can not only measure water level in a smaller space, but also can be attached (or stuck) inside irregular containers to achieve measurement due to the FPC manufacturing process. The structure has strong adaptability. It should be pointed out in particular that we have developed non-contact liquid level measurement in a laboratory environment. As long as it is a non-metallic cavity, after circuit parameter debugging and structural close-fitting, this FPC sensor can be attached to the cavity. Externally, there is no need for direct contact with the liquid to be measured, and its performance is superior to common liquid level valves or ultrasonic side liquid level principles. It can be expanded to be used in smart water cups, medical bottle drip volume detection, etc. The first challenge faced by this entry is power consumption. Currently, lithium batteries and chargers are shared. If lithium batteries are used for power supply, the WiFi chip consumes a lot of power. Flowerpots generally remain stationary and need to be moved when needed. At that time, after testing, a 2000mAh lithium battery can also sustain power supply for 2-3 days. The next stage requires software and hardware optimization in low-power design; the second challenge is that the soil moisture detection accuracy is not high. Currently, it is divided into The gear mode is calibrated through domestic ordinary soil moisture sensors. If higher accuracy is required, the circuit and software need to be further designed and calibrated with foreign high-precision soil moisture sensors. It needs to have good consistency and provide the basis for subsequent Prepare for mass production.


* 3. Describe the key points involved in the hardware and software parts of the work; 1. Key points in the hardware part:     Using capacitive sensing technology, a flat capacitor is made on the FPC. The two plates form mutual capacitance, and a signal of a certain frequency is generated through the LC oscillator. , is sent to one plate of the flat capacitor, and the other plate is used as a receiver. As the liquid rises, the mutual capacitance value changes, and the received frequency changes compared to the frequency of the air. The frequency of this change is measured through the frequency measurement function of the microcontroller timer. After calibration, the water volume can be known. Similarly, in order to obtain higher accuracy, soil moisture measurement uses one sending plate and two receiving plates. The more receiving plates, the higher the measurement resolution. 2. Key technical points of the software part . The key technical points of the software part are, on the one hand, the control of the overall software design and the control of power consumption, and the second, the design of the flowerpot protocol. This design uses a private protocol and uses custom data. The meaningful method ensures that the flower pot is online and the data communication is stable. The third is water level collection. For the hardware collection frequency method, the software calculates the frequency by capturing counts and then converts the water level, and draws the water level (or soil moisture) based on the calibration value. After fitting the relationship curve with frequency, the input and output equations are formed, and the overall effect is stable.


* 4. List of materials for the work; 1. Main board, top panel, side panel 2. 1 FPC 3. 1 flower pot 4. 1 sink 5. 1 set of waterproof micro-pump and water pipe 6. TCP Server 7. One WiFi router


* 5. Upload the picture of the work; (the PCB must have the competition logo and take a photo and upload it, if not, it will be deemed as giving up the competition) See the attachments "Pictures of the work.rar" and "PCB(PDF).rar" Flower pot construction model.jpg image.png circuit board Details.jpg image.png Mainboard front and back.jpg image.pngimage.png 3D-PCB image.png FPC picture image.png WeChat client.jpg image.png


* 6. Demonstrate your work and record it as a video for upload; (The video content must include: introduction to the work; functional demonstration; performance test; close-up of the competition logo on the PCB. Failure to do so will be deemed as giving up the competition) Video address: https://v .youku.com/v_show/id_XNDM3MDI3MTcwOA==.html?spm=a2h3j.8428770.3416059.1 or Youku search: Nongtian automatic flowerpot.


7. Open source documents. 1. Hardware-Server-WeChat Client Function Requirements Document V0.1.xlsx 2. Hardware-Server-WeChat Client Technical Solution Requirements Document V0.1 (internal draft).docx 3. Hardware-Vendor Server Communication Protocol V0.0.1 (toServer developer, external).xlsx 4. Hardware functional requirements (toServer developer, external).docx 5. Hardware-structural requirements V0.3.docx 6. Water level calibration data.xlsx

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-05 02:45:04

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号