1291558 、 九、發明說明: 【發明所屬之技術領域】 本發明涉及一種自動測試風扇轉速的裝置及方法。 【先前技術】 . 、與常規三線式風扇(兩根電源線,-根訊號線模式)相比,PWMlLf . 將導線數增至4線,多出的一根線用於控制風扇導通時間。PWM的全稱Γ P曰ulse WidthMod—(脈寬調變),它被用來控制風扇的轉速。不過前^ 是風扇的電源是四針介面。風扇的轉速可以利用pWM的迴圈變化進行 的控制,貫現雜訊和性能之間的平衡。pwM控制風扇轉速是按昭脈衝 的百分比進行的,其控制精度彳艮高。 、又 1 目風扇有節能等諸多優點’而成爲PC系統散熱領域的新寵。現在對於 PWM風扇存在-定檢财式,即爲用電雜應器提供風扇電源,用訊號產 生器產生所需要的-定頻率、佔空比(需用示波器_)的pwM波,再用 ‘轉速計測試風扇的轉速的檢測方式。但是,該檢測方式所需設備衆多,佔 '用空間比較大,並且測試相當麻煩,所需人員素質也必須較高,因此不適 ,於生產線大量産品的流水線作業。並且pWM風扇測試參數較多,習知測 忒方式多用按鍵編輯器來編輯測試參數,速度較慢,效率較低。 【發明内容】 ^ 雲於以上内容,有必要提供—種風扇轉速檢測裝置及方法,其量測準 確、便捷,測試效率高,使用範圍廣。 ,、-種風扇轉速檢測裝置,包括一電腦、一風扇檢測儀及一爲該風扇檢 測儀提供電制交流電源,其巾該電顧於編輯及傳遞風扇料號參數給所 述風扇檢測儀中的-微控制器。所述的風扇檢測儀還包括至少一與該微控 制器連接之啟動測試設備,該微控制器根據所述料號參數啟動該測試設備 對待測風扇進行轉速檢測。 其中所述的至少一啟動測試設備包括一低壓測試繼電器、一正常測試 繼電器及一浮空測試繼電器。 Μ 所述的微控制器包括:-系統初始化模組,用於調出儲存在微控制器 中的風扇料號參數,初始化程式中的標誌位及初始化測試點數的變量;一 6 χ29ΐ558 參數更新模組,用於從一個測試點切換到下一個測試點時更新佔空比和對 應的參考轉速;一轉速計算模組,用於計算該風扇的轉速;一判斷模組,' 用於判斷是否到測試時間,判斷風扇轉速是否在誤差範圍之内及判斷所 測試點是否測試完畢。 • 一種風扇轉速檢測方法,係透過一風扇檢測儀檢測待側風扇的轉速, 該風扇檢測儀包括一微控制器及與該微控制器連接的至少一啟動測試嗲 、 備,該方法包括如下步驟··(a)該微控制器接收由-電腦發送的風扇^ 芩數’(b)進行系統初始化;(c)該微控制器根據所接收的料號參數啟動 該測試設備;(d)計算風扇在一測試點的實際轉速;(e)判斷該測試點的 貫際轉速是否在誤差範圍内;(f)若該測試點的實際轉速在誤差範圍内,則 丨 判斷所有測試點是否都測試完畢;(g)若該測^點的實際轉速不在誤差範 圍内,或若所有測試點都已通過測試,則斷開該啓動測試設備。 所述的風扇檢測裝置及方法,可透過電腦下載多個料號的參數,減少 _編輯料號的時間,提高測試效率,且量測準確,更適合生產線更換料號比 較頻繁的測試作業,同時賴扇檢測裝置及方法還翻於三線錢扇的測 Λ試,增加了使用範圍。 【實施方式】 參閱第一圖所示,係本發明風扇轉速檢測裝置較佳實施例的硬體架構 圖。該風扇檢測裝置既可用於PWM風扇及三線式風扇轉速的自動檢測,還 可用於PWM風扇轉速的手動檢測,其包括一電腦1〇、一交流電源2〇、一 風扇仏測儀30及一電源供應器4〇。其中,電腦1〇中儲存有多個常用料號 風扇的料號參數,其中PWM風扇的料號參數包括:測試點數、pwM波的 ,率、佔空比、是否浮空測試、各佔空比對應的風扇參考轉速、測試時間、 疋否低壓啓動、低壓啓動時間、低壓啓動參考轉速及是否爲自動測試等; 二,式風扇的料號參數包括:風扇參考轉速、測試時間、是否低壓啓動、 低壓啓動時間等。該電腦1〇向風扇檢測儀3〇傳遞上述料號參數。風扇5〇 可透過一轉速回饋線60將其實際轉速反饋給風扇檢測儀3〇。 父流電源20與電源供應器4〇均透過電源線與風扇檢測儀3〇相連,以 提供所需電源電壓給風扇檢測儀3〇。在本較佳實施例中,該交流電源2〇 一 71291558, IX. Description of the Invention: [Technical Field] The present invention relates to an apparatus and method for automatically testing a fan speed. [Prior Art] Compared with a conventional three-wire fan (two power lines, - root signal line mode), PWMlLf increases the number of wires to four wires, and the extra wire is used to control the fan conduction time. The full name of the PWM Γ P曰ulse WidthMod—is used to control the speed of the fan. However, the front ^ is the power supply for the fan is a four-pin interface. The fan speed can be controlled by the loop change of the pWM to achieve a balance between noise and performance. The pwM control fan speed is based on the percentage of the Zhao pulse, and its control accuracy is high. And the 1 fan has many advantages such as energy saving, and it has become the new favorite in the field of PC system cooling. Now for the PWM fan to exist - check the fuel type, that is, to provide fan power for the electric hybrid, use the signal generator to generate the required - fixed frequency, duty cycle (using the oscilloscope _) pwM wave, and then use ' The tachometer tests the speed of the fan. However, the detection method requires a large number of devices, which accounts for a relatively large space, and the test is quite troublesome, and the required personnel quality must also be high, so it is uncomfortable, and the production line of a large number of products in the production line. Moreover, the pWM fan has many test parameters, and the conventional test method uses a key editor to edit test parameters, which is slower and less efficient. SUMMARY OF THE INVENTION ^ In the above content, it is necessary to provide a fan speed detecting device and method, which are accurate and convenient in measurement, high in test efficiency, and widely used. , a fan speed detecting device, comprising a computer, a fan detector and an electric AC power supply for the fan detector, the towel is used to edit and transmit the fan item number parameter to the fan detector - Microcontroller. The fan detector further includes at least one activation test device connected to the micro controller, and the microcontroller starts the test device according to the item number parameter to perform rotation speed detection on the fan to be tested. The at least one startup test device includes a low voltage test relay, a normal test relay, and a floating test relay. Μ The microcontroller includes: - a system initialization module for calling up the fan item number parameter stored in the microcontroller, initializing the flag bit in the program and initializing the number of test points; a 6 χ 29 ΐ 558 parameter update a module for updating the duty ratio and the corresponding reference speed when switching from one test point to the next; a speed calculation module for calculating the speed of the fan; a judgment module, 'for determining whether At the test time, determine whether the fan speed is within the error range and determine whether the test point is tested. A method for detecting a fan speed, which detects a rotation speed of a side fan through a fan detector, the fan detector comprising a microcontroller and at least one startup test device connected to the microcontroller, the method comprising the following steps · (a) the microcontroller receives the fan ^ number sent by the computer - (b) for system initialization; (c) the microcontroller starts the test device according to the received item number parameter; (d) calculation The actual speed of the fan at a test point; (e) determine whether the continuous speed of the test point is within the error range; (f) if the actual speed of the test point is within the error range, then determine whether all test points are tested. (g) If the actual speed of the test point is not within the error range, or if all test points have passed the test, disconnect the start test equipment. The fan detecting device and method can download parameters of multiple item numbers through a computer, reduce the time of _editing the item number, improve the testing efficiency, and measure accurately, and is more suitable for the testing operation of the production line to replace the item number more frequently. The Lai fan detection device and method are also turned over to the test of the three-line money fan, which increases the scope of use. [Embodiment] Referring to the first figure, a hardware architecture diagram of a preferred embodiment of the fan rotation speed detecting device of the present invention is shown. The fan detecting device can be used for automatic detection of the speed of the PWM fan and the three-wire fan, and can also be used for manual detection of the PWM fan speed, which includes a computer, an AC power supply, a fan, and a power supply. The supplier is 4〇. Wherein, the computer 1〇 stores the item number parameters of the fan of the plurality of common item numbers, wherein the item number parameters of the PWM fan include: the number of test points, the pwM wave, the rate, the duty ratio, whether the floating test, and each duty Compared with the corresponding fan reference speed, test time, 低压No low voltage start, low voltage start time, low voltage start reference speed and whether it is automatic test; Second, the fan number parameters include: fan reference speed, test time, low voltage start , low voltage start-up time, etc. The computer transmits the above item number parameter to the fan detector 3〇. The fan 5〇 can feed back its actual speed to the fan detector 3 through a speed feedback line 60. Both the parent current source 20 and the power supply unit 4 are connected to the fan detector 3 through a power line to provide the required power supply voltage to the fan detector. In the preferred embodiment, the AC power source 2〇-7
1291558 般採用的是220v交流電,是風扇檢測儀3〇的常用電源,而電源供應器奶 只作爲風扇檢測儀30的備用電源,只有當風扇5〇的功率較大時^用气 電源供應器40給風扇檢測儀30提供電源電壓。風扇檢測儀3〇的詳細纟士= 如第二圖所示。 參閱第二圖所示’係第-圖所示風扇檢測儀硬體框圖。該風扇檢 30由電源10卜操作按鍵102、LCD螢幕103、發光二極體1〇4、微控制器 105、低壓測試繼電器106、正常測試繼電器1〇7、蜂鳴器1〇8、pwM波形 產生态109、浮空測試繼電器ι10及一風扇端子U1構成。其中電源mi提 供微控制器105不間斷電源,可以在外部電源切斷時,保存最近一次電腦 10傳送的風扇測試倾和操作按鍵1G2編輯的風細試資料。除待測= 50爲大功率風扇時該電源101由電源供應器4_〇提供外,其他情況該電 1〇1均由交流電源20提供。本較佳實施例中交流電源2〇提供的是22(^交 流電,風扇檢測儀30能夠將該220v交流電轉換成檢測風扇5〇轉速所需二 直流電壓。 操作按鍵102、LCD螢幕103及發光二極體104均位於風扇檢測儀3〇 的表面’且透過數據線與微控制器1〇5相連。蜂鳴器觀位於風扇檢測儀 30的内部,也透過數據線與微控制器ι〇5相連。 操作按鍵102用於當制風扇50的料號不在微控制器1〇5所接收的電 腦1〇所發送的常用風扇料號範圍内時,才用其完成對風扇料號參數等資料 的輸入。 ' LCD螢幕1〇3用於顯示測試過程中的參數資訊,如轉速值、頻率值、 佔空比、測試時間以及測試的結果等。 、 發光^極體104及蜂鳴$ 1〇請於當被測風扇5〇測試失敗時進行聲光 報警,即當被測風扇50的轉速不在允許誤差範圍内時 紅燈,且蜂鳴器108發出報警訊號。 風扇端子111用於連接風扇檢測儀30與風扇5〇,該風扇端子⑴可分 別^=測試繼電器觸和正常測試繼電器浙與微控制器浙相連。 佳實施例中,若需要對風扇進行低_試時,則低制試繼電器106 在開口測試時與微控㈣1〇5接通,並透過風扇端子m提供給風扇5〇 一 8 1291558 〜 個5v低電壓,以測試風扇50在該低壓下的轉速是否正常。當低壓啓動時 間已到且經檢測低壓轉速正常時,低壓測試繼電器1〇6會自動斷開,而】 常測試繼電器107開始與微控制器105接通,並透過風扇端子m提供仏 風扇50 —個12v正常電壓,以測試風扇50在該正常電壓下的轉速是否^ • 常。 疋 浮空測試繼電器110是與PWM波形產生器109 一起用來連接微控制器 ' 105和風扇端子111的,浮空測試繼電器11〇與風扇端子111之間的連線爲 一 PWM線。若風扇50爲三線式風扇,則浮空測試繼電器11〇不起作用了 PWM線始終是_的;若風扇5G爲,則浮㈣試繼電器ιι〇 在開啟測試時是接_,從而把PWM線也接通;若風扇5G的料號參數中 _ 已设置有浮空測試,則在該風扇50的所有測試:點均測試完畢後,浮空測試 繼電器110斷開,從而把PWM線也斷開,以測試風扇在佔空比爲丨;^%^ PWM線浮空狀態下的轉速是否正常。 ° - 微控制器105可透過轉速回饋線6〇接收風扇50傳回的轉速回饋訊號, 即時計算風扇轉速,控制PWM波形產生器應工作。該微控制器1〇5包括 ,一系列功能模組,詳見第三圖。 PWM波形產生器應是PWM波產生的硬體基礎,其在微控制哭ι〇5 的控制下産生符合要求的PWM波提供給風扇50做轉速控制之用。 參閱第三圖所示,係第二圖所示微控制器的功能模_。微控制器1〇5 包括一系統初始化模組1051,一參數更新模組1〇52,一轉速計算模组1〇53 I 和一判斷模組1054。 # 其中,系統初始化模組1051用於調出存於微控制器1〇5的一儲存單元 中的由電腦10向微控制器105發送的風扇5〇的料號參數、初始化程式中 操作按鍵102的標誌位 '初始化變量。所述儲存單元可爲一電子可抹除可 程式化唯讀記憶體(EEPROM)。若風扇50爲PWM風扇,其料號參數包 括:測試點數、PWM波的頻率、健比、是否浮空測試、各佔空比對應的 風扇參考轉速、測試時間、是否低壓啓動、低壓啓動時間、低壓啓動參考 轉速及是否爲自動測試等;若風扇50爲三線式風扇,其料號參數包括:風 扇參考轉速、測試_、是祕壓啓動、低祕動時間等。職點數的設 9 1291558 ' 定一般是由客戶決定。因PWM風扇在相同電壓不同佔空比下會有不同的轉 速,爲檢測不同佔空比下的轉速,需要設定測試點數。如一款風扇,須測 佔空比爲〇%、25%、75%、100%這四個點下對應的轉速,因此該款風扇的 測試點數設定爲4。然後把對應的佔空比與各佔空比所對應的參考轉速輸 入。所述參考轉速是由風扇廠商提供的,是由風扇的性能決定的。測試時 間是指一個測試點到下一個測試點的測試時間,如從測〇%到測25%之間需 4秒,該時間長短的設定主要由風扇轉速穩定的時間決定,因爲不同佔空= 下的轉速一般是不同的,風扇從一種轉速變到另一種轉速需要一段延i^時 間。所述初始化程式中標誌位指初始化每個操作按鍵1〇2的標誌位,每個 操作按鍵102唯一對應一個標誌位,標誌位爲丨表示該按鍵閉合,爲〇表 示該按鍵斷開。例如:操作按鍵丨的標誌位爲ί,表示操作按鍵丨閉合,需 要檢測不同於上次檢測風扇50料號的風扇,需進入中斷以重新設定&號參 數;操作按鍵2的標誌位爲丨,表示操作按鍵2閉合,如果閉合時間小於^ 秒,則需要對編輯的參數進行移位,如果閉合的時間大於3秒,則需要編 輯下一個參數,操作按鍵3的標諸位爲1,表示現在操作按鍵3閉合,需要 -將編輯的參數加1。初始化變量包括初始化測試點數變量爲零。 參數更新模組1052用於從一個測試點切換到測試下一個測試點時更新 佔空比和對應的參考轉速這兩個參數。 轉速計算模組1053用於透過偵測風扇50的速度回饋線6〇,利用微控 制器105的Turned捕獲這一系列的脈衝,透過計算這個脈衝訊號的頻率再 來以個轉速因數就付到該風扇5〇的轉速。所述Timer2爲微控制器1〇5 中的一計時器。 判斷模組1054用於判斷是否到測試時間,判斷風扇轉速是否正確,判 斷所有測試點是否測試完畢,判斷是否低壓啓動及判斷是否進行浮空測試 等。其中判斷風扇轉速是否正確是透過將實測轉速與參考轉速進行比較來 判別的,判斷公式爲··參考轉速X (1-公差%)=<實測轉速<=參考轉速χ (1+公差%)。 參閱第四圖所示,係本發明風扇轉速檢測方法較佳實施例的檢測作業 流程圖。該方法既適用於PWM風扇及三線式風扇轉速的自動檢測,也適用 1291558 於PWM風扇的手動測試。本較佳實施例以自動測試pWM風扇爲例進行介 紹,且假設該被測PWM風扇的料號在微控制器105所接收的多個常用風^ 料號的範圍内。首先,微控制器105接收電腦1〇發送的多個常用料號風】 的料號參數,並將該參數保存到微控制器1〇5的儲存單元中,該儲存單= 可爲一 EEPROM,所述料號參數包括:測試點數、pWM頻率、佔空比、 是否浮空測試、各佔空比對應的風扇參考轉速、測試時間、是否低壓啓動、 低壓啓動時間、低壓啓動參考轉速及是否爲自動測試等(步驟sl〇〇》系統 初始化模組1051初始化標誌位及初始化測試點數變量等於零,調出儲存在 微控制器105的儲存單元中的料號參數(步驟1〇2)。判斷模組1〇54判^風 扇50的料號參數中是否設有低壓啓動,所述低壓啓動是指低壓測試繼電器 106將微控制器105與風扇端子ni接通,以籩過風扇端子ηι給風扇% 提供某一特定低電壓使其運轉,本較佳實施例提供的是一 5v電壓(步驟 S104)。若是,則進行低壓啓動,並計算低壓啓動轉速,且低壓啓動時間到 ,後,判斷模組1054判斷低壓啓動轉速是否正確,即將上述計算得到的低 壓啓動實際轉速與低壓啓動參考轉速對比,判斷實際轉速是否在誤差範圍 内(步驟S106)。若是,則低壓測試繼電器1〇6斷開,正常測試繼電器 接通,以給風扇50供應正常運轉電壓(步驟sl〇8)。透過轉速計算模組1〇53 計算該風扇50在一測試點的實際轉速(步驟su〇)。判斷是否到達測試下 一個測試點的測試時間(步驟SU2)。如果測試時間還沒有到,則返回步驟 S110 ;如果測試時間到了,則判斷轉速是否正常,即將上述計算得到的該 測試點的實際轉速與該測試點對應的參考轉速對比,判斷實際轉速是否^ 誤差範圍内(步驟S114)。如果該測試點的實際轉速在誤差範圍内,則將測 試點數變量累加1,對比變量與測試點數,判斷變量是否大於測試點數,即 判斷所有_點是否峨完畢(步驟sn6)。如果所有_點均測試完畢, 則判斷被氧扇5G的概參數巾是倾有浮㈣試,所述浮㈣試是指在 佔空比爲100%時將PWM線斷開並測試其轉速(步驟SU8)。若設有浮空 測試1則將浮空測試繼電器11〇斷開,並透過計算模組1〇53計算風扇5〇 在該浮空狀態下的實際轉速(步驟S120)。測試時間到後判斷模組1054判 斷所計异的浮空轉速是否正確,即是否在所允許的誤差範圍内(步驟 1291558 . S122)。若轉速正確,則表明風扇5〇通過測試,同時在LCD螢幕103上顯 示通過測試顯示資訊(步驟S124),測試停止。 在步驟S104中,若沒有設低壓啓動,則轉入步驟S108。 在步驟S106中,若低壓啓動實際轉速不在誤差範圍内,則進行聲光報 , 警,即發光二極體104紅燈亮,且蜂鳴器108發出報警訊號(步驟M23), 測試停止。 - 在步驟S114中,若實際轉速不在誤差範圍内,則轉入步驟S123,且斷 開正常測試繼電器1〇7。 在步驟S116中,如果還有測試點沒有測試,則參數更新模組1〇52更 新下一測試點的參數,包括該測試點的佔空比和該佔空比所對應的參考轉 ► 速,再進入步驟S110 (步驟S117)。 、 在步驟S118中,若不進行浮空測試,則轉入步驟si24。 在步驟S122中,若判斷浮空轉速不在誤差範圍内,則轉入步驟S123, 且斷開正常測試繼電器1〇7。 在上述較佳實施例中,若被測試PWM風扇50的料號不在微控制器1〇5 -所接收的多個常用風扇料號的範圍内,也可透過操作按鍵1〇2對料號參數 進行設置。在設置參數前,首先要進入INTO中斷服務程式設置參數,如第 五圖所示。 參閱弟五圖所示’係本發明風扇轉速檢測方法較佳實施例的進入中斷 服務程式設置參數流程圖。進入取丁〇(步驟S500 );關閉以丁〇(步驟S5〇2 ); 丨設定某料號風扇50的測試點數(步驟S504);設定從每個測試點到下一個 測試點的測試時間(步驟S506);設定PWM波頻率(步驟S5〇8);設定每 個測試點的佔空比(步驟S510 );設定每個測試點佔空比對應的參考轉速(步 驟 S512);打開 INTO (步驟 S513)。 如果交流電源20 —開始上電,用戶就要測試微控制器1〇5沒有接收到 的料號風扇,則可以在步驟81〇2系統初始化完標誌位和變量後不執行調出 儲存單元中的舊的料號參數,而是直接進入INTO中斷,透過操作按鍵1〇2 没定該新料號風扇50的所有料號參數,再從步驟S104開始執行。 本較佳實施例所提供的風扇測試系統及方法,不僅能完成PWM風扇轉 12 1291558 速的自動測試,還能完成三線式風扇轉速的自動測試及pWM風扇的手動測 試。所述三線式風扇的自動測試,是指由用戶根據需要對三線式風扇進行 低壓啓動轉速的測試及正常啓動轉速的測試,無浮空測試。所述PWM風扇 的手動測試’是指由用戶根據需要選擇需測試的點及點之間的切換時間, 所述點及點之間的切換由用戶對已設定的操作按鍵1〇2的操作來完成。由 用戶在LCD螢幕1〇3上觀察每一測試點的轉速狀況並判斷轉速是否正確。 本發明風扇轉速檢測裝置及方法,雖以較佳實施方式揭露如上,然其 並非用以限定本刺。任何熟悉此項技藝之人士,在不脫離本發明之&神1291558 is generally used 220v AC, is the common power supply of the fan detector 3〇, and the power supply milk is only used as the backup power of the fan detector 30, only when the power of the fan 5〇 is large ^ gas supply 40 The power supply voltage is supplied to the fan detector 30. The details of the fan detector 3〇 are as shown in the second figure. Refer to the hardware diagram of the fan detector shown in the second figure. The fan check 30 is operated by the power source 10, the operation button 102, the LCD screen 103, the light-emitting diode 1〇4, the microcontroller 105, the low-voltage test relay 106, the normal test relay 1〇7, the buzzer 1〇8, and the pwM waveform. The generating state 109, the floating test relay ι10 and a fan terminal U1 are formed. The power supply mi provides the uninterruptible power supply of the microcontroller 105. When the external power supply is cut off, the fan test dump of the last computer 10 transmission and the wind test data edited by the operation button 1G2 can be saved. The power supply 101 is provided by the power supply 4_〇 except for the case where the test is to be 50; the power supply 101 is supplied by the AC power supply 20. In the preferred embodiment, the AC power supply 2 is provided with 22 (^ AC power, and the fan detector 30 can convert the 220V AC power into two DC voltages required to detect the fan 5 rotation speed. The operation button 102, the LCD screen 103, and the illumination 2 The pole body 104 is located on the surface of the fan detector 3' and is connected to the microcontroller 1〇5 through the data line. The buzzer is located inside the fan detector 30 and is also connected to the microcontroller through the data line. The operation button 102 is used to complete the input of the fan number parameter and the like when the material number of the fan 50 is not within the range of the common fan number sent by the computer 1〇 received by the microcontroller 1〇5. ' LCD screen 1〇3 is used to display parameter information during the test, such as speed value, frequency value, duty cycle, test time and test results, etc., illuminating body 104 and buzzer $ 1 〇 When the tested fan 5〇 fails the test, the sound and light alarm is performed, that is, when the speed of the tested fan 50 is not within the allowable error range, the red light is emitted, and the buzzer 108 sends an alarm signal. The fan terminal 111 is used to connect the fan detector 30. 5 with the fan, The fan terminal (1) can be connected to the normal test relay and the micro-controller respectively. In the preferred embodiment, if the fan is required to be low-tested, the low-test relay 106 is tested during the opening test and the micro-control. (4) 1〇5 is turned on, and is supplied to the fan 5〇8 1291558~ 5V low voltage through the fan terminal m to test whether the rotation speed of the fan 50 at the low pressure is normal. When the low pressure start time has arrived and the detected low pressure speed is normal When the low voltage test relay 1〇6 is automatically disconnected, the normal test relay 107 starts to be connected to the microcontroller 105, and the fan terminal 50 is supplied with a normal voltage of 12v through the fan terminal m to test that the fan 50 is in the normal state. Whether the rotational speed of the voltage is constant or not. The floating test relay 110 is used together with the PWM waveform generator 109 to connect the microcontroller '105 and the fan terminal 111 between the floating test relay 11A and the fan terminal 111. The connection is a PWM line. If the fan 50 is a three-wire fan, the floating test relay 11 does not work. The PWM line is always _; if the fan 5G is, the floating (four) test relay ιι〇 When the test is started, the PWM line is also connected; if the material number parameter of the fan 5G is set to have a floating test, after all the tests of the fan 50: the point is tested, the floating test relay 110 is disconnected, so that the PWM line is also disconnected to test whether the fan has a duty ratio of 丨; ^%^ whether the speed of the PWM line is floating is normal. ° - The microcontroller 105 can receive through the speed feedback line 6〇 The speed feedback signal sent back by the fan 50, the fan speed is calculated instantaneously, and the control PWM waveform generator should work. The microcontroller 1〇5 includes a series of function modules, as shown in the third figure. The PWM waveform generator should be PWM. The hardware foundation generated by the wave, which generates the required PWM wave under the control of the micro control crying 5, is provided to the fan 50 for speed control. Referring to the third figure, it is the function module of the microcontroller shown in the second figure. The microcontroller 1〇5 includes a system initialization module 1051, a parameter update module 1〇52, a rotational speed calculation module 1〇53 I and a determination module 1054. The system initialization module 1051 is configured to call up the item number parameter of the fan 5〇 sent by the computer 10 to the microcontroller 105 stored in a storage unit of the microcontroller 1〇5, and the operation button 102 in the initialization program. The flag bit 'initializes the variable. The storage unit can be an electronic erasable programmable read only memory (EEPROM). If the fan 50 is a PWM fan, the item number parameters include: the number of test points, the frequency of the PWM wave, the health ratio, whether the floating test, the fan reference speed corresponding to each duty cycle, the test time, whether the low voltage start, the low pressure start time , low-voltage start reference speed and whether it is automatic test; if the fan 50 is a three-wire fan, its material number parameters include: fan reference speed, test _, is the secret pressure start, low secret time. The number of positions 9 1291558 ' is generally determined by the customer. Since the PWM fan will have different speeds under different duty cycles of the same voltage, in order to detect the speed at different duty cycles, it is necessary to set the number of test points. For example, a fan must measure the corresponding speed at four points of duty ratios: 〇%, 25%, 75%, and 100%, so the number of test points for this fan is set to 4. Then, the corresponding duty ratio is input to the reference speed corresponding to each duty ratio. The reference speed is provided by the fan manufacturer and is determined by the performance of the fan. The test time refers to the test time from one test point to the next. For example, it takes 4 seconds from the measurement of % to 25%. The setting of the length of time is mainly determined by the time when the fan speed is stable, because different duty = The speed underneath is generally different, and it takes a period of time for the fan to change from one speed to another. The flag bit in the initialization program refers to a flag bit for initializing each operation button 1〇2, and each operation button 102 uniquely corresponds to one flag bit. The flag bit indicates that the button is closed, and the button indicates that the button is off. For example, the flag of the operation button 为 is ί, which means that the operation button 丨 is closed. It is necessary to detect the fan different from the last detection of the fan 50 number. It is necessary to enter the interrupt to reset the & number parameter; the operation button 2 is marked with 标志, indicating that the operation button 2 is closed. If the closing time is less than ^ seconds, the edited parameter needs to be shifted. If the closing time is longer than 3 seconds, the next parameter needs to be edited, and the target position of the operation button 3 is 1, indicating that the current The operation button 3 is closed, and it is necessary to add 1 to the edited parameter. The initialization variable consists of initializing the test point variable to zero. The parameter update module 1052 is used to update the two parameters of the duty ratio and the corresponding reference speed when switching from one test point to the next test point. The rotational speed calculation module 1053 is configured to capture the series of pulses by using the Turned of the microcontroller 105 by detecting the speed feedback line 6 of the fan 50, and calculating the frequency of the pulse signal by using the speed factor. The speed of the fan 5 。. The Timer2 is a timer in the microcontroller 1〇5. The judging module 1054 is configured to determine whether the test time is up, determine whether the fan speed is correct, determine whether all test points are tested, determine whether the low voltage is started, and determine whether to perform a floating test. The determination of whether the fan speed is correct is determined by comparing the measured speed with the reference speed. The judgment formula is: · Reference speed X (1 - tolerance %) = < measured speed < = reference speed χ (1 + tolerance % ). Referring to the fourth figure, there is shown a flow chart of the detection operation of the preferred embodiment of the fan speed detecting method of the present invention. This method is suitable for automatic detection of PWM fan and three-wire fan speed, and also applies manual test of 1291558 to PWM fan. The preferred embodiment is described by taking an example of automatically testing a pWM fan, and assumes that the number of the tested PWM fan is within the range of a plurality of common wind numbers received by the microcontroller 105. First, the microcontroller 105 receives the item number parameter of the plurality of common item numbers sent by the computer 1 and saves the parameter to the storage unit of the microcontroller 1〇5, and the storage list= can be an EEPROM. The item number parameters include: test point number, pWM frequency, duty ratio, whether or not the floating test, the fan reference speed corresponding to each duty ratio, the test time, whether the low voltage start, the low pressure start time, the low pressure start reference speed, and whether For automatic test or the like (step sl〇〇), the system initialization module 1051 initialization flag and the initialization test point variable are equal to zero, and the item number parameter stored in the storage unit of the microcontroller 105 is called (step 1〇2). The module 1〇54 determines whether a low-voltage start is provided in the item number parameter of the fan 50, and the low-voltage start means that the low-voltage test relay 106 connects the microcontroller 105 and the fan terminal ni to pass the fan terminal ηι to the fan. % provides a certain low voltage to operate, and the preferred embodiment provides a 5v voltage (step S104). If yes, a low voltage start is performed, and the low voltage start speed is calculated, and the low voltage is started. After the time is up, the determining module 1054 determines whether the low-voltage starting speed is correct, that is, comparing the calculated low-voltage starting actual speed with the low-voltage starting reference speed, and determining whether the actual speed is within the error range (step S106). If yes, the low-voltage test The relay 1〇6 is disconnected, and the normal test relay is turned on to supply the normal operating voltage to the fan 50 (step sl8). The actual speed of the fan 50 at a test point is calculated by the rotational speed calculation module 1〇53 (step su 〇). Determine whether the test time of the next test point is reached (step SU2). If the test time has not arrived, return to step S110; if the test time is up, determine whether the rotation speed is normal, that is, the test point obtained by the above calculation The actual rotational speed is compared with the reference rotational speed corresponding to the test point, and it is judged whether the actual rotational speed is within the error range (step S114). If the actual rotational speed of the test point is within the error range, the test point variable is accumulated by 1, and the comparison variable is Test the number of points, determine whether the variable is greater than the number of test points, that is, determine whether all _ points are completed (steps) Sn6). If all the _ points are tested, it is judged that the parameter of the oxygen fan 5G is a floating (four) test, and the floating (four) test means that the PWM line is disconnected and tested when the duty ratio is 100%. The rotation speed (step SU8). If the floating test 1 is provided, the floating test relay 11 is turned off, and the actual rotation speed of the fan 5〇 in the floating state is calculated through the calculation module 1〇53 (step S120) After the test time is up, the judgment module 1054 judges whether the calculated floating speed is correct, that is, whether it is within the allowed error range (step 1291558 . S122). If the rotation speed is correct, it indicates that the fan 5 〇 passes the test, and at the same time The display information is displayed by the test on the LCD screen 103 (step S124), and the test is stopped. In step S104, if low pressure start is not provided, the process proceeds to step S108. In step S106, if the actual low-speed starting speed is not within the error range, an acousto-optic report is issued, that is, the light-emitting diode 104 is red, and the buzzer 108 sends an alarm signal (step M23), and the test is stopped. - If the actual rotational speed is not within the error range in step S114, the process proceeds to step S123, and the normal test relay 1〇7 is turned off. In step S116, if there is still no test point, the parameter update module 1〇52 updates the parameter of the next test point, including the duty ratio of the test point and the reference speed corresponding to the duty ratio. The process proceeds to step S110 (step S117). If the floating test is not performed in step S118, the process proceeds to step si24. In step S122, if it is determined that the floating speed is not within the error range, the process proceeds to step S123, and the normal test relay 1〇7 is turned off. In the above preferred embodiment, if the item number of the tested PWM fan 50 is not within the range of the plurality of common fan numbers received by the microcontroller 1〇5, the item number parameter can also be accessed through the operation button 1〇2. Make settings. Before setting the parameters, first enter the INTO interrupt service program setting parameters, as shown in Figure 5. Referring to the fifth embodiment of the present invention, a flow chart of the entry interrupt service program setting parameter of the preferred embodiment of the fan speed detecting method of the present invention is shown. Entering the dice (step S500); closing the dice (step S5〇2); setting the number of test points of the fan 50 of a certain number (step S504); setting the test time from each test point to the next test point (Step S506); setting the PWM wave frequency (step S5〇8); setting the duty ratio of each test point (step S510); setting the reference rotation speed corresponding to each test point duty ratio (step S512); turning on INTO ( Step S513). If the AC power supply 20 starts to be powered on, the user should test the number fan that the microcontroller 1〇5 has not received, and the system can be performed in step 81〇2 after the system initializes the flag and the variable. The old item number parameter, but directly enters the INTO interrupt, and all the item number parameters of the new item number fan 50 are not determined by the operation button 1〇2, and then the execution starts from step S104. The fan test system and method provided by the preferred embodiment can not only complete the automatic test of the PWM fan to 12 1291558 speed, but also complete the automatic test of the three-wire fan speed and the manual test of the pWM fan. The automatic test of the three-wire type fan refers to the test of the low-voltage starting speed and the normal starting speed of the three-wire type fan according to the needs of the user, and no floating test. The manual test of the PWM fan refers to the switching time between the point and the point to be tested selected by the user according to the need, and the switching between the point and the point is performed by the user on the operation button 1〇2 that has been set. carry out. The user observes the rotational condition of each test point on the LCD screen 1〇3 and determines whether the rotational speed is correct. The fan rotation speed detecting device and method of the present invention are disclosed above in the preferred embodiment, but are not intended to limit the present thorn. Anyone familiar with the art, without departing from the invention
和範圍内’當可做更動與潤飾,因此本發明之保護翻當視後附之 利範圍所界定者為準。 I 【圖式簡單說明】 ^圖係本發明風輕速檢測裝置較佳實施例的硬體架構圖。 =一圖係第一圖所示風扇檢測儀硬體框圖。 ,三圖係第二圖所示微控繼的功能模_。 弟四圖係本發明風扇轉速檢測方法較佳 置參==_祕肋咖_織== 程式設 【主要元件符號說明】 電腦 交流電源 10 風扇檢測儀 20 電源供應器 30 風扇 40 電源 50 操作按鍵 101 LCD螢幕 102 發光二極體 103 微控制器 104 低壓測試繼電器 105 106 13 1291558 正常測試繼電器 107 蜂鳴器 108 PWM波形產生器 109 浮空測試繼電器 110 風扇端子 111 系統初始化模組 1051 參數更新模組 1052 轉速計算模組 1053 判斷模組 1054And the scope of the invention may be modified and retouched, and therefore the protection of the present invention is defined by the scope of the appended claims. I [Simple Description of the Drawings] Fig. 1 is a hardware structural diagram of a preferred embodiment of the wind speed detecting device of the present invention. = Figure 1 shows the hardware diagram of the fan detector shown in the first figure. The three pictures are the functional modes of the micro control shown in the second figure. The fourth figure is a preferred method for detecting the fan speed of the present invention. ==_ Secret ribs _ weaving == program setting [main symbol description] computer AC power supply 10 fan detector 20 power supply 30 fan 40 power supply 50 operation button 101 LCD screen 102 Light-emitting diode 103 Microcontroller 104 Low-voltage test relay 105 106 13 1291558 Normal test relay 107 Buzzer 108 PWM waveform generator 109 Floating test relay 110 Fan terminal 111 System initialization module 1051 Parameter update module 1052 speed calculation module 1053 judgment module 1054
1414