1
\$\begingroup\$

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

\$\endgroup\$
5
  • \$\begingroup\$ How about a datasheet for the analog switch? \$\endgroup\$
    – Matt Young
    Commented Dec 4, 2013 at 16:37
  • \$\begingroup\$ The analog switch is probably malfunctioning; has it even been powered correctly? What's the output voltage of the signal generator? \$\endgroup\$
    – pjc50
    Commented Dec 4, 2013 at 17:04
  • \$\begingroup\$ To follow up pjc50's comment, details of how the switch IC is powered are important --- if the switch is powered by +5 and 0 V, and the input source pulls below 0 V, it's likely to damage the switch IC. An updated schematic showing power connections and a link to the datasheet for the switch would help us give you a complete answer on this. \$\endgroup\$
    – The Photon
    Commented Dec 4, 2013 at 17:41
  • \$\begingroup\$ @ThePhoton: That did work. What also worked is placing the op-amp before the switch. \$\endgroup\$
    – ShP
    Commented Dec 5, 2013 at 2:10
  • \$\begingroup\$ @pjc50: the output voltage from the signal generator was a square pulse of 5 volts, which reduced in voltage as it went through the op-amp, the trouble was with my connections - the signal generator gave out a +5 to -5 V signal which was inverted by the op-amp, when it went through the switch, the switch picked up 0 to -5 V which I think was the issue. I moved the switch after the op-amp, that seemed to work. \$\endgroup\$
    – ShP
    Commented Dec 5, 2013 at 2:13

1 Answer 1

1
\$\begingroup\$

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).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.