201227277 六、發明說明: 【發明所屬之技術領域】 [0001] 本發明涉及一種USB埠檢測電路,尤指一種可檢測USB埠 之電壓是否過壓或欠壓之USB埠檢測電路。 【先前技術】 [0002]目前’帶有USB ( Universal Serial Bus,通用串列 匯流排)埠之電子設備(如電腦)越來越多,當USB設備 連接到電子設備之USB埠後,電子設備首先檢測USB設備 是否連接於其USB埠上,然後才能實現同USB設備之資料 〇 交換。201227277 VI. Description of the Invention: [Technical Field] [0001] The present invention relates to a USB port detection circuit, and more particularly to a USB port detection circuit capable of detecting whether a voltage of a USB port is overvoltage or undervoltage. [Prior Art] [0002] At present, there are more and more electronic devices (such as computers) with USB (Universal Serial Bus), and when the USB device is connected to the USB device of the electronic device, the electronic device First, it is detected whether the USB device is connected to its USB port, and then the data exchange with the USB device can be realized.
[〇〇〇3]為保證USB埠能正常工作,於電子設備出廠檢驗及日常維 護時經常需要檢測USB埠之供電電壓是否過壓或欠壓,以 及檢查其傳輸資料性能是否良好。通常之檢測方法是利 用帶有USB介面之滑鼠、鍵盤、移動硬碟機、印表機等, 需將每一個USB設備分別插入所述USB埠,再藉由電子設 備之自動測試程式查看是否能夠正常檢測到所述Usb設備 之存在,即所有之USB設備是否能正常工作。然而,上述 USB蟑檢測方法僅能檢測咖埠之信號傳輸功能不能檢 測USB埠之電壓是否過壓或欠壓。 【發明内容】 [0004] #於以上内谷’有必要提供-種可檢測USB埠之電壓是否 過屋或欠壓之USB埠檢測電路。 [0005] 099144385 蟑檢測電路,用於檢測電子設備之崞之電壓 ,::B埠檢測電路包括—電壓比較電路及一指示電路 表單編號:電路與所述電壞比較電路之輪出端相連,所 第3頁/共13頁 0992076738-0 201227277 =電壓比㈣料USB埠輸出< 電壓與—參考值作比 '、、輪出L號控制所述指#電路指示USB埠之電壓是否 過壓或欠壓。 [0006] [0007] [0008] [0009] 099144385 六;d技術’本發明USB埠檢測電路利用電I比較電 、USB淳輸出之電壓與—參考電壓值作比較並輸出信 〜控制所述指示電路指示_崞之電壓是否過壓或欠壓。 【實施方式】 參閱圖1 ’本發明USB埠檢測電路用於檢測一電子設備 (如個人電腦)之USB埠1〇之電|,包括—與所述㈣痒 連之刀壓電路20、~與所述分壓電路2()相連之電墨 較電路30、一與所述電壓比較電路抑相連之指示電路 4〇及—與所·SB埠叫目連之貞載模組50» 心閱圖2 ’所述錢電路2()包括㈣連接於所述哪璋 10之正負輸出端之間之電剛〜R3。所述電阻R1之一端 ”所述USBi阜1〇之正輸出端相連,另一端與一節點A相連 ’所述電阻R2之-端與所述節點a相連,另一端與一節 點B相連;所述電阻⑸之—端與所述節點b相連,另一端 與所述USB埠1G之負輸出端相連。於本發明—較佳實施方 式中,所述電阻R1與所述電阻R3之阻值相等,所述電阻 R2之阻值是所述電阻ri或電阻R3i3/28,如ri=r3 = 14K Ω (千歐)時,R2 = 1.5Kq (千歐)。 所述電壓比較電路30包括—電壓比較晶片(如TSM1〇3晶 片)U1,所述電壓比較晶片卩i包括引腳卜8 ,其中引腳工 與一節點C相連,引腳2與所述節點a相連,引腳3外接有 一電容C1 ,引腳4與所述Usb埠1〇之負輸出端相連,引腳 表單編號A_1 第4頁/共ι3頁 0992076738-0 201227277 [0010] ο [0011] ο [0012] 099144385 5與所述節點Β相連,引腳6與引腳3相連因而與引腳3具有 相同之電壓,引腳7與一節點D相連,引腳8與所述埠 10之正輸出端相連。 所述指示電路40包括一第一發光二極體[〗、一第二發光 二極體L2、一第三發光二極體L3、一第四發光二極體" 及二極體D1〜D2。所述第一發光二極體L1<陽極藉由—電 阻R9與所述USB埠10之正輸出端相連,陰極與所述二極體 D1及D2之陽極相連,二極體])!之陰極與節點D相連,二極 體D2之陰極與節點c相連;所述第二發光二極體u之陽極 與節點D相連,陰極藉由—電阻R1〇與所述第四發光二極 體L4之陽極相連;所述第三發光二極體L3之陽極與節點c 相連,陰極藉由所述電阻R10與所述第四發光二極體“之 陽極相連,所述第四發光二極體L4之陰極與所述ϋSB埠lo 之負輸出端相連。 所述負載模組50包括一開關模&S1及並聯連接於所述USB 埠1 〇之正負輸出端之間之電阻R4~R8,所述開關模組31 包括5個分別與所述電阻R4~R8相連之開關,分別控制所 述電阻R4〜R8所在支路之通斷,以檢測所述⑽以阜^外接 不同之負載時其兩端之電壓是否在規定之範圍内。所述 負载模組50還包括一與所述電阻R4~R8所在之支路並聯之 電容C2。 請參閱圖3,所述電壓比較晶片υι包括—第一比較器〇ρι 及-第二比較器OP2。所述第一比較器〇ρι之正輪入端與 引腳3相連且接有參考電壓VRef (VRef = 2 5V),負輸入 蠕與引腳2相連’輸出端與引腳!相連。所述第二比較器 表單編號A0101 第5冥/共13頁 0992076738-0 201227277 0P2之正輸入端與引腳5相連,負輸入端與引腳6相連,輸 出端與引腳7相連。當所述第一比較器0P1或第二比較器 0P2之正輸入端之電壓大於負輸入端之電壓時,其輸出端 輸出高電平信號;反之則輸出低電平信號。所述電壓比 較晶片U1之引腳8為正電源引腳(Vcc+),引腳4為負電 源引腳(Vcc—)。 [0013] 檢測USB埠10之電壓時,如果USB埠10之電壓正常(如等 於5V)時,節點A之電壓約為2. 6V,大於所述第一比較器 OP1之正輸入端之參考電壓2. 5V,因而所述第一比較器 OP1藉由引腳1輸出低電平之信號至節點C ;節點B之電壓 約為2. 37V,小於所述第二比較器OP2之負輸入端之電壓 ,因而所述第二比較器OP2藉由引腳7輪出低電平之信號 至節點D ;此時所述第一發光二極體L1發光,所述第二發 光二極體L2、第三發光二極體L3及第四發光二極體L4熄 滅,指示所述USB埠10之電壓正常。如果USB埠10之電壓 過壓(如大於5.25V)時,節點A之電壓大於所述第一比 較器OP1之正輸入端之參考電壓2. 5V,因而所述第一比較 器OP1藉由引腳1輸出低電平之信號至節點C ;節點B之電 壓大於所述第二比較器OP2之負輸入端之電壓,因而所述 第二比較器OP2藉由引腳7輸出高電平之信號至節點D ;此 時所述第一發光二極體L1、第二發光二極體L2及第四發 光二極體L4發光,第三發光二極體L3熄滅,指示所述USB 埠10之電Μ過壓。如果USB埠10之電麼欠壓(如小於 4. 75時)時,節點A之電壓小於所述第一比較器OP1之正 輸入端之參考電壓2. 5V,因而所述第一比較器OP1藉由引 099144385 表單編號A0101 第6頁/共13頁 0992076738-0 201227277 〇 [0014] ^輪出高電平之信號至節點c;節點β之錢約小於所述 -Μ交器〇P2之負輸入端之電壓,因而所述第二比較器 一 2稭由引腳7輸出低電平之信號至節點d ;此時第一發光 〃 U f一發光—極體L3及第四發光二極體"發光 \發光一極體L2熄、滅’指示所述咖埠1〇之電壓欠壓 。測試者根據所述指㈣㈣之發光二極體之發光情況 即可判斷USB埠1G之電壓是否正常(僅以發光時表示電壓 正常,LI、L2、L4發光時表示過壓;u、、[4發光時 表示欠璧)。 於本發明較佳實施方式中,所述㈣埠1〇輸出之電壓經所 述分壓電路2〇之分壓後輸出至所述電厘比較電路30,所 述電塵比較電路3〇將接收到之電麗與預設之參考值作比 較,再根據比較結果輸出信號至所述指示電路㈣示測 試結果。所述電壓比較電獅亦可採用其他晶片直接將 電壓與預設之參考電顧作比較,再根據比較 ,。果輸出錢至觀指示電⑽指_試結果。 q [0015] =二T係合乎發明專利申請條件,爰依法提 出專财η ,χ上所述僅為本 舉凡熟悉本案技藝之人士其所爰 j只施例’ 之等效修飾«化1應涵胁=_精神所作 。 u下之申請專利範圍内 [0016] 【圖式簡單說明】 圖1是本發明較佳實施方娜叫檢測電路之級成圖。 [0017] 圖2是圖1中USB痒檢測電路之具體電路圖。 099144385 表單編號A0101 第7頁/共13頁 0992076738-0 201227277 [0018] 圖3是2中電壓比較晶片之内部電路圖。 【主要元件符號說明】 [0019] USB埠:10 [0020] 分壓電路:2 0 [0021] 電壓比較電路:30 [0022] 指示電路:4 0 [0023] 負載模組:50 [0024] 電阻:R1-R10 [0025] 電容:C1 〜C2 [0026] 電壓比較晶片:U1 [0027] 開關模組:S1 [0028] 第一發光二極體:L1 [0029] 第二發光二極體:L2 [0030] 第三發光二極體:L3 [0031] 第四發光二極體:L4 [0032] 二極體:D1 〜D2 0992076738-0 099144385 表單編號A0101 第8頁/共]3頁[〇〇〇3] In order to ensure the normal operation of the USB port, it is often necessary to check whether the power supply voltage of the USB port is overvoltage or undervoltage during the factory inspection and daily maintenance of the electronic device, and to check whether the performance of the transmission data is good. The usual detection method is to use a mouse with a USB interface, a keyboard, a mobile hard disk drive, a printer, etc., and each USB device needs to be inserted into the USB port separately, and then the automatic test program of the electronic device is used to check whether The existence of the Usb device can be detected normally, that is, whether all USB devices can work normally. However, the above USB port detection method can only detect that the signal transmission function of the coffee machine cannot detect whether the voltage of the USB port is overvoltage or undervoltage. SUMMARY OF THE INVENTION [0004] #上内谷" It is necessary to provide a USB 埠 detection circuit that can detect whether the voltage of the USB port is over- or under-voltage. [0005] 099144385 蟑 detection circuit for detecting the voltage of the electronic device, the :: B 埠 detection circuit includes a voltage comparison circuit and an indication circuit form number: the circuit is connected to the wheel-out end of the electrical-fail comparison circuit, Page 3 / 13 pages 0992076738-0 201227277 = voltage ratio (four) material USB 埠 output < voltage and - reference value ratio ',, turn out L number control said finger # circuit indicates whether the voltage of USB 过 is overvoltage Or undervoltage. [0006] [0008] [0009] [0009] 099144385 six; d technology 'the USB 埠 detection circuit of the present invention uses the electric I to compare the voltage of the USB 淳 output with the reference voltage value and output the signal ~ control the indication The circuit indicates if the voltage of _崞 is overvoltage or undervoltage. [Embodiment] Referring to FIG. 1 'The USB port detecting circuit of the present invention is used for detecting the USB device of an electronic device (such as a personal computer), including - and the (four) itching blade circuit 20, The electro-optic unit connected to the voltage dividing circuit 2() is connected to the circuit 30, the indicating circuit 4 connected to the voltage comparing circuit, and the load-carrying module 50» connected to the SB 埠Referring to Figure 2, the money circuit 2 () includes (d) an electrical connection ~ R3 connected between the positive and negative output terminals of the terminal 10. One end of the resistor R1 is connected to the positive output end of the USBi阜1〇, and the other end is connected to a node A. The end of the resistor R2 is connected to the node a, and the other end is connected to a node B. The end of the resistor (5) is connected to the node b, and the other end is connected to the negative output terminal of the USB 埠 1G. In the preferred embodiment of the present invention, the resistance of the resistor R1 and the resistor R3 are equal. The resistance of the resistor R2 is the resistor ri or the resistor R3i3/28, and when ri=r3 = 14K Ω (kiloohm), R2 = 1.5Kq (kiloohm). The voltage comparison circuit 30 includes a voltage. Comparing a wafer (such as a TSM1〇3 wafer) U1, the voltage comparison chip 卩i includes a pin 8 in which a pin is connected to a node C, a pin 2 is connected to the node a, and a pin 3 is externally connected with a capacitor C1, pin 4 is connected to the negative output terminal of the Usb埠1〇, pin form number A_1 page 4 / total page 3 0992076738-0 201227277 [0010] ο [0012] ο [0012] 099144385 5 and The node is connected, pin 6 is connected to pin 3 and thus has the same voltage as pin 3, pin 7 is connected to a node D, pin 8 is The positive output terminal of the 埠10 is connected. The indicating circuit 40 includes a first light emitting diode [1], a second light emitting diode L2, a third light emitting diode L3, and a fourth light emitting diode. And the diodes D1 to D2. The first light-emitting diode L1<the anode is connected to the positive output end of the USB port 10 via a resistor R9, and the cathode is connected to the anodes of the diodes D1 and D2 , the cathode of the diode] is connected to the node D, the cathode of the diode D2 is connected to the node c; the anode of the second light-emitting diode u is connected to the node D, and the cathode is connected by the resistor R1 The anode of the fourth light-emitting diode L4 is connected; the anode of the third light-emitting diode L3 is connected to the node c, and the cathode is connected to the anode of the fourth light-emitting diode by the resistor R10. The cathode of the fourth light-emitting diode L4 is connected to the negative output terminal of the ϋSB埠lo. The load module 50 includes a switch module & S1 and a resistor R4 R R8 connected in parallel between the positive and negative output terminals of the USB port, and the switch module 31 includes five resistors and R4 respectively. ~R8 connected switches respectively control the on/off of the branch where the resistors R4 R R8 are located to detect whether the voltage at both ends of the (10) is different within a specified range when external loads are different. The load module 50 further includes a capacitor C2 connected in parallel with the branch in which the resistors R4 R R8 are located. Referring to FIG. 3, the voltage comparison chip 包括1 includes a first comparator 〇ρι and a second comparator OP2. The first comparator 〇ρι is connected to pin 3 with a reference voltage VRef (VRef = 2 5V), and the negative input is connected to pin 2 'output terminal and pin! Connected. The second comparator form number A0101 5th/total 13 page 0992076738-0 201227277 The positive input of 0P2 is connected to pin 5, the negative input is connected to pin 6, and the output is connected to pin 7. When the voltage of the positive input terminal of the first comparator OP1 or the second comparator 0P2 is greater than the voltage of the negative input terminal, the output terminal outputs a high level signal; otherwise, the low level signal is output. The voltage comparison pin 8 of the chip U1 is a positive power supply pin (Vcc+), and the pin 4 is a negative power supply pin (Vcc-). [0013] When the voltage of the USB port 10 is detected, if the voltage of the USB port 10 is normal (for example, equal to 5 V), the voltage of the node A is about 2. 6 V, which is greater than the reference voltage of the positive input terminal of the first comparator OP1. 2. 5V, the first comparator OP1 outputs a low level signal to the node C through the pin 1; the voltage of the node B is about 2.37V, which is smaller than the negative input terminal of the second comparator OP2. a voltage, such that the second comparator OP2 rotates a low level signal through the pin 7 to the node D; at this time, the first light emitting diode L1 emits light, and the second light emitting diode L2, The three light emitting diodes L3 and the fourth light emitting diodes L4 are turned off, indicating that the voltage of the USB port 10 is normal. The voltage of the node A is greater than the reference voltage of the positive input terminal of the first comparator OP1 by 2. 5V, so that the first comparator OP1 is cited by the voltage of the voltage of the USB 埠 10 (for example, greater than 5.25V). The pin 1 outputs a low level signal to the node C; the voltage of the node B is greater than the voltage of the negative input terminal of the second comparator OP2, so the second comparator OP2 outputs a high level signal through the pin 7 To the node D; at this time, the first LED L1, the second LED L2 and the fourth LED L4 emit light, and the third LED L3 is extinguished, indicating the power of the USB port 10 Μ Overpressure. If the voltage of the node A is less than the reference voltage of the positive input terminal of the first comparator OP1 is 2. 5V, thus the first comparator OP1 By reference 099144385 Form No. A0101 Page 6 / Total 13 Page 0992076738-0 201227277 〇[0014] ^ Turn the signal of high level to node c; the money of node β is less than the negative of the - Μ 〇 2 P2 The voltage of the input terminal, so that the second comparator 2 is outputted by the pin 7 to the node d; the first illuminating 〃 U f is a illuminating body L3 and the fourth illuminating diode "Lighting\Lighting One pole L2 off, off' indicates the undervoltage of the curry 1埠. The tester can determine whether the voltage of the USB 埠 1G is normal according to the illuminating condition of the light-emitting diodes of the fingers (4) and (4) (only when the light is emitted, the voltage is normal, and when LI, L2, and L4 are illuminated, the over-voltage is indicated; u,, [4] When illuminating, it means owing). In a preferred embodiment of the present invention, the voltage of the (IV)埠1〇 output is divided by the voltage dividing circuit 2〇 and output to the electrical comparison circuit 30, and the electric dust comparison circuit 3〇 The received battery is compared with a preset reference value, and then the output signal is output to the indication circuit (4) according to the comparison result. The voltage comparison of the electric lion can also use other wafers to directly compare the voltage with the preset reference battery, and then according to the comparison. If the output money to the observation indicator (10) refers to the test result. q [0015] = two T system in accordance with the conditions of the invention patent application, 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 提出 η η η η η η η η η η η η η η η η η η η Hazard = _ spirit made. BRIEF DESCRIPTION OF THE DRAWINGS [0016] BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a level diagram of a preferred embodiment of the present invention. 2 is a specific circuit diagram of the USB itching detection circuit of FIG. 1. 099144385 Form No. A0101 Page 7 of 13 0992076738-0 201227277 [0018] FIG. 3 is an internal circuit diagram of a voltage comparison chip of 2. [Main component symbol description] [0019] USB port: 10 [0020] Voltage dividing circuit: 2 0 [0021] Voltage comparison circuit: 30 [0022] Indication circuit: 4 0 [0023] Load module: 50 [0024] Resistor: R1-R10 [0025] Capacitance: C1 ~ C2 [0026] Voltage comparison chip: U1 [0027] Switch module: S1 [0028] First light-emitting diode: L1 [0029] Second light-emitting diode: L2 [0030] Third Light Emitting Diode: L3 [0031] Fourth Light Emitting Diode: L4 [0032] Diode: D1 ~ D2 0992076738-0 099144385 Form No. A0101 Page 8 / Total] 3 Pages