Fork me on GitHub

Project Notes

NonInverting324 - LM324 OpAmp Non-inverting DC Gain

Use an Arduino to monitor an LM324 OpAmp in non-inverting DC gain mode and plot the results with Processing.

Notes

This circuit demonstrates the non-inverting DC gain mode of an LM324 Operational Amplifier.

A 555 astable circuit is used to generate an input signal with a low frequency of about 2Hz, obtained with the selection of R1=1kΩ, R2=330kΩ and C1=1uF.

The signal is scaled down with a 10kΩ/220Ω voltage divider to mimic a small signal input.

The signal is presented to the non-inverting input of LM 324. The gain of the LM 324 is set by the ratio of the inverting input pulldown resistor and feedback resistor:

G = 1 + Ra1/Ra2

Although the LM324 is capable of gains in the order of 100, by setting Ra1=Ra2=10kΩ, we have a circuit with a gain of 2.

The gain is demonstrated in the following trace. The lower trace is the square wave input generated by 555 timer, the upper trace is the amplified signal output from the OpAmp:

processing trace

Construction

The Arduino only acts as a measurement device in this circuit.

PlotNValues (a simple Processing sketch) reads the data from the serial port and plots the input and output value over time, with some coloration effects thrown in for good measure. In other words, we’re using Arduino and Processing as a basic oscilloscope! And it kind of works, mainly because the frequency is so low.

The Breadboard

The Schematic

The Build

NB: for simplicity, the circuit is powered from the Arduino 5V pin. That works fine, although it is equally possible to use a separate power supply (but ensuring there is a common ground connection).

Credits and References

About LEAP#36 OpAmp
Project Source on GitHub Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is my personal collection of electronics projects, usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting (IMHO!).

The projects are usually inspired by things found wild on the net, or ideas from the sources such as:

Feel free to borrow liberally, and if you spot any issues do let me know. See the individual projects for credits where due. There are even now a few projects contributed by others - send your own over in a pull request if you would also like to add to this collection.