Art student needs help on IR sensors
gdim
Posts: 3
I'm a Digital Media student who's planning to use infrared sensors to use distance measurement to control an image that will be projected.
Basically, depending on the distance of the viewer from the screen, the image projected changes. Someone recommended me to purchase these IR sensors, but I'm not sure how to use them. Will I need a microcontroller to be able to communicate with my laptop to the projector from the sensors? Is there anyone that could help shine a light for me?
Thanks
Basically, depending on the distance of the viewer from the screen, the image projected changes. Someone recommended me to purchase these IR sensors, but I'm not sure how to use them. Will I need a microcontroller to be able to communicate with my laptop to the projector from the sensors? Is there anyone that could help shine a light for me?
Thanks
Comments
The nice thing about the book is that besides the microcontrollers and and sensors, it also deals with software development on the computer for communicating with the microcontroller.
Your set-up would basically be:
1a. Microcontroller program monitors IR sensors for appropriate activity
1b. Computer program monitors microcontroller for indication of appropriate activity
2. When microcontroller detects a change, it notifies the computer
3. Computer program processes info from microcontroller, and communicates with the projector
So, if you do this with your laptop in the loop, you will need some kind of program that will interface the microcontroller to the projector. For example, if you were using Powerpoint to run the projector, you could probably write some macros that would get the info from the microcontroller and jump to a new slide.
You coul also do this without a laptop, as long as you could directly interface the microcontroller with the projector. This could possibly be done mechanically or electronically, depending on the projector.
Your scheme can work, though. You need some IR LED's, some 220 ohm resistors for the IR LED's, some IR Decoders (which require IR light at 38 Khz), and some light shields (so each decoder can only see the IR LED across from it).
And yes, you'll need a microcontroller (the BS2) on a carrier board (the BOE, "Board Of Education" board) and a 7.5 volt wall-wart power supply too.
And you'll need some small circuit boards to mount the IR-LED's and the Decoders on.
So, you connect each LED output to an I/O pin of the BS2. Use FREQOUT to send a 2 to 5 mSec burst of 38 Khz signal to each one. Connect each 'decoder' output to an I/O pin of the BS2, to detect the 'beam' of the IR-LED across the way. Write a simple program to detect which beam is 'broken'. Then use the programming port with SERIN and SEROUT to communicate with a PC program what beam was broken. Then use the PC program to control the projector.
If your distance is 10 feet or less, I believe you can use ONE 'ultrasonic' transducer to detect how far away the person is. This would be a better solution, actually, as putting all those emitters and sensors so far away from the BS2 could cause problems.
The technique Allan Lane described for slightly longer range IR detection is documented in the Chapter 7·of this Stamps in Class text - Robotics with the Boe-Bot v2.2.· This text is available for PDF download from the Downloads -> Stamps in Class Tutorials page.
There are also some Stamps in Class Ping))) Ultrasonic Transducer "How-To"·activities here: http://forums.parallax.com/showthread.php?p=560570