Connect with us

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

Discussion in 'Sensors and Actuators' started by Steve Peart, Jun 23, 2016.

Scroll to continue with content
  1. Steve Peart

    Steve Peart

    51
    3
    Sep 16, 2015
    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!
     
  2. BobK

    BobK

    7,682
    1,685
    Jan 5, 2010
    Your solution does not handle multiplexing the outputs.

    Bob
     
  3. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    It absolutely does,
    look at post #18 combined with #27.
     
  4. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    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.
     
  5. BobK

    BobK

    7,682
    1,685
    Jan 5, 2010
    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
     
  6. Steve Peart

    Steve Peart

    51
    3
    Sep 16, 2015
    @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.
     
  7. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    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: Jun 30, 2016
  8. BobK

    BobK

    7,682
    1,685
    Jan 5, 2010
    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
     
  9. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    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.
     
  10. BobK

    BobK

    7,682
    1,685
    Jan 5, 2010
    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
     
  11. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    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.
     
  12. BobK

    BobK

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

    Bob
     
  13. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    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?
     
  14. BobK

    BobK

    7,682
    1,685
    Jan 5, 2010
    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
     
  15. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    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
     
  16. BobK

    BobK

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

    Bob
     
  17. tilup367

    tilup367

    13
    1
    Mar 3, 2014
    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.
     
  18. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    Are you joking or what?o_O
     
  19. Steve Peart

    Steve Peart

    51
    3
    Sep 16, 2015
    @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
     
  20. BobK

    BobK

    7,682
    1,685
    Jan 5, 2010
    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
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-