熱學實驗(yan)是(shi)大學物理(li)實驗(yan)中(zhong)(zhong)的(de)一(yi)個重要組成(cheng)部分, 在大學物理(li)實驗(yan)《溫(wen)(wen)(wen)(wen)(wen)差(cha)電(dian)(dian)(dian)偶(ou)的(de)定標(biao)和測溫(wen)(wen)(wen)(wen)(wen)實驗(yan)》中(zhong)(zhong), 我校(xiao)(xiao)使用(yong)(yong)的(de)是(shi)“材料與器件溫(wen)(wen)(wen)(wen)(wen)度特(te)性綜合儀”, 它采用(yong)(yong)集成(cheng)溫(wen)(wen)(wen)(wen)(wen)度傳感器AD590與電(dian)(dian)(dian)壓(ya)比(bi)較控(kong)(kong)(kong)(kong)制(zhi)電(dian)(dian)(dian)路, 該儀器溫(wen)(wen)(wen)(wen)(wen)度調節(jie)部分經常出現故障且(qie)不方便維修, 經常需要對控(kong)(kong)(kong)(kong)制(zhi)電(dian)(dian)(dian)路進(jin)(jin)行校(xiao)(xiao)準(zhun);其(qi)溫(wen)(wen)(wen)(wen)(wen)控(kong)(kong)(kong)(kong)精度存在較大偏差(cha), 從學生(sheng)實驗(yan)數據(ju)中(zhong)(zhong)我們(men)發現溫(wen)(wen)(wen)(wen)(wen)度控(kong)(kong)(kong)(kong)制(zhi)波動(dong)能達2~3℃.針(zhen)對上(shang)述種種不足, 通過(guo)分析(xi)研(yan)究提出了新(xin)的(de)恒溫(wen)(wen)(wen)(wen)(wen)箱設計(ji).新(xin)的(de)溫(wen)(wen)(wen)(wen)(wen)控(kong)(kong)(kong)(kong)箱將克服及(ji)改善(shan)以上(shang)問題, 改進(jin)(jin)控(kong)(kong)(kong)(kong)溫(wen)(wen)(wen)(wen)(wen)腔(qiang)并運(yun)用(yong)(yong)單片機和繼電(dian)(dian)(dian)器模擬脈(mo)沖寬(kuan)度調制(zhi)實現智能控(kong)(kong)(kong)(kong)溫(wen)(wen)(wen)(wen)(wen), 新(xin)恒溫(wen)(wen)(wen)(wen)(wen)箱控(kong)(kong)(kong)(kong)制(zhi)電(dian)(dian)(dian)路簡單, 控(kong)(kong)(kong)(kong)溫(wen)(wen)(wen)(wen)(wen)準(zhun)確, 并在軟件中(zhong)(zhong)加(jia)入了高溫(wen)(wen)(wen)(wen)(wen)限制(zhi)措(cuo)施, 保(bao)障實驗(yan)的(de)安(an)全(quan).
1 原控溫腔構造與改進措施
原恒溫(wen)(wen)箱(xiang)控溫(wen)(wen)腔構(gou)造如圖1所示(shi), 鋁質的(de)控溫(wen)(wen)腔外壁(bi)(bi)繞置 加熱電阻 絲(si)(si), 電阻絲(si)(si)加 熱電壓20~24V, 功率50 W.腔壁(bi)(bi)中部 開孔插入 測(ce)溫(wen)(wen)傳(chuan)感 器AD590, 監測(ce)控溫(wen)(wen)腔的(de)實時溫(wen)(wen)度.
影響該儀器控溫精度的主要因素有:1) 熱慣性.當傳感器AD590檢測到腔體達到控溫溫度后電熱絲停止加熱, 但由于被加熱腔體的溫度變化因熱慣性而具有一定的滯后性, 電熱絲停止加熱后腔體的溫度往往會繼續增加而發生過沖.熱慣性的大小取決于腔體材質的比熱容和質量大小, 因此需要改進腔體材質, 采用銅質腔體且壁厚改薄使質量與原來相當, 從而使腔體的比熱容由約895J/ (kg·K) 降到385J/ (kg·K) , 導熱系數 由約2.38×10-2W/ (m·K) 增加到4.0×10-2W/ (m·K) [1], 此(ci)改(gai)進(jin)(jin)能有(you)(you)效(xiao)降低熱(re)(re)慣性的(de)影響.2) 原(yuan)儀(yi)器中AD590未(wei)完全放置(zhi)(zhi)到位(wei), 測量的(de)僅是腔(qiang)體(ti)外表面溫度(du)(du).改(gai)進(jin)(jin)的(de)儀(yi)器將(jiang) 開孔加深(shen) 讓更高(gao)精 度(du)(du)的(de)溫度(du)(du) 傳感器DS18B20盡量放置(zhi)(zhi)至(zhi)腔(qiang)體(ti)內壁.3) 原(yuan)儀(yi)器加熱(re)(re)絲加熱(re)(re)功(gong)率不可(ke)調(diao)與控制電路的(de)反饋有(you)(you)延(yan)時(shi).改(gai)進(jin)(jin)后采用單片機模(mo)擬脈沖寬(kuan)度(du)(du)調(diao)制 (PWM) 方式, 讓加熱(re)(re)絲功(gong)率可(ke)變(bian), 進(jin)(jin)一步減小恒溫時(shi)的(de)溫度(du)(du)波動.
圖1 儀器控溫腔構造
圖2 基于單片機的恒溫箱控制電路圖
圖3 不同溫度差模擬脈沖寬度調制 下載原圖
3 軟件設計
單片機主程序采用C語言設計[3]:主程(cheng)序(xu)循環(huan)執行讀DS18B20溫(wen)(wen)(wen)(wen)度(du)(du)值、掃描按(an)(an)鍵(jian)(jian)、執行控溫(wen)(wen)(wen)(wen)3個子程(cheng)序(xu).讀取溫(wen)(wen)(wen)(wen)度(du)(du)值時(shi)(shi)(shi), 首先復位DS18B20再發(fa)出讀取命令, 讀取的(de)溫(wen)(wen)(wen)(wen)度(du)(du)為(wei)2個字節, 單(dan)片(pian)機(ji)根(gen)據(ju)(ju)數碼(ma)管的(de)段位顯(xian)示(shi)原理, 將(jiang)溫(wen)(wen)(wen)(wen)度(du)(du)格式換算(suan)(suan)成(cheng)當前溫(wen)(wen)(wen)(wen)度(du)(du)并顯(xian)示(shi), 在(zai)程(cheng)序(xu)中用變量(liang)w表示(shi);單(dan)片(pian)機(ji)檢測(ce)按(an)(an)鍵(jian)(jian), 根(gen)據(ju)(ju)按(an)(an)鍵(jian)(jian)信號執行溫(wen)(wen)(wen)(wen)度(du)(du)設(she)(she)(she)(she)定(ding)加(jia)(jia)減操作, 換算(suan)(suan)成(cheng)設(she)(she)(she)(she)定(ding)溫(wen)(wen)(wen)(wen)度(du)(du), 通過數碼(ma)管顯(xian)示(shi)設(she)(she)(she)(she)定(ding)溫(wen)(wen)(wen)(wen)度(du)(du), 在(zai)程(cheng)序(xu)中設(she)(she)(she)(she)定(ding)溫(wen)(wen)(wen)(wen)度(du)(du)保存于變量(liang)S中;為(wei)了實驗安全, 程(cheng)序(xu)中對設(she)(she)(she)(she)定(ding)溫(wen)(wen)(wen)(wen)度(du)(du)與實時(shi)(shi)(shi)溫(wen)(wen)(wen)(wen)度(du)(du)進(jin)(jin)行限(xian)制(zhi), 最高(gao)可(ke)設(she)(she)(she)(she)定(ding)為(wei)100℃.根(gen)據(ju)(ju)實際測(ce)量(liang)、調試的(de)數據(ju)(ju)分析, 溫(wen)(wen)(wen)(wen)度(du)(du)差大于5℃時(shi)(shi)(shi)繼電器常閉, 加(jia)(jia)熱(re)絲用最大功率(lv)進(jin)(jin)行加(jia)(jia)熱(re), 當溫(wen)(wen)(wen)(wen)度(du)(du)與設(she)(she)(she)(she)定(ding)溫(wen)(wen)(wen)(wen)度(du)(du)的(de)溫(wen)(wen)(wen)(wen)度(du)(du)差小(xiao)于5℃時(shi)(shi)(shi), 開始采用模擬(ni)脈沖寬度(du)(du)調制(zhi)控制(zhi)繼電器的(de)導通時(shi)(shi)(shi)間防(fang)止(zhi)溫(wen)(wen)(wen)(wen)度(du)(du)過沖的(de)效(xiao)果最好.程(cheng)序(xu)流程(cheng)如(ru)圖4所(suo)(suo)示(shi).改(gai)進(jin)(jin)后的(de)溫(wen)(wen)(wen)(wen)控腔在(zai)進(jin)(jin)行單(dan)片(pian)機(ji)控溫(wen)(wen)(wen)(wen)程(cheng)序(xu)調試, 如(ru)圖5所(suo)(suo)示(shi).
表格(ge)中第一(yi)列為設(she)定(ding)(ding)溫(wen)度(du)(du), 下面為儀(yi)器恒溫(wen)時控(kong)溫(wen)腔溫(wen)度(du)(du)的波動(dong)(dong)值.從數據可以看出:采用單片機(ji)模擬脈寬調(diao)制的恒溫(wen)箱溫(wen)度(du)(du)雖然有一(yi)定(ding)(ding)的波動(dong)(dong)偏差但基(ji)本都在0.5℃范圍內(nei), 而原(yuan)儀(yi)器, 加熱時溫(wen)度(du)(du)上(shang)升更快, 控(kong)溫(wen)時溫(wen)度(du)(du)過沖現象(xiang)明(ming)顯, 恒溫(wen)時溫(wen)度(du)(du)波動(dong)(dong)大(da)溫(wen)差較大(da).
該設計較好(hao)地控制了溫度的(de)過沖與波(bo)動, 可推廣改(gai)造舊儀器(qi)(qi).除《溫差電偶的(de)定標和測溫實(shi)驗》的(de)改(gai)進(jin)外(wai), 可推廣用于《導熱系數》、《鐵磁材料居里點測量》、《線(xian)脹系數》等熱學實(shi)驗儀器(qi)(qi), 提升各實(shi)驗的(de)測量精度.由(you)于繼電器(qi)(qi)的(de)壽命(ming)有限(xian)如能改(gai)成可控硅或晶體管, 可進(jin)一步增(zeng)加控溫的(de)可靠性與精度.
總之, 利(li)用單(dan)片(pian)機對傳(chuan)統模擬控溫裝(zhuang)置的(de)改進, 具有(you)一定的(de)先進性和廣泛的(de)應用價值(zhi).