In two previous articles (here and here) I had tried to come up with a way to use IR light to gauge distances. It wasn’t very successful, but such is the risk of trying something new. So last night, whilst sitting at my laptop, I wondered if there was a way to emulate a $10 device (a Sharp IR Sensor) with more than $100’s worth of NXT sensors. It seems there is. I repurposed a HiTechnic IR Link and IR Seeker (v2) and turned them into a very limited IR distance sensor.
So how does it work? Well, remember I mentioned a few articles back how you could turn an IR Link into a beacon by pulsing it at 1200Hz? Well, instead of using the IR Seeker’s direction register to determine where the beacon is, you could, instead, just query the forward pointing sensor (sensor number 2) for signal strength. Now if you put the IR Link next to the IR Seeker and point them at an object some of the beacon signal from the IR Link is bound to bounce back and be detected by the IR Seeker. Using the contraption on the left, I set out to take readings at various distances. The results surprised me a little.
The first 3 points I expected to look that way, the surface was simply too close. However, the linearity of the next couple of points really boggled me. Did this actually work? They are most likely highly inaccurate as the values bounced around a fair bit, even though the program was taking 10 readings and averaging them out before displaying them. So there you go, a highly inaccurate, completely impractical IR distance sensor! I think the EOPD is probably more suitable for this kind of thing but what would the fun be in that?
You can download the program here: [LINK]. Please note that you will need to use my driver suite, too. You can pick that up here: [LINK].
Want to try another infrared ranging device? Try http://www.techno-stuff.com/ and their Infra-Red Proximity Detectors (IRPDs) for the RCX. You may want to connect them to an RCX or use a multiplexer to enable you to use more of them. If you do not think you will need to, you should probably connect an RCX style IRPD via a converter cable.
maybe im not thinking right here but what if you were to set the strength value of each of the 5 IR channels as a variable, then compare each variable to a preset scale as in, if channel 3 = 0, beacon is out of range, if channel 3 = 100, beacon is at certain distance. Its kind of inaccurate yes but would it help determine distance? I ask because this year’s FTC challenge involves and IR beacon and i would like to know whether this would work as an effective way to determine distance from the beacon.
It might work if there is only one beacon you’re looking for. The only way you’ll really know is if you give it a try 🙂
Good luck with the FTC!