Connect with us

counting input from sensors

Discussion in 'Electronic Basics' started by Avital, Nov 7, 2003.

Scroll to continue with content
  1. Avital

    Avital Guest

    Hi,

    I'm modifying a previous post of mine to form a different question:

    I have an X (values may range from 1-128) amount of light sensors
    whose output is fed to a 7414 - the result is a clean, ttl level "1"
    or "0" in response to light/dark conditions on the sensor. I would
    like to be able to count how many 1s I have using only ttl parts.

    Thank you for your suggestions in advance.
    Avital


    (remove the letter that sounds like "wye" and the words "nospam" to
    get actual email)
     
  2. JeffM

    JeffM Guest

  3. Avital

    Avital Guest

    My problem isn't as simple as counting the inputs one time - I should
    have been more specific. I have 3 LED displays already setup to show a
    count:

    clock input->7490->7490->7490
    | | |
    7448 7448 7448
    | | |
    (*) (*) (*)

    Where (*) represents a common-cathode 7-segment display. The chaining
    of the 7490s isn't a rigid requirement, just the way things are setup
    now.

    I would like to show an accurate real time count of the number of
    shaded sensors. That is, if the count is 5 at one point in time, but
    2mins later is 3, I need to see that change. Counting up isn't a big
    deal, but counting down, some sort of clever latching/display
    reset/refresh rate solution, or some other logic is required.

    Also, I require advice on power consumption issues regarding such a
    large array of sensors. As 128 sensors would probably require a
    relatively large number of ttl devices to interface to. Finally, I
    would like opinions/advice on issues regarding the fact that these
    sensors are spread out over a 1 meter surface in length - what power
    issues/problems lie there, and how do I solve them? buffers?

    So, as you can see, the starting point has already been passed :)
    although, I did find the 8254 chip an interesting component that I may
    use - but I'd rather exhaust the simplest ttl chip options first
    though.

    Thank you.
    Avital
     
  4. Luhan Monat

    Luhan Monat Guest

    Avital,

    This much complexity is almost always handled with a microcontroller
    today. Signals in, signals out, and software in the middle.
     
  5. John Fields

    John Fields Guest

    ---
    Check alt.binaries.schematics.electronic in a little while for a
    discrete CMOS solution.
    ---
    ---
    Assuming 1mA max for each chip for the CMOS solution, you'll need 21
    HC14's, 17 HC165's, 3 HC160's, 3 HC4511's, and 1 HC40103, for a total
    of 45mA for the logic.

    Power issues for your sensor array? Who knows? You haven't pasted
    anything at all about that in terms of what your sensors are, how much
    power they consume, what tour power supplies look like, etc...
    ---
     
  6. Avital

    Avital Guest

    John,

    Thank you for posting a schematic, it was useful to see the ideas
    being discussed in a diagram. After further consideration (I've
    described another possible design in another post), I'm resolved to
    the fact that there is no real clean plain-part ttl or cmos solution.
    There are simply too many sensors.

    In a last attempt to try to reduce the count, I have been toying with
    the idea of an xy grid representation of sensors using schmitt
    transceiver with tristate output. I haven't fully analysed whether or
    not it will work but the gyst of the idea is this:

    xy grid of sensor inputs whose row/cols are terminated by schmitt bus
    transceivers. Transceivers are enabled via decoders in sequence, their
    output is piped via mux or shift registers (with a seperate clock and
    some logic) to an AND gate. So, sequentially, every strobed xy point's
    output is sent to the AND gate (one from the x-row, one from the
    y-col), which, in turn, is finally piped into the chained 7490s
    controlling the count. Hope I've explained it clearly enough.

    This design seems to cut the chip requirements by about half, however,
    this is still not the most novel or extensible solution. I'm
    considering CPLD solutions now. Any advice on this front would also be
    much appreciated. At the moment I'm researching solutions from Xilinx
    but not fully clear about what a beginner kit would be. It seems that
    I should simply pick any CPLD that fits my current/future
    pin/macrocell requirements, buy the demo board offered on the site,
    use their free WebISP software, and use my VHDL book :)

    When I asked about power requirements on the sensors, I should have
    been more specific, I was prompting for more advice on pitfalls I
    should expect rather than specific issues. My sensors are simple
    photodiodes with a resistor, my choice for photodiodes was completely
    controlled by their relatively-to CdS and Phototransistors-cheap
    price. I was wondering what I should keep in mind when dealing with so
    many sensors spread out over such a large surface - resistance in long
    wires, capacitance issues, speed issues, mechanical considerations,
    designs which lead to unrealistic power supply expectations, other
    electrophysical problems, etc.

    Thank you for your help and advice! (that goes for everyone who posted
    :)
    Avital
     
  7. It sounds like you are already abandoning the traditional logic route.

    Given that, one option would be to build a little data bus based on tristate
    latches, and walk through them one by one, adding the ones up with a
    microprocessor. This is by far the cheapest solution, in my opinion. You
    would need 16 tristate 8 bit latches (74F825, for example), a 4 to 16 demux
    (like a 74F154), a micro with at least 19 I/O pins, and a tiny bit of
    software. Thats 8 input bits for the data bus, 4 selector bits for the
    'address bus' and another 7 output bits for the result.

    The result would not be 'instantaneous', but you could cycle through the
    sensors 1000 times per second with little trouble using a 4MHz uController.

    Regards,
    Bob Monsen
     
  8. John Fields

    John Fields Guest

    ---
    If you wanted to assemble the sensors into an X-Y array you could set
    them up as an 8 column (enables) X 16 row (outputs) array and you could
    use sixteen HC7540's as the Schmitt triggers. Strobe the columns with an
    HC138 and the rows with an HC4067 and your chip count for the array
    shrinks to 18 for the array.
    ---
    ---
    Once you've gotten the array shrunk down so that it can be controlled by
    seven logic lines it seems kind of silly to do the rest with discretes
    when, with a simple micro and four shift registers, you can do
    everything else including driving the LED arrays statically.
    ---
     
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

-