Needing help determining why this circuit did not work

Thread Starter

gte

Joined Sep 18, 2009
357
I am trying to build an analog voltage-controlled pulse width modulator.

I'm trying to get the first half working with the saw blade portion that is outlined by a red square but I cannot get that working. IC1 is also not outputting a square wave signal, so I believe my problem lies there. I have double checked my connections on my breadboard and they match up to the circuit.

Does anyone have any idea why this circuit does not work? My scope just sees a flatline VCC voltage value.

I'm modifying a circuit I found here:
http://pcbheaven.com/circuitpages/Triangle_Wave_Generator/
http://www.pcbheaven.com/circuitpages/Voltage_Controlled_PWM_Generator/

Thanks.

 
Last edited:

#12

Joined Nov 30, 2010
18,224
Wrong chip. The 741 is not designed to work with 5 volts.

I also have some doubts about whether the 2N2222 will turn your wave back into a square shape and wreck the results. I think the sawtooth input and the DC level should work well enough without a buffer.
 

wayneh

Joined Sep 9, 2010
17,496
(responding to Kubeek's post) Yeah, I just built an op-amp square wave generator and it didn't look like that circuit.
 

Thread Starter

gte

Joined Sep 18, 2009
357
I don't know, that was what was confusing me. This is an excerpt from the first link I posted

The two op-amps currently used are the known 741 chips. Different OP-Amps can be used as well, and also dual chips for simplicity. The right OP-Amp will operate as an integrator and the left as a comparator. When power is given to the circuit, the comparator drives it's output HIGH. This signal is driven to the integrator through the resistor R. The capacitor C then starts to charge gradually with RC time constant. While the capacitor is charging, the output of the integrator is also taken to it's low state with the same rate. When the positive input of the comparator, through the voltage divider that the 47K and 100K resistors perform, is driven low enough, then it changes state, and the integrator starts operating vice-versa.
 

MrChips

Joined Oct 2, 2009
30,701
The 741 op-amp is over 40 years old and is past its best use date.
It is featured extensively for teaching in textbooks, classrooms and lab instruction, and there it should remain.
Move on to more modern opamps.
 

Thread Starter

gte

Joined Sep 18, 2009
357
Is the rest of the circuit solid or should I search for another circuit that does use the 324? I think I have a few 324's in my parts bin.


The 741 op-amp is over 40 years old and is past its best use date.
It is featured extensively for teaching in textbooks, classrooms and lab instruction, and there it should remain.
Move on to more modern opamps.
 

crutschow

Joined Mar 14, 2008
34,280
It's not necessarily the 741 that's the problem, it's the error in the bias circuit. The op amps' bottom inputs are biased to the supply voltage through the 10k ohm resistor which saturates the op amps. You need an additional 10k ohm resistor to ground at that point to bias the amps at 1/2 the supply voltage (creating a virtual ground).

Also the comment about the transistor not amplifying the triangle-wave correctly (if that's the purpose of the transistor) are valid. It needs a resistor in the emitter to ground to stabilize the bias point and define the circuit gain. But I don't see a real need for that transistor circuit. Just drive the comparator directly from the triangle-wave at the op amp output.

Note that a 741 output, as a comparator, goes between about 2V less than the supply voltage to about 2V above ground. If you want the PWM output to go between the supply and ground, use a dedicated comparator chip such as the LM339.
 

wayneh

Joined Sep 9, 2010
17,496
For what it's worth, here is the square wave generator I'm using with an LM358 op-amp (old, but not as ancient as the 741). It's not as simple as some circuits you can find but it does a better job of making a near-50% duty cycle, which matters for my application.

Untitled.png
ƒ = 1/(2*LN(2)*R*C) ƒ in Hz, R in Ω and C in Farads
 

Thread Starter

gte

Joined Sep 18, 2009
357
Since I already had this circuit on the breadboard, I tried adding the 10k as you suggested (even if the lm741 is not ideal for me) but I'm still getting an analog voltage signal, no square wave and no triangle wave ... it is now just half of Vcc like you said. Why isn't it generating any square or triangle wave signals?


It's not necessarily the 741 that's the problem, it's the error in the bias circuit. The op amps' bottom inputs are biased to the supply voltage through the 10k ohm resistor which saturates the op amps. You need an additional 10k ohm resistor to ground at that point to bias the amps at 1/2 the supply voltage (creating a virtual ground).

Also the comment about the transistor not amplifying the triangle-wave correctly (if that's the purpose of the transistor) are valid. It needs a resistor in the emitter to ground to stabilize the bias point and define the circuit gain. But I don't see a real need for that transistor circuit. Just drive the comparator directly from the triangle-wave at the op amp output.

Note that a 741 output, as a comparator, goes between about 2V less than the supply voltage to about 2V above ground. If you want the PWM output to go between the supply and ground, use a dedicated comparator chip such as the LM339.
 

Thread Starter

gte

Joined Sep 18, 2009
357
I just build this with the lm339 and got no square wave from output 1 and no triangle wave from output 2.

Here are the IC's I have

LM339
LM741
LM386
LM324

If someone could point me to a circuit that is known to work, I would really appreciate it. I created a 555 timer circuit yesterday that gave the correct frequency, but I believe to manipulate the duty cycle I need a triangle wave?

Thanks


 

MrChips

Joined Oct 2, 2009
30,701
Wouldn't work with LM339 since that is a comparator. Try LM324 quad opamp.

Here is a circuit straight out of the LM324 datasheet:

 
Top