【正文】
是保護穩(wěn)壓芯片。由此通過開關(guān)的控制來完成了小旗的升降與停止功能。也就是說,給步進電機發(fā)一個控制脈沖,它就轉(zhuǎn)一步,再發(fā)一個脈沖,它會再轉(zhuǎn)一步。要想使步進電機按一定的速度精確地到達指定位置(角度或位移),步進電機的步數(shù)N和延時時間DALAYA是兩個重要的參數(shù)。步進電機要走的實際步數(shù)為N1=(S/C)64=64≈685步 步進電機實際要“走”的步數(shù),即為接收到的來自控制模塊的脈沖數(shù)?升(降)旗一秒所走的距離:V=S/t=167247。將國旗從基點上升到最高點或從最高點下降到最底端時,且跟蹤顯示物旗幟的上升高度,,并把它轉(zhuǎn)化為電機應(yīng)轉(zhuǎn)的步數(shù),最后將程序步數(shù)轉(zhuǎn)化為應(yīng)送出脈沖的個數(shù)并輸出。音樂功能主要是由定時器0的中斷完成,程序開始先對定時器0進行初始化,然后定時器0中斷完成音長的控制,在完成特定音符的音長后讀取下一個音符,并且更新定時器0的初始設(shè)置值。keil uvision3軟件調(diào)試過程簡單,功能強大,有跟蹤程序的執(zhí)行、設(shè)置斷點和實時觀察內(nèi)存等基本功能,另有配合仿真器使用的部分特殊功能,使編程與調(diào)試更為簡便。因為采用的是C語言編程,所以在對話框中選擇“是”。接著在左欄中點開“Target 1”,在“Source Group 1”加載剛才所建的文件,右擊“Source Group 1”選擇“Add File to Group ‘Source Group 1’”,找到剛才的文件,單擊“確定”.然后,加載程序進行編譯,將程序復(fù)制到文件中,調(diào)試結(jié)果在下顯示如有錯誤,點擊錯誤,就會在程序中提示出來,徐改完后繼續(xù)編譯,直到出現(xiàn)“0 Error(s),0 warning(s)”,表明程序編譯完畢。 HEX文件生成界面圖生成hex文件后,首先在運行程序中設(shè)置參數(shù),在”MCU Type”中選擇STC89C52RC,最高波特率設(shè)為115200,最低波特率設(shè)定為1200,在COM端口選擇開發(fā)板與PC機連接的COM口,如果不知道的話,可以右擊選擇”管理”,。 參數(shù)設(shè)定界面參數(shù)設(shè)定好后,采用優(yōu)轉(zhuǎn)串口先將郭天祥開發(fā)板與PC機連接起來,在開發(fā)板上放置單片機芯片,點擊OpenFile/打開文件找到生成的Hex文件,然后點擊下載,待提示上電后,給開發(fā)板上電,隨著指示燈的閃爍,程序被下載到單片機中,結(jié)束后,關(guān)閉電源。待元器件完整后,準備好要用的輔助儀器及工具,方便取用。將單片機最小系統(tǒng)的晶振電路和復(fù)位電路焊接在萬用板上,焊接時,注意單片機的管腳,以防接錯。 聲音模塊調(diào)試 接通電源,打開開關(guān)K1,控制語音模塊的單片機的20管腳接地端導(dǎo)通,單片機開始工作,開始三極管用的是9014,他是一個普通的NPN型管,集電極直接連接五伏電源,發(fā)射極經(jīng)過一個1K限流電阻連接一個有源的蜂鳴器,蜂鳴器開始工作,發(fā)聲。不斷地增加薄膜的半徑來控制線速度,最終滿足了設(shè)計的要求。 在只接驅(qū)動模塊的情況下,接通五伏電源,設(shè)置要停止的高度,將細線直接纏在電機的轉(zhuǎn)軸上,設(shè)置一個脈沖頻率,打開開關(guān)K1使電機工作在正轉(zhuǎn)(即國旗上升)的模式下,用秒表控制在43秒時間,國旗從參考零點上升,測試國旗在指定時間停止時的實際高度與設(shè)置的高度相差多大。分析與結(jié)果:上升的最大誤差是第二次測試,下降的最大誤差是第一次測試,在誤差范圍內(nèi),符合設(shè)計要求。結(jié)論此次采用單片機STC89C52設(shè)計了一個自動控制升降旗系統(tǒng),該系統(tǒng)實現(xiàn)了這幾項功能:(1)撥動上升鍵,國旗勻速上升,同時演奏國歌,上升到最高點時,自動停止,國歌停止播放。Jacobson, ,Readout supervisor design specifications[M], LHCb [16], report on the RD12 project:timeing,trigger and control system for LHC detectors[J] Time and technology,2009,(3):152155附錄A 英文文獻原文Development of a Novel Drive Topology for a Five Phase Stepper Motor. Weerakoon and L. Samaranayake(Dept. of Electrical and Electronic Engineering, Faculty of Engineering, University of Peradeniya, Sri Lanka)[Abstract] In this paper, a novel drive topology for a five phase stepper motor is described in detail. Commercially off the shelf, low cost, standard stepper motor drive ICs are used to derive a novel drive topology for five phase stepper motors which enables closed loop speed and position control powered by inner current control loop. It is proved that the derived topology can be generalized to any stepper motor with higher odd number of phases. The designed driver consists of full step, half step, clockwise and counter clockwise drive modes with the speed control and current control. [key words] Fivephase stepper motor, the return drive, speed control, multimodeI. INTRODUCTIONIn most of the robotics and automation engineering designs various types of stepper motors are used to obtain the required motion profiles. Stepper motors are preferred, as they do not require frequent maintenance and due to their ability to operate in many harsh environments. Selection of the motors and their drive circuits depend on the required performance characteristics of the applications. The two phase and four phase stepper motors are the most mon types available in the market.However, for applications requiring high precision, low noise and lower vibration, Five Phase Stepper Motors are used. Due to smaller step angle, five phase stepper motors offer higher resolution, lower vibration and higher accelerations and decelerations. Therefore it is essential to make sure that these motor characteristics can be obtained from the designed drive topology.Because the five phase stepper motors are a rarely used type in the robotic applications and the construction is typically plicated, it is very difficult to find driver ICs, which are manufactured exclusive for them. As a result, the available Driver circuits for five phase stepper motors are very expensive.Using the available drive control ICs manufactured for mon kinds of stepper motors such as 2 phased and 4 phased and using them in modeling new driver topology for other stepper motors would be a cost effective approach.The IC L297 integrates all the control circuitry required to control bipolar and unipolar stepper motors. The L298N dual H bridge drive forms a plete microprocessor to stepper motor interface. Here, novel drive topology is investigated and developed for five phase stepper motors by adding a microprocessor and logical control system with L297 and L298N. The plete topology is described in this paper.Section II explains the ponent characteristics. Section III is on the control logic circuit design phenomena. The interface design is given in Section IV with results in Section V. Finally the conclusions are presented in Section VI.II. CHARACTERISTIC ANALYSIS OF MAIN COMPONENTSThe IC L297 can be used with an H bridge driver IC for motor drive applications as shown in . In this design H bridge function is achieved from the L298N or L293E. This may change depending on the power rating of the motor. The control signals to the L297 may be received from microcontroller or from external switches. A single IC can drive a 2 phase bipolar permanent magnet motor, a 4 phase unipolar permanent magnet motor or a 4 phase variable reluctance motor. Because very few electronic ponents are used, it has many advantages such as lower cost, higher reliability and the ability to house in a paratively smaller space. The L297 generates three modes of phase sequences, namely half step mode, full step mode and wave mode depending on the input signals it receives. Fig. Circuit diagram to drive a 2 phase bipolar or 4 phaseunipolar stepper motor using L297 and L298N ICsA. CURRENT CONTROLSmall stepper motors generally need small DC supplies that control the winding currents and they are limited by the winding resistances. On the other hand, motors with the larger rated torque values have windings with smaller resistances. Therefore, they require a controlled cur