Hey all, I’m excited to finally be partaking here. Sadly my first post is because I’m stuck. Rather embarrassingly so. I’m certain this should be an easy circuit, but it has eluded me for days. I’m working on the 3 channel high level input section of my board. Currently I do selection through a jumper for 12V+ or short to GND input on a Broadcom ACSL-6400-50TE quad channel optocoupler.
I’m trying to get the inputs down to 3 pins with the 4th pin being system GND. To do this I need to sort out the circuit to take both 12v+ and gnd contact to trigger the led in the Opto. My statement of “I’ll have it sorted by dinner” at the beginning of this has haunted me daily. I have tried NOT gates, various NPN and PNP BJT combinations, NPN/PNP MOSFETS, ect. For what ever reason I just cant get my head around it. Any help would be great!
I have made a simple drawing showing the basic idea.
Here is a link to the latest thing I have tried. It is a NOT gate, which does work, but wont turn off. lol. Simpler is better of course. And if it can be found in a quad circuit in a TSSOP even better! lol
Are you trying to energize the Opto with the presence of 12V output and turn off when it’s gone? Or the opposite?
If you’re looking for an inverter maybe instead of giving it a steady 5V input on the Opto you grounded the cathode and then controlled the Opto by connecting a transistor to the output of the below schematic by connecting it to Anode.
Frankly at this point I don’t know what I’m looking for. The behavior I need is to be able to turn on the opto’s LED with either 12v+ or shorting to gnd, but on the same pin. I will have a single pin per opto channel coming into the box. In this case pin 1 above. If someone shorts that pin to the system gnd I need the opto to come on. OR If someone connects the gnd of an external 12v power supply to the system gnd (Through pin 4 in the graphic in post 1) and then connects the 12v to pin 1 I need the opto to come on.
Basically 2 scenarios:
Pin 1 is shorted to pin 4 and the opto turns on.
12VDC is applied to pin 1 (12VDC+) and pin 2 (Common GND)
Construct a voltage divider to produce 1/2 VCC. Two 10 k Ohm resistors would work. Connect the 1/2 VCC to your pin 1.
Design the window comparator to trigger at the desired voltage. For example, a voltage higher than 4 or lower than 1.
Note that the window comparator often features devices with open collector output. This allows the outputs to be connected together using what is known as a wired-or configuration. This allows a voltage greater than 4 or a voltage less than 1 to activate the circuit.
P.S. Be sure to add a series resistance to the input of the comparator. This is necessary to prevent circuit destruction when voltages higher than the comparator’s VCC are applied to the input. Yet another 10 k Ohm resistor may be a good starting point.
Thank you APDahlen, this sounds perfect. Of course my simulator seems to be broken and I can’t test it. Because I wouldn’t be so lucky. It seems the comparators in the simulation will not let me edit their parameters. Below is a link to what I have so far. I can’t swap the pins on the comparitors so that’s why it has the crazy cris-cross wires.
I do have some confusion though. I can see how this turns things on within the high-low voltage “window” but what changes do I need to make for it to trigger outside of that window and be off within it?
In the text it states:
A window comparator will have two reference voltages implemented by a pair of voltage comparators. One which triggers an op-amp comparator on detection of some upper voltage threshold, VREF(UPPER) and one which triggers an op-amp comparator on detection of a lower voltage threshold level, VREF(LOWER). Then the voltage levels between these two upper and lower reference voltages is called the “window”, hence its name.
I need to be outside of this window correct? “higher than 4 or lower than 1” Do I do this by
Setting VrefLower to be higher than VrefUpper?
My apologies, like I said, solving this problem has scrambled my brain.
Thank you for the quick responses, It’s nice to have somewhere to discuss this issue!
I just checked, but no. I put in the second switch so I could test truly floating inputs. On all of the other circuits I tried I would get the same result floating as I did low input. So I wanted to have a way to test it.
I’ve only been using this simulator for about a week. I normally don’t use one, but trying to sort out this circuit had my brain in knots.
What is neat about it is by going to the URL anybody can edit the simulation.
Did what I post a moment ago make sense?
It seems I cannot post the link to the live simulation.
Also replace the input resistor to the other side of the voltage divider. The input pin will connect directly to the voltage divider and the resistor will be placed between the divider and the comparator inputs.