I need to voltage shift a 3v3 driving port to 24v output signal. 3v3 is from a MCU and 24v goes to an industrial input.
Input signal is NPN where +3v3 is ACTIVE state. 24v side should be PNP where 0v is ACTIVE state.
Signal frequency is about 10-50kHz and ON state is 1-2ms. Load is max 15mA @ 24V because it drive an optocoupled industrial input.
I'd problematic experience with NPN and PNP transistors that, with a low driving voltage as 3v3, I was unable to saturate them (PNP to 0V or NPN to 24V).
Can you post me most common an reliable circuits to perform this level shift? Using transistors or MOS or both. I'll try to simulate them on breadboard with a LED and an oscilloscope.
For learning purposes I'd appreciate to see different solutions to keep them and if I need use them in future.
OP says they're driving an optocoupler; that pull-up resistor may get in the way of a proper current drive to the optocoupler. I'd much rather see a transistor between the +24V and the output, ensuring a proper output drive. Like in the link given in #3.
The pull-down resistor there is not even needed when driving an optocoupler, the PNP collector can connect directly to the optocoupler input.
I think we need more info. If the input signal drives the opto LED, why
do we need it supply 24V? If the opto diode anode is tied to a 24V source,
we need only pull current out of the device.