What is the difference between CD74HC4067 and cd4051?

Hi. I am trying to learn some things on arduino, and while doing so I have come up with a question, how do I increase the number of analog input on the arduino, for example to control four stepper motor w/o driver, although I think I can't, since current won't be enough. So I found out cd4051. But later I learned that it is for digital input. After then I found a more expensive mux CD74HC4067, which can be used for both analog and digital. Lastly in this same forum I found out that I CAN use cd4051 for digital input too. So if it is true, why there is a huge amound of price difference? What makes cd74hc4067 more expencive?

Where did you find that the 4051 is only for digital. The name in he datasheet is clearly "8-channel analog multiplexer/demultiplexer".

The CD and HEF versions are the 'original' versions from long ago; they work with supply voltages up to around 20V (check the datasheet if needed) also standard would be around 12V or so.
The H in HC stands for "High Speed" and is the newer version; they were designed for 5V power supply (some go higher, again check the datasheet if needed).

I have no idea about pricing.

Is 74 cents a good price?
https://www.digikey.com/product-detail/en/toshiba-semiconductor-and-storage/TC74HC4051APF/TC74HC4051APF-ND/870508

4067 not available in thru hole. Both are available in SMD.

sterretje:
Where did you find that the 4051 is only for digital. The name in he datasheet is clearly "8-channel analog multiplexer/demultiplexer".

The CD and HEF versions are the 'original' versions from long ago; they work with supply voltages up to around 20V (check the datasheet if needed) also standard would be around 12V or so.
The H in HC stands for "High Speed" and is the newer version; they were designed for 5V power supply (some go higher, again check the datasheet if needed).

I have no idea about pricing.

Oh, I see, I must have read it wrong. Thank you very much for the clarification and answer.

CrossRoads:
Is 74 cents a good price?
TC74HC4051APF Toshiba Semiconductor and Storage | Integrated Circuits (ICs) | DigiKey

4067 not available in thru hole. Both are available in SMD.

CrossRoads:
Is 74 cents a good price?
TC74HC4051APF Toshiba Semiconductor and Storage | Integrated Circuits (ICs) | DigiKey

4067 not available in thru hole. Both are available in SMD.

It is nearly the same price where I am buying it.
So that is the only difference between them other than CD74HC4067 can multiply the digital input too.

compnaion:
how do I increase the number of analog input on the arduino, for example to control four stepper motor w/o driver, although I think I can't, since current won't be enough.

Why do you believe you need analog inputs to drive motors? The only reason I can think of is to monitor the motor currents. But only advanced drivers have that capability, and as a beginner I doubt you knew that. I suspect you have seen the A0..A6 pins used as digital outputs. And you are correct, they can't supply enough current to drive a motor, but you may have seen them connected to a motor driver chip or module.

PaulRB:
Why do you believe you need analog inputs to drive motors? The only reason I can think of is to monitor the motor currents. But only advanced drivers have that capability, and as a beginner I doubt you knew that. I suspect you have seen the A0..A6 pins used as digital outputs. And you are correct, they can't supply enough current to drive a motor, but you may have seen them connected to a motor driver chip or module.

I am mechanical engineer, not electrical engineer. I really have no idea of how they work, I just simply use the c++ knowledge that was taught me by the school, which is not actually that much. I have a simple stepper motor, which I control with codes such as turn 50 steps clockwise than turn back etc. I will buy an easydrive in order to learn it, and I will just buy a mux so I can learn about it too, because who knows when I need a mux.

@ compnaion

If you are going to expand your analog channels of UNO, you have to use 74HCT4067 (TTL Level Logic) and is compatible with Arduino UNO which is also TTL Logic (VOH = 4.2, VOL = 0.9V).

74HC4067 and CD4051 are CMOS Logic, and they are not compatible with TTL logic. For CMOS logic:
(VIL = 0V to 1.5V). Therefore, UNO might fail to drive the selection bits of the CMOS analog multiplexers. The VOL (max) value for TTL logic (UNO) is: 0.9V.

What does 74 behind 74HC4067 indicate? CMOS logic with TTL speed (low power high speed logic).

GolamMostafa:
@ compnaion

If you are going to expand your analog channels of UNO, you have to use 74HCT4067 (TTL Level Logic) and is compatible with Arduino UNO which is also TTL Logic (VOH = 4.2, VOL = 0.9V).

74HC4067 and CD4051 are CMOS Logic, and they are not compatible with TTL logic. For CMOS logic:
(VIL = 0V to 1.5V). Therefore, UNO might fail to drive the selection bits of the CMOS analog multiplexers. The VOL (max) value for TTL logic (UNO) is: 0.9V.

What does 74 behind 74HC4067 indicate? CMOS logic with TTL speed (low power high speed logic).

Nope, no idea what you are saying :D. But I will try to search and learn as much as possible, thank you for the answer.

@GolamMostafa

I think that you see that wrong. I've used this 74HC/HCT4051 datasheet; specs at -40 to 85 degrees.

Vih of the 74HCT4051 is 2V (min)
Vil of the 74HCT4051 is 0.8V (max)

Vih of the 74HC4051 is 3.15V (min)
Vil of the 74HC4051 is 1.35V (max)

Output of the 328P
Vol = 0.9V (max) @ 20mA load, 85 degrees
Voh = 4.2V (min) @ 20mA load, 85 degrees

So in the worst case scenario the Vol of the 328P exceeds the the Vil of the 74HCT4051. OK, one 74HCT4051 will not give that load but that's not quite the point; with the HC version, one is always safe.

@compnaion

For the 4051 device to reliably switch, a logic LOW must be below Vil and a logic HIGH must be above Vih. If you apply a voltage between the two, the 4051 might interpret it as LOW or as HIGH and hence might select the wrong input/output to be routed.

There is a chance that the 328P gives a Vol (at full load) that is in this 'forbidden' region. Now life is not that bad if you limit the current to a few mA; see fig 31-306 on page 479 of the 328P datasheet that shows that at lower sink currents the Vol is close to 0V. So it's probably safe to use a 74HCT4051, but a 74HC4051 is guaranteed to work with the 328P in all possible conditions.

1 Like

with the HC version, one is always safe.

So it's probably safe to use a 74HCT4051, but a 74HC4051 is guaranteed to work with the 328P in all possible conditions.

You are right and thank+ you for pointing out my mistake!

There is a chance that the 328P gives a Vol (at full load) that is in this 'forbidden' region. Now life is not that bad if you limit the current to a few mA; see fig 31-306 on page 479 of the 328P datasheet that shows that at lower sink currents the Vol is close to 0V.

I am just presenting below a diagrammatic representation of your above proposition:

Input currents of the TTL gate are very low (20 uA/1.3 mA) compared to UNO (20mA/20mA) that the UNO could be considered as being operated at a very low load condition; as result, the output of the UNO will always remain much below of the forbidden zone.

**BTW:**By linear calculation -- the UNO will be able to drive (fan-out) directly about 10 TTL gates safely (((20/1.3)/0.9)*0.8 = 13 ---> 10).