Shop OBEX P1 Docs P2 Docs Learn Events
Art student needs help on IR sensors — Parallax Forums

Art student needs help on IR sensors

gdimgdim Posts: 3
edited 2006-07-13 22:04 in Learn with BlocklyProp
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.

199diagram9ax.jpg

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

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-07-12 19:08
    Have you seen the book Physical Computing: Sensing and Controlling the Physical World with Computers? It's geared towards interfacing various devices to a computer via microcontrollers and sensors. You can find it on Amazon.com, and if you Google the authors, you can find their websites.

    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.
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-07-12 19:37
    Nope, sorry, the IR sensors recommended to you require the object detected to be within 0.5 centimeters -- about 0.20 (or 1/5) inch.

    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.
  • edited 2006-07-13 21:25
    As Allan Lane said, the sensor that was recommended to you is much too close range (works best at about 1/16 of an inch).·

    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.
  • edited 2006-07-13 22:04
    allanlane5 said...
    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.
    Link to Ping))) Ultrasonic Rangefinder: http://www.parallax.com/detail.asp?product_id=28015

    There are also some Stamps in Class Ping))) Ultrasonic Transducer "How-To"·activities here: http://forums.parallax.com/showthread.php?p=560570
Sign In or Register to comment.