Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

Op-amp Tutorial 2 : Features of inverting and non-inverting input and application

Written By: 

Ajish Alfred
Features of inverting and non-inverting pins

The dependency of the output with the inverting and non-inverting pin can be simply explained as below,


If the inverting pin is high compared to other pin, the output is negative


If the non-inverting pin is high compared to other pin, the output is positive


This pecularity of the input pins are demonstrated in the following circuit. Let us take a 741 op-amp IC and keep the inverting pin at a high potential compared to the non-inverting pin.

5.jpgInverting pin high circuit
In the above circuit a 741 op-amp is used with two LEDs at its output. One LED (D1) has its anode connected to the output pin of op-amp and another LED (D2) has its cathode connected to the output pin of the op-amp. When the output voltage is positive D1 glows and when the output is negative, D2 glows.
Here inverting pin is connected to positive voltage (VCC) through a resistor R2, and the non-inverting pin is connected to GND through another resistor R1. Since the inverting input is having higher potential than the non-inverting pin, the output will be a negative voltage and D2 glows.
The image of the op amp circuit in Figure: 24 is shown below.
Image of Inverting pin high circuit
If we make the connection in such a way that, the non-inverting pin is having a high voltage compared to the inverting pin, the output will be positive. The circuit for such a connection is shown below.


Non-Inverting pin high circuit


Here non-inverting pin is connected to positive voltage (VCC) through a resistor R2, and the inverting pin is connected to GND through another resistor R1. Since the non-inverting input is having higher potential than the inverting pin, the output will be positive voltage and D1 glows.
The image of the circuit in Figure: 26 is shown below
Image of non-inverting pin high circuit
Component specifications:
R1, R2, R3=Resistor 1K, 1/4W
D1=LED, red
D2=LED, green
Normally the inverting pin is used for adjusting the gain of an op-amp, by realizing negative feedback. Hence it is appropriate to call the inverting pin as “gain adjust pin”. An input voltage can be applied to the non-inverting pin, which will maintain its polarity and phase at the output. Hence we can call the non-inverting pin as “signal input pin”, although the input signals are sometimes applied to the inverting pin itself.
Common pin functions

The non-inverting terminal

The non-inverting terminal
The non-inverting pin maintains the polarity and phase of the input signal at the output pin of the op-amp, when the op-amp is configured as an amplifier. In a 741 IC, pin3 is the non-inverting pin. The non-inverting pin is represented by the “+” sign in the symbol of an op-amp.
It acts as the signal input pin of an amplifier while the inverting pin can be considered as the gain adjusts, as shown in the Figure: 28.  
Concept of infinite gain
As we have discussed the history in basics of op amp, the idea put forward by Harry Black was to create a circuit with very high gain, which might be several times required for any practical purpose. Then try to reduce the gain to the required level using feedback circuits.
Ideally op-amp is supposed to have infinite gain. I.e. you will get maximum output voltage even if the input voltage approaches zero. But device parameters put a limit to the maximum possible gain.
The output voltage depends on the product of input voltage and gain, still the output voltage is limited to less than that of the supply voltage. For an op-amp IC operating at 15V, you will get a maximum voltage around 13V only.
Still it appears to have infinite gain as we can see very feeble voltages can make the output of the op-amp to its maximum value. This feature of the op-amp makes it useful for zero-crossing detector, level detector, window detector etc.
Level detector and Zero-crossing detector
Zero crossing detector is a circuit which is having an input terminal and an output terminal, and the output pin goes high whenever the input pin’s voltage rises slightly above the zero voltage.
Even the minute increase in voltage above the zero voltage will abruptly make the output high. When the input terminal returns to zero voltage the output again goes to low or negative voltage.
A level detector is most of the case has another input pin in which we can preset a voltage, and the output goes high whenever the voltage at the input pin rises slightly above this preset voltage. The output remains low whenever the voltage is below that preset level of voltage.
Level detector                                                              Waveforms
In Figure: 29.a) a ciruit symbolic representation of a level detector is shown. In this case the level to be detected is preset as nothing but zero volts itself. Hence this circuit acts as a zero crossing detector.
Assume a sine wave is applied to the non-inverting pin of the op-amp. The resulting wavform is ahown in the Figure: 29.b). Whenever the input is above the zero voltage, the output remains high (almost equal to positive supply voltage) and similarly whenever the input is below the zero voltage level, the output remains low (almost equal to negative supply voltage).

Non-inverting terminal Contd...

A practical level detector circuit with two LED indicators is shown  below. The pot RV2 is used to set the voltage level (any voltage including zero), and the pot RV1 is used to vary the voltage to be detected. If the voltage introduced by varying the pot RV1 crosses the voltage level preset by the pot RV2, output goes high and D1 glows, otherwise D2 glows.
Level detector
Component specifications:
R1 =Resistor 1K, 1/4W
D1=LED, red
D2=LED, green
RV1=10K, volume controller
RV2=10K, preset
Component significance:
R1: Controls the brightness of the LEDs. As the value decreases, the brightness increases. Resistors having values above 220 ohms are safe to use with the LEDs.
The image for the level detector circuit is shown in the following figure.
Image of Level detector

Proximity sensor

Proximity sensor
If you feel confident about the Level detector circuit discussed above, let’s do something really interesting based on the same concept
A proximity sensor is a device which can be used to detect the objects which approach its proximity. The presence of any object having a considerable size within a particular range can be detected using the device. The design of an IR based proximity sensor is discussed in this section.
The circuit has two IR LEDs which generate low power IR beams. There is also an IR photodiode which detects the IR rays reflected back to the device from some objects in its proximity. If the detector receives any reflected ray its output voltage rises. The voltage at the output depends on the size and distance of the object from the photodiode sensor. When the voltage raises a particular level the output of the comparator changes its polarity and hence we can detect an object.
The circuit for the proximity sensor is shown below.
Proximity sensor circuit
The image for the above circuit is shown below. Beginners should note the way in which I’ve modularize the sensor, right now the section include IR LEDs and photodiode only, so that I can connect the module with any other circuits. Only three wires come out of the module; VCC, GND and the input to the non-inverting pin.
Proximity sensor image
Normally we get a range of more than 30cm, again it depends on the size and reflective property of the object. The range can be adjusted by varying the potentiometer. In actual implementation we can replace the simple LED with a relay or a siren.
Watch the working video of the above circuit.
Component specifications:
R1=55E, 1/4W
R2=100KE, 1/4W
R3=10KE, potentiometer
R4=1KE, 1/4W
D1=D5=LED, 3mm
D2=D3=IR LED, 5mm
D4=IR photodiode (IR LED receiver)
Component significance:
R1: Controls brightness of the IR LED, and hence has an effect on the maximum range also. Lesser the value of the resistor, brighter the IR LED.
R2: The resistance R2 affects the sensitivity of the circuit. Increasing the value of the resistance increases the sensitivity of the circuit.
R3: The variable resistor should be adjusted in such a way as to obtain minimum voltage at the inverting pin. The lower the voltage at the inverting pin, higher the sensitivity of the circuit.
U1: LM358 is an op-amp IC, which can work really well without having dual-power supply. It is designed to work with modern day’s digital circuits. A single LM358 IC consists of two op-amp modules. Each op-amp modules are free to use separately and simultaneously.
Like 741, it also comes in 8-pin DIP package. The pin-outs of the LM358 is shown below.
LM358 pin-out
Unlike 741 IC, the LM358 has internal adjustment for maintaining zero offset voltage. Hence there is no pins like offset null in a LM358 IC. The capability of operating with a single power supply makes this IC favorite for the circuit designers, hobbyist and is very widely used in commercial products.


Capacitive touch switch

Capacitive touch switch

You can find touch switch in most of the high-end devices like mobile phones, laptops etc. The concept of the touch switch is very simple and in most of the cases capacitive touch is used.


In capacitive touch technology, when we touch the switch or a particular point in a touch screen, we are actually bringing our finger close to a sensing probe which is covered with some coating. When we actually touch, a capacitance will be generated between our finger and the touching probe which is separated by that coating. The device can sense that capacitance and hence a touch is detected.

Unlike the resistive touch technology there is no pressure applied, and also bending of the device is not required to detect a touch. Hence capacitive touch devices are more durable, nice to touch and are widely used now days.
We can generate a simple touch switch with the help of an op-amp based comparator. The circuit diagram for a capacitive touch switch is shown below
Capacitive touch switch circuit
An LM358 IC has two op-amps with in it. In the above circuit we use both the op-amps. One of them is configured as a simple comparator while the other one is configured as a mono-stable multi-vibrator of short time period. The comparator output gives the touch output, and is followed by the one-shot just to avoid the ‘key de-bouncing’ like effect at the output of the circuit.
The touch panel shown in the figure is built within a general purpose PCB along with the circuit itself. Whenever we touch the panel, a capacitance is generated between the panel and our finger and this reduces the potential at the inverting-input. Hence the non-inverting input has a potential greater than the inverting pin, and the output goes high.
We cannot directly use this output for triggering any external device, since the output has lot of ripples and pulses. In order to convert it to a useful output, we apply this to a mono-shot which will hold the output to a reasonable period of time once it goes high. The output of this mono-shot can be directly coupled to other devices like buzzer, relay etc.
The sensitivity of the touch switch can be adjusted by varying the potentiometer connected to the inverting input of the mono-shot. An LED indicates the status of the output.
The entire circuit can be assembled in a small strip of general purpose PCB and can be used with other circuits. The image of a capacitive touch switch built on general purpose PCB is shown below.
Capacitive touch switch image


Capacitive touch switch Contd...

As you can see in the figure, I’ve built the circuit into a module, so that I can use it with any other circuit to enhance a capacitive touch. The module has three pins; VCC, GND and OUTPUT, like shown in the following image.
Image-37.jpgCapacitive touch switch module pin-outs
The black colored portion (see figure 33) is the portion where we can touch. Underneath the black colored area of the GP board, I’ve shorted (filled with lead) all the leaded points together like shown in Figure: 32, so as to make a thick mesh like thing which when combined with the above mica coating can develop a capacitance with our finger. The existence of such a capacitance is then detected by the comparator circuit.
Capacitive touch panel
Watch the working video of the above circuit.
Component specifications:
R1=R2=R3=R5=1KE, 1/4W resistor
R4=18KE, 1/4W resistor
R6=10KE potentiometer
C1=C2=100uf, 16V electrolytic capacitor
D1=LED (red), 3mm
D=1N4007 diode
RLY=6V SPDT relay
Component significance:
C2: The value of C2 together with R3 determines the time period of the mono-shot. Increasing the value of the C2 increases the time period.
R3: As the value of R3 increases, the time period of the mono-shot increases.
R4: The position of the variable of the pot has an effect on the time period of the mono-shot. When the variable approaches the ground end, the time period decreases, and as the variable approaches the positive end the time period increases.

Concept of positive feedback

Concept of positive feedback
Positive feedback is a method in which a part of the output voltage is added with the current input voltage and hence increase the overall gain.
Positive feedback
As you can see from the symbolic representation of positive feedback from Figure: 36, the input voltage is added with a fraction of the output voltage produced by the device with gain A. The device with a gain B introduces the fraction of output voltage into the input terminal.
Positive feedback can be used when there is a requirement of extremely high gain. There are amplifiers which uses positive feedback to increase the gain. In an op-amp, the non-inverting pin provides for a positive feedback configuration as shown in the Figure: 37. As we already know, an op-amp IC is having extremely high gain (ideally infinite). So there is no point in using a positive feedback in op-amp ICs for improving amplification.
Op-amp positive feedback
The positive feedback has certain disadvantages also. It can easily make an amplifier unstable and trigger oscillations in the output voltage. Thus the positive feedback is most suitable for designing oscillators.