Voltage Level Shifter High Speed Data

Thread Starter

sakibnaz

Joined Jul 28, 2019
4
Hi All.

I need to connect my MCU with an external SPI device which have Logic levels of HIGH 3V and LOW 2V. From the Device to MCU Logic shift I can convert the Voltage 3V/2V to 5V/0V respectively using LM339. But I am facing problem in the other direction conversion of 5V/0V to 3V/2V.

Can anyone advice any comparator Circuit or IC which I can use to make the LOW Output a Positive Voltage (i.e. 2V)? It will be great if there any Quad Differential Comparator available.

Thank you in advance.

Regards.
 

danadak

Joined Mar 10, 2018
4,057
Here is a basic approach -

upload_2019-7-28_6-54-48.png

Note low level is 2.4V because I could not find a lower V zener in simulator.

The switch is a model switch, basically you would use a 2 input analog mux. V2 and V3
would equate to logic level input to mux channel select.

You might be able to find a level translator at On Semi, TI, or other manufacturers that
provide basic analog functions. Maybe even ones with internal Vref for logic levels.


Regards, Dana.
 

danadak

Joined Mar 10, 2018
4,057
Unless someone has a better idea you will have to do some homework.

Here is a selection table that will get you started -

https://www.analog.com/en/parametricsearch/10624


I would focus on Ron, to drive C load fast, single supply operation, fast switching times
(review datasheet) on the order of 5X max bit rate you are working with, CMOS 5V interface
of course.

Aside from that pay attention to making the Zener V sources "stiff", bypassing, maybe use MLC
caps to get the ESR down. Check the datasheet for ESR curves, there are variances between
manufacturers.

Also pay attention to channel to channel switching speed/skew. You do not want the mux output
to experience logic glitches that violate downstream setup and hold times. My thought is you
will have to breadboard this and look at with a fast scope to make sure the switch chosen is
able to produce the behavior you are looking for.

Lastly consider contacting vendor for advice, there are usually guys assigned to specific product
lines that can be a wealth of knowledge.


Regards, Dana.
 

danadak

Joined Mar 10, 2018
4,057
Here is attempt at transient analysis -

upload_2019-7-28_19-3-17.png

I cranked in 5 ns of delay into the transition from one state to another in the switches,
used 100 pF to limit the output glitch, seems OK. Used .1 nS in time step of the simulator.

Note the leading transient is due to zero initial conditions, getting the zener
caps charged.


Regards, Dana.
 

djsfantasi

Joined Apr 11, 2010
9,156
Isn’t the 3.3V circuit low voltage <2V? And hence anything 2V or lower is a low signal. Last time I checked, 0V is less than 2V. Similarly, anything between 3V and 3.3V is a high signal. Note you couldn’t go higher that 3.3V on an input because you’ll fry the 3.3V circuit.
 

ScottWang

Joined Aug 23, 2012
7,397
Try the circuit below.

5V0Vto3V2VVoltageLevelShifterforHighSpeedData-01_ScottWang.png

* The circuit of the output may cause a problem when the next input has resistance issue as in series or in parallel, it will make the output voltage to upper to lower.
 

Sensacell

Joined Jun 19, 2012
3,432
An analog comparator is going to be wayyyyyyy tooooooo slow.
Use an IC DESIGNED to solve this problem.

The attached translator does the job, there are also inverting versions available
 

Attachments

Last edited:

danadak

Joined Mar 10, 2018
4,057
An analog comparator is going to be wayyyyyyy tooooooo slow.
Use an IC DESIGNED to solve this problem.

The attached translator does the job, there are also inverting versions available
Can this part meet the 2 V logic 0 out requirement ? If thats what the TS needs as expressed ?


Regards, Dana.
 

danadak

Joined Mar 10, 2018
4,057
Try the circuit below.

View attachment 182797

* The circuit of the output may cause a problem when the next input has resistance issue as in series or in parallel, it will make the output voltage to upper to lower.
If you do a sim the storage time of the 2N3904/6 is way to high to handle 10 Mbs SPI
data. You might want to use different transistor and currents to get the speed. Maybe
base speedup caps to enhance switching.

I ran the sim with 100 ps time step (result simply not switching fast enough) -

upload_2019-7-30_6-43-13.png

Might be able to handle SPI at 2 - 3 Mbs max.


Regards, Dana.
 

ScottWang

Joined Aug 23, 2012
7,397
@danadak
Thank you.
I haven't try the highest speed yet, I just tried that it could works, I thought about 2N2222 and 2N2907, but I didn't try it, it seems that the 2N3904 and 2N22222 are the similar working frequency range and some resistors still need to change the values to suit for the speed.

Do you have any suggestion bjt for this application?
 

Thread Starter

sakibnaz

Joined Jul 28, 2019
4
Hello Guys. Thanks for all your suggestion about the Logic level conversion.

However, I implemented a solution based on Analog Multiplexers CD4053.

http://www.sycelectronica.com.ar/semiconductores/CD4051-52-53.pdf

I did applied 2V and 3V to the "ax" and "ay" pin then connect the MCU Signal (5V HIGH and 0V LOW) to the "A" Pin. Then gets desired 3V HIGH and 2V LOW pulse from the output pin (when output is Open).

But one problem now I am facing is ... when I am connecting my SPI Device (DSLR Camera Flash Light Hot-Shoe) then I can see the signal voltage drops to 2V HIGH and 1V LOW.

Can anyone advice why this Voltage Drop happening? Any idea to fix?

Regards.
 

ScottWang

Joined Aug 23, 2012
7,397
Mostly the voltage drops is the current not enough to caused that.

If you think CD4053 can match what your needed, it just the current not enough, maybe you can try 74HC4053, it can provides more current.
 

crutschow

Joined Mar 14, 2008
34,281
Do you have any suggestion bjt for this application?
The 2N2369 and 2N5771 have saturation storage times of 13ns and 20ns max. respectively.
Below is the Ltspice simulation comparing the switching time of a 2N2369 to a 2N3904 showing the long saturation delay of the 2N3904.
But that is probably still be too slow for this application.

upload_2019-7-30_7-53-51.png
 

BobTPH

Joined Jun 5, 2013
8,811
Wait a minute everyone. The device requires 3V as the high and 2V as the low? Are you sure? I have never seen logic levels stated as a specific voltage, they are listed as a range of voltages. If the high must be 3V excactly and the low must be 2V exactly, the device cannot possibly work! I.e. a voltage of 2.99 or 3.01 would do what? It has to be a range.

I suspect that the actual range of voltage is:

High: 3 - 3.3V (or whatever the supply voltage is, and possible something like 0.3V higher than that)
Low: 0-2V

In this case the problem is far simpler.

Please link to the datasheet from which you got these levels.

Bob
 

Thread Starter

sakibnaz

Joined Jul 28, 2019
4
Hi @BobTPH. I fully agree with you that the 3V HIGH and 2V LOW is a rare case.

Actually my project is controlling Canon DSLR Flash (E-TTL) from MCU. Here I measured by DSO the Signals between DSLR and Flash Hot-Shoe port and gets the voltage Levels are below:

CLK: LOW 2V, HIGH 4.5V
DATA: LOW 2V, HIGH 3V

For this I need the Voltage Levels conversion.

Hi @ScottWang, for signals I don't think it need high current where CD4053 should able to provide. Can there be any other case for the Voltage Drop?

Regards.
 
Top