【正文】
+。break。 case 7:Coil_DA1。i++。break。 case 8:i=0。break。 default:break。 } } else //反轉(zhuǎn) { switch(j) 沈陽理工大學(xué)學(xué)士學(xué)位論文 27 { case 0:Coil_DA1。j++。break。 case 1:Coil_D1。j++。break。 case 2:Coil_CD1。j++。break。 case 3:Coil_C1。j++。break。 case 4:Coil_BC1。j++。break。 case 5:Coil_B1。j++。break。 case 6:Coil_AB1。j++。break。 case 7:Coil_A1。j++。break。 case 8:j=0。break。 default:break。 } } } } TLC1543 采集函數(shù) n為命令字,控制通道,輸出數(shù)據(jù)長度,輸出格式,極性選擇。 int AD_1543(uchar n) { data uchar i,j。 idata union { uchar ch[2]。 uint m。 }u。 clk43 = 0。 ad43_cs = 0。 ab 的后四位是通道選擇。 8 次循環(huán)后,命令字輸入到 1543 中,同時(shí)采集數(shù)據(jù)讀入ab。通道最高位放入 1543 中,準(zhǔn)備寫入。 1543 的輸出數(shù)據(jù)放到 ab 變量的最低位。然后 沈陽理工大學(xué)學(xué)士學(xué)位論文 28 時(shí)鐘線拉高,通道數(shù)據(jù)移入 1543 的同時(shí),采集數(shù)據(jù)移入 ab。之后時(shí)鐘線拉高,恢復(fù)初始狀態(tài),為讀 /寫數(shù)據(jù)做準(zhǔn)備。 ab = n 4。 for(j = 0。j 10。 j++)。 for(i = 0。i 8。 i++) { addr43 = abit7。 ab =1。 abit0 = dout43。 clk43 = 1。 clk43 = 0。 for(j = 0。j 10。 j++)。 } [0] = ab。 ab = 0。 讀低兩位數(shù)據(jù) , ab 左移 1 位,數(shù)據(jù)輸出先放入 ab 的第 0 位,然后時(shí)鐘管腳進(jìn)行一次高低變化,則一位數(shù)據(jù)傳送完畢。循環(huán) 2 次,則采集到兩位數(shù)據(jù)。 for(i = 0。i 2。i++) { ab = 1。 abit0 = dout43。 //1543 數(shù)據(jù)輸出放入 ab 的第 0 位 clk43 = 1。 for(j = 0。j 10。 j++)。//延時(shí) clk43 = 0。 for(j = 0。j 10。 j++)。//延時(shí) } ab 采集的低 2 位移到高 2 位,并保存到 [1]。 中采集到的數(shù)據(jù)右移 6 位,此時(shí) 的 10 位數(shù)據(jù)就是采集 //的數(shù)字量 。然后 片選線為高電平,芯片不被選中,此時(shí)芯片進(jìn)入 A/D 轉(zhuǎn)換周期 。最后返回采集到的數(shù)據(jù)。 [1] = ab 6。 沈陽理工大學(xué)學(xué)士學(xué)位論文 29 = 6。 ad43_cs = 1。 return 。 } 沈陽理工大學(xué)學(xué)士學(xué)位論文 30 5 太陽能跟蹤控制器調(diào)試 經(jīng)過程序的調(diào)試,太陽能跟蹤控制器終于能實(shí)現(xiàn)太陽能的跟蹤控制。經(jīng)過測試,太陽能跟蹤控制器能實(shí)現(xiàn)太陽能的穩(wěn)定跟蹤控制。 跟蹤控制圖片如下 片 如下: 早上六 時(shí) ,跟蹤裝置跟蹤上太陽光 的位置,如圖 所示: 圖 早晨時(shí) 的跟蹤裝置 位置 中午 12 時(shí),跟蹤裝置跟蹤上太陽光 的位置如圖 所示: 圖 中午時(shí) 的跟蹤裝置 位置 傍晚 5 時(shí), 跟蹤裝置跟蹤上太陽光 的位置 如圖 所示: 圖 傍晚時(shí)的 跟蹤裝置 位置 沈陽理工大學(xué)學(xué)士學(xué)位論文 31 6 結(jié)論與展望 本文設(shè)計(jì)了基于單片機(jī)的太陽能跟蹤控制器,使得該機(jī)構(gòu)得以實(shí)現(xiàn)太陽能跟蹤的目的,并將該設(shè)計(jì)應(yīng)用于民用太陽能的設(shè)計(jì)。 主要研究內(nèi)容: 對控制系統(tǒng)的總體控制方案作了說明。對于目前太陽能跟蹤控制領(lǐng)域存在的數(shù)字控制價(jià)格昂貴,模擬控制適應(yīng)性差,精度低的問題。本文提出利用單片機(jī)實(shí)現(xiàn)太陽跟蹤控制的方案。本控制系統(tǒng)是閉環(huán)的控制系統(tǒng),單片機(jī)在控制系統(tǒng)作為主要的執(zhí)行元件。 對執(zhí)行部件和反饋部件的選取進(jìn)行了設(shè)計(jì)。執(zhí)行部件使用步進(jìn)電機(jī)。它是純數(shù)字控制電機(jī),非常適合單片機(jī)控制。對于傳感器單片機(jī)根據(jù)光敏電阻所給的反饋信息,已決定電機(jī)不同時(shí)刻的輸入角度以及轉(zhuǎn)動(dòng)方向,進(jìn)而發(fā)出其對應(yīng)的脈沖個(gè)數(shù)和方向。 控制部件我們選擇 ATMEIL公司生產(chǎn)的 STC89C52 系列單片機(jī)。 STC89C52 是一種低功耗,高性能的 8 位單品機(jī)。對系統(tǒng)的硬件的電路進(jìn)行了設(shè)計(jì)連接,并按照預(yù)定的控制思想編寫了控制系統(tǒng)的軟件即程序部分,使得整個(gè)跟蹤裝置能夠?qū)崿F(xiàn)對太陽的主動(dòng)式跟蹤。 研究展望: [8]由于國內(nèi)太陽能開發(fā)利用的水平還不是很高,國產(chǎn)太陽能跟蹤器的精度有待進(jìn)一步的提高,民用太陽能跟蹤裝置由原來依靠重力,壓差的被動(dòng)跟蹤方式,發(fā)展到現(xiàn)在利用傳感器的主動(dòng)跟蹤方式,經(jīng)歷了一個(gè)很長的時(shí)間,當(dāng)時(shí)主要是由于工業(yè)控制成本過高,所以機(jī)構(gòu)相對來說設(shè)計(jì)的比較簡單,精度較低,隨著工業(yè)控制的迅速普及,其成本也大幅下降,可以提 高控制系統(tǒng)的可靠性和實(shí)時(shí)跟蹤性,從而促進(jìn)了跟蹤裝置機(jī)構(gòu)的跟蹤發(fā)展?;趩纹瑱C(jī)的太陽能跟蹤控制器通過對太陽光強(qiáng)弱的檢測,實(shí)現(xiàn)對太陽的全自動(dòng)跟蹤。因此研究范圍大,精度高,成本低廉的跟蹤控制裝置成為發(fā)展的必然趨勢。 沈陽理工大學(xué)學(xué)士學(xué)位論文 32 8 致 謝 在這里我首先要感謝的是我的指導(dǎo)老師劉海燕老師,她對每一項(xiàng)工作都認(rèn)真負(fù)責(zé),對我時(shí)時(shí)處處細(xì)心指導(dǎo)。從她負(fù)責(zé)指導(dǎo)我的畢業(yè)設(shè)計(jì)開始,就對我設(shè)計(jì)中的每一個(gè)環(huán)節(jié)都不遺余力地給予我?guī)椭T诋厴I(yè)設(shè)計(jì)的這段時(shí)間,她深厚的學(xué)術(shù)修養(yǎng)、嚴(yán)謹(jǐn)?shù)闹螌W(xué)態(tài)度、強(qiáng)烈的責(zé)任心和對學(xué)生的嚴(yán)格要求,將令我受益終生。 在這里我還要感謝在沈陽理工大學(xué)所有教過我的老師,在大學(xué)這幾年學(xué)習(xí)期間給予了我良好的學(xué)習(xí)環(huán)境與學(xué)習(xí)氛圍,讓我學(xué)習(xí)到豐富的專業(yè)知識和待人處事的方法,提高了我的自學(xué)的能力,分析能力和解決問題的能力。 最后,我要特別感謝所有幫助過我的同學(xué)們, 沒有他們的熱心幫助,沒有他們那些好的建議,我將很難如此順利的完成畢業(yè)設(shè)計(jì)。 沈陽理工大學(xué)學(xué)士學(xué)位論文 33 參考文獻(xiàn) [1]胡壽松 .自動(dòng)控制原理 .國防工業(yè)出版社 1994 [2]李朝青 .單片機(jī)原理及接口技術(shù) [M].北京:北京航空航天大學(xué)出版社, 2021。 [3]陳尚松 .電子測量與儀器 [M].北京:電子工業(yè)出版社, 2021。 [4]楊素行 .模擬電子技術(shù)基礎(chǔ)簡明教程 [M].北京:高等教育出版社, 2021。 [5]馬忠梅 .單片機(jī)的 C 語言應(yīng)用程序設(shè)計(jì) [M].北京:人民郵電出版社, 2021。 [6]黃仁欣 .單片機(jī)原理與應(yīng)用技術(shù) [M].北京:清華大學(xué)出版社, 2021。 [7]譚浩強(qiáng) .C 程序設(shè)計(jì)(第二版) [M].北京:清華大學(xué)出版社, 1999。 [8]太陽能:未來理想能源 .大眾科技報(bào) 沈陽理工大學(xué)學(xué)士學(xué)位論文 34 附錄 A 英文原文 Solar Tracking System Solar tracking system is thermal and photovoltaic power generation process, the most optimal use of sunlight, to improve the photoelectric conversion efficiency of the mechanical system and the electronic control unit, prising: a motor (DC, stepper, servo, plaarygear motor, motor plunger ), worm, sensor systems and so on. In the solar photovoltaic applications: Keep solar panels facing the sun at any time, so that at any time the vertical rays of sunlight illuminated solar panels power plant, the use of solar tracking system can significantly improve the power generation efficiency of solar photovoltaic modules. Due to the Earth39。s rotation, a fixed location relative to a particular solar photovoltaic systems, four seasons a year, every day the rising sun, the sun39。s illumination angle changes all the time, effectively guaranteed solar panels can always being right Solar power generation efficiency will reach the best condition. Currently the world39。s universal solar tracking systems need to put such information to calculate latitude and longitude points for each day of the year at different times where the angle of the sun will be a year in the position of the sun every moment stores PLC, microcontroller or puter software in calculating the fixed locations have to rely on the position of the sun at each moment in order to achieve tracking. Uses the theory of puter data, needs to Earth coordinates regional data and settings, once installed, it inconvenient to move or dismantle, finished on each move must be recalculated parameter setting data and adjust various parameters。 principle, circuit, technology, equipment is very plex Miscellaneous, nonprofessionals can not easily operate. Hebei, a solar photovoltaic power generation panies exclusively developed with worldleading level, do not calculate the position of the sun around the data, free software, not afraid cloudy, thunderstorms, cloudy and other inclement weather, has been the default system device saver, dustproof effect strong wind resistance, easy to use, low cost, anytime, anywhere on your mobile device can accurately track the sun39。s intelligent solar tracking system. The solar tracking system in the pany39。s firstgeneration tracker technology based on integrated use of a variety of environments around the situatio