ad space

Build LM324 inverting amplifier and test with Matlab/Simulink Oscilloscope

Here a LM324 inverting amplifier is build on a breadboard and tested with Matlab/Simulink based PC oscilloscope in real time. This is useful for electronics hobbyist to test electronics circuits. With this there is no need for high end oscilloscope. One can immediately connect the circuit to PC and start testing circuit with actual signals in real time and perform various mathematical operation and testing with the help of simulink rich sets of blocks.

LM324 is a quad op-amp which has four individual op-amp build into its integrated circuit. The LM324 and LM358 are same op-amp only the power dissipation of LM324 is bit higher. Both the op-amp works with single supply or dual supply. Here +5V single supply voltage is used. We can use LM324 to create various electronics circuit such as function generators, signal amplifiers, instrumentation amplifiers, voltage controlled oscillators, FSK(Frequency Shift Keying modulator and de-modulators and many more. Here an inverting amplifier is build and tested with Simulink PC oscilloscope.

See video demonstration.

 

The schematic diagram of LM324 inverting amplifier with single voltage supply of +5V and gain of 10 is shown below.

schematic diagram of LM324 inverting amplifier


 How this inverting amplifier circuit works and how to calculate the resistors and coupling capacitors and bypass capacitor was explained in the tutorial How to design a Practical LM358 Op-Amp Inverting Amplifier.

The LM324 inverting amplifier constructed on a breadboard according to above schematic diagram is shown below.

 

Then in order to use the simulink PC oscilloscope we will connect the audio jack(male to male) from the speaker to the input of the inverting amplifier and the output from the amplifier goes into the microphone/line in input of the PC using another male to male audio cable.

 

Next we will use the Simulink PC waveform generator and oscilloscope program to send various types of signal into the amplifier and use the oscilloscope to display and analyze the input/output signal from the amplifier.

The following shows the function generator program created in simulink.

simulink function generator PC soundcard

With this simulink function generator we can create five different types of signal- sine wave, triangle wave, sawtooth wave, square wave and PWM wave. We can vary the amplitude and frequency of the waves and also set the duty cycle in case of PWM(Pulse Width Modulation) wave.

Next we run the simulation which then generates chosen wave signal with frequency and amplitude set, that goes out from the PC speaker to the input of the amplifier. The output signal(and input signal) of the amplifier is collected by the PC mic/line in and gets displayed in the time scope and spectrum analyzer. With time scope we can analyze the signal in time domain and use the spectrum analyzer to get frequency spectrum of signals.

 

LM324 amplifier testing with Simulink Oscilloscope

Testing with various waveform are shown below. 





 

Thus one can build an LM324 amplifier on a breadboard and test it in real time with Matlab/Simulink oscilloscope. The following are tutorials where BJT amplifier using NPN transistor is build and tested with other sound card based PC oscilloscope and PC function generator. Also links are provided which demonstrates how one can build waveform graphs for viewing signal in real time.

- Real Time Simulation of BJT amplifier using Proteus & PC Soundcard

- Arduino Simulink as Oscilloscope to Capture Square Wave  

- Construction of Collector-Emitter Feedback Bias BJT Amplifier Test with PC Oscilloscope

How to Build BJT amplifier and test with Soundcard based PC Oscilloscope using VDB

- Testing of self biased BJT amplifier on breadboard with PC oscilloscop

Post a Comment

Previous Post Next Post