Tri-state switch uses opto-isolator for high voltage isolation.
Fig. 1 Tri-state switch uses opto-isolator for high voltage isolation.

Tri-State Switch Circuit uses Optocouplers

By adding optocouplers to a tri-state switch we isolate 5-volt logic from high voltage output transistors.

For information on the digital gates see Review Connecting Digital Logic and Transistors.

The circuit example in Fig. 1 does two things. Q2 bipolar transistor was replaced with a N-channel power MOSFET.

To get above the 5-volt limit created by the 5-volt digital logic, I've used an optocoupler. This consists an LED infrared emitter and in this case a NPN photo transistor.

When the optocoupler transistor is switched on current flows though Rb1 turning on Q1.

+Vcc is the motor voltage limited by the collector-emitter voltage of the optocoupler. Rb1 is calculated to limit base current of Q1 and optocoupler circuit.

PC817 optocoupler pin connections.
Fig. 2

Fig. 2 is the PC817 optocoupler. I bought 50 for $5 from Ebay. It has a transistor voltage limit of 80-volts and a collector current of 30mA.

The formula to calculate Rb1 is +Vcc - 2V / 25mA. I chose 25mA to stay under the 30mA limit of the optocoupler transistor. Q1 is a TIP120 NPN Darlington with a gain of 1000.

See Tutorial Using TIP120 and TIP125 Power Darlington Transistors.

For the power MOSFET Q2 see:

N-Channel Power MOSFET Switching Tutorial.

4N25, 4N26, 4N27, 4N28 outline.
Fig. 3

Fig. 3 shows the outline of the 4N25, 4N26, 4N27, 4N28 type optocouplers. The transistor has a collector-emitter breakdown voltage of 70V and a maximum current of 50mA.

For more information on optocoupler circuits see:

Truth table for tri-state non-inverting switch.
Fig. 4

Fig. 4 is the truth table for Fig. 1.

View all of my You Tube Videos
Also visit and subscribe to My YouTube Channel

Article List Assorted Subjects

What do UN climate experts say about climate change?

"Basically, it is a big mistake to discuss climate policy apart from the big issues of globalization. The climate summit... is not a climate conference, but one of the biggest business conferences since the Second World War ... But one has to be clear: we are effectively redistributing world wealth through climate policy. One has to free oneself from the illusion that international climate policy is environmental policy. This has almost nothing to do with environmental policy..."

See Climate Change Dogma About Money

Bartender and New York Democratic socialist Alexandria Ocasio-Cortez says:

"Fighting climate change will be 'the civil rights movement of our generation'. It's inevitable that we will create jobs. We can use the transition to 100 percent renewable energy as the vehicle to truly deliver and establish economic, social and racial justice in the United States of America."

I take them at their word.

Web site Copyright Lewis Loflin, All rights reserved.
If using this material on another site, please provide a link back to my site.