http://lifestyle201.com/wiki/index.php?action=history&feed=atom&title=%28SKU%3ARB-02S042%29%E5%A4%8F%E6%99%AE_GP2Y0A02YK0F_%E7%BA%A2%E5%A4%96%E6%B5%8B%E8%B7%9D%E4%BC%A0%E6%84%9F%E5%99%A8%EF%BC%8820cm_-_150cm%EF%BC%89 国产在线观看91精品2022,在线观看中文字幕制服丝袜 2024-10-23T00:38:47Z 本wiki的該頁面的版本歷史 MediaWiki 1.21.2 http://lifestyle201.com/wiki/index.php?title=(SKU:RB-02S042)%E5%A4%8F%E6%99%AE_GP2Y0A02YK0F_%E7%BA%A2%E5%A4%96%E6%B5%8B%E8%B7%9D%E4%BC%A0%E6%84%9F%E5%99%A8%EF%BC%8820cm_-_150cm%EF%BC%89&diff=4621&oldid=prev Arduino77:/* 程序效果 */ 2015-12-29T09:08:39Z <p>?<span dir="auto"><span class="autocomment">程序效果</span></span></p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">←上一版本</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">2015年12月29日 (二) 09:08的版本</td> </tr><tr><td colspan="2" class="diff-lineno">第95行:</td> <td colspan="2" class="diff-lineno">第95行:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===程序效果===</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===程序效果===</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>打開Arduino IDE軟件的串口監(jiān)視器,將波特率設(shè)置為9600,能顯示出當(dāng)前傳感器測試到的障礙物距離。測量時(shí)注意障礙物需要在傳感器測量的有效范圍內(nèi)。</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>打開Arduino IDE軟件的串口監(jiān)視器,將波特率設(shè)置為9600,能顯示出當(dāng)前傳感器測試到的障礙物距離。測量時(shí)注意障礙物需要在傳感器測量的有效范圍內(nèi)。</div></td></tr> <tr><td class='diff-marker'>?</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[文件:02S04201.png|500px|縮略圖|<del class="diffchange diffchange-inline">右</del>]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[文件:02S04201.png|500px|縮略圖|<ins class="diffchange diffchange-inline">居中</ins>]]</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==產(chǎn)品相關(guān)推薦==</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==產(chǎn)品相關(guān)推薦==</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[文件:erweima.png|230px|無框|右]]</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[文件:erweima.png|230px|無框|右]]</div></td></tr> </table> Arduino77 http://lifestyle201.com/wiki/index.php?title=(SKU:RB-02S042)%E5%A4%8F%E6%99%AE_GP2Y0A02YK0F_%E7%BA%A2%E5%A4%96%E6%B5%8B%E8%B7%9D%E4%BC%A0%E6%84%9F%E5%99%A8%EF%BC%8820cm_-_150cm%EF%BC%89&diff=4620&oldid=prev Arduino77:以“右 ==產(chǎn)品概述== GP2Y0A02YK0F是夏普的一款距離測量傳感器模塊。它由PSD(position sensitive detector) 和I...”為內(nèi)容創(chuàng)建頁面 2015-12-29T08:57:32Z <p>以“<a href="/wiki/index.php/%E6%96%87%E4%BB%B6:RB-02S042.jpg" title="文件:RB-02S042.jpg">右</a> ==產(chǎn)品概述== GP2Y0A02YK0F是夏普的一款距離測量傳感器模塊。它由PSD(position sensitive detector) 和I...”為內(nèi)容創(chuàng)建頁面</p> <p><b>新頁面</b></p><div>[[文件:RB-02S042.jpg|500px|縮略圖|右]]<br /> ==產(chǎn)品概述==<br /> GP2Y0A02YK0F是夏普的一款距離測量傳感器模塊。它由PSD(position sensitive detector) 和IRED (infrared emitting diode) 以及信號處理電路三部分組成。由于采用了三角測量方法,被測物體的材質(zhì)、環(huán)境溫度以及測量時(shí)間都不會(huì)影響傳感器的測量精度。傳感器輸出電壓值對應(yīng)探測的距離。通過測量電壓值就可以得出所探測物體的距離,所以這款傳感器可以用于距離測量、避障等場合。<br /> ==規(guī)格參數(shù)==<br /> # 距離測量范圍:20 to 150 cm<br /> # 信號輸出類型:電壓模擬信號<br /> # 包裝尺寸:29.5×13×21.6 mm<br /> # 功耗: 標(biāo)稱值33 mA<br /> # 供電電壓:4.5 to 5.5 V<br /> [[文件:RB-02S042109.png|737px|縮略圖|居中]]<br /> [[文件:RB-02S042110.png|616px|縮略圖|居中]]<br /> ==接口定義==<br /> [[文件:RB-02S0421.jpg|500px|縮略圖|居中]]<br /> ==使用方法==<br /> ==使用方法==<br /> ===工作原理===<br /> 通過紅外線的反射原理,從發(fā)射到接收到回傳信號,傳感器共引出三個(gè)引腳分別接,信號線S、電源地G、電源正VCC,將信號線與 Arduino 板的 Analog IN 引腳相連接。通過對Arduino編程實(shí)現(xiàn)模擬量讀取,程序簡短好用。<br /> ===性能簡評===<br /> GP2D12使用性能個(gè)人簡評:&lt;br/&gt;<br /> 優(yōu)點(diǎn):&lt;br/&gt;<br /> * 紅外傳感器連接使用簡單,對于1米以內(nèi)的中距離測試精度良好、性能優(yōu)越。<br /> * 數(shù)據(jù)測量值穩(wěn)定,測量結(jié)果波動(dòng)較小。<br /> * 數(shù)據(jù)傳輸穩(wěn)定,程序讀取簡單不會(huì)在數(shù)據(jù)傳輸過程中出現(xiàn)卡死的現(xiàn)象,錯(cuò)誤信號較少。<br /> 缺陷:&lt;br/&gt;<br /> * GP2d12測量范圍有限,最大值80cm,并且從60cm開外的距離開始測量值的波動(dòng)較大,與實(shí)際情況偏差增大。(60cm為室內(nèi)環(huán)境的個(gè)人感受,不同環(huán)境所產(chǎn)生的干擾不同所以可能達(dá)到的精度也有所不同。)<br /> * 當(dāng)障礙物(或目標(biāo))與紅外傳感器之間的距離小于10cm時(shí),測量值將與實(shí)際值出現(xiàn)明顯偏差,當(dāng)距離值從10降至0的過程中,測量值將在10~35之間遞增。(電壓值與距離值關(guān)系:如圖)<br /> * 紅外傳感器,使用時(shí)會(huì)受到環(huán)境光的影響,在室內(nèi)使用時(shí),傳感器數(shù)據(jù)接收時(shí)可能會(huì)受到白熾燈光線的印象,產(chǎn)生一些非真的距離值。<br /> GP2D12使用注意及使用優(yōu)化方式:&lt;br/&gt;<br /> * 當(dāng)多個(gè)GP2d12同時(shí)連接Arduino板使用時(shí),由于供電量的增加,可能造成電壓不穩(wěn)定而對測量結(jié)果產(chǎn)生偏差。從硬件角度可以通過在VCC與 GND之間接電容的方式來穩(wěn)定對GP2d12的供電,減少供電電壓波動(dòng)對測量結(jié)果的影響,或者在GND與數(shù)據(jù)線之間接一個(gè)電容減小輸出電壓的波動(dòng)略去可能出現(xiàn)的誤差信號,提高數(shù)據(jù)穩(wěn)定性。(接線見附錄圖)<br /> * 針對測量時(shí)可能產(chǎn)生的干擾和誤差數(shù)值,可能從軟件的角度進(jìn)行改進(jìn)和防止,通過多次的測量記錄,排除一場輸入量后,取均值來的到一個(gè)較為穩(wěn)定更為接近實(shí)際值的測量數(shù)據(jù)。其次可以根據(jù)實(shí)際的使用要求,可以進(jìn)行有效值的范圍定義,過濾超出范圍的測量結(jié)果,該范圍可根據(jù)使用情況自行界定。<br /> * 針對紅外傳感器測量時(shí),可能受環(huán)境光影響測量結(jié)果,在安放使用時(shí)竟可能避免傳感器正對燈光的使用,可以將 GP2d12的發(fā)射接收端水平放置進(jìn)行測量,盡可能減少環(huán)境光帶來的干擾。<br /> 總體來說:&lt;br/&gt;<br /> * GP2d12在對測量精度要求不高,測量范圍在1m以內(nèi)的情況下,對物體距離值的定位是非常簡單有效地、操作簡便、實(shí)用性強(qiáng)。<br /> ===接線方法===<br /> 將夏普GP2Y0A02YK0F 紅外測距傳感器連接到UNO控制器的A1接口<br /> ===例子程序1===<br /> &lt;pre style=&quot;color:blue&quot;&gt;<br /> /* description: <br /> The sample code is used to measure distance by GP2Y0A02YK IR ranger sensor. <br /> VCC -- VCC <br /> GND -- GND <br /> Signal -- Analog 1 <br /> */ <br /> int IRpin = 1; // analog pin for reading the IR sensor <br /> void setup() {<br /> Serial.begin(9600); // start the serial port<br /> } <br /> void loop() {<br /> float volts = analogRead(IRpin)*0.0048828125; // value from sensor * (5/1024) - if running 3.3.volts then change 5 to 3.3<br /> float distance = 65*pow(volts, -1.10); // worked out from graph 65 = theretical distance / (1/Volts) <br /> Serial.println(distance); // print the distance <br /> delay(100); // arbitary wait time.<br /> }<br /> <br /> <br /> &lt;/pre&gt;<br /> ===例子程序2===<br /> &lt;pre style=&quot;color:blue&quot;&gt;<br /> /******** start code ********/<br /> /*<br /> * created 2013-07-26<br /> * by lisper (leyapin@gmail.com)<br /> * function test gp2y0a02yk, read value from A1<br /> *<br /> */<br /> <br /> //connect gp2y0a02 to A1<br /> #define pin A1<br /> <br /> void setup () {<br /> Serial.begin (9600);<br /> pinMode (pin, INPUT);<br /> }<br /> <br /> void loop () {<br /> uint16_t value = analogRead (pin);<br /> uint16_t range = get_gp2y0a02 (value);<br /> Serial.println (value);<br /> Serial.print (range);<br /> Serial.println (&quot; cm&quot;);<br /> Serial.println ();<br /> delay (500);<br /> }<br /> <br /> //return distance (cm)<br /> uint16_t get_gp2y0a02 (uint16_t value) {<br /> if (value &lt; 70) value = 70;<br /> return 12777.3/value-1.1; //(cm)<br /> //return (62.5/(value/1023.0*5)-1.1); //(cm)<br /> //return ((67870.0 / (value - 3.0)) - 40.0); //gp2d12 (mm)<br /> }<br /> <br /> /******** end code ********/<br /> &lt;/pre&gt;<br /> ===程序效果===<br /> 打開Arduino IDE軟件的串口監(jiān)視器,將波特率設(shè)置為9600,能顯示出當(dāng)前傳感器測試到的障礙物距離。測量時(shí)注意障礙物需要在傳感器測量的有效范圍內(nèi)。<br /> [[文件:02S04201.png|500px|縮略圖|右]]<br /> ==產(chǎn)品相關(guān)推薦==<br /> [[文件:erweima.png|230px|無框|右]]<br /> ===產(chǎn)品購買地址===<br /> [http://lifestyle201.com/goods-183.html 夏普GP2Y0A02YK0F 紅外測距傳感器]&lt;br/&gt;<br /> ===周邊產(chǎn)品推薦===<br /> [http://lifestyle201.com/goods-181.html GP2D12 IR Sensor 夏普紅外測距]&lt;br/&gt;<br /> ===相關(guān)問題解答===<br /> [http://www.makerspace.cn/forum.php?mod=viewthread&amp;tid=3851&amp;highlight=%E5%A4%8F%E6%99%AE 夏普紅外測距邊界問題]&lt;br/&gt;<br /> ===相關(guān)學(xué)習(xí)資料===<br /> [http://www.makerspace.cn/portal.php 奧松機(jī)器人技術(shù)論壇]&lt;br/&gt;</div> Arduino77