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.

LM386 - Twin T oscillator not working

Status
Not open for further replies.

atferrari

Well-Known Member
Most Helpful Member
I am trying to implement the equivalent circuit of the power oscillator shown in the datasheet of the LM386, using Twin T cells as shown in the attached schematic.

The pot was used to ensure I could change gain at will.

I even swapped inputs to pins 2 & 3...

No joy.

What is wrong with it?
 
You have a 10uF capacitor between pin 1 and pin 8 on the LM386 power amp to increase its gain from 20 to 200 then you add negative feedback with the pot to decrease the gain. That does not make sense.

You have the twin-T as positive feedback but it is supposed to be negative feedback.
Pin 3 is supposed to be at 0VDC but you have it DC-coupled to the output of the LM386 so its output DC voltage is saturated as high as it can go. A saturated output does not produce a signal.

The twin-T oscillator uses a transistor or an opamp, not a power amp. Make a twin-T oscillator with a transistor or an opamp then use the LM386 power amp to drive a speaker.
 
Hi,


Yeah, where did you get this design?

There is a twin T notch filter in the positive feedback path. A notch filter creates a deep cut in gain at the center frequency (around 2900Hz for those resistors and capacitors) so the gain is very very low at Fc. Putting that in the positive feedback path is contrary to what you want because at the center frequency you get next to no positive feedback at all when an oscillator needs positive feedback. The phase shift is zero, but that doesnt help when the gain is incredibly low (no where near 1).

At the very least you have to connect the notch filter in the negative feedback path. You might also have to play with the gain.

So where did you find this design exactly as drawn?
 
Made changes

MrAL, this is my attempt to obtain something similar to what is shown in the datasheet.

Current circuit attached. I get no signal at the output and just a steady +0,5 V before the DC-blocking cap.

How to control de gain? Messing with the circuit in between pins 1 and 8?


BTW Audioguru, I built a Twin T oscillator with a CA3140 and worked well.

If they show a Wien bridge power oscillator, why not a Twin T instead? I still think it should be possible.

Thanks to you both for replying.
 
In your new circuit:
1) A twin-T oscillator is supposed to have positive feedback. Yours has none.

2) Pin 2 is supposed to be at 0VDC but you have it DC-coupled to the output of the LM386 so its output DC voltage is saturated as low as it can go. A saturated output does not produce a signal.
 
Hello again,


Yes, the feedback must be decoupled from the output DC or it will feed the input with DC because of the two forward 6800 ohm resistors.

The positive feedback will also help increase the gain, but it most likely will have to be stabilized by limiting the peaks as with other oscillators or else we'll end up with a square wave output or worse instead of a cleanish sine wave. This could be accomplished with a couple diodes and some divider resistors...the output feeds the diodes through a current limiting resistor for example, and the output across the diodes is divided down further with two resistors forming a voltage divider. Of course zeners are also a possibility, but we need a low feedback voltage so maybe diodes would be better here.
There's also a chance that the twin tee impedance will have to be scaled down in order to drive the input properly and this would be accomplished by dividing all the resistors by a factor A and multiplying all the cap values by that same factor A. So say start with A=10, then the resistors that are 6800 ohms become 680 ohms and the caps that are 8nf become 80nf. It might work without doing this but something to keep in mind just in case.
 
Last edited:
Next tests

(Every time Audioguru modifies a circuit I wonder how he does it. Corel Draw?) THANKS FOR THAT!

My comments to you both:

Did as suggested by AG (I use a pot to vary the resistor divider values) and I am getting, as best, kind of an awful square signal rather unstable and far from the expected (app.) 3KHz

Not being a profesional (you know that :eek:) I do not know if it is good to keep comparing this with the twin T oscillator I built with a CA3140. After reading the post by MrAL it seems it is.

This Sunday I have a vessel with special cargo to load. When back in the afternoon I will test as suggested.

Gracias.
 
I use Microsoft Paint program to make, copy, paste and modify schematics.

Any simple sinewave oscillator creates an awful squarewave when it does not have something to limit its output amplitude. The amplitude keeps increasing until the output clips the signal into a squarewave.
You can manually adjust the positive feedback so that the clipping is not too bad but then the oscillator slowly builds up its output level when it is turned on, and might stop oscillating if a resistor value changes a little.
A long time ago a simple incandescent light bulb was used because its filament inreased its resistance as the signal level through it increased and it was part of an attenuator for gain control.
Newer oscillators rectify the output and use the resulting DC to turn on a Jfet used as an attenuator for gain control.

As MrAL said, diodes can be used to chop off the tops of the sinewaves to control the maximum lvel so that the amplifier does not clip but then the diodes create distortion.
 
Last edited:
Moving ahead but not much...

Hola AG and MrAl

With the new circuit (attached) I did all tests I could imagine including the change of values (bigger caps & smaller resistors).

The diodes, initially 6,2V zeners were replaced later by 1N4148. I tested both pairs together and separately.

I do not see changes at the output: esentially a square-like almost periodic signal, rather unstable. From what I could say far from the expected 3KHz (appr.)

BTW, the LM386 is running somewhat hot (with all filters in place).

Measured prior the DC-blocking cap: +0,6V to +7,6V

Measured after the DC-blocking cap: +/- 3,5V.

Power supply is +9V. The amplifier is clipping, isn't it?

Tested the same for few seconds with 12V and the clipping happens at a higer value.

I am struggling with an amplifier wich already has a fixed gain of 20 (that I cannot control). Isn't that the reason of being unable to obtain the desired output?.

Thanks for your help, and your time!!.
 
Hola,


Here's a quick diagram of what i was talking about using the limiting diodes. The distortion introduced by the diodes in this scheme shouldnt be too bad really because once the right steady state point is reached the diodes dont do too much.
Also note that one of the diodes is reversed from your previous drawing.
The resistor values shown are typical. The higher value pot you had drawn may work too.
 
Last edited:
Also note that one of the diodes is reversed from your previous drawing.
The resistor values shown are typical. The higher value pot you had drawn may work too.

Yes, I used them in antiparallel, but have drawn them wrong. Back to the bench now.
 
Hi,

Oh ok good. You should be able to adjust the output amplitude with the pot. You'll have to adjust it low enough to get it stable which means the output might not be too high if you want a clean sine out (say 1v peak or around there). See what you can get though.
 
Last edited:
The LM386 power amp IC will run hot when it oscillates at a high frequency maybe because it is built on a breadboard (too much stray capacitance between rows of contacts) or maybe because a supply bypass capacitor (10uF to 100uF) is not connected close to the IC power supply pins.

The clipping diodes must be back-to-back and not simply in parallel. Then they clip symmetrically.
Use two diodes in series on each side so the output level is double the small level of only one pair of diodes and make it like this:
 
The LM386 power amp IC will run hot when it oscillates at a high frequency maybe because it is built on a breadboard (too much stray capacitance between rows of contacts) or maybe because a supply bypass capacitor (10uF to 100uF) is not connected close to the IC power supply pins.

The clipping diodes must be back-to-back and not simply in parallel. Then they clip symmetrically.
Use two diodes in series on each side so the output level is double the small level of only one pair of diodes and make it like this:

Hello audioguru,

Why did you put the diodes in series with pin 3? That seems to say:
"Dont provide any increase in gain until the output reaches up high enough, and then provide lots of positive feedback for lots more gain".
So it seems that the output will go high and then provide more feedback. Isnt that contrary to what we want to happen? As the output gets higher we want less and less gain so as to limit the output amplitude. In a more traditional oscillator with bulb in the positive feedback path the bulb will increase in resistance as the output rises and that causes less voltage across the grounded resistor and thus less feedback (that would be as your drawing except with the bulb in place of the diodes you drew). The diodes have the opposite characteristic of the bulb, in that as the voltage across the diodes increases they provide more current, while the bulb provides less current. This implies that to use diodes we have to use them as the lower device in the divider not the upper device in the divider, which makes them connect to ground where they should be able to provide a decent limiting action.

The drawing i provided previously shows the diodes going to ground so that as the output gets higher the feedback gets limited because the INPUT gets clipped (not the output either).
 
Last edited:
MrAl,
You are correct.
I was wrongly thinking about negative feedback instead of positive feedback.
 
Something should be wrong in my PCB. I can't manage to get any reasonable output. And the high frequency oscilation is a bad sign.

I will rework it and start afresh.

It will take some time to be back here with my news.

Gracias again to you both.
 
I don't have an LM386 model, so I took a couple of LTspice's universal op amps and set up an amp with an open loop gain of 26dB, and two poles at 500kHz. I added 50k to GND from each input, then simulated MrAl's latest circuit. I tuned the pot for minimum amplitude sustained oscillation. The pot wiper wound up at 7% rotation (from gnd), so I changed it to 10k, and added 62k in series. This got the pot wiper to 50%. Oscillation frequency was 2.83kHz, very close to the theoretical value of 2.85kHz. Third harmonic distortion was -50dB at that setting, and output amplitude was about 70mV p-p. Crank the pot up to 100%, and the amplitude goes to 1.5V p-p, and 3rd harmonic distortion is about -32dB.
One difference was the lack of DC offset, due to the model I used, so I used DC feedback for simplicity.
Right-click on the op amps in the sim to see their parameters.
 
Last edited:
hi Ron,
This zip is the contents of my LTS LM386 folder.;)

Eric
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top