# Level shifter

#### manojh09

Joined May 6, 2022
7
1.i need to do level shifting of 24V signal to 12 V signal

2. i want to do level shifting from 12V to 5V signal in another circuit.

how to do it and is there any particular IC which helps in level shifting please let me know or if there is any circuit diagram please share

#### Papabravo

Joined Feb 24, 2006
20,985
There are several different techniques that can be used. You can use a transistor or a MOSFET to do it, or you can use a comparator with an open collector output. There are also several logic IC's that have higher voltage tolerant inputs that can be converted to a lower voltage. The 74LVC1Gxx series has 5.5 Volt tolerant inputs and will run from a Vcc supply of 1.65 to 5.5 volts.

How many signals do you need to level shift, and how fast are the signals changing?

#### manojh09

Joined May 6, 2022
7
There are several different techniques that can be used. You can use a transistor or a MOSFET to do it, or you can use a comparator with an open collector output. There are also several logic IC's that have higher voltage tolerant inputs that can be converted to a lower voltage. The 74LVC1Gxx series has 5.5 Volt tolerant inputs and will run from a Vcc supply of 1.65 to 5.5 volts.

How many signals do you need to level shift, and how fast are the signals changing?
signals are working on 1Mhz and voltage level translation is from 12v to 5v is required and also 24V to 12V is required

#### crutschow

Joined Mar 14, 2008
33,982
Are these all digital signals going from 0V to the plus voltage.

#### manojh09

Joined May 6, 2022
7
Are these all digital signals going from 0V to the plus voltage.
12V to 5V is a analog signal and 24V to 12V is a digital signal

#### Jon Chandler

Joined Jun 12, 2008
979
12V to 5V is a analog signal and 24V to 12V is a digital signal
The fact that one of signals is analog is kind of an important detail to neglect to mention.

#### Papabravo

Joined Feb 24, 2006
20,985
So, for the analog signal you need a pair of single supply rail-to-rail opamps with a gain of 5/24=0.20833, and
for the digital signal a comparator, with an open collector output pulled up to +12 volts should do the job.

#### Ryszard M

Joined Dec 31, 2021
3
Level shifting technique depends on what will be driven by these converted signals (industrial controller, MCU, logic gate? - what is the input requirements, e.g. input current and input specifications, e.g. input resistance). Simple voltage dividers can be enough under certain conditions.

#### manojh09

Joined May 6, 2022
7
So, for the analog signal you need a pair of single supply rail-to-rail opamps with a gain of 5/24=0.20833, and
for the digital signal a comparator, with an open collector output pulled up to +12 volts should do the job.
can u please mention any ICs which can work as per ur suggestion I did not any in the voltage range

#### manojh09

Joined May 6, 2022
7
Level shifting technique depends on what will be driven by these converted signals (industrial controller, MCU, logic gate? - what is the input requirements, e.g. input current and input specifications, e.g. input resistance). Simple voltage dividers can be enough under certain conditions.
input currents are upto 50 to 250mA

#### BobTPH

Joined Jun 5, 2013
8,653
That does not sound like a signal. Signals are normally a voltage level or current level and not something that significant power is drawn from. 12 V at 250 mA is 3 Watts.

Let’s stop playing 20 questions. Tell us what you are trying to do. Then we might be able to offer you a reasonable solution.

What is the source of your “signals” and what are they driving?

Bob

#### Papabravo

Joined Feb 24, 2006
20,985
can u please mention any ICs which can work as per ur suggestion I did not any in the voltage range
For the comparator you can use the LM339 Quad Compar
can u please mention any ICs which can work as per ur suggestion I did not any in the voltage range
You could not have looked very hard:
This comparator will work from a +24VDC supply and you can use a pullup on the output to +12VDC

for the opamp, units with a high supply voltage are rare and mostly unavailable. Instead use a voltage divider and one of these devices which cost less than \$1 in quantity 10
https://www.mouser.com/datasheet/2/268/MCP6006_6R_6U_7_9_Data_Sheet_20006411B-2449139.pdf

Last edited:

#### Ryszard M

Joined Dec 31, 2021
3
signals are working on 1Mhz and voltage level translation is from 12v to 5v is required and also 24V to 12V is required
MCP6006 is too slow for 1MHz signal, it has Gain Bandwidth Product = 1MHz and Slew Rate is 1.9V/us, so with 1MHz even square input signal you will get on output about 1Vp-p triangle signal.
If signal output has lower impedance and input higher impedance, voltage divider will fit.
LM393 is from the speed point of view on the edge (300ns rise/fall times with large input signal and RL=5.1k).

#### Papabravo

Joined Feb 24, 2006
20,985
MCP6006 is too slow for 1MHz signal, it has Gain Bandwidth Product = 1MHz and Slew Rate is 1.9V/us, so with 1MHz even square input signal you will get on output about 1Vp-p triangle signal.
If signal output has lower impedance and input higher impedance, voltage divider will fit.
LM393 is from the speed point of view on the edge (300ns rise/fall times with large input signal and RL=5.1k).
If you can find a better part, then use whatever part you can find. I suggested that one because it was cheap and in stock. You know your requirements better than I do. Supply chains are constricted and there are limited numbers of parts available.

#### manojh09

Joined May 6, 2022
7
sorry guys due to some emergency could not reply ….thanks for the suggestion for converting 12V to 5V can I use the following circuit

#### Attachments

• 9.7 KB Views: 3

#### manojh09

Joined May 6, 2022
7
please let me know if this works and if it works what precautions should I take

#### Ian0

Joined Aug 7, 2020
9,436
Why all the complicated solutions?
What’s wrong with two resistors in a potential divider?
There‘s even a utility to work out the values for you
http://sim.okawa-denshi.jp/en/teikokeisan.htm
put 24V as input and 12V as output etc.

#### Ryszard M

Joined Dec 31, 2021
3
sorry guys due to some emergency could not reply ….thanks for the suggestion for converting 12V to 5V can I use the following circuit
View attachment 266814
FDC637BNZ has max gate-source voltage 12V, if you directly connect 12V to the gate, there is no margin. Additionally this transistor is oversized (6.2A drain current MOSFET to drive 0.5mA load) and has high input capacitance (it would be good to check it this capacitive load will not influence e.g. delay signal). You can use small signal MOSFET e.g. 2N7002 ( max gate-source voltage 20V).

#### Ian0

Joined Aug 7, 2020
9,436
FDC637BNZ has max gate-source voltage 12V, if you directly connect 12V to the gate, there is no margin. Additionally this transistor is oversized (6.2A drain current MOSFET to drive 0.5mA load) and has high input capacitance (it would be good to check it this capacitive load will not influence e.g. delay signal). You can use small signal MOSFET e.g. 2N7002 ( max gate-source voltage 20V).
A simple resistive divider has none of those problems.

#### drjohsmith

Joined Dec 13, 2021
850
A simple resistive divider has none of those problems.
At the 250 mA the OP quoted,
what resistor values would we suggest ?