<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3946391003844713151</id><updated>2012-02-16T01:05:33.948-08:00</updated><title type='text'>Use of Infrared Transimitter and Receiver to detect black or white line</title><subtitle type='html'>Applicable to Kai Rider and Kai Tracer</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://irbasic.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3946391003844713151/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://irbasic.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chang's Hobby</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_rIkxkg1-h8U/SPG9zrgkRRI/AAAAAAAAAGE/PZaqCmlSsFU/s1600-R/170033.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3946391003844713151.post-1980439196645273333</id><published>2006-11-24T01:32:00.000-08:00</published><updated>2006-11-24T17:30:52.720-08:00</updated><title type='text'>Use of Infrared Detectors Basics</title><content type='html'>&lt;img src="http://www.dropshots.com/photos/59763/20061124/130413.jpg"&gt;&lt;br /&gt;&lt;bgsound src="http://www.jachang.org/temp2/contemporary-1.mp3" loop=infinite&gt;&lt;br /&gt;&lt;b&gt;IR emitter and IR phototransistor&lt;br /&gt;An infrared emitter is an LED made from gallium arsenide, which emits near-infrared energy at about 880nm. &lt;br /&gt;The infrared phototransistor acts as a transistor with the base voltage determined by the amount of light hitting the transistor. &lt;br /&gt;Hence it acts as a variable current source. Greater amount of IR light cause greater currents to flow through the collector-emitter leads. &lt;br /&gt;As shown in the diagram below, the phototransistor is wired in a similar configuration to the voltage divider. &lt;br /&gt;The variable current traveling through the resistor causes a voltage drop in the pull-up resistor. &lt;br /&gt;This voltage is measured as the output of the device&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/170029.jpg"&gt;&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/170359.jpg"&gt;&lt;br /&gt;Photo&lt;br /&gt;&lt;br /&gt;IR reflectance sensors contain a matched infrared transmitter and infrared receiver pair. &lt;br /&gt;These devices work by measuring the amount of light that is reflected into the receiver. &lt;br /&gt;Because the receiver also responds to ambient light, the device works best when well shielded from abient light, &lt;br /&gt;and when the distance between the sensor and the reflective surface is small(less than 5mm). &lt;br /&gt;IR reflectance sensors are often used to detect white and black surfaces. White surfaces generally reflect well, &lt;br /&gt;while black surfaces reflect poorly. One of such applications is the line follower of a robot.&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/170608.jpg"&gt;&lt;br /&gt;&lt;br&gt;How Infrared Trans Rex detectors work ?&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061125/081507.jpg"&gt;&lt;br /&gt;Schematic Diagram for a Single Pair of Infrared Transmitter and Receiver &lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061125/090658.jpg"&gt;&lt;br /&gt;&lt;br&gt;Theory of Sensor Circuit&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061125/073555.jpg"&gt;&lt;br /&gt;To get a good voltage swing , the value of R1 must be carefully chosen. If Rsensor = a when no light falls on it and Rsensor = b when light falls on it. The difference in the two potentials is:&lt;br /&gt;&lt;br /&gt;Vcc * { a/(a+R1) - b/(b+R1) }&lt;br /&gt;Relative voltage swing = Actual Voltage Swing / Vcc&lt;br /&gt;= Vcc * { a/(a+R1) - b/(b+R1) } / Vcc&lt;br /&gt;= a/(a+R1) - b/(b+R1)&lt;br /&gt;&lt;br /&gt;The resistance of the sensor decreases when IR light falls on it. A good sensor will have near zero resistance&lt;br /&gt;in presence of light and a very large resistance in absence of light. We have used this property of the sensor to form a potential divider. The potential at point ‘2’ is Rsensor / (Rsensor + R1). Again, a good sensor circuit should give maximum change in potential at point ‘2’ for no-light and bright-light conditions. This is especially important if you plan to use an ADC in place of the comparator&lt;br /&gt;&lt;br /&gt;To get a good voltage swing , the value of R1 must be carefully chosen. If Rsensor = a when no light falls on it and Rsensor = b when light falls on it. The difference in the two potentials is:&lt;br /&gt;Vcc * { a/(a+R1) - b/(b+R1) }&lt;br /&gt;&lt;br /&gt;Relative voltage swing = Actual Voltage Swing / Vcc&lt;br /&gt;= Vcc * { a/(a+R1) - b/(b+R1) } / Vcc&lt;br /&gt;= a/(a+R1) - b/(b+R1)&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061125/074952.jpg"&gt;&lt;br /&gt;Description of operation of a typical circuit&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/171016.jpg"&gt;&lt;br /&gt;If the emitter and detector (aka phototransistor) are not blocked, then the output on pin 2 of the 74LS14 will be high (apx. 5 Volts). &lt;br /&gt;When they are blocked, then the output will be low (apx. 0 Volts). The 74LS14 is a Schmitt triggered hex inverter. &lt;br /&gt;A Schmitt trigger is a signal conditioner. It ensures that above a threshold value, we will always get "clean" HIGH and LOW signals. &lt;br /&gt;Not Blocked Case: Pin 2 High Current from Vcc flows through the detector. The current continues to flow through the base of Q2. &lt;br /&gt;Current from Vcc also flows through R2, and Q2's Drain and Emitter to ground. &lt;br /&gt;As a result of this current path, there will be no current flowing through Q1's base. &lt;br /&gt;The signal at U1's pin 1 will be low, and so pin 2 will be high. Blocked Case: Pin 2 Low Current "stops" at the detector. &lt;br /&gt;Q2's base is not turned on. The current is re-routed passing through R2 and into the base of Q1. &lt;br /&gt;This allows current to flow from Q1's detector and exiting out Q1's emitter. Pin 1 is thus high and pin 2 will be low. &lt;br /&gt;To detect a line to be followed, we are using two or more number of poto-reflectors. &lt;br /&gt;Its output current that proportional to reflection rate of the floor is converted to voltage with a resister and tested it if the line is detected or not. &lt;br /&gt;However the threshold voltage cannot be fixed to any level because optical current by ambent light is added to the output current.&lt;br /&gt;Most photo-detecting modules are using modurated light to avoid interference by the ambient light. &lt;br /&gt;The detected signal is filtered with a band pass filter and disused signals are filtered out. &lt;br /&gt;Therefore only the modurated signal from the light emitter can be detected. &lt;br /&gt;Of course the detector must not be saturated by ambient light, this is effective when the detector is working in linear region.&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/171538.jpg"&gt;&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/171601.jpg"&gt;&lt;br /&gt;The line position is compeared to the center value to be tracked, the position error is processed with Proportional/Integral/Diffence filters &lt;br /&gt;to generate steering command. The line folloing robot tracks the line in PID control that the most popular argolithm for servo control.&lt;br /&gt;The proportional term is the commom process in the servo system. It is only a gain amplifire without time dependent process. &lt;br /&gt;The differencial term is applied in order to improve the responce to disturbance, and it also compensate phase lag at the controled object. &lt;br /&gt;The D term will be required in most case to stabilize tracking motion. The I term that boosts DC gain is applied in order to remove left offset error, &lt;br /&gt;however, it often decrease servo stability due to its phase lag. &lt;br /&gt;When any line sensing error has occured for a time due to getting out of line or end of line, the motors are stopped and &lt;br /&gt;the microcontroller enters sleep state of zero power consumption.&lt;br /&gt;Typical Examples of infrared Transmitter and Receiver installation&lt;/b&gt;&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/190158.jpg"&gt;&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/190117.jpg"&gt;&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/185934.jpg"&gt;&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/185840.jpg"&gt;&lt;br /&gt;&lt;img src="http://www.dropshots.com/photos/59763/20061124/185543.jpg"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3946391003844713151-1980439196645273333?l=irbasic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://irbasic.blogspot.com/feeds/1980439196645273333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3946391003844713151&amp;postID=1980439196645273333' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3946391003844713151/posts/default/1980439196645273333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3946391003844713151/posts/default/1980439196645273333'/><link rel='alternate' type='text/html' href='http://irbasic.blogspot.com/2006/11/use-of-infrared-detectors-basics.html' title='Use of Infrared Detectors Basics'/><author><name>Chang's Hobby</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_rIkxkg1-h8U/SPG9zrgkRRI/AAAAAAAAAGE/PZaqCmlSsFU/s1600-R/170033.jpg'/></author><thr:total>1</thr:total></entry></feed>
