單開關(guān)實現(xiàn)小型微處理器系統(tǒng)的雙功能
價格低,易使用設(shè)計實現(xiàn)外圍傳感器|0">傳感器的監(jiān)控。
傳統(tǒng)控制系統(tǒng)設(shè)計使用隔離開關(guān)控制電源和各種系統(tǒng)功能,但是給小型微處理器系統(tǒng)增加一些器件,能與系統(tǒng)開關(guān)結(jié)合成控制功能。例如,設(shè)計系統(tǒng)顯示相對濕度和溫度(參考文獻1)。這個小型電池供電的系統(tǒng)需要微處理器可控的供能開關(guān),可以用按鈕實現(xiàn)。攝氏度顯示到熱力學(xué)溫度的改變也可以用一個功能開關(guān)實現(xiàn)。從易使用和總投入的觀點看,用單一開關(guān)結(jié)合這兩個功能更有意義。
圖1顯示這個應(yīng)用的電路。首先,R1使P溝道MOSFET Q1的柵-源極電壓穩(wěn)定在0V,使得Q1關(guān)閉。沒有輸入達到電壓穩(wěn)壓器IC1,從而系統(tǒng)的微處理器IC2還仍然關(guān)閉。當(dāng)操作者按下常閉瞬時接觸按鈕開關(guān)S1,電流通過R1和R2流到地,不斷提高柵源極電壓到足夠打開Q1和為IC1和微處理器供能。電容C1使開關(guān)接觸處彈起,不論使用者多迅速的按下和釋放開關(guān),都確保Q1狀態(tài)足夠長到使微處理器啟動。此外,作為最后的任務(wù),啟動固件初始化系統(tǒng)的LCD,從而使操作者趨勢保持供能開關(guān)處于位置上時間足夠長,確保完全啟動。
微處理器立即啟動之后,開始執(zhí)行固件并通過3V以上的N溝道MOSFET Q2門極電壓傳遞到邏輯單元,打開Q2。接下來,Q2保持Q1開關(guān)打開,系統(tǒng)在軟件控制下運行。如果操作者再次按下開關(guān)按鈕,Q1仍然打開,微處理器繼續(xù)運行,但是模型線被上拉。模型線驅(qū)動中斷輸入引腳,軟件作為所存功能或訪問包裹的多選擇菜單來使用中斷。適當(dāng)?shù)念A(yù)編程時間間隔后,微處理器系統(tǒng)通過Q2的柵極被置于邏輯零而實現(xiàn)自我關(guān)閉。然后,Q2關(guān)閉Q1實現(xiàn)系統(tǒng)斷電。
英文原文:
Single switch serves dual duty in small, microprocessor-based system
Low-cost, easy-to-use design allows monitoring of peripherals, sensors.
Steve Hageman, Windsor, CA; Edited by Brad Thompson and Fran Granville -- EDN, 3/30/2006
Traditional control-system designs use separate switches to control power and various system functions, but adding a few components to a small, microprocessor-based system can combine a control function with the system's on/off switch. For example, you can design a system to display relative humidity and temperature (Reference 1). This small, battery-powered system requires a microprocessor-controlled on/off power switch, which you implement with a pushbutton, and a function switch to change the display from degrees Celsius to degrees Fahrenheit, which you implement as a toggle switch. From ease-of-use and total- cost perspectives, combining these two functions in a single switch makes sense.
Figure 1 shows a circuit for this application. Initially, Q1, a P-channel MOSFET, is off because R1 holds Q1's gate-to-source voltage at 0V. No input reaches voltage regulator IC1, and, thus, the system's microprocessor, IC2, also remains off. When the operator presses the normally closed momentary-contact pushbutton switch, S1, current flows through R1 and R2 to gro
und, developing sufficient gate-to-source voltage to turn on Q1 and apply power to voltage regulator IC1 and the microprocessor. Capacitor C1 debounces the switch contact and ensures that Q1 remains on long enough to start the microprocessor, regardless of how quickly the user presses and releases the switch. In addition, as its final task, the start-up firmware initializes the system's LCD, thus reinforcing the operator's tendency to hold the power switch in its on position long enough to ensu
re full start-up.
Immediately after the microprocessor powers up, it begins executing its firmware and turns on Q2, an N-channel MOSFET, by delivering a logic one of more than 3V to Q2's gate. In turn, Q2 keeps Q1 switched on, and the system runs under software control. If the operator again presses the on/off button, Q1 remains on, and the microprocessor continues to run but pulls its mode line high. The mode line drives an interrupt input pin, and the software can use the interrupt as a toggling function or to access a wraparound, multiple-choice menu. After a suitable preprogrammed time interval, the microprocessor system turns itself off by placing a logic zero on Q2's gate. In turn, Q2 switches off Q1 to remove power from the system.
Reference
Hageman, Steve, Relative humidity/temperature meter, www.analoghome.com/projects/dewpointer.html.
英文原文地址:http://www.edn.com/article/CA6317068.html
評論