control a lot of switches

Discussion in 'General Electronics Chat' started by joni, Nov 13, 2009.

  1. joni

    Thread Starter Member

    Oct 4, 2009
    39
    0
    I need to build a controller 8 bit that can activate at least 50 switches
    For example :
    The signal 00000000 gives 5 volt in terminal number 1
    The signal 00000001 gives 5 volt in terminal number 2
    The signal 00000002 gives 5 volt in terminal number 3
    Like this until at least 50
     
  2. russ_hensel

    Well-Known Member

    Jan 11, 2009
    818
    47
    Use a series of latching shift registers. Each will probably be good for 8 bits, so you will need 7 of them in series. Your uc will need only 3 bits.
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The shift registers are a good idea.

    It would help if you could tell us what the 50 +5v outputs are supposed to do.
    For example if there is any particular current requirement, like driving LEDs?
    Or is it just a logical high 5v level?
     
  4. joni

    Thread Starter Member

    Oct 4, 2009
    39
    0
    can i use for this application 74138 decoder?
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    We have no idea of the switches. Are they relays that are electrically activated? Do they get turned on one at a time, or controlled in groups? If individually controlled, do several or all get turned on at the same time?
     
  6. jgessling

    Active Member

    Jul 31, 2009
    74
    14
    Might look at a 74151. 3 inputs + enable and selects among 8 outputs.
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    A 74151 is a data selector/mux. It selects from 1 of 8 inputs to provide an output. A demux/decoder is what would be needed if taking that approach. The 74138 is a decoder/demux; it could be made to work with some extra gates/inverters.

    Going along with Russ Hensel's idea, a CMOS 4021 8-bit latching shift register would be very easy to implement; part numbers would be HEF4021, CD4021B, or MC14021 for most of the major manufacturers.

    However, we don't know if the OP has a requirement for a direct selection of an output, or if it can be clocked in over time.

    Is this a homework assignment for a class or course?
     
  8. joni

    Thread Starter Member

    Oct 4, 2009
    39
    0
    Beenthere, I don't understand all the differences, can you explain​
    My case is : ​
    Solenoids​
    turned on one at a time
    Individually controlled​
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, it helps a lot to know that your load is a large number of solenoids.

    Right now, I will assume that your solenoid coils are rated for 5V DC. If that is not correct, please tell us what their rated voltage is.

    We also need to know what is their resistance in Ohms, or their wattage, or their current requirement.

    Also, are you going to be using a microcontroller (uC) to select these solenoids?
    Or will the input be a series of switches?
    Or will it be some other kind of control?
     
  10. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Beside the steering logic, this could control off a pair of thumbwheel switches - a bit pricey, but they look so good.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Yep, thumbwheel switches are cool :cool: - but that would preclude the use of shift registers, unless there were a uC in between.
     
  12. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Yes, but the OP has said only one will be energized at a time.

    Maybe we will get a bit more information about the solenoids.
     
  13. jgessling

    Active Member

    Jul 31, 2009
    74
    14
    Had that backwards. Mux/demux is confusing, maybe I'll get it now. I look forward to how this circuit will turn out. I have no idea how a shift register would fit into this.
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, a 4094 latching serial-to-parallel shift register circuit is pretty easy to explain. It'll help if you have a datasheet handy. HEF4094B is a good one to download.

    Earlier, I mentioned a 4021; unfortunately that's a parallel to serial; we need to go serial to parallel.

    These shift registers basically require three inputs:
    1) A clock pulse
    2) Data input
    3) A Strobe to latch the serial data to the Parallel output.
    They also require the OE (Output Enable) pin to be held high, as these have tri-state outputs.

    All of the shift registers receive the same clock pulse and Strobe input.
    The 1st shift register gets it's Data input directly from a uC output.
    The QS1 or QS2 output (depending on how the clock rise time looks) of the 1st shift register goes to the Data input of the 2nd shift register. The remaining shift registers are cascaded in a similar manner.

    There are 8 output bits per shift register; to have 50 controllable outputs would require a minimum of 7 shift registers. 56 solenoids could then be individually addressed and controlled.
     
  15. rcbuck

    New Member

    Nov 10, 2009
    9
    0
    OP still has not posted enough information. He said turn them on one at a time. But will more than 1 need to be on at a given time?

    Also, what is the distance between the solenoids and the controlling circuit? If more than a few inches, serial to parallel data latches won't work.

    The 4094 can only sink about 1.5 ma on each output. The 4094 would have to drive something like a ULN2803 darlington transistor array. The ULN2803 can handle up to 50V on each output.

    If the solenoids are a substantial distance from the controller, the only way to do this would be to use some type of addressable switch with an RS-232 or maybe RS422. With RS422 5 pins of the microcontroller could drive 5 transmitters with 10 receivers assigned to each transmitter.

    Another good choice if the solenoids are located some distance from the controller would be the Maxim DS2413 1-wire parts.
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    We are painfully aware of the dearth of information provided. ;)

    Serial-to-parallel latching shift registers would provide for the capability of multiple solenoids on at a time. Decoders/demultiplexers would not.

    The shift registers could be placed in one small area on a board; wires/cabling routed to individual solenoids.

    Yes, that's a given. CMOS would be better off with ULN2804's and a Vdd of 10v-16v. However, at TTL levels, they could directly drive logic-level MOSFETs such as IRLD014 or even abuse 2N7000 MOSFETs.

    There really isn't much point in continuing this if we don't get more info from our original poster.
     
Loading...