Inverting signal

operational-amplifier

Is there any other way to invert a signal apart from using an op-amp?

I am inverting a square wave from a function generator to an LED through an op-amp.

Problem: I am also using

schematic

simulate this circuit – Schematic created using CircuitLab

An analog switch IC to control (stop) the signal going through the LED if needed (by closing and opening the switch with 5V).

The led lights up and flashes as needed without the involvement of the switch, but when I connect the function generator through the analog switch to the op-amp, the LED stops flashing and is dimly lit. When I check the signal in the oscilloscope, there is a slight voltage, instead of a 5V square pulse.

Is it because of the op amp?

Connections: function generator : op-amp: transistor: resistor: led

function generator: switch: op-amp: transistor: resistor: led

Best Answer

How about this:

schematic

simulate this circuit – Schematic created using CircuitLab

Make sure that when the input is low, PMOS is conducting. In other words, ensure that when the input is low the voltage divider ratio satisfies:

$$V_{SG}=V_{led}-(V_{in}+(V_{led}-V_{in})\frac{R_{bias}}{R_{bias}+R_{pullup}})>V_T$$

Also, depending on the frequency of the square wave and the current drive capability of the signal generator in series with switch, you may need to make sure that the transistor's gate capacitance is low enough and half the period of your input signal suffices for this capacitance to discharge.

If you got just NMOSs you might use this topology:

schematic

simulate this circuit

In addition to what I said about the PMOS configuration, in this circuit you must also ensure that the (-) pin of your function generator is floating (i.e. it is not grounded internally).