Matrix of opto interupters possible?

Status
Not open for further replies.

Pommie

Well-Known Member
Most Helpful Member
I need 32 opto interrupters and wondered about making them into a matrix. I'm thinking a 6x6 matrix with this at each node,

Excuse the image, I'm in school and had to use an online schematic tool and paint!!!

My question, assuming I work through the matrix 1 node at a time so only one row is 0V and only one column is 5V, would/could there be any cross talk between the various nodes? I realise I'll need a sense for each column but wondered about using a diode on each nodes sense to AND then together? I'm also thinking I can get away with one LED resistor per column and one photo diode resistor pre column also. Thoughts, suggestions?

Mike.
 
Are the interrupters diode based like your schem, or phototransistor based.
If the latter then it might well work. If you were really keen you might be able to sense current pulled by the phototransitor when its on, then you'll only need row & column pins no sense pins.
Diodes inline with the row & or column might be req if the phototrans dont like reverse polarity.
 
Thanks for the reply.
I'm hoping to use photo diodes, I figure R2 at 47K should give a reasonable signal.
I don't see how the phototransistor/diode could see a reverse voltage but this is why I asked, in case there's a path I hadn't considered. Note, the rows and columns not selected will be set to input (Hi Z).
Think it's time for a trip to the local electronics shop and a little experimenting. I do actually have the bits here but it's quicker to just buy new ones.

Mike.
Edit, This works well with R1 = 150R and R2 = 10k.
Edit2, too sensitive (to tolerances) with photodiode but works very well with phototransistors.
 
Last edited:

Hola Mike,

To be sure that I got it right, you propose: 6 bits with logic 1 for columns, 6 bits with logic 0 for rows and 6 bits to read sense. Correct?

Thinking of minimizing: could you go away with the bottom of all nodes permanently to common (0 V)? That way, it seems to me that for every column getting a logic 1 (+5V) you could read the six rows (sense). Is consumption a concern?

Not sure yet about the common resistors whether for columns and / or rows.
 
The problem is that stray light from one diode can illuminate another. So, to prevent this I'm going to only power 1 LED and 1 phototransistor. So 1 column high and 1 row low - all other rows and columns set to input. I think I can get away with 1 sense input by using diodes and a resistor to ground to OR all the sense points together. I now need two arrays of 8x8 interrupters so am thinking of two small pic chips as I²C slaves running an 8x8 matrix each - looks like I'll need a 28 pin device for each. Should be interesting.

Mike.
 
The problem is that stray light from one diode can illuminate another.
That is not solved reading one by one if the stray illumination persists by the time you read the next neighbor.
Can't stray light be eliminated / confined?

If you find my intervention is just bothering you or not desired, please tell. I suspect you are already well ahead in this project.
 
LEDs turn on/off pretty quick so I guess I can read each node in less than 250nS (I'm clocking at 64MHz). Reading the complete array should take around 64mS. I only need to read it about twice per second so I should be able to tweak it somehow.

Thanks for your interest.

Mike.
 
Yes, at that speed it makes sense and the two PICs in charge of a matrix each sound a clever solution.

In spite of an eventual DNA that you could have, please post the final outcome. Interesting subject.

Good luck.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…