【正文】
源內(nèi)部其他電路脫離聯(lián)系,這樣輸入電壓變 化不直接影響基準(zhǔn)電路和恒流源電路,保持輸出電壓的穩(wěn)定。充電過程中采用 LED 燈、數(shù)碼管指示,系統(tǒng)中 設(shè)計有完備的過流過壓保護(hù),避免因電池過度充電而損壞,并且充電器采用模塊 式結(jié)構(gòu)和 USB 接口,可對手機、MP攝像機等多種數(shù)碼產(chǎn)品充電。s emphasis on environmental protection are also rising, look for clean alternative energy issues bee more urgent. Solar energy as a renewable energy it has an inexhaustible and clean and safe and so on, so have a broad application prospects, photovoltaic power generation technology is more and more attention, with the PV module continue to lower prices and photovoltaic technology, solar PV systems will gradually supplement the energy from the current transition to alternative energy. People who use mobile phones have had the experience, go out or travel no electricity when the battery suddenly, and because they can not be found or does not timely 220V electricity and not to charge their cell phones affect the normal use of mobile phones. To solve this problem, the course design introduces a multipurpose solar charger, use MCU control, will transform solar energy through the circuit to stabilize the direct current to charge their cell phones and can charge the battery automatically stops charging after, but also as a general DC power use, so get rid of dependence on electricity obtained the freedom of munication. Compared with the conventional charger, solar charger has a clear advantage. Key words: solar energy, battery, single chip, intelligent, BUCK converter 3 1 緒論 本課題的研究背景 當(dāng)電力、煤炭、石油等不可再生能源頻頻告急,能源問題日益成為制 約國際社會經(jīng)濟發(fā)展的瓶頸時,越來越多的國家開始實行“陽光計劃”, 開發(fā)太陽能資源,尋求經(jīng)濟發(fā)展的新動力。 關(guān)鍵詞: 關(guān)鍵詞:太陽能,電池,單片機,智能,BUCK 變換器 2 Multipurpose solar mobile charger Abstract Increasing depletion of fossil energy, it39。鋰電池一般不宜采用全過程恒流充電方式,而是 4 采取開始恒流快速充電, 待電池電壓上升到設(shè)定值時, 自動轉(zhuǎn)入恒壓充電的方式, 并且這樣有利于保存電池容量。 LM7805 應(yīng)用 圖 2 LM7805 典型應(yīng)用電路 單片機電源電路的設(shè)計以三端集成穩(wěn)壓器 LM7805 為核心, 它屬于串聯(lián)穩(wěn)壓 電路,其工作原理與分立元件的串聯(lián)穩(wěn)壓電源相同。 圖 3 按鍵接線圖 對電路總體考慮后,將 ADC0809 采集電路接在了單片機的 P0 口,并用 P2 口做采集控制,這樣 P0 口僅用接收數(shù)據(jù),不用發(fā)送數(shù)據(jù),有 P0 口的硬件構(gòu)成知 道,其做輸出的話需接上拉電阻,做輸入的不用接,這樣整體上減少了電路的硬 件開支,而 P3 口要做串口傳輸?shù)裙ぷ?,所以在本電路中將按鍵接在 P1 口,其中 是數(shù)字減鍵, 為數(shù)字加鍵, 鍵位確定鍵, 為過電流保護(hù)指示 燈,、 為輸出功能選擇鍵,按下 代表給手機電池充電,按下 則做普通直流電源使用,其中 5V 輸出可直接用 USB 連接線給手機充電,電池 充電控制則有手機提供。要顯示某字段則相應(yīng)的移位寄存器 74LS164 的輸出線必須 是低電平。多路開關(guān)可選通 8 個模擬通道,允許 8 路模擬量分 時輸入,共用 A/D 轉(zhuǎn)換器進(jìn)行轉(zhuǎn)換。 本設(shè)計中用單片機的 P0 口接收來自 0809 的換數(shù)據(jù),、 依次 11 接在 0809 的 A、B、C 地址線, 接在 0809 的 ALE 端, 接 START, 接 OE 端,時鐘信號由單片機的 ALE 端經(jīng) 74HC74 觸發(fā)器二分頻后提供,單片 機采用 12MHz 晶振, ALE 端經(jīng)二分頻后為 500KHz。RS-為內(nèi)傳感電阻的負(fù)載端。 顯示子程序首先初始化串口,使串口工作在方式 0,再讀取顯示緩沖區(qū)內(nèi)的 數(shù)據(jù)(顯示緩沖區(qū)主要是用來存放即將要顯示的數(shù)據(jù)),然后通過查表的方式找到 對應(yīng)的字形碼,最后把字形碼寫入串口寄存器 SBUF 通過串口方式 0 發(fā)送出去。程序的設(shè)計 既參考了一些資料里的內(nèi)容,也有相當(dāng)多的自我設(shè)計,比如說 PWM 脈寬調(diào)制信 號產(chǎn)生程序,就是參考了網(wǎng)友提供的標(biāo)志位加定時器實現(xiàn)的方法,但主程序中有 關(guān)數(shù)據(jù)處理計算的則是自己設(shè)計,因為這些東西涉及到具體硬件電路,是找不到 相關(guān)資料的,在數(shù)據(jù)處理中有簡單的單字節(jié)算法,也有雙字節(jié)的,有的則采用巧 妙的算法有效避免出現(xiàn)雙字節(jié),從而使程序設(shè)計變得簡單。A中為低電 。PWM輸 MOV TH0,PWM1H MOV TL0,PWM1L SETB TR0 出高電平 CLR PWMF RETI TESTIN: SETB CLR CLR LCALL TEST RET TESTOUT: CLR TR1 JNB TVI,STCBA TEST1:LCALL TEST LCALL TEST JNB OUT,TEST2 MOV A,TESTI INC A JZ PROTECT MOV DPTR,OTVTAB MOV A,LED MOVC A,A+DPTR CLR C CJNE A,TESTV,DADA LJMP RETURN DADA: JC XIAO MOV A,PWM2L ADD A,01H MOV PWM2L,A MOV A,PWM1L SUBB A,01H MOV PWM1L,A 24 LJMP RETURN XIAO: CLR C 。但是,從長 遠(yuǎn)來看,隨著太陽能電池制造技術(shù)的改進(jìn)以及新的光—電轉(zhuǎn)換裝置的發(fā)明, 各國對環(huán)境的保護(hù)和對再生清潔能源的巨大需求,太陽能電池仍將是利用 太陽輻射能比較切實可行的方法,可為人類未來大規(guī)模地利用太陽能開辟 廣闊的前景。 2 太陽能手機充電器硬件設(shè)計 系統(tǒng)總體設(shè)計方案 系統(tǒng)總體設(shè)計方案 總體 DC/DC 變換 太 陽 能 電 池 板 按 鍵 AT89C51 顯示電路 手 機 電 池 ADC0809 圖 1 系統(tǒng)總體設(shè)計方案 太陽能電池在使用時由于太陽光的變化較大,其內(nèi)阻又比較高,因此輸出電 壓不穩(wěn)定,輸出電流較小,這就需要用充電控制電路將電池板輸出的直流電壓變 換后供給電池充電。 LM7805 輸入電壓為 8V 到 36V, 最大工作電流 , 具有輸入電壓范圍寬, 工作電流大,輸出精度高且工作及其穩(wěn)定,外圍電路簡單等特點,太陽能電池電 壓即使有較大的波動,也能穩(wěn)定的輸出 5V 電壓,從而是單片機等控制電路正常 工作,且成本低。方式 0 的輸出是 8 位串行數(shù)據(jù),通過移位寄存器可將 8 位串行數(shù)據(jù)變成 8 位并行數(shù)據(jù)輸出,也可以將外部的 8 位并行數(shù)據(jù)變成 8 位串行數(shù)據(jù)輸入。 DC/DC 變換是將固定的直流電壓變換成可變的直流電壓,也稱為直流斬波。A,B 和 C 為地址輸入線,用于選通 IN0-IN7 上的一路模擬量輸入。直到 A/D 轉(zhuǎn)換完成,EOC 變?yōu)楦唠娖?,指?A/D 轉(zhuǎn)換結(jié)束, 結(jié)果數(shù)據(jù)已存入鎖存器,這個信號可用作中斷申請,而觸發(fā)單片機動作準(zhǔn)備接收 數(shù)據(jù),這是使 輸出高電平,輸出三態(tài)門打開,轉(zhuǎn)換結(jié)果的數(shù)字量輸出到數(shù) 據(jù)總線上,單片機讀取 P0 口然后做下一步處理操作。OUT 為電流輸出端,該電流的大小正比于 12 流過傳感電阻的電流。 ADC0809 具體工作過程為: 首先 、 輸入 3 位地址,并使 輸出高電平,將地址存入地址 鎖存器中。三態(tài)輸出鎖器用于鎖存 A/D 轉(zhuǎn)換完的數(shù)字 量,當(dāng) OE 端為高電平時,才可以從三態(tài)輸出鎖存器取走轉(zhuǎn)換完的數(shù)據(jù)。當(dāng)有按鍵按下時,有單片機處理編碼后送到數(shù)碼管上顯示。 數(shù)碼管顯示電路 數(shù)碼管顯示電路 AT89C51 單片機內(nèi)有一個串行 I/O 端口, 通過引腳 RXD 和 TXD 可與外部 電路進(jìn)行全雙工的串行異步通信, 發(fā)送數(shù)據(jù)時由 TXD 端送出, 接收時數(shù)據(jù)由 RXD 端輸入。圖 2 是三端穩(wěn)壓集成電路 LM7805 的典型應(yīng)用電路,三端集成穩(wěn)壓器設(shè)置的啟動電路,在穩(wěn)壓電源啟動后 處于正常狀態(tài)時,啟動電路與穩(wěn)壓電源內(nèi)部其他電路脫離聯(lián)系,這樣輸入電壓變 化不直接影響基準(zhǔn)電路和恒流源電路,保持輸出電壓的穩(wěn)定。充電過程中采用 LED 燈、數(shù)碼管指示,系統(tǒng)中 設(shè)計有完備的過流過壓保護(hù),避免因電池過度充電而損壞,并且充電器采用模塊 式結(jié)構(gòu)和 USB 接口,可對手機、MP攝像機等多種數(shù)碼產(chǎn)品充電。s emphasis on environmental protection are also rising, look for clean alternative energy issues bee more urgent. Solar energy as a renewable energy it has an inexhaustible and clean and safe and so on, so have a broad application prospects, photovoltaic power generation technology is more and more attention, with the PV module continue to lower prices and photovoltaic technology, solar PV systems will gradually supplement the energy from the current transition to alternative energy. People who use mobile phones have had the experience, go out or travel no electricity when the battery suddenly, and because they can not be found or does not timely 220V electricity and not to charge their cell phones affect the normal use of mobile phones. To solve this problem, the course design introduces a multipurpose solar charger, use MCU control, will transform solar energy through the circuit to stabilize the direct current to charge their cell phones and can charge the battery automatically stops charging after, but also as a general DC power use, so get rid of dependence on electricity obtained the freedom of munication. Compared with the conventional charger, solar charger has a clear advantage. Key words: solar energy, battery, single chip, intelligent, BUCK converter 3 1 緒論 本課題的研究背景 當(dāng)電力、煤炭、石油等不可再生能源頻頻告急,能源問題日益成為制 約國際社會經(jīng)濟發(fā)展的瓶頸時,越來越多的國家開始實行“陽光計劃”, 開發(fā)太陽能資源,尋求經(jīng)濟發(fā)展的新動力。CPU開 。數(shù)碼管 001BH TESTOUT 。充電子程序 流程圖如圖 13 所示。其中讀 取端口后要做一定的延時以排除鍵抖引起的誤動作。 MAX471 各引腳功能說明如下:SHDN 為關(guān)閉信號,正常操作時接地;當(dāng)它 為高電平時,供電電流小于 5μA。OE=1,輸出 轉(zhuǎn)換得到的數(shù)據(jù);OE=0,輸出數(shù)據(jù)線呈高阻狀態(tài)。其 電路如圖 5 所示,PWM 脈寬調(diào)制信號有單片機提供,控制開關(guān)管的通斷。需要幾個數(shù)碼管就擴展