Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

op-amp square wave generator

Status
Not open for further replies.

ElectroChas

New Member
Hi all,

Here goes my first post here ...
First off, thank you for having me as a member to this forum.

I am looking for some assistance regarding a simple op-amp circuit.

I included 2 urls showing the same exact cirucit, but neither of them specify the values for the voltage divider resistors, or the timing resistor or capacitor.

I will mention that neither url I posted is in any way an advertisement and both sites are reputable and have been online for years.

**broken link removed**

Square Wave Generator

Basically I have 2 questions about this circuit that have been daunting me for the better part of a week.

Both sites show the image of the square wave supposedly generated by this circuit, yet nothing I have tried regarding resistance and capacitance values comes close with regards to duty cycle and the negative component of the wave.

1 Assuming the waveform image is in fact reasonably accurate, what values will give me the pulse that has a negative DC component and reasonably symetrical highs and lows?

I do not seek, nor expect a perfect 50% duty cycle, but the images shown do appear to represent something to that effect.

My own personal experience with op-amps has generally involved the circuit having 0 or 1 feedbacks and at least 1 rail from the power source directly or indirectly connecting to the inverting or non-inverting input of the op-amp. But as you can see, this circuit has dual feedback and only connects to the power source through the Vs+ and Vs- pins of the op-amp chip.

2 What is the starting point for the circuit? In other words, what initially begins the output for the circuit so the feedback paths begin to work?

Additional notes ..
When I build this circuit and use a oscilloscope on the output, what I get is very low positive duty cycle square wave.

If I use values on the non-inverting input side that cause a higher capacitor charge time (low frequency pulse), I do get a waveform that shows the sawtooth positive component and sawtooth negative component with the oscilloscope's AC mode on the scope and in the DC mode the wave is basically square with no negative component. If I go with a lower charge time (higher frequency), I get square waves that do not have a negative components in either mode and always seem to have a very low positive duty cycle.

I can gladly post scope images upon request if it can help answer these questions.

Thank you for reading,
Charles
 
Hi all,
2 What is the starting point for the circuit? In other words, what initially begins the output for the circuit so the feedback paths begin to work?
Charles

I Just have time to answer this question! As a cristal oscillator, thermal noise is starting the process. On power-on, thermal noise is amplified to reach op-amp saturation and then the square-wave is brougth! It's like magic ;)
 
Are you are using positive and negative supplies for the op amp? Or just positive and ground (single supply)? What are your supply voltages, and is your opamp rail-to-rail output?
 
Hiya speakerguy,

I think your question might be the answer :)

I've been using a unipolar supply ( +12v to Vs+ and 0v ground to Vs- ). I guess this could explain why I haven't been seeing the negative component of the DC wave. Are all op-amps able to receive a -12v to the Vee pin? If not how can I find out before trying it?

If I provide the op-amp with a bipolar supply, +12v and -12v, is it ok to still use a regular polarized electrolytic capacitor?

As far as the op-amp being "rail to rail" I am not sure. The chip is an LM324AN Quad made by Texas Instruments. I looked at the data sheet, but I am afraid I am not sure exactly what you mean by "rail to rail".

If I connect it open loop, (ground the inverting input and apply Vcc of 12v to the non-inverting input), I get about 10.13v out.

Thanks for the response,
Charles
 
The circuit should work perfectly with a single positive supply voltage but then the square-wave output will not go negative.

The lousy old LM324 quad opamp is too slow for an oscillator unless the frequency is low. Its "vertical" transitions will be ramps.

The positive wire of a polarized capacitor connects to the input of the opamp.

Please post the schematic you tried showing the important resistor values that might be too low for the opamp to drive.
 
AG,

If he's using single supply doesn't he need to connect the R1/R2 divider to 1/2Vcc instead of ground?

ElectroChas,

Using +/-12V should fix your problem, but you couldn't use an electrolytic cap.
 
Last edited:
AG,

If he's using single supply doesn't he need to connect the R1/R2 divider to 1/2Vcc instead of ground?
Of course. I should have looked at the datasheet of an LM324.
 

Attachments

  • opamp square-wave generator.PNG
    opamp square-wave generator.PNG
    11.7 KB · Views: 3,967
Thanks guys, I think I am much closer, if not at the point of sufficient understanding of all of this. What I need now are more op-amps to experiment with.

Im curious though, what is it about the LM324 that led you both to the conclusion that when using a single supply that the R1/R2 divider needs to be connected to 1/2Vcc instead of ground?

Am I correct in assuming that another op-amp would function with the original circuit layout with the R1/R2 divider connected to ground?

Thanks again, you guys have been most helpful.
 
No, the circuit would be the same. Any op-amp would need the extra resistor. Study the circuit some more and you'll see why.
 
Last edited:
You want to reference the + input to the "center" of your power supply so that the op-amp can swing equally in both the + and - direction, hopefully to the "rails", the full + and - voltage of the supply. Some op-amps can do this or nearly so.

To reference the op-amp to the center using a single positive supply you make a voltage divider, two equal resistors going from + to 0, and connect the midpoint to the + input on the op-amp.

When using a dual supply the center or mid point is 0 so you use that as the + input reference.
Hope i got that right :)
 
I got some really helpful responses here and it has helped me to better understand this. Thank you all very much.

I have another question if I may be so bold. :)

Referring to the schematic that AudioGuru posted, I notice that his image shows the square wave high at + and low at 0. It has no negative component.

Is there no negative component because the scope which showed this wave was set to DC or it is expected that with a single supply voltage that the output should be from 0v to +v?

The reason I ask is that when I built this circuit using the ½ supply voltage to the non-inverting input from my single supply, my scope shows the wave with a negative component, in AC mode and of course in DC mode, there is no negative component.

Here is a what I get building the circuit with all 100kΩ resistors and a 10nF ceramic capacitor.

**broken link removed**

Thanks in advance,
Charles
 
Why do you have two threads about the same circuit?
It is confusing for everybody.
I answered your other thread.
 
Sorry, the post in this thread was submitted a couple days ago ..

I suspected that the moderator did not accept it for whatever reason. I guess I was wrong. Anyhow, it was not intentional. Just disregard this one. I got my answer.

Thanks again.
 
Status
Not open for further replies.

Latest threads

Back
Top