Why is my sawtooth oscillator not oscillating?

  • Thread starter Thread starter petterg
  • Start date Start date
  • Tags Tags
    Oscillator
AI Thread Summary
The discussion centers on troubleshooting a sawtooth oscillator that is outputting a constant -13V instead of oscillating. The user has tested various op-amps, including the ua741 and lm1875t, but has encountered issues with the lm1875t being unsuitable for this application due to its design as an audio amplifier rather than a general-purpose op-amp. Suggestions include using the ua741 for oscillation and the lm1875t solely for amplification, as well as considering other op-amps like TL072 or LM324 for better performance. The conversation highlights the importance of selecting appropriate components for oscillator circuits and the potential issues with using high-speed op-amps in this context. Overall, the user is advised to experiment with different configurations and components to achieve the desired oscillation.
petterg
Messages
162
Reaction score
7
Hi
Does anyone have an idea of why my oscillator doesn't oscillate? It's supposed to generate sawtooth. But the scope shows constant -13V. Actually the output of the oscillator has a more stable voltage than the input voltage source!

It works IRL with ua741 opamp (but the 741 doesn't provide enough current for my application)
It works in simulation with lm1875t opamp.
While I was trying to debug and placing probes around the circuit all of a sudden it started to work... and after 30seconds or so it stopped just as sudden as it had started.

Then I took the components off the board and made a square wave generator circuit that worked. I checked both opamps and the capacitor with the square wave generator, so the components seems not to be defective.

Then I put them all back to the sawtooth generator circuit, and again it's output is constant -13V.

So I took a new breadboard, all new components, this time I added some potentiometers in order to tweak it a bit. Hopefully that would get it started, but it didn't. The output is barely changing when I turn the potentiometers.

I've tried 3 different capacitors; 2nF, 20nF, 200nF. It doesn't affect the output at all (except for the startup time when voltage drops from 0 to -13).

Something elementary must be wrong. Could it be that the lm1875t is to fast at voltage changes so it adjusts for feedback too fast and becomes stable? (I have never before used any opamp as powerfull and fast as the lm1875t.)
Any ideas where I'm failing?

Attached is a sketch of the latest test circuit with potentiometers.
 

Attachments

  • sawtooth.png
    sawtooth.png
    6.7 KB · Views: 2,736
Engineering news on Phys.org
Where did you get the circuit from? It would be good to see a source circuit -- I can kind of see how this one is supposed to work, but a couple things about setting the hysteresis are not clear to me.
 
So the main difference I see right off the bat is that the 2nd opamp's + input should be grounded (at least in the simplest implementation). Try turning your 160k pot so that it grounds the + input of the 2nd opamp...
 
There are loads of implementations of this circuit out there.
The 160k pot is the one that (in simulation) makes the difference in rise and fall time. When turned to ground the rise and fall times will be equal. Turning it away from ground changes the output towards sawtooth - in simulation.
IRL turning the pots doesn't make any difference at all. That includes turning the 160k all the way to ground - still got the ultimate noiseless DC output.
 
Can you label all the nodes in the schematic with the DC voltages from your simulation?
 
(Sketch in #1 was made in NI Multisim 30day demo, because it's the only simulator I found that has lm1875t in it's library.)

I've now created a similar circuit in Lt Spice. Using LT1366 as opamp it worked. Using LT1210 the simulation behaves just like my RL lm1875t circuit. LT1210 is faster and more powerful than lm1875t. LT1366 is slower and less powerful. This strengthen my idea that the issue I'm facing IRL is that the opamp is to fast/powerful for the circuit. It sounds strange though.

If that actually is the case, how can I modify the circuit to work with fast and powerful opamps?
 
berkeman said:
Can you label all the nodes in the schematic with the DC voltages from your simulation?

In simulation (in Ni Multisim) there is AC everywhere. Do you want me to lable simulation AC averange, or RL DC measurements?
 
petterg said:
In simulation (in Ni Multisim) there is AC everywhere. Do you want me to lable simulation AC averange, or RL DC measurements?

Are you saying that the output is DC, but there are AC waveforms everywhere else? Maybe I'm misunderstanding the orignial problem...
 
  • #10
petterg said:
If that actually is the case, how can I modify the circuit to work with fast and powerful opamps?

You could leave the oscillator working with your low power op amps, and use its output to drive your high power amp (e.g. as a unity gain amplifier).

Trying to take a lot of power direct from an oscillator isn't a particularly good design idea, even if it does work. If your "large" load is not a pure resistance, you might be messing up the phase shifts in the oscillator circuit, which might stop it oscillating.

From your descriptions it seems like your "non-oscillator" has got one of the op amp outputs locked up to a supply rail voltage, which will certainly stop it oscillating - but I've no idea why that is happening.
 
  • Like
Likes 1 person
  • #11
Good point about lowpower oscillator + amplifier! That is probably the way to go.

Currently it looks like I've fried 4pc lm1875t. Voltage from powersource drops to +/-1,5V once connected to any of the 4 op amps I've used for testing. No load is connected, both inputs are grounded. Just Vcc and Vee is connected.
 
  • #12
The LM1875 is specifically an audio power amplifier not an Op-Amp as such, its output is designed to drive a speaker, not the input to another LM1875
why did you choose this device ?

you should be using a more specific Op-Amp


Dave
 
  • #13
I looked through the opamps listed on ebay and chose the first I came to that had enough output current and speed. I had no idea that some opamps can't drive another of the same kind.
 
  • #14
petterg said:
I looked through the opamps listed on ebay and chose the first I came to that had enough output current and speed. I had no idea that some opamps can't drive another of the same kind.

I don't think you understood what I said ... these are not really op-amps as such
They are audio amplifier chips designed to drive speakers

You should really be using something like TL072 or similar for the actual oscillator ... once you have an osc working ... then you could use the LM1875 or some other audio amplifier chip to boost the output

cheers
Dave
 
  • #15
I've now learned that oscillator based on lm1875 is not good.

Is ua741 suitable for driving the oscillator before lm1875 amplifies it?
(Those are the two kinds I have. If they're no good I'll need to order others, i.e TL072)
 
  • #16
741 should drive an audio amp quite nicely.
I much prefer LM324. They're cheap and easy to use and okay for single or dual supply.
And the most widely used opamp ever so they're widely available, even Radio Shack .
Input and output specs are better than 741.
http://www.ti.com/lit/ds/symlink/lm324-n.pdf

.................

I suspect that your trouble lies with LM1725's input.
The datasheet is a bit sketchy as to input impedance
http://www.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=lm1875&fileType=pdf

look at parameter "Input Bias Current"

so long as the amplifier can balance its inputs it draws only a microamp or so of input current
but the datasheet doesn't say what happens when input voltage differential becomes substantial as it does for U1. They don't expect us to use it that way. It's not a general purpose opamp.

Observe that in order to oscillate , your circuit must push or pull enough current through R1 to change state of U1.
and we don't know how much current that is.
Furthermore your unequal supply rails(more + than -) are in the direction to make U1's output stay positive , and your symptom(-13V out) agrees with that. There's less negative to pull current through R1 than there is positive to push it through R2 .
That's probably not an issue if R3 is set fairly high.

Lastly C1 can pass a LOT of current into U2's inverting input.
That can cause latchup in some amplifiers, see

http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=slya014&fileType=pdf

and that can be destructive.
I'd stick a kohm or two between U2 pin2 and junction C1-R5

It'd be very educational to get this working with 1725's.


old jim
 
  • Like
Likes 1 person
  • #17
jim hardy said:
I suspect that your trouble lies with LM1725's input.

Good point - the 1725 is meant to be a used as a linear amplifier not as a general purpose op amp.

It'd be very educational to get this working with 1725's.

If you really want to use the 1725 for a "one chIp" circuit you might try a Wien bridge oscillator, which will use it as a linear amplifier (and it only needs one 1725, not two).

One other comment from the data sheet - it says the 1725s must always be mounted on a heatsink, because the quiescent current can be high (100 ma). Even if they have thermal shutdown protection, they won't work till they cool down again!
 
  • #18
Thanks for the detailed description, Jim.

I needed 6 lm1875's for the project (5 when using ua741 for the oscillator). I bought 10. Having killed 4 of them, I'm not into retrying what killed them. So I played around with LT1210 in LT Spice. The circuit with LT1210 gave a constant output of 4.8V (positive) in simulation. Adding a R7>300 on U2 pin2 and setting R6 (the 160k pot) at most 30% away from ground made the oscillation start. (The other pots were left on 50%.)
I guess something similar would get the real lm1875 circuit going. But from what I've learned I'll let the ua741's do the oscillation and use lm1875 just for amplification.

With this solution I'll run out of ua741's. Do you recommend that I order lm324 or TL074 or both?


The powersupply I'm using is supposed to be 2x 15V, according to HP. The voltage in the sketch is what I actually measure from it. My original plan was to use a +/-12V from a pc powersupply, but it turns out that -12V drops to -7V already when 32mA is pulled from the terminal. I might need to make a supply circuit too.
 
  • #19
Yes PC's haven't much oomph on their -12 line.
You can probably find a supply at thrift store. I just picked up a HP printer wall-wart transformer that has secondary 20VAC centertapped at almost an amp.

I've never used TLO74 but its datasheet looks very good. Both opamps are specified with 2kohm load
the 074's fet input stage should give you a better sawtooth at very low frequencies
and I think they're pin compatible (at least in 14 pin dip package) so you could compare them easily. Its ~3 to 6 millivolts offset voltage won't matter much in your circuit, probably 741 is at least that bad.

lm324's are so cheap i'd say get a handful for experimenting. Someplace I have a tube of fifty which should last me the rest of my life.
lm324: http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_23683_-1
22 cents apiece in quantity; but TL074 is only 39 cents

I'd like to experiment with some 1725 power amps. I have been using LM12's (more current) for a three phase 60 hz power driver but they've got terribly expensive. It's worth making a new board.
The LM12 is what you thought the 1725 to be - a general purpose opamp with 8 amp output capability, good for about 80 watts of audio. OPA541 is a possible replacement but even it's $25.

keep us posted - this is a most interesting project.

old jjim
 
Last edited:
  • #20
AlephZero said:
Good point - the 1725 is meant to be a used as a linear amplifier not as a general purpose op amp.



If you really want to use the 1725 for a "one chIp" circuit you might try a Wien bridge oscillator, which will use it as a linear amplifier (and it only needs one 1725, not two).

One other comment from the data sheet - it says the 1725s must always be mounted on a heatsink, because the quiescent current can be high (100 ma). Even if they have thermal shutdown protection, they won't work till they cool down again!

you really mean LM1875 ... not sure how the 1725 crept into this discussion
I think Jim got sidetracked even tho he linked to the 1875 pdf :wink:

As I have already covered the fact that the 1875 is not applicable to this process, let's get petterg
going on the right path :smile:

petterg ...

The TL072 has 2 opamps in the same package ... now using the info from the datasheet, wire up the the 2 opamps in the package according to the circuit berkeman gave you right at the beginning of this thread ... NOTE the pin numbering will be different
Page 4 of the datasheet has the pinouts for the TL072 ... top row , centre diagram

Dave
 
  • #21
oops 1875 1725 I tend to mangle names and numbers, sorry for the confusion it sure wasn't intentional

now i'll just watch from sidelines ; thanks guys for letting me play in your sandbox.
 
  • #22
Does this sketch look OK?

L1 and R2 represents the load.
The hardest part here was to make the amplitude into 1875 small enough for it not to clip, while trying to keep the rise and fall times as far apart as possible. This circuit gets a rise/fall time factor of 4.3 at 5kHz. I was hoping to reach 5.

I might be able to increase the rise/fall factor by getting a power supply that is symmetric (or adjustable)


10pcs of lm324 is ordered. ($1.70 on ebay including shipping. Local store would set me back $50 with unknown delivery time.) As shipping takes some time I'm thinking to go with ua741 in the oscillator, and use the 324s where the 741s originally was planned to be used.
 

Attachments

  • sawtooth-741-1875.png
    sawtooth-741-1875.png
    10.4 KB · Views: 750
  • #23
jim hardy said:
....now i'll just watch from sidelines ; thanks guys for letting me play in your sandbox.

Jim ... get off those sidelines :smile: you know more abt this stuff than I ever will !
 
  • #24
not sure why you have 2 different voltages for your split rail supply ?
you should have them the same

also you oscillator part is a long way away from what Berkeman showed you in his earlier post
As I suggested before, replicate his circuit ( its out of a datasheet) so that you get your triangular wave

disconnect the input to the LM1875 for the time being and concentrate on getting your oscillator working
THEN you can worry about adding the amplifier

D
 
Last edited:
  • #25
It's basically the same as Berkemans. I didn't bother to draw pots for fine adjustments, and it's tweaked to give sawtooth, not symmetric triangular, and it gives way smaller amplitude. The one Berkeman found will make the 1875 clip, hence make square wave.

My supply is double 15V on the sticker. Measured voltage is what the sketch show. Better to simulate with the real voltage than the theoretic.

And R6 is added because of the genius Jim. I adopted his solution for powerfull opamp circuit to the not so powerfull opamp circuit.
 
Last edited:
  • #26
What is the advangtages / disadvangtages of using a small vs large C1?

I'm thinking small C1 makes it possible with large R1, which will make less power consume and less load on the opamps (= more stability)
 
  • #27
This is the first time ever I've had a circuit that performs better IRL than in simulation! It's been running for an hour now (oscillator stage only) with a rise/fall factor of 10, and no distortion at all, and opamp temperature is barely above room temperature. (In simulation distortion get significant when the factor is above 4.5.)
 
  • #28
petterg said:
What is the advangtages / disadvangtages of using a small vs large C1?

I'm thinking small C1 makes it possible with large R1, which will make less power consume and less load on the opamps (= more stability)

i'm thinking you're exactly right.
observe all current into U1's summing junction through R1 exits through C1 to U1's output pin. And it had to be provided by [STRIKE]U1[/STRIKE] U2. EDIT - oops I said U1 at first, typo, should have called 'em left and right...
So minimizing that current eases life for those opamps.

With small C1 you probably don't need R6, I had suggested it to protect your audio amplifier from possible latchup. 741 is supposed to be inherently latchup-proof .

What do you mean by " rise/fall factor " ? Up vs down slopes of sawtooth ? Is that what your 160K R5 adjusts?

If your low power opamps are pin compatible it'd be educational to see whether the TL074(72?) or LM324 makes a difference.

Looks like this would operate in the 10khz region which is about as far as you want to push a 741.
A faster opamp might help rise and fall times.
and I note your TL074 is ~ a decade faster than both 741 AND LM324...
My apology for not noting that earlier - I think i'll acquire a tube of them myself.

Congratulations on your R4::R3 ratio, it assures oscillation.
It should also control amplitude of triangle wave am I right? (That's from intuitive look not rigorous circuit analysis so please correct me if I'm dead wrong)

If I learn something every day, I might someday know something !

old jim
 
Last edited:
  • #29
Something is not right with the amplifier circuit. (I have not connected the load yet.) Signal from U1 pin6 dies when the amplifier is connected. Even with C2 removed, still no signal from U1. When R7 also is removed, the signal comes back. Or if I leave R7 in and pull out R8 og C3 there is also signal from U1.
The circuit around the lm1875 is from the datasheet example for typical application.

If I replace C2 and C3 with 20k resistors, the signal from U1 turn into pulse with negative amplitude out of range for my scope. And the frequency is 10x what comes from the unloaded oscillator. Whats going on here?
 
  • #30
jim hardy said:
What do you mean by " rise/fall factor " ? Up vs down slopes of sawtooth ? Is that what your 160K R5 adjusts?

Correct. Time of the up slope devided by time of the down slope (or the other way around).
Actually R5 adjust the fall slope length, and R4/R3 ratio adjust the rise slope length. By length I mean the diagonal distance from top to bottom (or the other way around). So they affect both amplitude and frequency.
R1 affects mostly frequency.
If R5 is set close to ground, then R4/R3 has less affection on frequency.

jim hardy said:
Looks like this would operate in the 10khz region which is about as far as you want to push a 741.

My target is between 4kHz and 6kHz. Should be within range for 741 and 324. Although the sawtooth requires faster change in output in a fraction of the cycle than what a symmetric triangle requires at 10kHz.
 
  • #31
Looks like the lm1875 is doing something that is messing up the supply voltage. With nothing connected to pin1 and only R9 (the feedback) + R8 (to ground) connected it's able to kill signal from the oscillator. At this point the only thing the two stages has in common is power and ground. Setting a 47k resistance between pin 1 and pin 2 on the 1875 makes the oscillator start oscillating again. So the amplifier circuit has to be modified so that voltage on pin 1 and 2 don't drift apart - as they apparently do with the current circuit.
 
  • #32
this could be part of it

The LM1875 is designed to be stable when operated at a closed-loop gain of 10 or greater, but, as with any
other high-current amplifier, the LM1875 can be made to oscillate under certain conditions. These usually involve
printed circuit board layout or output/input coupling.
that's from its datasheet

and you've set gain to 2

datasheet "applications" circuits are both set to 20.
And have a larger C3.


How about:
Use a leftover pot for volume control at output of U1, or replace R7 with a volume control wiper to pin 1. Then set amp gain to 20 like the datasheet showed.
Might not work
but one needs to start with ALL the rules followed and then see which ones it'll tolerate breaking.

One gets accustomed to carefully reading datasheets. And still makes mistakes - I sure missed TL074's bandwidth.

Hang in there. This thing will work.

I assume you have adequate power supply with big filter capacitors - measure power supply voltage , both its DC value and its AC content under load.
 
  • #33
oops I was going to just watch ... please excuse the old fire-horse syndrome...

go fellows, go !

j
 
  • #34
You can't just watch, Jim. Idiocy would concur the world.

With gain at 20 (R9=20k, R8=1012) and C2 removed - this should give an amplifier with no input and no output load - I get the same behavior as with gain at 2, except that supply voltage dropped to 22,1V and the supply made some unfriendly sounds. Shorting out C3 did not make any difference.

It doesn't make sense that the powersupply can't drive one unloaded lm1875 when it surely had enough power to drive two of them yesterday - and kill them. Hence my logic say here is something very bad with the circuit.
 
  • #35
It doesn't make sense that the powersupply can't drive one unloaded lm1875

Let's focus on that a minute

datasheet page 3 says an unloaded 1875 can draw 100 milliamps

1. what is rating of your supply?
2. what do you read for DC output voltage, supply unloaded and loaded?
Measure + and - individually, not just across them
3. switch your meter to AC (or use your 'scope) and measure AC ripple voltage at same conditions .
That checks power supply for filtering and regulation.


1: Supply rated output:
voltage ________ and current _____________

2 & 3 : Measured output
positive output negative output

_____________ ____________ volts DC No Load

_____________ ____________ volts DC loaded with an 1875

_____________ ____________ volts AC No Load

_____________ ____________ volts AC loaded with an 1875

when things gets confusing go back to the starting point.
Old troubleshooting rule - always check power supply first thing
Power supply troubles look like they're everywhere (because power supply goes everywhere).

Davenn - chime in here...
 
  • #36
Supply is rated 15V, 530mA

DC voltmeter:
Measured supply voltage unloaded: -15.1 to -15.3 and +16.2 to +16.7
Measured supply voltage loaded with oscillator: -15.1 and +16.3
Measured supply voltage loaded with oscillator and amp.gain=2: -15.1 and +15.3
Measured supply voltage loaded with oscillator and amp.gain=20: +13.5 and +13.6

AC voltmeter:
Measured supply voltage unloaded: 0.0V and 36V
Measured supply voltage loaded with oscillator: 0.0V and 36V
Measured supply voltage loaded with oscillator and amp.gain=20: 0.2V and 40V

oscilloscope:
Supply voltage loaded with oscillator and amp.gain=20, negative rail: Between -14.9V and -15.1V. Variations looks like random noise.

Supply voltage loaded with oscillator and amp.gain=20, positive rail: Between +16.1V and +16.3V. Variations looks like random noise.

Supply voltage loaded with oscillator and amp.gain=20, negative rail: -15V, with some triangle shaped pulse dips (about 100 pr second) down to 11,5V. (Living in a country where electricity has 50Hz I suspect these dips have some relation to that.)

Supply voltage loaded with oscillator and amp.gain=20, positive rail: Between +38V and +52V. Variations looks like random noise.


How can the DC voltmeter say 13.5V (loaded, positive rail) when the oscilloscope show variations between 38 and 52? Just reading the oscilloscope I'd say there is a DC of 45V + random AC.

I guess I need to find another power supply. Could two laptop AC/DC adapters be OK? If I make sure they are not connected to grounded outlet I could connect + from one and - from the other to my circuits ground, right?
 
  • #37
Now I've also tested with a dual 12V rated for 1A. Voltage drop to -10.4V / + 11,1V once the lm1875 is connected.
(C2 removed, C3 shortened)

I've replaced the lm1875 now. That didn't make any changes.

Here is the mystery: I remove R9, then the lm1875 has nothing connected to its output - problem still occurs.
I remove R7 and R8 - problem still occurs.
I place a R=10k between pin 1 and 2 on the lm1875 (its inputs) - problem goes away.
Now, with that 10k resistor in place I reinsert R7 and R8 - basically grounding the inputs - problem reoccurs! How can that be?
 
  • #38
okay you're making progress

those odd power supply readings suggest to me that your first supply is somehow not well isolated.
Scopes are usually Earth grounded through power cord and when you 'scoped your supply you saw lots of AC.
I don't completely understand it yet but there's something there.

Since it CAN be stable with your second supply let's continue with it...

So now you have made another good observation, the 1875 seems to like its inputs close together. Not surprising, it is an audio amp so expects only about a volt of signal.

Be aware that R9-R8 is the feedback, so removing R9 leaves the amp at wide open gain. If there's any coupling between output pin 6 and +input pin 1 it'll likely oscillate - look for wires run close together...

You noted when inputs are connected together the amp quiets down... another good observation.
Beginning to sound like stability could be an issue ...

I would , for the duration of testing, connect the inputs together by two diodes from pin 1 to pin 2, one pointing each way. That holds the two inputs within 0.6 volts of each other, and we call that a 'clamp'.
Then replace R8 & R9, and a C3 that's closer to what datasheet shows - several microfarads.

How's she look ?

Then insert R7. change ?

Lastly, the power supply bypass capacitors C 3, 4, 6 & 7 in datasheet aren't on your schematic.
If your power wires are more than a few inches long twist them together so as to minimize area they encircle - that reduces their inductance.If it still cuts up then, let us look into stability. Those problems can be elusive so it's important to be methodical.
Here's the direction i'd suggest we take:
Read the section "stability" in datasheet
When designing a different layout, it is important to return the load ground, the output compensation ground, and the low level (feedback and input) grounds to the circuit board ground point through separate paths. Otherwise, large currents flowing along a ground conductor will generate voltages on the conductor which can effectively act as signals at the nput, resulting in high frequency oscillation or excessive distortion.

It is advisable to keep the output compensation components and the 0.1 μF supply decoupling capacitors as close as possible to the LM1875 to reduce the effects of PCB trace resistance and inductance.

For the same reason, the ground return paths for these components should be as short as possible.

I don't see the output compensation on your schematic - see datasheet 'typical application' drawing top of page 2 C5 & R5 .

And I have no idea how you routed your 'grounds' (I call them commons or returns to distinguish from Earth grounds).
They are telling us to keep the signal returns separated from the power and output returns so that the input pins don't see voltage drop along traces carrying those currents.
You see, if something is tied right to bottom of R7, any current flowing down that return wire from there to common causes a voltage drop that adds to input signal.

Edison said "1% inspiration, 99% perspiration." Welcome , you're doing fine !
 
  • #39
jim hardy said:
those odd power supply readings suggest to me that your first supply is somehow not well isolated. Scopes are usually Earth grounded through power cord and when you 'scoped your supply you saw lots of AC. I don't completely understand it yet but there's something there.

My scope runs on battery. I have only one cable connected to it, the probe, so the scopes grounding is not the cause of the odd results. (And the outlets in my living room, where I play with this, is not grounded either, so ground on the supply is kind of a virtual ground, not earth.)


jim hardy said:
Be aware that R9-R8 is the feedback, so removing R9 leaves the amp at wide open gain. If there's any coupling between output pin 6 and +input pin 1 it'll likely oscillate - look for wires run close together...

Are you pointing to the output of oscillator (pin 6 on ua741) or output of the lm1875 (pin 4)?
When there is a 20k resistor from output to inverting input, and a resistor from both inputs to ground, and nothing else connected to output/inputs, shouldn't the opamp stay at the lowest possible power consumption? This seems to not be the case with the lm1875.


jim hardy said:
You noted when inputs are connected together the amp quiets down... another good observation.
Beginning to sound like stability could be an issue ...

Yes, but I don't understand why it makes a difference once they are connected to ground while they are connected together. Could it be the resistors that picks up noise?

jim hardy said:
I would , for the duration of testing, connect the inputs together by two diodes from pin 1 to pin 2, one pointing each way. That holds the two inputs within 0.6 volts of each other, and we call that a 'clamp'.
Then replace R8 & R9, and a C3 that's closer to what datasheet shows - several microfarads.

You've got so many genius ideas, Jim!

Diodes is a good idea. 0.6V might be a bit much tough?

The largest capacitor I've got is 100nF. A bunch of larger capacitors is in the mail somewhere, hopefully not too far away.
Does those capacitors (on signal/output) serve any other purpose than wide band filter? I think they are large to not interfere with the frequency response. Again my intuition say they should be as small as possible without without interfering with the frequency range the amplifier will work in.
Other circuits I've googled doesn't use the capacitors when they know the signal source will not send DC.

Cable roundtrip from supply, trough the breadboard and back to supply/0V is only 15cm (6 inches).

I think I'll put R7 and C3 on separate ground cables on the todolist too.

jim hardy said:
I don't see the output compensation on your schematic

I thought of them like load and figured starting with no load would be a good idea. That might have been one more mistake.

A thing I don't like about the lm1875 is that the heatsink seems to be directly connected to pin3.

I'm out of town for volunteer work for two nights now. I'll get started on the todolist Thursday morning.
 
  • #40
Separate ground cables to every object that has connection to ground did not make any difference.

A new observation:
When setting a small capacitor over the inputs of 1875, C2 and R7 removed, R8=1k, C3 shortened, the voltage on inverting input is stable 545mV or -545mV (on scoop). I saw it swap once, but the normal seems to be that it decides when powered on if it will go to the positive or negative side. Most times it chooses the negative side.
Then once I remove the short over C3, the voltage goes to near supply voltage.
The same happens if I insert R7 (no matter if C3 is shorted or not).

Using two diodes (actually two transistors with base and collector put together) insted of the capacitor between pin1 and 2 did not affect much, just that voltage on pin1 increased when pin 2 increased.
Diodes and capacitor in parallel worked the same way.

Unplugging R7 while the power is on does not make any difference. Power has to be switched off and back on to start the oscillator.

Another experiment:
I replaced the short cables to the power supply with some longer (30cm each), and twisted them. That made the oscillator (without amplifier connected) create sine waves at 9.6kHz rather than sawtooth at 4.9kHz.

The obvious explanation for what's happening is that some voltage difference between inputs is significantly amplified once pin1 get connected to anything that doesn't follow pin2.
As the voltage is so stable with C3 shorted, it's really no surprise that removing the short makes gain go nuts.

Is it really needed to put a small resistor from output to ground? That would make quite a lot of wasted current.

I started to think maybe the two inputs were swapped on my samples on lm1875. But creating a circuit with one lm1875 that made square wave worked perfectly.
 
  • #41
petterg said:
Separate ground cables to every object that has connection to ground did not make any difference.

Good. I trust they're short wires.

A new observation:
When setting a small capacitor over the inputs of 1875, C2 and R7 removed, R8=1k, C3 shortened, the voltage on inverting input is stable 545mV or -545mV (on scoop).
Is that with R9 in place? If so, that says output is around ten volts, R9-R8 divides it down by 20.
If that's with R9 open, that sort of says the 1875 is trying to force a half milliamp out through its input leads.

I saw it swap once, but the normal seems to be that it decides when powered on if it will go to the positive or negative side. Most times it chooses the negative side.

That sure sounds like a latchup from positive feedback.
Then once I remove the short over C3, the voltage goes to near supply voltage.
The same happens if I insert R7 (no matter if C3 is shorted or not).
Possibly being overdriven.

Using two diodes (actually two transistors with base and collector put together) insted of the capacitor between pin1 and 2 did not affect much, just that voltage on pin1 increased when pin 2 increased.
Diodes and capacitor in parallel worked the same way.

okay - 0.6 volt clamp on input amplified by 20 is still >10 volts output. But we are no longer prying the inputs ten volts away from each other.

Unplugging R7 while the power is on does not make any difference. Power has to be switched off and back on to start the oscillator.
Still sounds like a latchup.

Another experiment:
I replaced the short cables to the power supply with some longer (30cm each), and twisted them. That made the oscillator (without amplifier connected) create sine waves at 9.6kHz rather than sawtooth at 4.9kHz.
So your oscillator itself is that sensitive to power supply lead length? Great observation.
Do you have capacitors on both the negative and positive power supply leads physically close, like within a few inches of U1 and U2?
Opamps need those. Sometimes you get away without them but it's not good practice.
Your power amp really needs them, observe its datasheet shows a 100uf and a 0.1 in parallel. Both are important and here's why:
Big electrolytics are made by rolling up a long strip of aluminum and stuffing it into that cylindrical container. That makes a coil. So at high frequency, the inductance of that coil overwhelms its capacitance and it no longer provides filtering. So they add a small capacitor with less inductance to do the high frequency work.

So make sure they're present and accounted for.

The obvious explanation for what's happening is that some voltage difference between inputs is significantly amplified once pin1 get connected to anything that doesn't follow pin2.
That's what amplifiers do... agreed . Where's the phantom input coming from is our mystery.

As the voltage is so stable with C3 shorted, it's really no surprise that removing the short makes gain go nuts.
C3 should be large enough that it looks like a short circuit for AC. Did you get a large one with your shipment?

Is it really needed to put a small resistor from output to ground? That would make quite a lot of wasted current.
Observe in datasheet that it's connected through a 0.1 uf capacitor which is greater than ten ohms for all frequency below about 100khz. So there's no power getting to it unless amplifier tries to oscillate at very high frequency.
That is its job - to overload the amplifier at high frequency way beyond audio, where it shouldn't be in the first place.

I started to think maybe the two inputs were swapped on my samples on lm1875. But creating a circuit with one lm1875 that made square wave worked perfectly.

I was wondering about that too.
What I think is happening is the 1875 is breaking into oscillation because of stability problems.
When it does that, it overloads the power supply.
When power supply goes haywire, everything looks confusing.

So - you had one working with square waves?
What was its gain?
Try feeding it a 0.1 volt sawtooth wave. That, at gain of 20, should give 2 volts out.
That'll prove your oscillator and power amp CAn work together.

This is the schematic I'm working from - is it right?
attachment.php?attachmentid=61308&d=1378000206.png


Tweak your R4::R3 ratio to get about a quarter volt sawtooth from U1.
That'll both not overdrive Mr 1875, AND let a slow opamp keep up with the sawtooth's slope.

So for starters:

Continue on improving stability by adding bypass caps to power supply and power amp output.

Get oscillator working good by itself with ~ 1/4 volt output at U1 pin6.

Make C3 big enough to do its job of shorting out signal, then you won't need to short it anymore.

When 1875 is stable with C2 out, it should accept a small sawtooth okay. Be sure sawtooth amplitude X gain < power supply volts, that opamp seems to not like being overdriven.
I think overdriving it makes it yank your power supply's tail.

Your perseverance is commendable, sir. I see progress. It looks darkest just before dawn.

The important thing is to take small steps, learning from each one.

Hang in there !

old jim
 
Last edited:
  • #42
IT WORKS!
(by accident)

Two things:
I reread the datasheet and noticed the sentence telling the lm1875 is intended for gain between 10 and 20. Having R9=20.04k and R8=998. That makes gain of more than 20. So I replaced R8 with a 1.2k. Then the oscillator seemed to spend a little bit of time (like half a second) before it stabilized on no oscillation.
Then I figured I'd remove the short over C3. While I was doing that I accidentally pulled out the potentiometer that is part of R1. (R1 was a 47k resistor + a pot.) As I built this as tiny as possible there was no way I would be able to the pot back with my fat fingers without removing other components. So I measured the value of the pot and inserted a 12k resistor instead. All of a sudden the oscillation worked! (And I forgot about removing the short over C3)

Now I connected what is C2 on the sketch, but I used a 100k resistor instead. And I got sawtooth output from the lm1875!
(The choice of 100k came from that I'm not able to turn output of U1 lower than +/-0.9V without increasing the frequency significantly. And with R7=20k, that I'll experiment with higher voltage out of U1 as I don't like to be close to limits.)

Just to try this out: Reinserting the R8=998 kills signal.
Reinserting the pot also kills signal.

So it seems like the pot was affected by noise.
And the maximum gain of 20 for lm1875 seems to be absolute. (Why do they make example for "typical application" in the datasheet that is SO on the limit?)


(I'm currently running with 4 short (4cm) cables and 8 long (30cm) twisted cables from the power supply. One ground wire is connected to every screw on the supply as well as the ground connectors.)

jim hardy said:
Big electrolytics are made by rolling up a long strip of aluminum and stuffing it into that cylindrical container. That makes a coil. So at high frequency, the inductance of that coil overwhelms its capacitance and it no longer provides filtering. So they add a small capacitor with less inductance to do the high frequency work.

The wisdom will come handy! I've never though that drawback with large capacitors.


jim hardy said:
C3 should be large enough that it looks like a short circuit for AC. Did you get a large one with your shipment?


I still haven't got the shipment with larger capacitors. But I realized why I hadn't thrown away that old cisco dslam - it was full of various capacitors. I spent the evening pulling capacitors out of it with the intention to increase size of C3. I never got to the point of replacing C3 because of the accident that solved the problem.


Jim, I've learned a lot from your postings. You've been such a great help. Without your help I wouldn't have a clue of what's going on. This would probably have taken months to figure out.


Next challenge: make a amplifier/filter that can remove a very slow (less than 1Hz) sine wave and amplify the pulse signal (3-10kHz) that is mixed with the sine - positive or negative pulses. That will be a new thread.
 
  • #43
Glad you "got 'er done"... I learned too .
I suspect your potentiometer in previous post was an antenna - a teeny capacitor from pin 6 to pin 2.
You ought to put C3 into avoid DC offset in output. And study all you went through - you'll be the Jedi Master of LM1875's .

Filter, eh ?
Look into "Bi-Quad Filter". TI's LM324 datasheet has one, so does LM3900.
I built the one in fig 40 of this application note for a sharp filter at ~25khz and it worked excellent. Actually I wanted to separate two signals, one at 22 kHz and one at 28 kHz.
http://www.ti.com/lit/an/snoa653/snoa653.pdf
The amp is fast enough you have to be careful with layout.

Filters are the most fun, I think, because they directly apply math..

Thanks for the kind words, and
Good luck !
 
  • #44
Back
Top