Pull up/down resistor on multiplexer

Hi! I need a stupid, but necessary, info... I use a 74151 (multiplexer) interfaced to arduino that control some sensors, like IR and contact.. using only one pin on arduino... But someone know if the input of multiplexer need a pullup resistor, or I can connect directly to 5v? this last method is working well, but i don't know if is the "good" way.
And the question is the same for any arduino's pin.. I can connect an input directly to Vcc or GND? An input, without pull resistor, have an high impedance, so can I avoid the pull resistor and short directly input on vcc?

thanks!

I think you are not using a 74151 but a 74LS151 or a 74HC151?

Generally you do not need "pulls" of any kind if this line is connected to a defined output. This is the case for all Arduino pins as long as they are programmed as OUTPUT.

However after the Arduino is reset (or a quite different programm is running inside), this is not the case and a connected chip can become confused.

This however applies only to high-impedance inputs as in HC or HCT chips, and for Arduino INPUTS, of course. Old fashioned TTL chips (standard or LS) have a build-in pullup "by construction"

yes, is an input multiplexer (74HC151)..

"This however applies only to high-impedance inputs as in HC or HCT chips, and for Arduino INPUTS, of course. Old fashioned TTL chips (standard or LS) have a build-in pullup "by construction""

but if I have an high impedance on input pin of arduino, why the guide talk about a resistor to pull and not in short? maybe I don't understand, sorry..

and @Crowley:
"a pullup or pulldown resistor would be the most reliable method of ensuring that the circuit does exactly what is intended"

this means that is suggested a resistor? but why if I don't have problems of short or chip damaging?

I explained bad...I NEVER leave the pin disconnected from the vcc or GND, but however, I found my answer...

I was mean, what's happen if I'll connect an input to a high value like a Vcc without a resistor? Nothing, because it's an high impedance and the resistor is used for configurations like a switch wich when it's closed, short Vcc to GND, and the PullUp resistor need to avoid the short circuit... I apologize for this obviousness, but I was confused by a configuration with a DEVIATOR, and the resistor is not required..

I see -maybe I misunderstood your primary question.

You can connect ground or Vcc to any (unused) CMOS input pin, be it a HC-chip or the Arduino.

It has been good practice however to use a resistor (of some k ohms) inbetween. This has two quite different reasons:

  • in bi-polar technology as LS, it would be dangerous otherwise
  • microcontroller inputs can also been configured - by accident - as output, which would be harmless when having used some k-ohms resistors.

Anyway unused inputs of CMOS chips as HC or HCT should be connected to a defined voltage. Doing this without a resistor will do no harm!

For arduino inputs this should be considered as a guideline to always set the internal pull-up on all unsused pins. But I have rarely seen this recommendation ...

thanks deSilva... very helpful advice :smiley:

ok, today I bought a new multiplexer, a 74LS151... what is the difference from 74HC151?
There's a problem with interfacing with the old 74HC151?

As RC said, this becomes OT now:
Just my personal preference: I use HC chips only! They are closer to the microcontroller pins' behaviour and have little drawbacks.

Can you convert your LS chip? Well, stupid question....

Which brings us back to the topic: You will need no pull-ups for the LS-inputs :slight_smile:

You will need no pull-ups for the LS-inputs

yes, searching on internet this type have an internal pullup... thanks!

and in according to RC, I explain a little example, but only for the life of the chip:
in the LS type (I know that they have a pullup internal) if I connect an input pin directly to gnd o vcc (independent if this is the right way or not) I risk to damage the chip? Or, in according to previous posts, I have also an high impedance, and the risk is only on OUTPUT pin (for example set to high) directly connected to gnd?

I hope I was clear and not to have made you lose time..

(for this last phrase I used google, sorry XD)

Now that I go back and read your original question, it appears that you may be trying to use the '151 for analog signals? You cannot do that in any reliable manner. If you have analog signals, use a multiplexer like 4051 (CMOS) http://www.arduino.cc/playground/Learning/4051 The '151 is a DIGITAL multiplexer. It expects digital inputs, and produces a digital output.

But all his listed sensors were of a digital nature, as some sensors are. :wink:

I use a 74151 (multiplexer) interfaced to arduino that control some sensors, like IR and contact.. using only one pin on arduino...

yes, I use digital inputs for my sensors... I know little bit about semiconductors and electronics in general... but I have an exam on the classification and making of type of semiconductors (like cmos or others) and at the moment I don't know these differences, and now I asking questions referring to worst conditions, only to know the range of tolerance...
and ok, I can't connect safely any output directly, like as expected (right?)...but I don't understand, RC, I can connect a digital INPUT (in LS chips) without a resistor? Like that? http://ctheds.files.wordpress.com/2007/10/digital_input.jpg
THAT, was half of the primary question... (and with a practical example :D)
Because if I understand well, you say to me that the pic above it isn't the right way...

The picture shows a very unhappy situation. I think the use of pull-downs in pre-basic microelectronic examples comes from a weird misconception of the possible weird prejudices of novices.

You should use pull-ups, and it is easy with the Arduino, and it is easy with LS chips, and PLEASE read a good book about electronic basics....

I quite agree with deSilva, that arrangement of connecting a button to an arduino is not the best.
It was done (I think) so that beginners expect a button push to equal a logic one or true.
There is nothing much electrically wrong with it in mos but in TTL the pull down would be in the order of 200R where as a pull up would be in the 3K - 10K range. I know TTL inputs float high but they should always be connected to a supply either directly or through a pull up.

The real problem is when this push button has to leave the box and be remote. Then you are trailing +5v around the place which opens the door to so many accidents and mistakes, where as trailing ground about doesn't pose the same issues.

Just to clear some things up:-

if I connect an input pin directly to gnd o vcc (independent if this is the right way or not) I risk to damage the chip

You can connect input lines to +5V or ground with no damage. If you connect output lines to ground then there is a limited degree of protection. If you connect an output line to +5v that is the best way I know of damaging it.

but I have an exam on the classification and making of type of semiconductors (like cmos or others) and at the moment I don't know these differences,

So some one is going to give you a test on something they have not taught you? Or did you not understand it or were you supposed to find out yourself?
I suggest you read Wikipedia for this sort of thing:_ CMOS - Wikipedia

I know TTL inputs float high but they should always be connected to a supply either directly or through a pull up.

The real problem is when this push button has to leave the box and be remote. Then you are trailing +5v around the place which opens the door to so many accidents and mistakes, where as trailing ground about doesn't pose the same issues.

thanks, is the same that I think... :smiley:

So some one is going to give you a test on something they have not taught you? Or did you not understand it or were you supposed to find out yourself?

I'm not explained :smiley:
I'm a student in electronic engineer, and before I studied for electrotechnic (and I don't have a practical knowledge on types of semiconductors).. and now (from here to 3 months) I've a lessons on theory of semiconductors (and related choose of materials)... Yes, before I can use google and wiki, but is not the same as 7 week of lessons at polytechnic.. :smiley:

PS: "200R" = ?... are "200K" or "200 ohm"?

Ah, usually I use this method:

but without the 10K resistor on input... and IF I understand well, I can use the same with LS or HC chips... (it's impossible that this last pic is wrong, because the IR demodulator receivers that I use, have the same circuit)

There is no need for the 10K resistor in line with the input. If you were using TTL then it would actually stop it from working. 100K is too high and should be 10K maximum.

200R is 200 ohm

It's wrong for ttl? what is the right way for this?

what is the right way for this?

To remove the 10K altogether and connect direct to the pin.

The 10K resistor limits the current so that some fault (like the power supply going over 5V) won't damage the gate input.

???
But the pull up resistor (100K) is limiting current for that, the 10K is just getting in the way of ground. I can see no reason why you need to include a series resistor in the input line here.

uhm ok, thanks... I've this chip in ttl because in the shop they have only this type of multiplexer (marked motorola)... ok, so, I think it's approx safe if I connect a 10K array at the ttl input, to pull them down...
because I need to read a switch state.... with cmos I use the previous pic (and we are alright)...

with ttl, in according with your example of TTL NAND port, by default the value of the port is high, and I need to pull down with a resistor and now I think this:
look this pic: http://www.robot-italy.net/downloads/dmanc_art1_fig1.gif

I leave the 10K, replace S1 with another 10K, and replace 100K with a S1 switch... I think that is correct.. sorry for my ignorance when I try to understand your pic, RC, but I don't understand well the mean of double emitter (or collector?) of Vi... but for now, I need to know if my solution is appreciable..

so, I think it's approx safe if I connect a 10K array at the ttl input, to pull them down..

Yep it's safe. Also it will not work. Please read what I say.

apologize to Grumpy and RC!! When I post my last message, I haven't read yours! So, (for now XD) thanks! :smiley: