Other Parts Discussed in Thread: CD4093B
Hi,
Background:
I am using the CD4504 to level shift the inputs to my circuit, from the voltage level of a selectable power supply, that can either be 15V, 5V or 3V3, to 3V3 (the inputs will always be driven from the same voltage as the selectable supply). I need to meet both TTL and CMOS input thresholds for my application (obviously 15V TTL isn't a valid condition). The circuit for the inputs is shown below. The signals TTL_EN is driven from the same supply as the selectable power supply.
I am also using the CD4504 to level shift my outputs from 3V3 to the selectable supply level, so again 15V, 5V or 3V3. The circuit for the outputs is shown below.
Speed and power are not critical for my application, but the L->H and H->L switching voltages are critical for noise immunity. The 3V3 signals are the ones that interface with my raspberry pi.
Each IC has local 100nF decoupling between each of the supplies and there's good bulk decoupling (e.g. 10uF) spread around the board.
The problem:
When I vary the input voltage to test the V_IL and V_IH levels, I notice that there is no hysteresis. The output switches at around 1.18V and there is no hysteresis (I'm running CMOS to CMOS) and the switching voltage is pretty much the same for all input supply voltages (i.e. Vcc=15V, 5V or 3V3). For all inputs Vdd is 3V3. When I shift to TTL mode for the inputs, the threshold voltage for L->H transition and H->L transition both drop to around 280mV, making it practically useless from a noise immunity perspective.
The level shifting for the outputs shows the same issue, except the voltage for switching changes and at Vdd=3V3 it's around 1.08V, at Vdd=5V it's around 1.62V and Vdd=15V it's around 1.47V. This time, Vcc=3V3 for all outputs.
These results are different to what's in the datasheet, for V_IL(max) and V_IH(min).
Attempts to resolve:
The CD4504 datasheet states minimum recommended operating voltage of 5V, however the graphs indicate operation at 3V3 and other threads (e.g. https://e2e.ti.com/support/logic-group/logic/f/logic-forum/1116554/cd4504b-ep-can-cd4504b-ep-convert-15vin-to-5vout?tisearch=e2e-sitesearch&keymatch=CD4504B#) also support the principle of what I'm doing. For the time being, I suspect the design is OK. However, I have adjusted the supply of one input chips to shift from 5V to 5V, just in case the 3V3 operation was the issue, but the problem remains.
I've checked that the parts fitted are correct and the code on the IC matches what I expect to see. The parts were bought from Mouser, so I'm not expecting any fake IC issues.
I wondered about damaged ICs, possibly from unconnected inputs (there shouldn't be any, but you never know when testing if something accidentally gets disconnected with the test hook-up) and so I tested a previously unused channel, which exhibits the same problem. I also tested a second board that had not been powered before. That also shows the same issues and I can confirm that that board has been handled perfectly. Full ESD precaution has been taken when handling all parts, so I don't think that's a likely explanation either.
Call for help!!
Is the phenomenon that I'm seeing a known artefact of the CD4504?
Could there be something wrong with my implementation, configuration or operation?
Is there a more suitable device that you would recommend for my application? Ideally it would be pin compatible, because we have had PCBs built, but that's not the end of the world...
Many thanks in advance!!