Maker Pro
Maker Pro

Cheapest way to get data from multiple(100s) of sensors?

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
Definitely plan to try a smaller matrix, just so the logic is simpler to understand as I go. I want to make this as modular as possible, so as I want to throw more $ at it, I can make the table larger, etc. I may just go with a 10x10 grid and if it's modular enough, expand it as I see fit.

I have some parts ordered and on their way. I'll most likely have more questions, but I think im off to an ok start now.

Thanks!
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
Definitely plan to try a smaller matrix, just so the logic is simpler to understand as I go. I want to make this as modular as possible, so as I want to throw more $ at it, I can make the table larger, etc. I may just go with a 10x10 grid and if it's modular enough, expand it as I see fit.

I have some parts ordered and on their way. I'll most likely have more questions, but I think im off to an ok start now.

Thanks!
It is a good idea to make it modular.
Modularity here lends itself to powers of 2
I would use an 8x8=64 as a basic building block.
To use a block requires:
For the rows drive => one 8bit shift register + one 8bit driver =2 ICs.
For the columns mux tree => one 8bit analog mux = 1 IC.
A total of 3 ICs.

"Fixed" assets
One 4bits analog mux. (for a maximum of 1024 leds),=1 IC.
One 8bit shift regster (or 5 direct output pins from the Arduino) =1 IC
A total of 2(1) ICs.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Dorke,

Here is the equivalent circuit when one of the 20 sensors in one of your columns is selected:

upload_2016-6-30_11-32-41.png

The signal from the sensor has been reduced by a factor of 20. Though this might be workable, it certainly will not provide the same level of discrimination that the sensor is capable of without additional amplification or a high resolution A/D. If you could find a shift register with each output individuality able to tri-state, it would work.

I think the best solution might be a combination of the two. Use the MOSFET I proposed to get high impedance for the sensors that are off, and still arrange it as a matrix for multiplexing. I didn't go that way because I wanted to explain what I was proposing as simply as possible.

Bob
 

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
@BobK , I am confused. I would think that if the matrix is causing only one of the sensors to be active, then how is the signal being reduced by the total count of sensors in the row? @dorke 's idea mentions powering the row of 20 IR LED's that are used for detecting the reflection, but only one of the sensors would ever be "on" at a time to read data from the environment. Am I wrong to think that this would make the entire circuit pushing the full signal for just the one sensor that is active? I would think the rest of the sensors being open circuits would not have any current draw to reduce the signal. Again, just trying to think of it logically, but I am not the pro here.
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
Dorke,

Here is the equivalent circuit when one of the 20 sensors in one of your columns is selected:

View attachment 27645

The signal from the sensor has been reduced by a factor of 20. Though this might be workable, it certainly will not provide the same level of discrimination that the sensor is capable of without additional amplification or a high resolution A/D. If you could find a shift register with each output individuality able to tri-state, it would work.

I think the best solution might be a combination of the two. Use the MOSFET I proposed to get high impedance for the sensors that are off, and still arrange it as a matrix for multiplexing. I didn't go that way because I wanted to explain what I was proposing as simply as possible.

Bob

Bob ,
the ULN2803 driver is an "open collector" device,effectively a tri-state driver.
i.e.
when row is selected(in="1",out="0")
when row is de-selected(in="0",out=tri-stste)
only one row selected at a time.

Thus R2=R/19 is not present.
 
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
That does not work either. Now you have all 20 sensors in parallel with a single emitter resistor. Sure, the IR led is not lit, but unless the room is dark, each sensor will conduct some current V+ to through that load resistor to ground based on the stray light hitting it. My method works because there is a single collector resistor and a non-grounded sensor cannot conduct any current, so the only current the collector resistor sees is through the 1 selected sensor.

Bob
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
The fact that the room is dark or not has no effect.
The sensor has a "Daylight blocking filter",(this "coating" is a must in that type of device,otherwise a single "isolated" device will not work properly anyways).
That means only IR light passes through to it.
see the TCRT5000 datasheet.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Incandescants produce a lot of IR. So does the sun if there are windows in the room.

I don't see why you are opposed to taking all of the sensors not activated out of the circuit.

All you need to do is use a single collector resistor instead of multiple emitter resistors on each row. Now, when the column select is high impedance, the disabled sensors are not connected at all.

Like this:

upload_2016-6-30_17-23-58.png

Bob
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
Bob,
I don't oppose it,I do think it is not needed.
It increases the devices needed for an NxN matrix to N^2 instead of the order of N.
That is a big disadvantage.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
My modification to your circuit requires fewer components. Read it again.

Bob
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
My circuit already has "open collector row selects".
Did you mean "Column selects"?

Even so ,
It will not "take all of the sensors not activated out of the circuit"
The Row or column selected will activate all sensors in it.
To select a single element in the matrix you would need a "selector" for each element,
that is N^2 of them.

Or am I missing something?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Yes, you are missing something. In your circuit, every sensor in the selected column is connected together in parallel (i.e. all emitters and all collectors are connected together) With my modification they are not. Each emitter is connected to a row select. When the row select is high impedance, the sensor essentially has only the collector connected, thus no current can flow through it. The difference is where the resistor is placed.

Bob
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
I see what you mean.
There was a fault in my original row selection.
Here it is modified and corrected ,
with the output at the collectors and a single resistor,
that was actually my intended idea for activating only a single row of LEDs and sensors at a time.

Row-coulmn mux.jpg
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Alright, we have collaborated for what I think is a good design!

Bob
 

tilup367

Mar 3, 2014
13
Joined
Mar 3, 2014
Messages
13
Hey team,

I am an electronics beginner/novice. Currently working with an Arduino UNO (though that isn't necessarily the only thing i'd want to use for this).

I plan to have 100s of Reflective IR Sensors and want to be able to read from all of them at once in the cheapest way possible.

Issues/Thoughts thus far:

  • Obviously, there aren't that many inputs on an Arduino so i can't just run wires to each one.
  • I would be up for getting each sensor to communicate via serial to the Arduino, but then they'd have to be addressable somehow, not sure how I'd achieve this, especially cheap.
I would want to be able to receive something like an address, and the sensor output on the arduino, like 'Sensor 1A = 0.123' or something like that, so I know which one is being detected and at what value, etc.

Any ideas? Questions? There may be some IC or some solution that is obvious to those with more training or understanding of electronics, I just don't know how to formulate the correct google query to return the solutions I need.

Thanks!
-Steve
Depending of what you want to do, your best bet will be to buy a programmable relay or an automate (crouset, omron, schneider, etc.)(from 100$ to 3000$). All of them are programmable in ladder or logic and have a lot of function case to do reading juste like you want and much more. On the other hand..... if your good in electronic you can built your own automate using like PIC processor or arduino or teensy. Or depending of what you want to do with your sensor..... why dont you just connect them to relay and then the relay activate your "power stuff" like a motor or a cylinder or anything else.
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
Depending of what you want to do, your best bet will be to buy a programmable relay or an automate (crouset, omron, schneider, etc.)(from 100$ to 3000$). All of them are programmable in ladder or logic and have a lot of function case to do reading juste like you want and much more. On the other hand..... if your good in electronic you can built your own automate using like PIC processor or arduino or teensy. Or depending of what you want to do with your sensor..... why dont you just connect them to relay and then the relay activate your "power stuff" like a motor or a cylinder or anything else.

Are you joking or what?o_O
 

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
@dorke, @BobK : The ULN2803 just boosts the signal from each input to each output, right? That way it will be able to drive the whole row? Would I still need to have a shift register for selecting which row I want to drive in front of it?

On bit from shift register (0) -> ULN2803 (0) -> Row enabled?

-Steve
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Yep, that is the idea. Another way to do it is use a microcontroller with enough pins to drive all the rows and all the columns without using a shirt register. That would be 40 outputs.

Bob
 
Top