Your EasyEDA usage duration is brief. In order to avoid advertising information, this action is not supported at present. Please extend your EasyEDA usage duration and try again.
Editor Version×
recommended
Profession
Brand new interactions and interfaces
Smooth support for design sizes of over 3W
devices or 10W pads
More rigorous design constraints, more
standardized processes
For enterprises, more professional users
Standard
Easy to use and quick to get started
The process supports design scales of 300
devices or 1000 pads
Supports simple circuit simulation
For students, teachers, creators
Ongoing
STD
Simple LM324 squarewave and sawtooth generator.
Simple LM324 squarewave and sawtooth generator.
Project tags
License
Public Domain
License: Public Domain
Mode:
Mode
Editors' pick
Editors' pick
10.8k
0
0
1
Update time:
2020-03-21 16:23:49
Creation time:
2016-05-09 12:45:20
Description
Description
A simple LM324 squarewave and sawtooth generator with triangle to adjustable duty cycle pulse output.
Triangle output is roughly linear by being set to a small section of an exponetial charge and discharge.
**How it works:**
The actual oscillator is made up of the components around U2. See "Figure 27. Squarewave Oscillator" in: http://www.ti.com/lit/ds/symlink/lm124-n.pdf
U1 just generates an approximately mid swing voltage that is needed to make the relaxation oscillator built around U2 work with a single supply. You could dispense with U1 and split R3 into a pair slung across the ground and supply with their common node connected to the non-inverting inptu of U2. I just use U1 instead because there are 4 LM324 in a box and I needed the same voltage it generates at the input of U3 anyway
U2 is a standard non-inverting comparator with hysteresis (defined by the high and low output swing and the resistor potential divider set by R3 and R4 and the output voltage of U1).
The output of U2 switches fully to the low and high extremes and as well as providing the positive feedback it is also used to feed the switched output back into C1 via RFREQ+R5.
This sets up an exponential charge and discharge of C1 but because the target voltages are quite a bit larger than the comparator hysteresis trip points the charge looks almost linear because it only traverse a small part of the exponential curve in both rising and falling slopes.
U3 buffers and amplifies the relatively small swing at the junction of C1 and RFREQ up to the maximum that the LM324 can achieve before it's output hits the ground and supply side output limits of it's swing (which is close to ground but only to about 1.5V below the +ve supply: see the LM324 datasheet).
U1 supplies an output at slightly below 6V because it is set to the middle of the output swing of U2. This is because the symmetry of the squarewave is set by the symmetry of the LM324 outputs. If it swung to 0V and 12V then U1 would need to generate 6V. However, as just explained, the LM324 output swing down very close to ground but up to only about 1.5V below VCC (i.e. VCC-1.5 as in the datasheet).
Therefore, U1 has to generate about 10.5V/2 i.e. 5.25V in order to set the reference for the hysteresis levels of the comparator formed by U2 at approximately mid-swing to ensure that the charge and discharge of C1 is symmetrical.
The buffer U3 also has it's reference set by the output of U1 so that the output swings just within the limits of the LM324. Again R6 could be split and slung across the supplies to supply the reference but U1 is available for that so what the heck.
U4 is just to play with really. It's there in the box with the other 3 so it's used to generate an output with an adjustable pulse width.
It might be worth noting that if the pot is set to 50% or the inverting input of U4 is just tied to MIDBUF then the output of U4 will be pretty much exactly in quadrature with SQUARE.
Of course, if desired, the inputs of U4 can be swapped over to reverse the polarity of the PWM output.
One more thing to note: the LM324 is a useful device in this application because it behaves nicely even if the differential input voltage is equal to the output swing (i.e. one input at ground, the other at VCC-1.5V).
It also plays nicely if the input common mode voltage is at either of these extremes.
Note that not all opamps play that nicely under those conditions and not all comparators maintain a high impedance input with large differential input voltages (have a careful read of the "Application Hints" in:
http://www.ti.com/lit/ds/snosbw6a/snosbw6a.pdf
and "Figure 6. Input Characteristics" in:
http://www.ti.com/lit/ds/symlink/lm319-n.pdf)
Why not play with the simulations and see what happens?
Try replacing the name of the opamp with TL081EE which is a realistic in-house model of the TL081 opamp. As hinted at above, the TL081 is a nice device spoilt by some very bad habits...
:)
* This project also demonstrates the basic relaxation oscillator.
This generates a pulse and a sawtooth output.
For a detailed analysis, see:
https://en.wikipedia.org/wiki/Relaxation_oscillator
For similar circuits using single Schmitt Trigger input logic gates, see:
https://easyeda.com/andyfierman/How_to_use_EasyEDA_Schmitt_Trigger_input_logic_gates_as_an_oscillator-lSQqYPXR9
Forked project will be set private in personal workspace. Do you continue?
Clone
Project
The Pro editor is about to be opened to save as. Do you want to continue?
private message
Send message to andyfierman
Delete
Comment
Are you sure to delete the comment?
Report
Simple LM324 squarewave and sawtooth generator.
No Profile
Announcer: andyfierman
Creation time: 2016-05-09 12:45:20
Published time:
2020-03-21 16:23:49
*
Report type:
Please select report type
*
Report reason:
Please fill in the reason for your report and the content is 2-1000
words
*
Upload image:
+
Upload image
*
Email address:
Please fill in your email address
Report
*
Report type:
Please select report type
*
Report reason:
Please fill in the reason for your report and the content is 2-1000
words
*
Upload image:
+
Upload image
*
Email address:
Please fill in your email address
Report
Submitted successfully! The review result can be viewed in the personal
center, review notification.
Kind tips
Your EasyEDA usage duration is brief. In order to avoid advertising information, this action is
not supported at present. Please extend your EasyEDA usage duration and try again.
Share
Project
Copy
Copy
Scan the QR code and open it on the mobile terminal