What is the advantage of using a chip like "CD74HC4050" in certain
The answer is smaller size, less power consumption, and lower overall cost (not just part cost).
The CD74HC4050 has 6 circuits in its package. Lets compare it to 6 channels made from discrete parts.
The footprint for the CD74HC4050 in the TSSOP package (including silkscreen and keep-outs) is about 40 mm^2 of board area.
The smallest version of the BSS138 is the BSS138W in the SC-70 package. That package footprint, including silkscreen and keep-outs would occupy about 6.8mm^2 of board area.
Lets say you pick two 0402 resistors. The IPC-SM-782A recommended footprints for an 0402 resistor occupies 0.66mm^2 worst case. If you add standard silkscreen markings and keep-out clearances it becomes closer to 1.3mm^2
In summary the chip uses 40mm^2 of board space, the discrete solution uses 56.4mm^2. And I ignored reference designators, if you include a 3mm^2 label for each part it becomes more like 43mm^2 for the chip and 74.4mm^2 for the discrete solution.
So if you want a smaller circuit board then use the chip.
I have personally built this discrete level translator before and it can achieve good performance. On an oscilloscope I have measured propagation delays in the 6ns range. But to achieve this you need to use resistors in the range of a few kilo-ohms max.
What this means is that any time a signal is low you will consume power in those resistors. In your case you show 10K pullup resistors. Assuming we are translating between 3.3V and 5.0V the static power consumption whenever the signals are low is (3.3V)^2 / 10K + (5V)^2/10K = 3.6mW per channel.
For six channels you will consume 21.5mW whenever all channels are low. Assuming signals are high 50% of the time and low 50% of the time that's 10.7mW on average. There is additional dynamic power consumption due to the FET capacitance that is likely to add a few more mW.
The CD74HC4050 shows 20uA max current consumption when the device is in a static state. It also shows 35pF of "power dissipation capacitance". Assuming VCC = 5V and a signaling rate of 10MHz the dynamic power consumption is (5V)^2 x 35pF x 6ch = 5.25mW @10MHz.
So we see that for a low frequency case the chip consumes much less power than the discrete solution. And at 10MHz the chip consumes less than half the power.
In isolation the cost of a single chip might be slightly higher than some FETs and resistors, but there are hidden costs.
- Firstly, the discrete solution is larger. That means that you have
to have a larger circuit card and enclosure to house that circuit
- Next the discrete solution has more parts. This means that there is
more assembly cost either in manual labor or time on an SMT machine.
During the design phase it will take longer to do layout on a board
with more parts.
Is it that the IC is faster? In that case the "CD74HC4050" has a
typical propagation delay of 6ns at 5V Vcc while according to the
datasheet of the BSS138 it has a turn on delay time of 2.5ns to 5ns
and a turn off delay time of 26ns to 36ns. Is it the turn off time
that makes it better to use the ICs?
I have personally built this discrete level translator before and it can achieve good performance. On an oscilloscope I have measured propagation delays in the 6ns range. So from a performance standpoint it can be similar to some chips.
On the other hand there are a lot of chips rated for operation at 100MHz and beyond, so for high performance stuff use a chip.
Technically the CD74HC4050 is a buffer rather than a level-shifter, but under certain circumstances it can be used to change voltage levels. A more apt comparision would be the TXB0106