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

Thread Starter

lalarka

Joined Aug 10, 2007
3
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
 

nomurphy

Joined Aug 8, 2005
567
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.
 

spar59

Joined Aug 4, 2007
64
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.
 

nomurphy

Joined Aug 8, 2005
567
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).
 

Thread Starter

lalarka

Joined Aug 10, 2007
3
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
 
Top