Best Way to Invert Optocoupler Collector Signal?

Thread Starter

Equinox_76

Joined Jul 11, 2024
8
I'm using a pc817 optocoupler to drive a tc4420 mosfet driver IC. When using this common configuration for the optocoupler, the signal is inverted at the collector. To fix this I used an npn transistor, resistor setup to invert the signal. Due to unknown reasons though, the output from the mosfet driver shows shows some noise at a low state, which could cause problems when switching a mosfet. You may say, just use an inverter IC, which works just fine but they only come in in packages with multiple inverters. It would be a waste to have a 16 pin dip, and then only use one inverter. I would like to use a transistor setup, which is small and can be easily made, but my calculations for the resistors seem to be slightly off.Inverter problem.jpgInverter problem.jpg
 

dl324

Joined Mar 30, 2015
18,295
I would like to use a transistor setup, which is small and can be easily made, but my calculations for the resistors seem to be slightly off.
How fast is the optocoupler switching? You might also have problem with turn off time from the inverter.

Have you considered using a discrete CMOS inverter? Two devices instead of 1, but you don't need the 1k resistor.
 

Thread Starter

Equinox_76

Joined Jul 11, 2024
8
How fast is the optocoupler switching? You might also have problem with turn off time from the inverter.

Have you considered using a discrete CMOS inverter? Two devices instead of 1, but you don't need the 1k resistor.
Th optocoupler receives a pulse of about 1-10ms from a chain of RS latches. I guess I could use a cmos inverter. Would the 2N7000 N-channel MOSFET's be suitable?
 

dl324

Joined Mar 30, 2015
18,295
Th optocoupler receives a pulse of about 1-10ms from a chain of RS latches. I guess I could use a cmos inverter. Would the 2N7000 N-channel MOSFET's be suitable?
I'd choose some logic level MOSFETs. Don't have any through hole recommendations. For SOT-23, I'd use AO3400 and AO3401.
 

crutschow

Joined Mar 14, 2008
38,428
Couldn't you just use the opto's transistor as an emitter follower and eliminate the bjt?
Yes.
Below is the LTspice sim of an opto coupler, similar to the one in initial schematic, used as an emitter follower, non-inverting output as Alec_t suggested :
No added transistor needed.

Note that since the base signal is optical and isolated, the opto output transistor saturates in the emitter-follower mode, the same as the common-emitter mode, so there is no 0.7V offset at the output, just the ≈0.2V saturation voltage..

1722197160405.png
 
Last edited:
Top