Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Does the 74HC4051 chip work backwards as an output selector?

  1. #1

    Does the 74HC4051 chip work backwards as an output selector?

    I want to drive a series of relays using the 74HC4051 chip and BlinkWithoutDelay. Just making sure: the 74HC4051 chip works backwards as a series of outputs as well as inputs, correct?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,305
    Quote Originally Posted by foam_FORM View Post
    Just making sure: the 74HC4051 chip works backwards as a series of outputs as well as inputs, correct?
    No, it does not.

    At least it can not in any useful way. If you attempt this, it can only drive one of the 8 pins at a time. So in some manner, it can allow you to access 8 output by using it in reverse. But each is only connected temporarily, so it just isn't very useful if you attempt to use it that way.

    Another problem with trying to use an analog mux chip for output is the on resistance. When you make a connection through the 74HC4051, the switches act like resistors. Running at 5 volts, the resistance is about 70 to 100 ohms. Running at 3 volts, it's higher (the chip specs don't say how much worse... which probably means it's quite a lot worse). When using the chip for inputs, the resistance is not a problem. But if you try to use it for output, the resistance also limits its usefulness... as if only being able to temporarily drive one of the 8 outputs at a time wasn't a big enough problem!

    Usually for outputs, a shift register is used. The 74HC595 is the most popular type.

    For driving relays, which require more power than most normal logic chips can provide, you should consider a part like TPIC6B595. Digikey has it as part number 296-1956-5-ND.

  3. #3
    Quote Originally Posted by PaulStoffregen View Post
    No, it does not.

    At least it can not in any useful way. If you attempt this, it can only drive one of the 8 pins at a time. So in some manner, it can allow you to access 8 output by using it in reverse. But each is only connected temporarily, so it just isn't very useful if you attempt to use it that way.

    Another problem with trying to use an analog mux chip for output is the on resistance. When you make a connection through the 74HC4051, the switches act like resistors. Running at 5 volts, the resistance is about 70 to 100 ohms. Running at 3 volts, it's higher (the chip specs don't say how much worse... which probably means it's quite a lot worse). When using the chip for inputs, the resistance is not a problem. But if you try to use it for output, the resistance also limits its usefulness... as if only being able to temporarily drive one of the 8 outputs at a time wasn't a big enough problem!

    Usually for outputs, a shift register is used. The 74HC595 is the most popular type.

    For driving relays, which require more power than most normal logic chips can provide, you should consider a part like TPIC6B595. Digikey has it as part number 296-1956-5-ND.
    Someone else was saying something like most relays need more current than the microprocessor will give but the one I purchased works just fine using blink to drive a LED+battery from the relay. All I need this to do is act like a sequencer of either 8 or 4 switches that I can plug anything into (circuit bent points, speaker connections on circuit bent stuff, analog synths, etc, on each relay) and the Teensy 2.0 will switch one at a time in succession using 5V and <100mA on the relays. I know this is possible because I have done it here with one relay, but if I can get a multiplexer (or apparently a shift register) then I can have way more inputs and possibly get a huge chaotic analog jam going with lots of people. Does this make sense? Thanks again, Paul!!!

  4. #4
    Correction---My test was irrelevant because you were referring to the multiplexer's resistance limiting the usefulness, correct? From what I read you are saying that the resistance on the multiplexer makes it so there is so little amperage going into the relay that it won't switch. Unfortunately, I just received 20 multiplexers this afternoon in the mail...ha. But I will find a use eventually.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,305
    I would recommend you buy part TPIC6B596N from Digikey. Each chip can drive 8 relays.

  6. #6
    Quote Originally Posted by PaulStoffregen View Post
    I would recommend you buy part TPIC6B596N from Digikey. Each chip can drive 8 relays.
    Very nice, thanks!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •