Hong-yan SHI, Xiao-qiang WU, Xiao-min SHAN,Chun YING, Chun-you ZHANG
(College of Mechanical Engineering, Inner Mongolia University for the Nationalities, Tongliao 028000, China)
?
Software design for spur gear tooth thickness based on MATLAB/GUI
Hong-yan SHI, Xiao-qiang WU, Xiao-min SHAN,Chun YING, Chun-you ZHANG*
(College of Mechanical Engineering, Inner Mongolia University for the Nationalities, Tongliao 028000, China)
As far as the gear measurement and analysis are concerned, the traditional way is to do large amount of calculation by using the artificial evaluation other than commonly used to divide the circular tooth thickness. In order to solve the above problems, this paper developed a straight tooth cylindrical gear tooth thickness calculation software to realize the corresponding computation functions by using the MATLAB/GUI function to add the corresponding controls. The calculation examples have shown that the design and development of this software has a certain practical value.
Spur gear, MATLAB/GUI, Callback function
Spur gear could transmit motion between two parallel axes with high transmission efficiency, which has a great range of passing power and peripheral speed. It becomes the most widely used transmission mechanism [1-2]. The tooth thickness of other circles outside pitch circle are often used in the analysis and measurement, the traditional calculation method is usually manual calculation, which is error-prone and needs large computation. Therefore, there is a need to develop a specialized computation software. With the development of object-oriented technology, graphical user interface (Graphical User Interfaces, GUI) design becomes more popular [3-7]. GUI design, which is the build-in function in MATLAB, could meet design object of the user through the related graphics capabilities. In this paper, with the GUI function in MATLAB, calculation software for spur gear tooth thickness is developed, which has the powerful computation capabilities and easy-learning characteristic based on the MATLAB.
This paper gives the computational formula for spur gear tooth thickness on the arbitrary circle. Then, a graphical user interface is designed and the program code is written in the appropriate callback function. Based on these characteristics, this software could independently run without the MATLAB environment. Finally, a numerical example is given to verify the correctness of the software design.
According to the literature, it shows that teeth thick of straight teeth cylindrical gear is related with pressure angle and radius of arbitrary circle. As shown in Fig.1, the radius at the pointKisrK, whose pressure angle is:
(1)
Tooth thickness at the pointKis:
(2)
Where,φKis the central angle of both sides of the cylindrical gear tooth profile corresponding pointK.
From Fig.1, it can be seen that the central angleφKcould be expressed as follows:
(3)
Puttheequation(3)intoequation(2),thetooththicknessofarbitrarycircleoncylindricalgearcouldbeexpressedasfollows:
(4)
Fig.1 Tooth thickness of arbitrary circle
The graphical user interface (GUI) refers to a man-machine interface which consists of windows, menus, graphics, buttons, dialog boxes and text boxes, and other graphic objects. By selecting, activating graphic above-mentioned objects, it could make the computer generate the corresponding action or change. Basic graphical objects could be divided into the control objects and menu objects, referred as the controls and menus for short[5]. Controls used in this software interface design consist of text editor, static text boxes and buttons.
Graphical user interface design window in the MATLAB is shown in Fig.2. Desired controls are dragged into the blank panel and named to obtain the software interface as shown in Fig.3. Then the appropriate parameters are required to enter into the dynamic input box on the left. By clicking the calculation button, the program calls the input parameters to calculate and display the calculation results in the right side of the text box.
Fig.2 GUI design interface
Fig.3 Calculation software interface
The above-designed calculation software is developed in the MATLAB environment and could only run in the MATLAB environment, which greatly limits the use of this software. In this paper, the correlation functions in MATLAB are used to generate a program which can independently run without MATLAB environment.
The steps of generation stand-alone application are as follows:
1) Install the compiler. Enter mbuild-setup in MATLAB, then select the compiler, as shown in Fig.4.
Fig.4 install the compiler
2) Call MATLAB Compiler toolbox, as shown in Fig 5. Use Compiler toolbox to generate a window of generation stand-alone application, as shown in Fig 6.
Fig.5 Compiler toolbox
Fig.6 The window of generating standalone application
3) Click Add main file in the window of Windows Stand-alone Application shown in Fig.7, and add the M program written in MATLAB into the window, then click the first button on the top right corner to generate the exe files.
Fig.7 Add M-files
4) Finally package the obtained exe files with MATLAB self-bring “MCRinstaller.exe” together, and first install MCRinstaller.exe on the computer where MATLAB is not installed, then run the calculation software. This method could make the application runs independently without the MATLAB environment on any computers.
Take a spur gear for example, the specific geometric parameters are shown in Table 1. According to the calculation software, an arbitrary location is selected to calculate.
Table 1 Spur gear parameters
ModulemNumberofteethZPressureangleαAddendumcoefficient32520°1
The parameters above are entered into the corresponding position in the software. Take the calculation of addendum circle and pitch circle tooth thickness for example, the calculation result is shown in Fig.8 and Fig.9.
Fig.8 Calculation result of tooth thickness of addendum circle
Fig.9 Calculation result of tooth thickness of pitch circle
Manually calculate the tooth thickness of the addendum circle and pitch circle is as follows:
sa=2.159mm
The calculation result is exactly the same as the result of software, which proves the correctness of this software. In addition, the software could also integrate a calculator function, which is convenient for the calculation of user, as shown in Fig.10.
Fig.10 Calculator
In this paper, through MATLAB/GUI, a spur gear tooth thickness calculation software is designed and developed to make the tooth thickness calculation simple, accurate and easy to operate. In addition, with this design method software development cycle could be decreased, which has a certain significance to other software design.
This paper is supported by National Natural Science Foundation of China (6144041).
[1]Zhang Ce. Mechanical principle and mechanical design [M].Beijing: Mechanical Industry Press, 2004.
[2]Xiao Li.Forming method based on straight bevel gears dimensional parametric design [J].Manufacturing Automation, 2012,34(4): 154-156.
[3]Gezhe school.Proficient in MATLAB [M].Beijing: Electronic Industry Press, 2008.
[4]Chen Jie.MATLAB Collection [M].Beijing: Electronic Industry Press, 2013.
[5]Section insurance cases, segment Liu Yun, et al.Research and Implementation of MATLAB GUI software production methods[J].Electronic Design Engineering, 2010,18(7): 54-56.
[6]Wang Yulin, Ge Lei, et al.The new interface development tools: MATLAB/GUI [J].Radio Communications Technology, 2008, 34(6): 50-52.
[7]Qiujin Hui, Wang Yu-hui, et al. The new interface based development approach MATLAB/GUI of [J].Journal of Industrial Science, 2008, 25(4): 233-236.
基于MATLAB/GUI的直齒圓柱齒輪齒厚計(jì)算軟件設(shè)計(jì)
侍紅巖,吳曉強(qiáng),單曉敏,迎春,張春友*
內(nèi)蒙古民族大學(xué) 機(jī)械工程學(xué)院, 內(nèi)蒙古 通遼028000
在齒輪的測(cè)量和進(jìn)一步的分析中,常用到分度圓以外的其他圓上的齒厚,傳統(tǒng)的方法就是通過(guò)人工進(jìn)行計(jì)算,計(jì)算量大,且易出錯(cuò)。為了解決以上問(wèn)題,利用MATLAB/GUI功能,開發(fā)直齒圓柱齒輪齒厚計(jì)算軟件,在MATLAB/GUI添加相應(yīng)的控件,并在相應(yīng)的回調(diào)函數(shù)中編寫程序,以實(shí)現(xiàn)相應(yīng)的計(jì)算功能。計(jì)算實(shí)例表明:本文設(shè)計(jì)開發(fā)的計(jì)算軟件具有一定的實(shí)用價(jià)值。
直齒圓柱齒輪;MATLAB/GUI;回調(diào)函數(shù)
25 November 2014; revised 9 Feburary 2015;
Chun-you ZHANG,
E-mail: wangzai8402@163.com
10.3969/j.issn.1001-3881.2015.18.015 Document code: A
TH132.417
accepted 12 March 2015
Hydromechatronics Engineering
http://jdy.qks.cqut.edu.cn
E-mail: jdygcyw@126.com