【正文】
進(jìn)行穩(wěn)壓??刂谱止?jié)的最高有效位(位 7) 必須 為邏輯1, 否則就 不能把數(shù)據(jù)寫入 DS1302。 本控制器可以 通過 此模塊, 可以 實(shí)現(xiàn)微 機(jī)和單片機(jī)之間的數(shù)據(jù)交換。 當(dāng)單片機(jī)的 , MOC3043輸出端的雙向可控硅導(dǎo)通, 此時(shí)對(duì)向可控硅 BTA12600導(dǎo)通, 加熱管通電加熱;當(dāng) , MOC3062輸出短的雙向可控硅關(guān)斷, 對(duì)向可控硅 BTA12600截止, 加熱管斷電 ,不加熱 。 DSl8B20的引腳 DQ連接 ,作為單一數(shù)據(jù)線 ,并且接 ,連接電路圖如圖 210所示。 DS18B20的測(cè)溫原理 [11]為: 低溫度系數(shù)晶振的振蕩頻率受溫度影響小, 把 產(chǎn)生固定頻率的脈沖信號(hào)送 到 計(jì)數(shù)器 1。 C,在一 10℃ ~+85℃ 。電路圖如 圖 28所示 : Q185 50D4紅燈報(bào)警R81KL S 1R747 0V C CP D2黃燈D3綠燈R147 0R647 0V C CP P 圖 28指示燈、報(bào)警電路 控制器采用三個(gè)發(fā)光二極管指示工作狀態(tài),D 2黃燈表示恒溫保持定時(shí)倒計(jì)時(shí);綠燈表本科畢業(yè)論文 10 示控制器 正在 控制 加熱 ;紅燈表示 恒溫時(shí)間到,停止工作 。 第 6腳: E端 是 使能端, 低電平時(shí) 執(zhí)行命令。 本科畢業(yè)論文 8 S4加S2 設(shè)置S5減P 1 .0P 1 .1P 1 .2 圖 25 鍵盤 接口 電路 圖 顯示電路 LCD1602概述 字符型液晶顯示是一種用于顯示字母、數(shù)字、符號(hào)等點(diǎn)陣式 LCD,目前常用 16*1, 16*2,20*2和 40*2行等的模塊。時(shí)鐘有內(nèi)部 產(chǎn)生 方式和外部產(chǎn)生方式 。 最高運(yùn)作頻率 35Mhz, 6T/12T可選。與數(shù)碼管相比, 開銷小,需要提供的 I/O 接口電路也較簡(jiǎn)單,功耗低,反應(yīng)靈敏。 用單片機(jī)并結(jié)合 PID算法對(duì)溫度進(jìn)行 控制, 大大減少了 溫度的抖動(dòng), 使溫度處于相對(duì)穩(wěn)定 值 ,也 減少了雙向可控硅道通次數(shù) ,打破了頻繁通斷繼電器的傳統(tǒng)溫度控制方式 。 ℃,當(dāng)電源電壓在 5— 10V之間,穩(wěn)定度為 1﹪。應(yīng)用 PID算法 [5]提高溫度的精度,使溫度保持在要求的一個(gè)恒定范圍內(nèi)。 課題研究的主要內(nèi)容及技術(shù)參數(shù)有以下幾點(diǎn): ( 1)通過按鍵設(shè)定加熱目標(biāo)溫度和恒溫時(shí)間; ( 2)通過 LCD液晶顯示溫度和時(shí)間,當(dāng)目標(biāo)溫度到達(dá)時(shí),倒計(jì)時(shí); ( 3)通過綠、黃、紅彩燈顯示正在加熱、定時(shí)倒計(jì)時(shí)、報(bào)警; ( 4)紅燈閃爍報(bào)警的同時(shí),結(jié)合蜂鳴器發(fā)出聲音報(bào)警; ( 5)應(yīng)用 PID算法提高控制精度;溫度誤差≤177。 溫度 控制系統(tǒng)由人工調(diào)節(jié)發(fā)展到由單片機(jī) 控制,溫度 采集由熱電偶、熱電阻 發(fā)展到可編程的 數(shù)字溫度傳感器,制冷和加熱的設(shè)備 都 有所改善,可控制的溫度范圍 越來越大 , 精度 逐步提高,恒溫箱的應(yīng)用也越來越細(xì)化。 現(xiàn)在市場(chǎng)上的溫度控制器 所選用電熱元件一般都是電發(fā)熱絲 。用戶可自行設(shè)定的所需溫度、恒溫時(shí)間等參數(shù)。控制器由單片機(jī)、溫度采集模塊、溫度控制模塊、顯示模塊等模塊組成,可結(jié)合現(xiàn)場(chǎng)溫度與用戶設(shè)定的目標(biāo)溫度,采用 PID算法和 PWM脈寬調(diào)制技術(shù),使溫度逐步穩(wěn)定于用戶 設(shè)定的目標(biāo)值。 關(guān)鍵詞: PID算法 , 恒溫控制 , 中醫(yī)理療 本科畢業(yè)論文 II Constant Temperature Control System of TCM Physiotherapy Based on PID Abstract: In the rapid development of science and technology, and medical technology, medical physiotherapy equipment tends to be highprecision, high intelligence to play the physical efficacy of traditional Chinese medicine. Designed a PID algorithmbased Chinese medicine treatments thermostatic control system on the working principle of the system hardware circuit and software design, discusses the principle of digital PID controller and its constant temperature control system. Controller by the microcontroller, temperature acquisition module, temperature control module, display modules and other modules can be bined with onsite temperature and the target temperature set by the user, using PID algorithms and PWM technology, the temperature is gradually stable set by the user target. The application button is set target temperature, heating time, the LCD display realtime, temperature and heating countdown display is being heated, timer countdown, alarm status of the three green, yellow, red lantern. The controller can meet the the physiotherapy temperature control equipment needs and control accuracy, more convenient, intelligent, with the majority of the market demand. Key words: PID , Constant temperature control , Physiotherapy 本科畢業(yè)論文 III 目 錄 第一章 緒論 ............................................................................................................ 1 選題的背景與意義 ............................................................................................... 1 .................................................................................................. 1 .................................................................................................. 1 研究現(xiàn)狀及發(fā)展趨勢(shì) ............................................................................................ 1 .................................................................................................. 1 展趨勢(shì) .................................................................................................. 2 論文研究的目標(biāo)及主要內(nèi)容 ................................................................................. 2 ........................................................................................... 2 .................................................................................... 2 第二章 硬件電路設(shè)計(jì) .................................................................................................... 4 系統(tǒng)硬件總體框圖 .............................................................................................. 4 系統(tǒng)主要模塊方案的設(shè)計(jì)與論證 .......................................................................... 4 測(cè)溫模塊 ................................................................................................. 4 ........................................................................................... 5 .................................................................................................. 5 STC89C52 單片機(jī)最小系統(tǒng) .................................................................................. 5 STC89C52單片機(jī)簡(jiǎn)介 ............................................................................... 5 單片機(jī)復(fù)位電路 ..................................................................................... 6 單片機(jī)時(shí)鐘電路 ..................................................................................... 7 控制器 I/O口分配 .................................................................................. 7 按鍵接口電路 ...................................................................................................... 7 顯 示電路 ............................................................................................................ 8 LCD1602概述 ......................................................................................... 8 LCD1602引腳功能 .................................................................................. 8 指示燈與報(bào)警電路 .............................................................................................. 9 溫度采集電路 .................................................................................................. 10 DS18B20簡(jiǎn)介 ......................................................