capturing a matrix of sensors

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
cag
 
Posts: 21
Joined: Mon Jun 18, 2012 10:34 pm

capturing a matrix of sensors

Post by cag »

I need to build a matrix of IR sensors. IOW, lets say I have five columns and five rows - so I have 25 IR sensors.

I want to see a signal on xy coordinate 3, 2 and interpret what the signal is. and similarly for all the others.

I know I could do it with 25 micro-controllers all wired to their respective IR sensor, while feeding serially or whatever to a "master" micro-controller. That starts getting pretty unwieldy pretty quickly. Can anybody point me somewhere to research another way to do that?

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: capturing a matrix of sensors

Post by adafruit_support_bill »

What kind if IR sensors are you talking about? We have IR rangefinders as well as 38KHz IR remote control receivers.

cag
 
Posts: 21
Joined: Mon Jun 18, 2012 10:34 pm

Re: capturing a matrix of sensors

Post by cag »

940nm 38khz IR sensors - like the Sharp ones. I guess I need something that does a progressive scan of each position...

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: capturing a matrix of sensors

Post by adafruit_support_bill »

Do they need to decode signals, or just detect? Decoding signals requires tight timing. You might be able to manage a couple at a time with some clever interrupt coding, but you would probably need a processor per sensor or two.

If you just need to detect the 38KHz signal, then a Mega could handle the whole array.

cag
 
Posts: 21
Joined: Mon Jun 18, 2012 10:34 pm

Re: capturing a matrix of sensors

Post by cag »

Yeah, I've got to decode each one.

cag
 
Posts: 21
Joined: Mon Jun 18, 2012 10:34 pm

Re: capturing a matrix of sensors

Post by cag »

What I was thinking was I could do something like look at position 1 for 100 milliseconds, look at position 2, look at 3, etc. It wouldn't be instant to get through the entire array, but it should serve my purpose. I'm just not sure how to configure that to happen.

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: capturing a matrix of sensors

Post by adafruit_support_bill »

Are the transmitters sending the same code repeatedly? If the code is repeating, then you just need to sample each channel for long enough to guarantee one repeat of the signal. It shouldn't be too hard to do if your processor has enough pins. Have you taken a look at the IR sensor tutorial? http://learn.adafruit.com/ir-sensor

cag
 
Posts: 21
Joined: Mon Jun 18, 2012 10:34 pm

Re: capturing a matrix of sensors

Post by cag »

Yep, I know how to read the codes. Thanks for your prompt replies by the way.

I think I can summarize the question now - how do I read more IR sensors than I have pins on the micro? Because, eventually, I'm going to need more than what is practical to have pins for. I want to look at 0,0 then look at 0,1 etc. I don't know what kind of circuit allows me to do that but it seems like a reasonable thing that should be solvable?

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: capturing a matrix of sensors

Post by adafruit_support_bill »

What you need then are some multiplexers: http://playground.arduino.cc/learning/4051

cag
 
Posts: 21
Joined: Mon Jun 18, 2012 10:34 pm

Re: capturing a matrix of sensors

Post by cag »

Bingo! Thanks.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”