op-amp hardware setup

How to Build a Voltage Amplifier Circuit with a Op-Amp

Today, I have decided to share my experience on how to design a voltage amplifier circuit for a given specification. I am no expert in analogue electronic’s circuit design, however, I know a little which I would love to share with you folks. In this post, we will be dealing with the amplification of DC signals.

1. When would we need a voltage amplifier

It’s obvious that we need a voltage amplifier circuit when we want to amplify a small voltage signal to a large one.

Example: You have a sensor which gives output in millivolts (mV). Now, you want to digitize this sensor output that is analogue in nature. So, you think about using that old dusty 12 bit ADC lying around somewhere in your space. Now, the problem with this ADC is that it can only take input in Volts (V) while the sensor’s output is in mV. So what do we do now?. It’s simple, we use a voltage amplifier circuit to amplify the sensor’s output from mV to V and then feed this signal as input to the ADC. Hence, the problem is solved using just a simple op-Amp.

2. Design Specification

The design specification mainly deals with understanding what is the input and the desired output from voltage amplifier. And this depends on the application as what you are trying to achieve from it.

Let’s consider a scenario where for some reason, we would like to amplify the output voltage from a Microcontroller – ESP8266(NodeMCU) i.e. 3.3 Volts to 9 Volts using a 9V battery as the additional source. So theoretically, we need to design an amplifier circuit that takes input as 3.3V and gives an output of 9V. However, it is always better to consider the input voltage slightly lesser than the actual input, for e.g. If Vin = 3.3V, design your circuit for an input voltage of 3V. In this case, we can use a Non-Inverting Op-Amp as we aren’t looking to invert the input signal. The design specification is simple, i.e.

Input Voltage, Vin = 3V

Output Voltage, Vout = 9V

No. of Op-Amps = 1

Type of configuration = Non – Inverting

Model = OP177

Make = Analog Devices

I am using OP177 because that is what I have, but you can use any other op-amp as well. In the next section, let us understand how to design the voltage amplifier circuit for the above specification.

3. Design Calculations

non inverting op-ampThe image on the left shows the Non-Inverting Op-Amp circuit. In the circuit, +V2 is the external source and +V1 is the input voltage. R1 is the constant resister and R2 is the feedback resistor. In our design, let us consider R1 = 3.3K.

The calculations are done using the below equation.

\frac{Vout}{Vin} =Av= 1 + \frac{R2}{R1}             …(1)

\frac{9V}{3V} = 1 + \frac{R2}{3.3K}                       …(2)

Solving Eq(2), we get  R2 = 6.6K.

voltage amplifier designNow, since our design is ready, let’s simulate this design as per the circuit parameters are shown in the image on the left. From the simulation results, we can slightly tweak the R2 value to achieve a better response. So, if the value of R2 is 6.6 K, we can use some standard resistance values close to this and check which provides the best response. In the next section, we will be analyzing the simulation results and have a peek into the hardware.

4. Circuit Simulation and Hardware Setup

To simulate the above, I have used a free online circuit simulator known as PartSim. Go here to know more about this tool and a quick peek on its working.

I simulated the above circuit for the following standard resistance values as shown below.

op-amp simulationFurther trials with resistance values of 11K and 12K  gave just the same output of 8.96V. This was an indication that the op-amp had reached its saturation state. The image on the left shows the simulation results for R2=10K. So, I have decided to stick to this design and go ahead with setting up the hardware. The hardware will be set up same as per the simulated circuit for R2=10K. So, let’s check out if the practical results matched the simulated results.

The image below shows the circuit diagram as per which the hardware has been set up. You voltage amplifier schematiccan see that the ESP8266 GPIO output i.e. D2 is given as input to the OP177. A 9V battery is used as an external source connected to the OP177 and is used to amplify the voltage. The hardware for this circuit has been shown at the beginning of this post.

5. Testing the Hardware and Analysis of the Output

To test the hardware, I just wrote a simple code for ESP8266 in Arduino IDE as shown below.

The above code will toggle the GPIO_4 every 3 seconds. So, when the GPIO is high i.e 3.3V, the voltage at the output pin of the OP177 op-amp should be around 8.5V to 9V. The below video shows the live demonstration of the voltage amplifier circuit. The output from the OP177 is captured using a Digital Multi-Meter.

There are two things you would have observed in the video. First is, the amplified output voltage is not 9V, but it is 8.74V. This is because at some point the op-amp reaches a saturation voltage due to which the maximum output we can get from the op-amp, will be about 80 to 90% of the supply voltage. Also, note that the simulated results were 8.96V while in reality, we could just achieve 8.74V. Hence, simulation is just a means of checking if your design is right and the circuit is close to doing what its supposed to do.

The second thing is that when the input to the amplifier circuit is 0 i.e. output from the ESP8266 is LOW, yet there is some voltage of about 1.70V at the output of the amplifier circuit. This is known as an offset voltage.

We can get rid of the offset voltage using the TRIM pins i.e. PIN 1 and PIN 8 of the OP177. The process of balancing, minimizing or eliminating the offset voltage is known as offset compensation. I will show you how to do this as well, probably in one of my upcoming posts. Till then, keep learning and happy engineering 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *