IR Object Detection

I have 4 digital Pins remaining on the arduino, I have a matrix of LEDs to be lit 9x6, so there is 9 LED's in each section and when it detects an object infront of it the LEDs around it light up. I know how to light the LEDs but I have come to a mishap on how I am going to detect the objects infront of them. I can use the 6 analog inputs for the photodiodes inputs but then I dont know how would I turn on the the IR emmitters for each section (I would like to have 2 per section but 1 is probably fine)

Sorry for my bad wording I am troubling on this late at night

Bump

I am having confusion now, after looking around I found this: http://www.instructables.com/id/A-very-simple-proximity-detector/, As to what I thought before, I only thought you could use IR leds with IR Photodiodes if you use it like this: tone(iremitter,38000); and then detect the input from a photodiode, now with that it doesnt have anything in the cuircut to carry a signal??? I dont think I know what Im talking about. Basically, can anyone tell me what would happen if I connect 6 or 12 ir emitters to a 12v powersupply, in parralel with the arduino, and then try read a signal on the analoginputs (of course with resistors in place to lower the voltage before it gets to the emitters)? Also if I connect them to the 5v instead what would happen, explode?

now with that it doesnt have anything in the cuircut to carry a signal???

If you download the datasheet for the IS471F, you'll see it is actually a chip
with an IR detector/amp on it, plus a circuit that generates a pulse signal
to the external Led. It is specifically made for synchronous detection of the
Led signal.

It is really a self-contained version of the circuit that roboticists have used for
many years, which uses a separate 38-khz pulse-generator -> Led, plus TV
IR-remote detector for pickup. If you do a further search on "infrared proximity
detector", you'll find examples of the latter circuits.

Also, if a chip says Vdd = 5V, do not try to power it from 12V.

You may still be able to do what youre trying to do with your setup (assuming I understand you correctly). Just have the IR emitters always on and when an object is close it should bounce back some of the IR light that the photodiodes should be able to pick up on. I'd imagine this would take a good amount of tweaking before you could get it working reliably especially with a matrix of LEDs but I think it could be done. Have you considered using a sensor such as this Infrared Proximity Sensor - Sharp GP2Y0A21YK - SEN-00242 - SparkFun Electronics ? Seems like it would simplify your design.

oric_dan(333):

now with that it doesnt have anything in the cuircut to carry a signal???

If you download the datasheet for the IS471F, you'll see it is actually a chip
with an IR detector/amp on it, plus a circuit that generates a pulse signal
to the external Led. It is specifically made for synchronous detection of the
Led signal.

It is really a self-contained version of the circuit that roboticists have used for
many years, which uses a separate 38-khz pulse-generator -> Led, plus TV
IR-remote detector for pickup. If you do a further search on "infrared proximity
detector", you'll find examples of the latter circuits.

Also, if a chip says Vdd = 5V, do not try to power it from 12V.

Thank You soooooo much, that clears up alot, im fairly new to working with the Hardware in systems so everything in my understanding is new :slight_smile: Also I new not to power it from 12v that would be very silly :stuck_out_tongue:

gdgt:
You may still be able to do what youre trying to do with your setup (assuming I understand you correctly). Just have the IR emitters always on and when an object is close it should bounce back some of the IR light that the photodiodes should be able to pick up on. I'd imagine this would take a good amount of tweaking before you could get it working reliably especially with a matrix of LEDs but I think it could be done. Have you considered using a sensor such as this http://www.sparkfun.com/products/242 ? Seems like it would simplify your design.

It would help simplyfy it alot! The only problem is, the price, 13$ ea and I need 6 (prefer 12), I have the money in my school bank... because in our fees we deposit money to them for projects like this, but I am not allowed to order anything from an overseas store or with a credit card :3 (Also my dad is tight and he wont buy any parts 4 me)
It is exactly what I want to do btw :slight_smile:

I basically need a cheap way to detect objects over a table, so i can light a matrix of leds near the object.

Also, quick question, if I have the 12v dc wall adapter, connecting in parralel with the arduino, and on one side have the 6 IR segments, connect the outputs of the photodiodes to the arduino, and on the other side of the adapter have it powering the arduino, I have to draw alot of current for power each emitter and detector at the same time, say around 300ma right?, will that draw put 300 ma through the arduino and blow it up? Again also, do resistors limit voltage or current?, say I want to connect an LED to the 12v power supply, if I want it to have 5v and 20 amps flowing through it , would I do 12-5=7, R=V/I, R=7/0.0020A (Is that 20 ma), and then get a 3500Ohm resistor and connect it with the led to the power?

P.S: This doesnt use any 38khz pulse generators? http://www.reconnsworld.com/ir_ultrasonic_basicirdetectemit.html (Found it from sparkfun product)

Thanks for the replys guys/girls I reallly appreciate it :smiley: