PWM LEVEL SHIFT 12V to 5V

Thread Starter

skazner1234

Joined Feb 15, 2024
1
Hello,
I am trying to level shift a PWM signal from 12 V TO 5 V i read that using BS170 MOSFET can be a solution, the voltage divider one didn't give a good result when tested out, can someone please give a clear solution.
Thanks
 

Ian0

Joined Aug 7, 2020
13,097
Hello,
I am trying to level shift a PWM signal from 12 V TO 5 V i read that using BS170 MOSFET can be a solution, the voltage divider one didn't give a good result when tested out, can someone please give a clear solution.
Thanks
What was wrong with the voltage divider?
 

MrSoftware

Joined Oct 29, 2013
2,273
And why are any of these better than a two-resistor potential divider?
The OP said a voltage divider didn't work, but did not specify why. Just taking a complete stab in the dark, maybe the inputs are not high impedance or have some capacitance, both of which have to be considered if using a simple voltage divider but would be less of an issue if using a transistor solution.
 

panic mode

Joined Oct 10, 2011
4,869
if sized correctly either solution can work. We just do not know what is this supposed to be driving and what values for resistor were used. if done correctly, transistor solution can produce good result over wider range
 

crutschow

Joined Mar 14, 2008
38,326
A single CMOS buffer chip would give a low-impedance push-pull output (LTspice sim below):
The six gates on the chip are connected in parallel to give a high drive capability, if needed.
The input resistor limits the current to below the 10mA max. the internal input protection diodes connected to Vdd can conduct.

1708025116094.png
 

Ian0

Joined Aug 7, 2020
13,097
A single CMOS buffer chip would give a low-impedance push-pull output (LTspice sim below):
The six gates on the chip are connected in parallel to give a high drive capability, if needed.
The input resistor limits the current to below the 10mA max. the internal input protection diodes connected to Vdd can conduct.

View attachment 315313
So, if the purpose of the level shift was to interface with 5V logic, then all that is needed is R1.
 

BobTPH

Joined Jun 5, 2013
11,466
I suspect he is trying to draw significant power from the circuit which is why the voltage divider did not work. Do not take “signal” seriously. Most people here refer to the output of a motor controller as a PWM “signal”.

We also don’t know if it is a typical open drain output of a PWM power controller, which means it could be used at 5V with no translation.
 
Top