CAO Yi ,ZANG Yi,SHI Qingsheng,LU Ke
School of Electrical Engineering,Henan University of Technology,Zhengzhou 450001,China
Numerous foods are produced from wheat,and grain hardness has been described to have an impact on grain end-use value,and in particular for drymilling performance.In flour processing industry,grain hardness is usually used as a grading index to determine the type of wheat[1 - 2].Grain hardness is normally influenced by various environmental,physical and chemical factors like kernel protein,vitreousness of grain,kernel size,water-soluble pentosans,moisture content and lipid content[3].
Correspondingly,a number of attempts have been made to find a quantitative measure of the hardness of individual kernels or of the average hardness of a collection of kernels.In the article written by GALANDE et al.[4],many testing methods were listed and the characteristics of each one were analysed in detail.In these methods,the endosperm texture or the relative hardness or softness of a grain can be defined as a measure of the resistance to deformation based on the Single Kernel Characterization System(SKCS).So far,the SKCS testing methodology is used commonly in the world.However,Standard Deviations(SDs)for all SKCS traits are not correlated with any of the wheat traits.Therefore average hardness is a better indicator of wheat kernel quality.
In the papers[5 -6]and the patent[7],a novel hardness tester based on a collection of kernels is presented.The tester is able to measure the hardness of a collection of kernels which are in a container by one stroke,and that is simpler than the traditional SKCS method.In the kernel hardness tester,an 8-bit MCU[6]based Data Acquisition and Control(DAC)system is proposed in detail from the hardware and software.Nevertheless,there are some shortcomings in the MCU controller,such as,it cannot show the testing curves on the LCD in time,and the input/output of complex parameters are almost impossible to achieve.Nevertheless,contrasting to the 8-bit micro-processor,the 32-bit ARM microprocessor[8]core’s ability to execute complex mathematical functions in a short time makes this family of microprocessors ideal for implementing servo motor control techniques and collecting multiple sensor data at the same time.So in the paper,an ARM micro-processor based on Linux OS is used to replace the previous MCU controller.
As shown in Fig.1,the wheat kernel tester consists of a load force sensor,one container,one linear sliding saddle,one stylus of hardened steel rod and so on.One(upper)end of the Alternate Current(AC)servo motor connects with an optical encoder and the(lower)end with a screw which drive the linear sliding saddle.
Fig.1 Mechanical outcome of the hardness tester
Before testing a kernels sample,some preparation should be carried out.First,a certain quality of wheat kernels,40 gram for example,is taken into the container.Then the top cap of the container is screwed with a certain load to press onto the sample.After that,the container is placed on the base of the tester and a hole of the top cap is centered to the stylus.
When a test begins,the servo motor starts to rotate and the stylus which is installed on one end of the load sensor is forced into the kernels in the container moving along the sliding saddle.Within a certain range,if the weight of the kernels is constant,the kernel hardness could be characterized by the relationship between the loading force and the displacement of the stylus.Therefore appropriately increasing the accuracy of stress and displacement measurement is critical to assure the reliability of hardness measurement[9].
For a measuring instrument,having the capabilities such as complex computing and data display is very important.For the hardness tester,it is not only needed the display of the measuring data on screen,but also the analysis of the data from mathematical and physical.Therefore,in its control system,a Samsung ARM9 32 bit microprocessor is used for data acquisition of various sensors,as well as motor controller.
The optical encoder used in the tester is an incremental rotary encoder which could provide 131 072 pluses at most.The linear displacement of the sliding saddle corresponding to one pulse Dp,can be calculated from the rotary angle by the equation(1).
Where,Dcis the rotary displacement corresponding to per revolution of the encoder,kcis a coefficient chosen from the reference manual,and according to the desired displacement resolution.In the paper,kc=113 and Dc=10 mm,therefore Dp=0.01 mm.
Block diagram,shown in Fig.2,for the tester controller featuring the ARM microcontroller,analog/digital conversion modular,LCD,and servo motor actuator& displacement measure modular.The three modular are of the most important for constructing the tester,so should be considered seriously in the design.
Fig.2 Detection and control system of tester controller
The output signal obtained from the load sensor(0~50 kilogram force)is of low magnitude(0 to 22 mV),whereas the analog input range of S3C2440 is 0~3.3 V,hence the signal needs to be amplified before further processing.In addition,the integrated A/D converter module can only convert the analog input signal into 10-bit binary digital codes,which can not meet the resolution of the tester.Therefore,an external A/D converter chip AD7705 is used in the design[10].
The AD7705 is two fully differential input channel ADCs.The devices employ an Σ - Δ conversion technique to realize up to 16 bits of no missing codes performance.The selected input signal is applied to a proprietary,programmable-gain front end based around an analog modulator,and the gain can be from 1 to 128.The programmable gain input allows the AD7705 to accept input signals range of 0 mV to 20 mV directly,removing a considerable amount of signal conditioning.The device features a serial interface that can be configured for 3-wire operation,and simplifies the interface design.The interface circuit of AD7705 and S3C2440 is shown in Fig.3.
Fig.3 Interface circuit of AD7705
In the paper,an AC servo motor model GYS101AC2-T2A and a servo driver/amplifier model RYC101D3-VVT2,made by Fuji Electric Group,are employed to realize the precise control of actuating system.In order to improve the anti-jamming capability,the servo motor control pulses are converted to differential signal by the chip MC3487(shown in Fig.4),and the differential output signals of optical encoder,phase A and phase B,are converted to level signals for the MPU by the chip MC3486(shown in Fig.5).
Fig.4 Circuit of servo motor amplifier
Commonly,microcontrollers are integrated into automated machines which facilitate engineers to interact via LCD displays,buttons/knobs and keypads.In this tester of the paper,the sensory data are needed to be acquired to the ARM microprocessor and to provide actuator control commands to drive the servo motor.The algorithm for designing the software is given in the form of flow chart in Fig.6.
Fig.5 Servo motor control circuit of encoder measurement
The architecture of ARM technology enables the development of interactive GUIs for process monitoring and control[11].In order to accomplish the above tasks shown in Fig.6,embedded operation system porting,device drivers,and GUI application programming should be completed.
Compared to other Operating Systems(OS),the characteristics of embedded Linux are perfectly matched with the attributes of the OS required in the project:Integrating open source applications can help reduce overall development costs and improve TTM(time-to-market).The Linux architecture and kernel ensure the stability and reliability.The kernel,the core of the embedded Linux can be customized easily for the specific hardware architecture independently with the file system and GUI.In this paper,the controller software development is finally based on ARM Linux kernel,one of the open source embedded Linux implementations.
Fig.6 Flow chart of measurement and control
In the Linux kernel,device drivers take on a special role.They hide completely the details of how the device works,but provide a well-defined internal programming interface.In this paper,there are three devices drivers to program.First is the SPI driver for ADC.The mainly functions of SPI driver consist of configuring the ADC mode and acquiring ADC results[5].Second is the servo motor driver.Four operation functions are compiled in the driver,and they are open function,write function,close function,and ioctl function.The write function is responsible for regulating the duration of high and low level to achieve different frequency PWM pulses to control the servo motor.The ioctl function call sets one generating PWM pulses pin to low level,and another is set to high,and thus stops the servo motor.Last is the encoder driver.By calling encoder driver,the pins’status of interface port is returned to count the pulses and determine the rotation direction of the servo motor.
For the GUI application,Qt/Embedded is the most popular small footprint option suitable for the S3C2440 platform.Qt/Embedded is available under the GNU General Public License(GPL),or can be licensed on other terms from its originator,which is not open-sourced and free of charge.Qt/Embedded provides a full graphics stack,from the hardware interface to a full GUI toolkit.Through direct interaction between QT API and Linux I/O devices,the controller GUI provides an interface configuring parameters,running programs,and saving the test results,relying heavily on Qt/Embedded and Tslib(Tslib is a linux library for initialising and reading data from a range of touch screen devices,using standard methods).That is to say,Qt/Embedded provides the user interface functionality,while Tslib provides the underlying touch screen library.
The main interface(GUI)is the monitoring and the control software of the tester.The interface includes four sub modules:data acquisition,data management,system management,and exit.In the interface,the user should input some parameters,such as the load force threshold of the stylus,the diameter of the stylus,the stylus displacement intruding in the wheat kernels,and the name of the wheat sample.The data consist of two columns,the first one is the load force of the stylus and the second is the corresponding displacement.There are five buttons in the picture below,comprising Start,Stop,Data curves display,Data delete,and Data save.
A novel hardness tester for wheat kernel has been presented in the paper,and the operation process is introduced in brief.The measure and control system employs a Samsung ARM9 32 bit microprocessor as the controller which is the foundation of the hardware,and the software development is based on ARM Linux.The controller GUI provides a userfriendly interface with configuring parameters.Based on the tested results,the objectives of the mechatronic tester have been successfully accomplished since the servo motor can be controlled in specific speed and displacement,and interfacing with the load sensor works perfect.
The hardness tester system has been successfully used in contrastive studies on various wheat kernels.The system designed in this paper can deal with many middle and small mechatronic control systems.When external attachments are added,ARM microprocessor based embedded system really minimizes overall system costs and eliminates the need to configure additional components.
[1] PASHA I,ANJUM F M,MORRIS C F.Grain hardness:a major determinant of wheat quality[J].Food Science and Technology International,2010,16(6):511 -522.
[2] GUO Shihua,HE Zhonghu.Association between friabilin protein and grain hardness in common wheat[J].Scientia Agricultura Sinica,2003,36(9):991-995.
[3] TURNBULL K M,RAHMAN S.Endosperm texture in wheat[J].Journal of Cereal Science,2002,36(3):327-337.
[4] GALANDE A A.Dissection of kernel hardness and bread making quality in wheat using molecular markers[D].India:PlantMolecular Biology Unit,Division of Biochemic,2002.
[5] CAO Yi,HE Shenxue,CHEN Huige.Research and implementation on extending AD driver program based on ARM-Linux[J].Automation & Instrumentation,2010,25(9):45-48.
[6] CAO Yi,LI Xiujuan,YUE Longwang.MCU-Based detection and control system design of a kernel hardness tester[J].Applied Mechanics and Materials,2011,44:4018-4022.
[7] CAO Yi,ZHOU Jie,LI Xiujuan,et al.Wheat hardness tester with pressure instruding:People’s Republic of China,CN202351140U[P].2011-12-14:1-5.
[8] ELECTRONICS S.S3C2440A 32 - Bit CMOS microprocessor user’s manual[K].2004.
[9] CAO Yi,YU Xinjun,ZHOU Jie,et al.Wheat hardness tester and its detection methodology:People’s Republic of China,CN102519815A[P].2011-12-14:1-7.
[10] Analog Devices Inc.AD7705/AD7706 user datasheet[K].2006.
[11]BLANCHETTE J,SUMMERFIELD M.C++GUI programming with QT[M].2nd ed.Beijing:Publishing House of Electronics Industry,2009.