<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>芷菁博客 &#187; 传感器</title>
	<atom:link href="http://www.stars625.com/tag/cnsensor/feed" rel="self" type="application/rss+xml" />
	<link>http://www.stars625.com</link>
	<description>记录生活点滴，分享学习体会，专注微嵌开发。</description>
	<lastBuildDate>Sat, 03 Dec 2011 13:05:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>灭火机器人的设计与制作之传感器</title>
		<link>http://www.stars625.com/firefightersensor.html</link>
		<comments>http://www.stars625.com/firefightersensor.html#comments</comments>
		<pubDate>Fri, 05 Jun 2009 13:30:08 +0000</pubDate>
		<dc:creator>stars_625</dc:creator>
				<category><![CDATA[嵌入开发]]></category>
		<category><![CDATA[firefighter]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[sensor]]></category>
		<category><![CDATA[传感器]]></category>
		<category><![CDATA[机器人]]></category>

		<guid isPermaLink="false">http://www.stars625.com/?p=111</guid>
		<description><![CDATA[在灭火机器人中主要使用了三类传感器，火焰传感器是用来探测火焰的；红外传感器用来测量小车到墙壁的距离，用来定位；灰度传感器主要是用来识别地面的白线，当然还有声音传感器在<a href="http://www.stars625.com/firefightersch.html">灭火机器人的设计与制作之电路设计</a>那一章已经作了说明。]]></description>
			<content:encoded><![CDATA[<p>火焰传感器</p>
<p>远红外火焰探头将外界红外光的变化转化为电流的变化，通过 A/D转换器反映为 0~1023 范围内的数值。外界红外光越强，数值越小。因此越靠近热源，机器人显示读数越小。根据函数返回值的变化能判断红外光线的强弱,从而能大致判别出火源的远近。此外，远红外火焰探头探测角度为 60°。火焰传感器的原理图如下：</p>
<div id="attachment_186" class="wp-caption aligncenter" style="width: 421px"><a href="http://www.stars625.com/firefightersensor.html/firesensor" rel="attachment wp-att-186"><img src="http://www.stars625.com/wp-content/uploads/firesensor.jpg" alt="火焰传感器原理图" title="火焰传感器原理图" width="411" height="149" class="size-full wp-image-186" /></a><p class="wp-caption-text">火焰传感器原理图</p></div>
<p>使用中在火焰传感器上串联了一个电位器，这样便可以调整传感器的灵敏度。在不同光线环境下，直接调整电位器，即可减少外界光对传感器的影响。</p>
<p>在以往的比赛中，一般都在机器人前方加装三个以上的火焰传感器来探测火焰，这样机器人到达房间门口即可感应到火焰是否存在，但是这种方案容易受相机闪光灯、阳光等影响，所以本系统中未采用。本系统中采用的是单传感器加舵机的方案。取一不透光黑色胶卷筒，在其尾部钻孔，将火焰传感器装入其中，再将胶卷筒固定在舵机舵盘上。这样，火焰传感器就能随舵机转动，在转动的过程中进行A/D采样，实验证明抗干扰能力很好。并且小车距离火焰2.6cm以外即可“看”到底部距地面15cm～20cm高度不定的火焰，满足比赛要求。</p>
<p>红外测距传感器</p>
<p>红外测距传感器使用的是SHARP公司的GP2D12集成高精度传感器，测量有效距离为10cm~80cm，对应输出电压为2.5V~0V。传感器外形及距离－电压曲线图如下：</p>
<div id="attachment_188" class="wp-caption aligncenter" style="width: 517px"><a href="http://www.stars625.com/firefightersensor.html/irsensor" rel="attachment wp-att-188"><img src="http://www.stars625.com/wp-content/uploads/irsensor.jpg" alt="GP2D12红外传感器" title="GP2D12红外传感器" width="507" height="201" class="size-full wp-image-188" /></a><p class="wp-caption-text">GP2D12红外传感器</p></div>
<p>本系统中共使用了三个红外测距传感器（以下简称PSD），一个装于机器人正前方，另外两个分别装于机器人两侧，与前方PSD成90度。主要用这三个PSD来测量前方、左方、右方离开墙壁的距离。但是在使用该传感器的过程中有很多不当的地方在此作一些说明。</p>
<p>传感器安装错误。在组装机器人时，为了安装方便将传感器安装成如图4-4所示，这样安装就使得机器人在沿墙走的过程中如果遇到内角拐弯时就必需不断配合检测前方传感器的值才能完成拐弯动作如图4-6，增加了程序的复杂性，降低了系统的可靠性。比较好的安装方式是如图4-5，左右传感器斜向前装，这样的安装在遇到内角拐弯时单传感器就能完成所有动作如图4-7，系统运行稳定可靠。</p>
<p>另外前方传感器安装在机器人的最前面也是不恰当的，PSD在距离10cm内读出的数值是无效的，数值不确定，无法用在程序中进行判断，这就容易使机器人了误判，出现撞墙或打转等现象。</p>
<div id="attachment_189" class="wp-caption aligncenter" style="width: 575px"><a href="http://www.stars625.com/firefightersensor.html/irsetsensor" rel="attachment wp-att-189"><img src="http://www.stars625.com/wp-content/uploads/irsetsensor.jpg" alt="红外传感器安装示意图" title="红外传感器安装示意图" width="565" height="392" class="size-full wp-image-189" /></a><p class="wp-caption-text">红外传感器安装示意图</p></div>
<p>距离使用错误。在本系统中为图便利，直接将A/D采样的数值作为距离值放入程序中进行判断，但是从图4-8可以看出A/D采样值与距离不是成线性关系，在使用前必需对采样值进行数学运算后才能应用到程序中进行判断。</p>
<div id="attachment_190" class="wp-caption aligncenter" style="width: 562px"><a href="http://www.stars625.com/firefightersensor.html/iroutput" rel="attachment wp-att-190"><img src="http://www.stars625.com/wp-content/uploads/iroutput.jpg" alt="红外传感器输出曲线" title="红外传感器输出曲线" width="552" height="316" class="size-full wp-image-190" /></a><p class="wp-caption-text">红外传感器输出曲线</p></div>
<p>PSD所输出的电压与测量的距离是非线性的。因此若要求出所测距离，必须根据实验数据求出 、 的值，在灭火比赛中由于对距离的精度要求不是很高，可以采用分段线性插值法对距离值进行校正。</p>
<p>灰度传感器</p>
<p>灰度传感器可以检测地面反射光线的强度，使机器人能识别地面颜色的深浅。在灭火比赛中，灰度传感器主要是用来检测地面的白线。灰度传感器是利用光敏电阻的阻值会随着光照强度的变化而变化这一特性制成的。</p>
<p>灰度传感器由两个主要部件组成：高亮LED和光敏电阻。LED通过串联一个限流电阻连到电源两端，使之提供反射光源。光敏电阻其实是一个能根据光照强度而变化的可变电阻，在电路中串联一个电阻进行分压，另外在光敏电阻两端并联一个104电容，降低信号干扰。灰度传感器电路图如下：</p>
<div id="attachment_191" class="wp-caption aligncenter" style="width: 296px"><a href="http://www.stars625.com/firefightersensor.html/graysensor" rel="attachment wp-att-191"><img src="http://www.stars625.com/wp-content/uploads/graysensor.jpg" alt="灰度传感器原理图" title="灰度传感器原理图" width="286" height="136" class="size-full wp-image-191" /></a><p class="wp-caption-text">灰度传感器原理图</p></div>
<p>同时关注<a href="http://www.stars625.com/tag/firefighter">灭火机器人http://www.stars625.com/tag/firefighter</a>其它系列文章。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stars625.com/firefightersensor.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

