【正文】
分類號:TP 2 編號:BY 15 5033 10/11/2 140703沈陽化工大學本科畢業(yè)論文 題 目:比例電磁閥驅動電源軟件設計 院 系: 信息工程學院 專 業(yè): 電氣工程及其自動化 班 級: 0703 學生姓名: XXXX 指導教師: XXXX 論文提交日期:2011年 6月 27日 論文答辯日期:2011年 6月 28日畢業(yè)設計(論文)任務書電氣工程及其自動化專業(yè)電氣0703班學生:XXX畢業(yè)設計(論文)題目:比例電磁閥驅動電源軟件設計畢業(yè)設計(論文)內(nèi)容:1)利用PWM控制技術實現(xiàn)比例閥電流閉環(huán)控制; 2)采用單片機及相關驅動電路完成比例閥驅動電源設計; 3)為產(chǎn)品的實用化作必要的前期研究工作。畢業(yè)設計(論文)專題部分:1)在比較各種方案優(yōu)缺的點基礎上,完成比例電磁閥電流PWM閉環(huán)控制電源的軟件設計及試制;2)利用單片機設計電流可調(diào)式、電流跟蹤式比例閥電源各功能塊軟件,并與硬件系統(tǒng)聯(lián)機調(diào)試;起止時間:2011年03月2011年06月指導教師: 簽字 年 月 日教研主任: 簽字 年 月 日學院院長: 簽字 年 月 日摘要本文以國外比例閥電源控制器的功能和技術參數(shù)為參考,致力于將外部標準輸入信號轉換成PWM電壓信號,通過控制驅動PWM電壓的占空比,實現(xiàn)控制主電路的大信號。通過閉環(huán)設計,補償線圈的溫升影響,使比例電磁閥的電流穩(wěn)定,保持比例閥的開度不變,達到提高流量的控制精度的目的;同時,通過增加頻率可調(diào)環(huán)節(jié),選擇適用于比例閥的最優(yōu)脈動性。由于控制途徑是采用電流閉環(huán)控制,保證了電流的穩(wěn)定性。經(jīng)過仿真與實驗分析,完成了單片機控制器的設計。在硬件電路設計方面,根據(jù)本設計控制對象的特點,本文采用了STC12C5A60S2為核心控制器件在使用特殊功能寄存器功能下的PWM驅動電路方案,將理論計算和面包板調(diào)試相結合的方法,實現(xiàn)了主電路和驅動控制電路的參數(shù)研究,完成了控制主電路,PID調(diào)節(jié)電路和電流反饋控制電路的設計工作。其中工作主電路部分主要使用單片機直接輸出PWM控制信號。本文設計最后進行了實際測試,實驗結果表明本文所設計的電路基本都能滿足控制要求,對電磁閥平穩(wěn)、寬范圍內(nèi)的流量控制有著明顯的作用。關鍵詞: 電磁閥; 單片機; PWM; PIDAbstractIn this paper, the proportion of foreign power controller valve function as a reference, is mitted to an external standard voltage input signal into a PWM signal, PWM voltage by controlling the duty cycle of drive to achieve control of the main circuit of the largesignal。 through closedloop design, the pensation coilThe temperature rise, the solenoid valve with a stable current to maintain the same ratio of valve opening, to improve the accuracy of flow control purposes。 the same time, by increasing the frequency adjustable links, choose the best for the pulse of proportional valve.As the current control approach is the use of closedloop control to ensure that the current stability.Through simulation and experimental analysis, pleted the microcontroller design.In circuit design, according to the characteristics of the design control object, we use as the core control device STC12C5A60S2 SFR functions using the PWM drive circuit under the program, the theoretical calculations and bread board debugging method of bining to achieve the main circuitand drive control circuit parametric studies, pleted the main control circuit, PID regulator circuit and current feedback control circuit design.The major part of the main circuit which work directly with the microcontroller output PWM control signal.Finally, this design was the actual test, experiment results show that the design of the control circuit to meet the basic requirements of the solenoid valves smooth, wide range of flow control has a significant role.Key words: Solenoid valve; SCM; PWM; PID目 錄第一章 國內(nèi)外發(fā)展概況 1 國際驅動電源現(xiàn)狀 1 國內(nèi)驅動電源現(xiàn)狀 1 比例電磁閥驅動電源設計的意義 1第二章 比例電磁閥電流環(huán)控制優(yōu)缺點 3 3 3第三章 比例電磁驅動電源設計原理 4 總體方案 4 基本思路 4 比例電磁閥簡介 5 硬件要求 5 比例電磁閥驅動電源的功能 5 功能簡介 5 技術指標 6 優(yōu)點 7第四章 硬件系統(tǒng)設計分析 8 控制電路 8 10 放大電路 11 按鍵與顯示電路 12第五章 軟件系統(tǒng)設計 13 軟件設計的整體思路 13 編程工具Keil uVision4 13 Keil的概述 13 Keil uVision4的組成 14 初始化 14 系統(tǒng)的始化 14 主程序 14 子程序 16 系統(tǒng)時鐘初始化子函數(shù) 16 7279芯片初始化 17 定時器0初始化子函數(shù) 18 PWM初始化子函數(shù) 19 延時子函數(shù) 21 數(shù)碼管顯示子函數(shù) 21 鍵處理子函數(shù) 22 PWM處理子函數(shù) 22 AD轉換子函數(shù) 22 PID算法子函數(shù) 24第六章 實驗結果及數(shù)據(jù)分析 26 Proteus仿真軟件簡介 26 調(diào)試中出現(xiàn)的問題及實驗結果 26 調(diào)試中的問題 26 實驗結果 27結束語 28致 謝 30參考文獻 31附錄A 硬件原理圖 32附錄B 顯示電路原理圖 33附