Need transistor circuit to control optical switches

Thread Starter

matthej

Joined Oct 10, 2020
38
I am a digital designer so anything analog is out of my expertise. I need to control an optical 2x2 switch with the following truth table:

enter image description here

The pulse is in the msec range and the driver current is about 200mA.

I have an FPGA that can control the transistors but not sure how to arrange them?

Any ideas?

Thanks!
 

AnalogKid

Joined Aug 1, 2013
9,248
a) What is the I/O power supply voltage for the FPGA?

b) what is the actual output voltage range on an FPGA output pin when sourcing 1 mA?

Off the top, this smells like two small-signal transistors, like a 2N4401 and 2N4403, and two resistors, per switch input pin.

ak
 

AnalogKid

Joined Aug 1, 2013
9,248
First pass at what basically is a high-current level shifter. R3 assures that Q2 turns off rapidly, and R4 assures that the input to the switch sees a firm low signal when the switch is off. Of course, the switch inputs might require something different, but we're still waiting for ***any*** information about it.

ak
Optical-Switch-1-c.gif
 
Last edited:

Thread Starter

matthej

Joined Oct 10, 2020
38
So I understand the basic function of this circuit that AnalogKid has provided. Thanks!. The problem I have is how I actually hook up the two pins used to control the switch. They seem to work in tandem as there is no "gnd" pin, so it looks like one is always the ground path according to the datasheet which is attached. So for example you pulse pin1 while pin2 is ground for one connection which is then latched, then pulse the pin2 and keep pin 1 ground for the second connection (or at least how I interpret it)

Thanks!
 

Attachments

crutschow

Joined Mar 14, 2008
27,188
So for example you pulse pin1 while pin2 is ground for one connection which is then latched, then pulse the pin2 and keep pin 1 ground for the second connection (or at least how I interpret it)
Yes, that device requires a bipolar signal.
So you need a push-pull bridge type circuit.

Below is the LTspice simulation of a simple circuit that should work for you.
In1 and In2 are the signals from your FPGA.
A positive In signal applies ground to that side of the bridge and +5V to the opposite side.
R_Load represents the switch load for simulation purposes.
Current into the side of the load with the small circle is positive current (yellow trace).

The transistors can be just about any that are rated for at least twice the load current and voltage.

1613057775546.png
 
Last edited:

Thread Starter

matthej

Joined Oct 10, 2020
38
Yes, that device requires a bipolar signal.
So you need a push-pull bridge type circuit.

Below is the LTspice simulation of a simple circuit that should work for you.
In1 and In2 are the signals from your FPGA.
A positive In signal applies ground to that side of the bridge and +5V to the opposite side.
R_Load represents the switch load for simulation purposes.
Current into the side of the load with the small circle is positive current (yellow trace).

The transistors can be just about any that are rated for at least twice the load current and voltage.

View attachment 230122
Thanks for this circuit. So just so I understand this. When there is no voltage on In1 and In2, all 4 transistors are off, no current flowing thru R load and both sides of the R load are at 5V? When I apply a pulse at In1, it turns on Q1, which in turn will turn on Q4 and the current will flow through pin 2 of the load? Pin1 will be close to GND and pin2 will be at 5V? Do I have it correctly?
 

crutschow

Joined Mar 14, 2008
27,188
Q3 and Q4 base pullup resistors - ?
Don't think they are needed for this application.

The bases of Q1 and Q2 are pulled down by the FPGA input signal so the only leakage current when both inputs are off is Ices from Q1 and Q2.

When one input is high, that NPN transistor output goes low, turning on the opposite high side PNP, which pulls the same side PNP base to V+.
 
Last edited:

crutschow

Joined Mar 14, 2008
27,188
When there is no voltage on In1 and In2, all 4 transistors are off, no current flowing thru R load and both sides of the R load are at 5V?
Yes.
I don't think that's a problem for the optical switch since no significant current is flowing.
When I apply a pulse at In1, it turns on Q1, which in turn will turn on Q4 and the current will flow through pin 2 of the load? Pin1 will be close to GND and pin2 will be at 5V? Do I have it correctly?
Yes
 

sparky 1

Joined Nov 3, 2018
540
Because you have familiarity with digital you might be able to integrate general scheme and packages including optocouplers into some order
of logic arrangements elaborated by discrete transistors. The (subroutines) discrete components as individual or array can vary in function however electrical characteristics should comply. The 555 has some of the functions. It is better format to define the variables first for those arrangements that can be made with a 555 and not call a subroutine where the whole program locks up.
https://docs.rs-online.com/bcb1/0900766b808dfee3.pdf
http://www.diy-electronic-projects.com/projects/118/bigs/simple_optical_switch.gif
https://www.instructables.com/Build-Your-Own-555-Timer/
https://www.thorlabs.com/drawings/5...B-FD58-04FA6A9C15814B6F/OSW22-488E-Manual.pdf
 
Last edited:

Thread Starter

matthej

Joined Oct 10, 2020
38
Yes.
I don't think that's a problem for the optical switch since no significant current is flowing.
Yes
1613067940821.png

So looking at this driving table, it looks like these pins should be at GND for most of the time (other than when a pulse is applied)? But does your circuit default those pins to +5V when switching is not happening?
 

crutschow

Joined Mar 14, 2008
27,188
View attachment 230132

So looking at this driving table, it looks like these pins should be at GND for most of the time (other than when a pulse is applied)? But does your circuit default those pins to +5V when switching is not happening?
Yes, it puts both pins at +5V.
I assumed the inputs were floating with one input sinking current and the other sourcing current, which could tolerate both inputs being high but in retrospect, perhaps that's an incorrect assumption.
If so, and the inputs don't need to sink significant currents, then you would need two circuits, as AK showed in post #5.
 

onno

Joined Jul 13, 2017
11
Hi Matthej,

Sorry for being a bit off-topic here but my curiosity won. Can you share a bit on your/a use case for the optical 2x2 switch (and like-wise devices)? Both the transitor circuit request as the 'optical switch' triggered me in reading your question. Wanted to send a DM without cluttering this thread, but can't send DM's.
Either way thanks! (and good question. :) )

KR,
Onno.
 
Top