201119185 六、發明說明: 【發明所屬之技術領域】 本發明關於-種電_換裝置,尤指-種可在主電源的電壓不 足時,改由備用電源提供穩定電壓的電源切換裝置。 【先前技術】 目前,大部分的行動f置皆是採用電池(例如,㈣池)作為 電源供應器。系統在運作時,也經常需要量測電池的電壓,進而監 ^電池的電量…般而言,會把電池電壓接到系統中的類比數位^ ^ (analog to digital converter, ADC) 0 , 由於鐘電池的操作電壓範圍介於3 Q至4 2伏特之間,因 =轉數位的w須接近符合系統電麵格 = 就疋3·3伏特的電壓系統。 窄見的 由於功率轉換的效率對於行動裝置而 術最常使__魏狀直流/錢轉_要,所以先前技 用來把鐘電池電财降到33伏特, C_erter), 愿大於3·5伏特時,直流/直電池電 定電屢。然而,-旦__於3常^ 3.3伏特的穩 著鐘電池輕的下私 、^輪出健也會跟 下降此時,參考電顧無法準確 201119185 地判斷出目前鋰電池的實際電壓值。 此外’亦有先前技術利用線性穩壓電源(linear drop output, LDO )作為輸出電源的設計。線性穩壓電源通常存在著電壓降(dr〇p voltage) ’亦即輪入必須高於輸出的電壓差,約莫介於〇5至〇7伏 特之間。此種電源供電方式將更不利於維持在3.3伏特的穩定電壓 的要求。 【發明内容】 因此,本發明的目的之一在於提供一種電源切換裝置,在主電 源的電壓不足時,利用一開關做切換,而改由備用電源提供穩定電 壓給負載。 根據一實施例’本發明之電源切換裝置包含一第一電源、一參 籲考電壓源、-比較器、一第二電源、一開關以及一負載。比較器電 連接於第-電源與參考電壓源。第二電源電連接於比較器。開關電 連接於第電源與比較器。負載電連接於第二電源與開關。第一電 源用以提供一第一電壓。參考電壓源用以提供一參考電壓。比較器 =以比較第-電壓與參考電壓。第二電源用以提供—第二電壓。當 -電愚大於參考電壓時,比較器輸出—第_電位織,以導通開 ^且關閉第二電源後得第一電源經由開關輸出第一電壓至負載。 :另—方面,當第-電壓小於參考電壓時,比較器輸出—第二電位訊 5 ί S 1 201119185 號,以截止關,且·第二電源,使得第二電源輪 負載。於實際應用中,第一電源可為主電 一 電源 电碌而弟二電源可為備用 ‘上戶純,當f電壓大於參考賴時,表示第—電源 的第-電壓充;i,此時開關導通,由第—電源供電給負載;而气 -電壓小於參考電壓時,表示第—電源所提供的第—電壓不足:此 a寺開關截止,改㈣二電祕電給負載。換言之,本發_電源切 換裝置可藉由控制開關的導通或截止,在主電源(即上述之第—電 源)的電壓充足或不足時’切換由主電源或個電源(即上述之第 二電源)來供電給負載,進而確保穩定的輸出電壓。 關於本發明之優點_神可以藉由以下的發明詳述及所附圖式 得到進一步的瞭解。 ^ 【實施方式】 請參閱第1圖,第1圖為根據本發明一實施例之電源切換裝置 1的功能方塊圖。如第1圖所示,電源切換裝置i包含一第一電源 10、一參考電壓源12、一比較器14、一第二電源16、一開關18、 一負載20、一電壓轉換電路22以及二電阻24。二電阻24電連接於 比較器14的負輸入端與第一電源10之間,參*考電壓源12則電連接 於比較器14的正輸入端。第二電源16電連接於比較器14的輸出 201119185 端。電壓轉換電路22電連接於第—電源1()與關ls之間,開關 18另電連接於tb較H Μ的輸出端。負載2()電連接於第二電源16 與開關18。 於此實施例中’第1源1G可為-電池,用以提供一第-電 麼’第-電源16可為-運算放A||穩壓電路、一電荷泵(也哪 pump)或-升降壓電源轉換電路(stepupandstep_d_switehing regulat〇r),用以提供一第二電壓。此外,參考電魏i2用以提供 參考電壓,電壓轉換電路22則用以將第一電壓轉換為一穩定電 壓。二電阻24則用以對第一電壓進行分壓,以防止第一電壓過大而 使比較器Η㈣。是轉要電阻%,以及需要時其數量及其阻值 可根據實際應用而決定。 於此實域巾,比較H 14用以比較第—電源賴輸出的第一 電壓之分壓與參考賴源丨2所輸出的參考霞。當第—電壓之分肩 大於參考電壓時’峨器Μ會輸出—第―電位訊號,轉通開關 18 ’且關閉第二電源16 ’使得第1源1G所輸出的第-電壓在裡 過電壓轉換魏___顯,可__ 負 2〇。換言之,料_電壓之分壓大於參考電 負 :供的第,充足’此時開關18導通且第二電源16: 由第一電源10供電給負载20。 比較器14則會 另一方面,當第-龍之分壓小於參考電壓時, 201119185 輸出一第二電位訊號,以截止開關18,且開啟第二電源16,使 二電源16可輸出第二電壓至負載2心換言之,當第—電壓之 小於參考時,表示第—電源ω所提供的第—電壓不足,此 關18截止’第一電源1〇輸出的第—電壓即無法供給負載㈤,而 由第二電源16供應敎頓(即第二電壓)給負載2〇。 於此實施例中’開關18可為一 p型電晶體,因此,當第—電壓 之分壓大財考電鄉比妓M崎㈣第—_峨為低電位 錢,而當第:電壓之分壓小於參考電壓時,比較器14所輸出的第 ‘ R號為问電位況號。需說明的是’藉由適當的電路設計,開 關18亦可為電晶體或其它電路開關。 ^請參閱第2圖,第2圖為第⑶中的第二電源_電路示意圖。 第電源16 tc以運算放大器穩壓電路來實現時,其電路設計可如 第2圖所示正迴卿反向放大電路來產生所需的穩定電 壓。如第2圖所示,第二電源16包含一比較器16〇以及二電阻162、 164,其中比較器160的正輸入端電連接於第j圖中的比較器“的 輸出端,比較器160的輸出端則電連接於第j圖中的負載2〇。在此 疋義從比較器160的正輸入端輸入的電壓為Vin,從比較器16〇的 輪出端輸出的電壓為Vout ’電阻162的阻值為Ri,且電阻164的阻 值為R2,則其關係式係如下列公式一所示。 公式一 :Vout = (Vin/Rl)*(Ri+R2)。 201119185 電阻 162、164 根據公式—,本㈣之實施鱗可藉由適當的 的設置而獲得所需要的穩定電壓。 3 5 ,如果第—^料―_池,_電池電壓大於 卜特寺’電壓轉換電路22可輸出穩定的3 3伏賴,价 rm會輸出低電位訊號,以導通咖18。由於比較器14輸出 峨’所以第二電源16不啟動。因此,電壓_路22輸 出的.伏特龍便可經由觸18而供給負⑽。反之,當鐘電池 電麼小於3.5伏特時,經由賴轉換魏22轉換後料—糖更會 低於3.3伏特,此時,比較器14會輸出高電位峨,峨止開㈣。 同時,第二電源16會產生穩定的輸出電壓33伏特給負載2〇。藉此, 無論链電池電壓是否大於3.5伏特,負㈣所接收的電壓皆可維持 在穩定的3.3伏特。 • 請參閱第3圖,第3圖為根據本發明另-實施例之電源切換裝 置3的功能方塊圖。如第3圖所示,電源切換裝置3與上述的電源 切換裝置!的主要不同之處在於電源切換裝置3的負載2〇包含一電 壓侧電路200。於此實施例中,第一電源1〇為一電池,電壓偵列 電路·電連接於電池(即第-電源1〇),以_電池之剩餘電量。 於實際應用中’電測電路200可包含一類比數位轉換器。需說 明的是,第3圖中與第1圖中所示相同標號的元件,其作用原理皆 相同,在此不再贅述。 201119185 請參閱第4圖,第4圖為根據本發明另一實施例之電源切雜 置5的功能方塊圖。如第4圖所示,電源切換裝置5與上述的電源 切触置擊要獨之處在於電壓轉換電路22電連接於開關Μ 與負載20之間。賴關18被導通時,第—電源ig所輸出的第一電 壓才可經由開關丨8輸人電壓轉換電路22,此時,電壓轉換電❹ 會將第-電壓轉換為-歡電壓。換言之,如果關18未被導通, =電壓轉換電路22即不會作動,可進—步節省第—電㈣的耗電 $ °需說明的是,第4圖中與第1圖中所示相同標號的元件,1作 用原理皆相同,在此不再贅述。 八下 相較於先前技術,根據本發明之電源切換 f敎於參考電㈣,表示第-魏所提供的第充^ 時開關導通,由第一電源供電給 此 料第二提供㈣-電壓不足,此時簡截止, 控制開轉可藉由 電給負載,進而確保穩定的輪出電麼。第-電源)來供 圍 201119185 【圖式簡單說明】 第1圖為根據本發明一實施例之電源切換裝置的功能方塊圖。 第2圖為第1圖中的第二電源的電路示意圖。 第3圖為根據本發明另一實施例之電源切換裝置的功能方塊 圖。 第4圖為根據本發明另一實施例之電源切換裝置的功能方塊 圖。 【主要元件符號說明】 1 ' 3 ' 5 電源切換裝置 10 第一電源 12 參考電壓源 14、160 比較器 16 第二電源 18 開關 20 負載 22 電壓轉換電路 24、162、164 電阻 200 電壓偵測電路 11BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a power-changing device, and more particularly to a power switching device capable of providing a stable voltage from a backup power source when the voltage of the main power source is insufficient. [Prior Art] At present, most of the operations are using a battery (for example, a (four) pool) as a power supply. When the system is in operation, it is often necessary to measure the voltage of the battery, and then monitor the battery's power... In general, the battery voltage is connected to the analog digital unit in the system ^ ^ (analog to digital converter, ADC) 0 , due to the clock The operating voltage range of the battery is between 3 Q and 42 volts, because the w of the = digits must be close to the system with the system grid = 疋 3 · 3 volts. Narrower due to the efficiency of power conversion for mobile devices, the most often used __ Wei DC / money to _, so the previous technique used to reduce the clock battery to 33 volts, C_erter), may be greater than 3. 5 When volts, DC/straight battery power is fixed repeatedly. However, the __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ In addition, there is a prior art design that uses a linear drop output (LDO) as an output power supply. A linear regulated power supply usually has a voltage drop (dr〇p voltage), which means that the turn-in must be higher than the output voltage difference, which is between 〇5 and 〇7 volts. This type of power supply will be more detrimental to maintaining a stable voltage of 3.3 volts. SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a power switching device that uses a switch to switch when a voltage of a main power source is insufficient, and supplies a stable voltage to a load by a backup power source. According to an embodiment, the power switching device of the present invention includes a first power source, a reference voltage source, a comparator, a second power source, a switch, and a load. The comparator is electrically connected to the first source and the reference voltage source. The second power source is electrically connected to the comparator. The switch is electrically connected to the first power supply and the comparator. The load is electrically connected to the second power source and the switch. The first power source is used to provide a first voltage. The reference voltage source is used to provide a reference voltage. Comparator = to compare the first voltage with the reference voltage. The second power source is used to provide a second voltage. When the electric power is greater than the reference voltage, the comparator outputs the first potential to turn on the second power supply, and the first power source outputs the first voltage to the load via the switch. On the other hand, when the first voltage is less than the reference voltage, the comparator output - the second potential signal 5 ί S 1 201119185, is turned off, and the second power source causes the second power wheel to load. In practical applications, the first power source can be the main power source and the power source can be the standby power supply. When the f voltage is greater than the reference voltage, the first voltage source of the first power source is charged; i. The switch is turned on, and the first power supply is supplied to the load; and when the gas-voltage is less than the reference voltage, it indicates that the first voltage provided by the first power source is insufficient: the switch of the a temple is turned off, and the (four) second electrical power is given to the load. In other words, the power-switching device can switch between the main power source or the power source (ie, the second power source described above) when the voltage of the main power source (ie, the first power source) is sufficient or insufficient by controlling the on or off of the switch. ) to supply power to the load, thus ensuring a stable output voltage. Regarding the advantages of the present invention, God can be further understood by the following detailed description of the invention and the accompanying drawings. [Embodiment] Please refer to Fig. 1. Fig. 1 is a functional block diagram of a power switching device 1 according to an embodiment of the present invention. As shown in FIG. 1 , the power switching device i includes a first power source 10 , a reference voltage source 12 , a comparator 14 , a second power source 16 , a switch 18 , a load 20 , a voltage conversion circuit 22 , and two Resistance 24. The two resistors 24 are electrically connected between the negative input terminal of the comparator 14 and the first power source 10, and the reference voltage source 12 is electrically connected to the positive input terminal of the comparator 14. The second power source 16 is electrically coupled to the output of the comparator 14 at the 201119185 terminal. The voltage conversion circuit 22 is electrically connected between the first power source 1 () and the switch ls, and the switch 18 is electrically connected to the output terminal of tb and H Μ . The load 2() is electrically connected to the second power source 16 and the switch 18. In this embodiment, the 'first source 1G can be a battery for providing a first-electrode'. The first-power source 16 can be an operational amplifier A||voltage regulator circuit, a charge pump (also a pump) or A step-up and step-down power conversion circuit (stepupandstep_d_switehing regulat〇r) for providing a second voltage. In addition, the reference voltage is used to provide a reference voltage, and the voltage conversion circuit 22 is used to convert the first voltage into a stable voltage. The second resistor 24 is used to divide the first voltage to prevent the first voltage from being too large to cause the comparator to Η (4). It is the % of the resistance, and the number and resistance of it can be determined according to the actual application. In this real area towel, the comparison H 14 is used to compare the partial voltage of the first voltage output of the first power source with the reference peak output by the reference source 丨2. When the shoulder of the first voltage is greater than the reference voltage, the device will output the first potential signal, turn the switch 18' and turn off the second power source 16' so that the first voltage output from the first source 1G is overvoltage. Convert Wei ___ explicit, __ negative 2 〇. In other words, the partial voltage of the material_voltage is greater than the reference voltage: the supplied first, sufficient 'the switch 18 is turned on at this time and the second power source 16: is powered by the first power source 10 to the load 20. Comparator 14 will, on the other hand, when the partial pressure of the first dragon is less than the reference voltage, 201119185 outputs a second potential signal to turn off the switch 18, and turn on the second power source 16, so that the two power sources 16 can output the second voltage. In other words, in the case of the load 2, in other words, when the first voltage is less than the reference, it means that the first voltage supplied by the first power source ω is insufficient, and the first voltage of the first power supply 1〇 is not turned off, and the load is not supplied to the load (5). The load (ie, the second voltage) is supplied to the load 2 by the second power source 16. In this embodiment, the switch 18 can be a p-type transistor. Therefore, when the voltage of the first voltage is greater than that of the 乡Maki (four), the first _ 峨 is low potential, and when the first: voltage When the partial pressure is less than the reference voltage, the 'R number' output by the comparator 14 is the question potential condition number. It should be noted that the switch 18 can also be a transistor or other circuit switch by appropriate circuit design. ^Please refer to FIG. 2, and FIG. 2 is a schematic diagram of the second power_circuit in the (3). When the first power supply 16 tc is implemented by an operational amplifier voltage regulator circuit, the circuit design can be as shown in Fig. 2 to generate the required stable voltage. As shown in FIG. 2, the second power supply 16 includes a comparator 16A and two resistors 162, 164, wherein the positive input terminal of the comparator 160 is electrically coupled to the output of the comparator "j" in the figure j, the comparator 160 The output is electrically connected to the load 2〇 in Figure j. Here, the voltage input from the positive input terminal of the comparator 160 is Vin, and the voltage output from the output terminal of the comparator 16〇 is Vout 'resistance. The resistance of 162 is Ri, and the resistance of resistor 164 is R2, then the relationship is as shown in the following formula 1. Equation 1: Vout = (Vin/Rl)*(Ri+R2) 201119185 Resistor 162, 164 According to the formula - the implementation scale of (4) can obtain the required stable voltage by appropriate setting. 3 5 , if the first - _ pool, _ battery voltage is greater than the Butte ' voltage conversion circuit 22 can output The stable 3 3 volts, the price rm will output a low potential signal to turn on the coffee 18. Since the comparator 14 outputs 峨 ' so the second power supply 16 does not start. Therefore, the voltage _ way 22 output of the voltoon can be touched 18 and supply negative (10). Conversely, when the clock battery is less than 3.5 volts, the conversion is via 22 After changing the material, the sugar will be lower than 3.3 volts. At this time, the comparator 14 will output a high potential 峨, 峨 开 (4). At the same time, the second power source 16 will generate a stable output voltage of 33 volts to the load 2 〇. Whether the voltage of the chain battery is greater than 3.5 volts, the voltage received by the negative (four) can be maintained at a stable 3.3 volts. • Referring to Fig. 3, Fig. 3 is a diagram showing the function of the power switching device 3 according to another embodiment of the present invention. As shown in Fig. 3, the main difference between the power switching device 3 and the above-described power switching device is that the load 2 of the power switching device 3 includes a voltage side circuit 200. In this embodiment, the first The power supply is a battery, and the voltage detection circuit is electrically connected to the battery (ie, the first power supply), and the remaining power of the battery is used. In practical applications, the electrical measurement circuit 200 can include an analog-to-digital converter. It should be noted that the components of the same reference numerals as those of the first embodiment shown in FIG. 1 have the same principle of operation, and are not described herein again. 201119185 Please refer to FIG. 4, FIG. 4 is another embodiment of the present invention. The power supply cuts the function of 5 As shown in Fig. 4, the power switching device 5 is unique from the power tapping described above in that the voltage converting circuit 22 is electrically connected between the switch Μ and the load 20. When the lagoff 18 is turned on, - The first voltage output by the power source ig can be input to the voltage conversion circuit 22 via the switch ,8. At this time, the voltage conversion power will convert the first voltage into a voltage. In other words, if the switch 18 is not turned on, The voltage conversion circuit 22 does not operate, and the power consumption of the first (electricity) (4) can be further saved. It should be noted that the components of the same reference numerals as those shown in FIG. 1 are the same. I will not repeat them here. Compared with the prior art, the power supply switching according to the present invention is referred to as reference power (4), indicating that the first charging switch provided by the first-wei is turned on, and the first power supply is supplied to the second supply (four)-low voltage. At this time, the simplification is cut off, and the control can be turned on and off by electric power to ensure a stable round-out. First-Power Supply) 201119185 [Simplified Schematic] FIG. 1 is a functional block diagram of a power switching device according to an embodiment of the present invention. Fig. 2 is a circuit diagram of the second power supply in Fig. 1. Fig. 3 is a functional block diagram of a power switching device according to another embodiment of the present invention. Fig. 4 is a functional block diagram of a power switching device according to another embodiment of the present invention. [Main component symbol description] 1 ' 3 ' 5 Power switching device 10 First power supply 12 Reference voltage source 14, 160 Comparator 16 Second power supply 18 Switch 20 Load 22 Voltage conversion circuit 24, 162, 164 Resistance 200 Voltage detection circuit 11