Need an IC...is it a Shift Register?

Discussion in 'The Projects Forum' started by lalarka, Aug 10, 2007.

  1. lalarka

    Thread Starter New Member

    Aug 10, 2007
    3
    0
    Hi,
    I've got an application in need of a circuit, but I don't know for sure if my idea will work....

    What I've got is 2 DO lines. I need to turn on 16 relays one at a time, but not necessarily in order. For example, I might need to turn on relay 1 then turn it off. Then turn on 3, then off. Etc.

    Ideally I would like to Turn my 1st DO line on/off the number of times that equal the number of the DO line I want to activate and then use the 2nd DO line to actually turn the DO line on and off.

    From reading the tutorials in AAC I think a Serial-in - Serial-out shift register will do what I want. Am I understanding correctly?

    Thanks,
    Lance
     
  2. nomurphy

    AAC Fanatic!

    Aug 8, 2005
    567
    12
    You could use a counter, such as a 74HC191, and feed the output into a 4:16 decoder, such as a 74HC154.

    The counter will count the pulses, such as 3, and provide an output of 0011, the '154 would then decode this into a single-line output corresponding to the count of three (but watch out for that "0").

    Your other line would be used as a clear between counts.

    Look up the datasheets and I think you should be able to figure it out.

    Another way would be to use a 4-bit serial-in/parallel-out shift register, where you clock in the necessary pulses and then run the parallel output into the decoder. I think you would find this a little more complicated than above.
     
  3. lalarka

    Thread Starter New Member

    Aug 10, 2007
    3
    0
    Cool. I like the Counter/Decoder idea.

    I'll let you all know how it works out.

    Thanks,
    Lance
     
  4. recca02

    Senior Member

    Apr 2, 2007
    1,211
    0
    from the looks of it u shud go for the decoder/demultiplexer.
     
  5. spar59

    Active Member

    Aug 4, 2007
    51
    0
    Only snag is that you will get glitches on the decoder outputs whilst clocking the counter, however if you clock it quickly and you only intend to drive relays they will not have a chance to pull-in with the short glitch pulses.

    A typical microcontroller could easily clock up to output 15 in less than 30 microseconds.

    The wanted output will of course reset as soon as you reset the counter - this could make programming simpler since you don't need to do any clocking to reset a relay just clear the counter.

    Steve.
     
  6. nomurphy

    AAC Fanatic!

    Aug 8, 2005
    567
    12
    Yes, spar59 makes a good point. I have only given you the basic idea, and it is up to you as the designer to work out any bugs and make it function properly (to perform the way you intend).
     
  7. lalarka

    Thread Starter New Member

    Aug 10, 2007
    3
    0
    I'm trying to avoid using a microcontroller, but if I end up going that route I'll use a BASIC Stamp.

    Thanks all for the suggestions. I just picked up the chips a few minutes ago and will be playing with them this weekend.

    Lance
     
Loading...