Design of plant stem diameter variation measurement system based on microcontroller

Publisher:陈风102Latest update time:2014-11-21 Source: 21ic Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  From the perspective of plant physiology, the dynamics of micro-changes in the volume of plant organs (stems, leaves, fruits, etc.) are related to the water status in the body. When the root system absorbs sufficient water, the stem expands slightly, and when the water is insufficient, the stem shrinks slightly. There are already instruments abroad that use changes in stem diameter to reflect the water and water shortage status in the plant body. However, its cost is relatively high. For this reason, this study mainly develops a measurement system for plant stem variation based on a microcontroller. The diameter of the plant stem changes at the micron level, so precise measuring instruments must be used to measure its changes.

  The inductive micrometer is a precision measuring instrument that can measure tiny size changes and is widely used in precision machinery manufacturing, transistor and integrated circuit manufacturing, as well as defense, scientific research, and metrology departments. It consists of two parts: the main body and the probe. With the corresponding measuring device (such as a measuring stand, etc.), it can complete various precision measurements. Therefore, with a suitable stand, it can also measure the diameter of the plant stem. By processing the measured data through the microcontroller and recording the time of data collection, a real-time data acquisition system for measuring changes in plant stem diameter can be formed.

  1. Hardware circuit

  The measurement system is composed of 89C51 microcontroller, inductive micrometer, ADC574 analog-to-digital conversion chip, DS12C887 clock chip, 8279 keyboard control chip, etc. The system block diagram is shown in Figure 1:

System block diagram for measuring rod diameter

  Figure 1 System block diagram for measuring rod diameter

  Among them, 89C51 microcontroller and inductive micrometer, AD57

  4 constitutes the data acquisition part and the A/D conversion part; the 89C51 microcontroller and the keyboard/display interface chip 8279 constitute the human-computer interaction part; the 89C51 microcontroller and the DS12C887 clock chip constitute the timing part of the system; the 89C51 microcontroller and RS232 constitute the communication part. The 89C51 microcontroller reads the sampling value from AD574 every hour through the internal timing interrupt, and records the time at this time by reading DS12C887. If necessary, the measured value and time can be displayed on the LED through keyboard operation. The 89C51 microcontroller stores the collected data and the recorded time, and can send these data to the PC through the RS232 communication port. The working principles of the main parts are described as follows:

  1.1 Data Collection

  1.1.1 Working principle of inductive micrometer

  

Working principle diagram of inductive micrometer


Figure 2 Working principle diagram of inductive micrometer

  The electric micrometer converts the size change of the measured object into a voltage signal output through an inductance sensor, a measuring circuit, etc. Its working principle is shown in Figure 2. When the power is turned on, the shock pressure generated by the oscillator is added to the inductance bridge composed of the inductance measuring head and the zeroing potentiometer (the inductance measuring head consists of an inductance coil and an iron core connected to the measuring rod and displaced together). When the iron core is in the middle position of the coil (balanced position) and the zeroing potentiometer is also in the middle position, the bridge is in a balanced state and no signal voltage is output. If the size change of the measured workpiece causes the measuring rod to move upward, when the iron core moves upward, the bridge is unbalanced and an output voltage is generated. Similarly, when the iron core moves downward, a voltage will also be generated, but the phases of the two signal voltages are opposite, that is, they differ by 180°. In this way, the inductance measuring head can be used to convert the tiny size change of the object into a corresponding voltage signal. Similarly, turning the zeroing potentiometer can also make the bridge unbalanced and generate an output voltage, which can be used for zero position adjustment.

  1.1.2 A/D Conversion

  The output of the inductive micrometer is a pulsating DC voltage signal, which will be affected by interference and noise during the processing. In order to improve the sampling accuracy, a second-order low-pass filter circuit is designed. In addition, the output voltage range of the inductive micrometer is -50mv~+50mv, which cannot meet the input requirements of AD574, and its output voltage needs to be amplified. Component parameters: R1=6.1K, R2=22K, R3=1K, R4=82K, R5=R6=10K; C1=470μF, C2=100μF. The circuit diagram is shown in Figure 6, where Ui is connected to the output end of the inductive micrometer and Uo is connected to channel 1 of ADC574.

Main program flow chart

Figure 3 Main program flow chart

  1.2 Timing

  The timing part is composed of DS12C887 clock chip and 89C51 microcontroller. DS12C887 clock chip is produced by DALLAS, USA. It has a complete clock and calendar clock function until 2100. Therefore, the system can conveniently set and record the time using this chip. In this system, 89C51 microcontroller reads the contents of 02H, 04H, 07H, 08H units of DS12C887 internal RAM to record the time (month, date, hour, minute) during measurement. The schematic diagram of the connection between 89C51 and DS12C887 is shown in Figure 1.               

               

  1.3 Keyboard and display                  

  This part is composed of 89C51 microcontroller and special keyboard/display interface chip 8279. 89C51 microcontroller reads the value from DS12C887 and sends it to 8279 to drive 8 LEDs to display month, date, hour and minute. Key input is processed by 8279 and sent to 89C51 to display the collected data and send the collected data and corresponding collection time to the host computer. Since the technology of this part is quite mature, I will not elaborate on it here.

  1.4 Communication part

  This system is designed to communicate semi-industrially between the microcontroller 89C51 and the host PC via the RS232 port. The 89C51 sends the collected values ​​within a period of time (such as one day) to the PC.

  2. Software Design

  The system software consists of the main program and interrupt handler. The main program is used for system initialization, 8279, DS12C887 initialization, internal and external interrupt initialization, and timer initialization. The interrupt handler mainly responds to key input to call different subroutines. The subroutines include 8279 keyboard display control program, A/D conversion digital filter subroutine (acquisition number program), scale conversion program, and communication program. [page]

  2.1 Main program flowchart

  The main program block diagram of this system is shown in Figure 3. Its main functions are to read and store the sampling time from DS12C887, store the processed sampling value, and display the time and sampling value according to the key input.

flow chart

  2.2 Communication program flowchart

  89C51 communicates with PC in query mode. Only when PC is ready to receive data, 89C51 starts to send data. The flow chart is shown in Figures 4 and 5.

  2.3 Partial Program List

  The following program is an assembly program for setting the time of DS12C887. Assume that the address of DS12C887 is 5000H, and the month, date, hour, and minute are stored in units 53H, 52H, 51H, and 50H respectively.

  SETTIME: MOV R0,#50H

           MOV DPTR,#500AH

           MOVX A,@DPTR

           MOV A,#20H

           MOVX @DPTR,A ; open at least 244 milliseconds later

  INC DPTR; start update cycle

  MOV A,#80H

           MOVX @DPTR,A; the chip stops working,

  ; Initialize each time stamp

           MOV DPTR,#5002H ; Set minutes

            MOV A,@R0

            INC R0

            MOVX @DPTR,A ; Set hours

            MOV DPL,#04H

            MOV A,@R0

            INC R0

            MOVX @DPTR,A ; Set date

          MOV DPL,#07H

            MOV A,@R0

            INC R0

            MOVX @DPTR,A ; Set the month

            INC DPTR

            MOV A,@R0

  INC R0

  MO

 

VX @DPTR,A

            MOV DPTR, #500BH; 24-hour working mode,

            MOV A,#02H

            MOVX @DPTR,A  

  3. Conclusion

  This paper designs a plant stem diameter measurement system based on the 89C51 microcontroller. Preliminary tests show that the plant stem diameter can be measured in real time, and the measured value and the time of measurement can be stored and transmitted to the host computer, which facilitates further analysis of plant stem deterioration and water shortage. The cost and power consumption of the current system need to be further reduced to be suitable for field work. In addition, a suitable single-use sensor measurement device should be developed.

  The author's innovation lies in the use of inductive micro-instrument in conjunction with a microcontroller and peripheral circuits to achieve the purpose of real-time measurement of tiny changes in plant stem diameter at a relatively low cost. This idea can be further improved and ultimately applied in practice.

  references

  1 He Limin. MSC-51 Series Microcontroller Application System Design. Beijing: Beijing University of Aeronautics and Astronautics Press, 1990

  2 Tong Shibai. Fundamentals of Analog Electronic Technology. Beijing: Higher Education Press, 1988

  3 Xu Huazhong, Qu Xin. Yarn steamer control system based on MCS-51 single chip microcomputer. Microcomputer Information, 2006, 8:21-23

  4 Wang Junhong, Fu Zetian, Wang Xiu, etc. Design of variable spray controller based on AT89C52 single chip microcomputer, Microcomputer Information, 2006, 8:8-10

  5 Wu Guili, Liu Jianhua, Cui Yujie. Interface design between microcontroller and clock chip DS12887. Journal of Shijiazhuang Railway Engineering and Technology Institute, 2004, 3 (2): 15-19

  6 By J.-G.HUGUET, SHLI,J.-Y.LORENDEAU,G.PELLOUX. Specific micromorphometric reactions of fruit trees to water stress and irrigation scheduling automation. Journal of Horticultural Science.199267 (5)631-640

  7 L.Urban, C.Fabret, L.Barthelemy.Interpreting changes in stem diameter in rose plants.PHYSIOLOGIA PLANTARUM.1994.92:668-674

  8 Meng Zhaojiang, Duan Aiwang, Liu Zugui, et al. The relationship between the microscopic changes in pepper plant stems and the water status of crops. China Rural Water Conservancy and Hydropower, 2004. (2): 28-30.

Reference address:Design of plant stem diameter variation measurement system based on microcontroller

Previous article:Design of digital thermometer based on DS1620 and AT89C2051
Next article:Design of smart home wireless alarm system based on single chip microcomputer

Recommended ReadingLatest update time:2024-11-17 05:29

Design of speed control system for fuel injection pump calibration platform based on 89C51 single chip microcomputer
1 Introduction The performance of the fuel injection system directly affects the working process and performance indicators of the diesel engine. It is a key part of the diesel engine to improve emissions, reduce fuel consumption and improve performance. The traditional diesel locomotive diesel injection pu
[Automotive Electronics]
Design of speed control system for fuel injection pump calibration platform based on 89C51 single chip microcomputer
Design of Serial A/D Driver Based on 89C51 Single Chip Microcomputer
  The result of the conversion by the serial A/D converter is output in serial mode. The serial output of digital quantity can simplify the system connection, reduce the area of ​​the circuit board, and save system resources. The following takes TLC2543 as an example to introduce the design of the serial A/D driver.  
[Microcontroller]
Design of Serial A/D Driver Based on 89C51 Single Chip Microcomputer
The latest version of KEIL5 does not have ATMEL (including 89C51 chip)
The latest version of KEIL5 does not put the 89C51 series chip in Atmel like the original KEIL4, but in Microchip:
[Microcontroller]
The latest version of KEIL5 does not have ATMEL (including 89C51 chip)
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号