【正文】
e output current, thereby regulating the brightness of white light LED. PWM dimming has the advantage of being able to provide high quality white light, and the application of simple, high efficiency! For example, in a mobile phone system, using a special PWM interface can easily generate arbitrary duty cycle of the pulse signal, the signal is passed through a resistor, connected to the drive EN interface. Most manufacturers drive support PWM dimming. For Buck, Boost, BuckBoost or linear regulator to drive LED, their mon ideas are the drive circuit to control the output of light. Some applied simply to achieve the on and off function, but more application demand is to be from 0 to 100% regulates the brightness of the light, and often have very high precision. The designer has two main options: linear regulator LED current ( analog dimming ), or using the switch circuit with respect to human recognition capacity, a high enough frequency to change the average light output ( digital dimming ). The use of pulse width modulation ( PWM ) to set the cycle and duty cycle ( Figure 1 ) is probably the most simple digital dimming method, and Buck regulator topology can often provide a best performance. KEY WORDS digital pulse ,duty ,drive circuit ,linear regulator 基于單片機(jī)的 PWM 調(diào)光 III 目 錄 中文摘要 ……………………………………………………………………………………… I 英文摘要 ……………………………………………………………………………………… II 引 言 .......................................................................................................................... 1 1 單片機(jī)應(yīng)用技術(shù)簡(jiǎn)介 ......................................................................................... 2 單片機(jī)內(nèi)部構(gòu)成 ....................................................................................... 2 單片機(jī)的工作原理 .................................................................................. 2 2 PWM 調(diào)光原理簡(jiǎn)介 ............................................................................................... 4 PWM 調(diào)光技術(shù)原理 ................................................................................... 4 脈沖寬度調(diào)節(jié) ...................................................................................... 4 PWM 對(duì)于 LED 調(diào)光的優(yōu)勢(shì) ................................................................... 5 LED 光源的特性 ........................................................................................ 7 3 電路設(shè)計(jì) ................................................................................................................ 8 電路設(shè)計(jì)流程圖 ....................................................................................... 8 主控元件與功能模塊介紹 .................................................................... 8 按鍵功能設(shè)計(jì) ...................................................................................... 8 主控元件單片機(jī) .................................................................................. 8 光源模塊 .............................................................................................11 電源的選擇與連接 .............................................................................11 其他元件工作特性 ................................................................................ 12 LED 發(fā)光二極管功能簡(jiǎn)介 ................................................................. 12 晶振的作用與電路的連接 ................................................................ 13 4 實(shí)物裝配與調(diào)試 ................................................................................................ 16 實(shí)物裝配流程 ......................................................................................... 16 按照電路原理圖焊接組件 ................................................................ 16 元器件清單及型號(hào) ............................................................................ 16 單片機(jī)內(nèi)部程序的編寫 ....................................................................... 16 焊接工序注意事項(xiàng) ................................................................................ 16基于單片機(jī)的 PWM 調(diào)光 IV 調(diào)試完善功能 ......................................................................................... 19 結(jié)束語(yǔ) ........................................................................................................................ 19 致 謝 ........................................................................................................................ 20 參考文獻(xiàn) ................................................................................................................... 21 附錄 1: 電路原理圖 .......................................................................................... 22 附錄 2: 元器件清 單及型號(hào) .............................................................................. 24 附錄 3:?jiǎn)纹瑱C(jī)內(nèi)部程序正文 .......................................................................... 24 附錄 4:實(shí)物成果圖 .......................................................................................... 20 附錄 5:實(shí)物使用說(shuō)明 ...................................................................................... 21 基于單片機(jī)的 PWM 調(diào)光 1 引 言 目前,針對(duì) LED 亮度控制方面 ,主要的兩種解決方案為線性調(diào)節(jié) LED 的電流 (模擬調(diào)光 )或在肉眼無(wú)法察覺(jué)的高頻下,讓驅(qū)動(dòng)電流從 0 到目標(biāo)電流值之間來(lái)回切換 (數(shù)字調(diào)光 )。設(shè)計(jì)者主要有兩個(gè)選擇:線性調(diào)節(jié) LED 電流(模擬調(diào)光),或者使用開(kāi)關(guān)電路以相對(duì)于人眼識(shí)別力來(lái)說(shuō)足夠高的頻率工作來(lái) 改變光輸出的平均值(數(shù)字調(diào)光)。 不管用 Buck, Boost, BuckBoost 還是線性調(diào)節(jié)器來(lái)驅(qū)動(dòng) LED,它們的共同思路都是用驅(qū)動(dòng)電路來(lái)控制光的輸出。 PWM 調(diào)光的優(yōu)點(diǎn)在于能夠提供高質(zhì)量的白光,以及應(yīng)用簡(jiǎn)單,效率高!例如在手機(jī)的系統(tǒng)中 ,利用一個(gè)專用 PWM 接口可以簡(jiǎn)單的產(chǎn)生任意占空比的脈沖信號(hào),該信號(hào)通過(guò)一個(gè)電阻,連接到驅(qū)動(dòng)器的 EN 接口。 第六階段: 2020 年 4月上旬完成并提交正式畢業(yè)設(shè)計(jì)成果 . 指導(dǎo)教師簽名: 日期: 基于單片機(jī)的