To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 2545
2544  |  2546
Subject: 
Re: IR Port as Proximity detector.
Newsgroups: 
lugnet.robotics
Date: 
Fri, 8 Jan 1999 10:01:08 GMT
Original-From: 
Simen Svale Skogsrud <simen@mopSTOPSPAM.no>
Viewed: 
1426 times
  
David Chen wrote
Someone (Can't remember who, so unfortunately unable to give credit for
the idea appropriately) posted the fact that the IR port used as a
emitter coupled with the Light Sensor unit as the reciever can be used
as a IR proximity sensor.

eh... twas me.

As for programming goes the fluctuations in light intensity is fairly large
(typically 100-200 RAW units when facing a wall or anything) I have had
great success not setting a specific threshold in the code, just sample the
light-sensor at regular (rapid) intervals and look for huge fluctuations.
An algorithm somewhat like

  if abs(oldsample-newsample) > 100 then you are nearby something

if you do it like that you will not depend on any specific ambient
lightning level.

The magnitude of the spikes are fairly proportional to the distance to
reflector, it seems that by using two light-sensors (which I don't have)
you would be able to determine fairly accurately the general direction of
the obstruction that are bouncing back your IR messages.

--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
10 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR