Maker Pro
Maker Pro

LM358 - Combined Filter & Amp

D

David White

I had this circuit working, but then mis-copied my original diagram.
Given my level of (non) skill, I have lost the plot.

This is what I have now. I used to get 6Vpp, but now only 1V.

Can anyone see an obvious mistake?

http://www.4shared.com/photo/-6AX7P9n/Sine-Gen.html

The LM358 is a combined active filter and amp for the 5V squarewave
from the CD4060. The 1uF caps reduce the input to around 1V. IOW there
is no gain.

Thanks for any advice.

David White
 
P

Phil Allison

"David White"
I had this circuit working, but then mis-copied my original diagram.
Given my level of (non) skill, I have lost the plot.

This is what I have now. I used to get 6Vpp, but now only 1V.

Can anyone see an obvious mistake?

http://www.4shared.com/photo/-6AX7P9n/Sine-Gen.html

The LM358 is a combined active filter and amp for the 5V squarewave
from the CD4060. The 1uF caps reduce the input to around 1V. IOW there
is no gain.


** A 6:1 loss in level equates to 15.6 dB - or about 1 octave in terms of
that LP filter I see.

I suspect the square wave input frequency is now an octave or two higher
than you previously had.



..... Phil
 
D

David White

Does the opamp have power? Even if it does, it won't make 6v p-p from
a 6 volt battery.

So sorry. The 6V indicated was the previous version. Now using 9V.
Although it does more or less the same on either. No gain.
And the biasing is weird.

How would I "unweird" it?

While we are on the subject, what do the bright sparks on this list
charge for basic circuit design work, on paper? Maybe something
between free (thanks) and too much for a hobbiest like me.

Sorry, but there are no viable mentors in my area. Used to be at least
one ham operator in every neighborhood.

David
 
D

David White

I'm free, if it's fun. Otherwise, I don't sell engineering: it's too
valuable.

I guess that makes me about half "too valuable". Always something more
to learn. Feeling better about it already.

David
 
J

Jasen Betts

I had this circuit working, but then mis-copied my original diagram.
Given my level of (non) skill, I have lost the plot.

This is what I have now. I used to get 6Vpp, but now only 1V.

Can anyone see an obvious mistake?

http://www.4shared.com/photo/-6AX7P9n/Sine-Gen.html

The LM358 is a combined active filter and amp for the 5V squarewave
from the CD4060. The 1uF caps reduce the input to around 1V. IOW there
is no gain.

Thanks for any advice.

David White

reading the dragram the CD4060 is producing an 8Hz square wave
and you're trying to filter it into a sine wave?

You might get better results building an damped oscilator that runs
close to 8Hz and then forcing it with a small part of the 8Hz
squarewave.

eg:increase the gain of the op-amp to 2 (by a resistive divider on the
non-inverting input) increase the frequency by using smaller capaciors
(about 100nF) and reduce the input signal by replacing R3 with a network
of resistors that reduce the amplitude by about 20, and use a 1M resistor
to feed that into C5 (where R3 was connected)

In simulation I get about 5v P-P and the third (and all the other)
harmonics about 30dB down.


I'm now told it's 16hz, oops! use 47nF capacitors.
 
D

David White

So a 16Hz sine-wave is the desired output from the filter?

Yes, that is the object ... at 6Vpp with 9V rails.

The thing that really floors me is that this circuit actually worked
prior to replacing the CD4060 and LM358 chips.

David
 
J

Jamie

David said:
Replication based upon this circuit. The diagram below is clearer.

http://www.4shared.com/photo/86e4vchu/Filter---Amp.html

This is really frustrating, since I know it worked before. Except now
there is no gain. Just a 1Vpp sinewave at 16Hz.

David

You need to look at what is at the + input of the 358 chip.

If it appears that you have your level that you expect, then I would
be looking at loading issues on the output or, you have feed back
problems with the (-) input and is affecting your gain.

If input is not there, then scope out the signal coming out of the
chip before it goes through the filter.

Etc.

Jamie
 
J

Jamie

John said:
C3 is backwards. But the biasing is still goofy.
C3 should be a NP type because I can see where it is going to shift
between the 5 volts out of the digital source and that of the output of
the 358.

He is trying to get output that just isn't going to happen with that
circuit. He needs some gain there, but instead, he is actually creating
- gain with the network at R5.

Maybe if a NP for C3 is used and R5 is connected to the common rail
instead, the output will swing?

You must remember, he is trying to get more out than signal in, so,
one needs to impede the feed back, not push it down into the
dumps

I am just a back hills yank, born and raise where every one is
related. SO don't pay no attention to me.

Jamie
 
T

tm

John Larkin said:
C3 is backwards. But the biasing is still goofy.

If the 16 Hz square wave were going from ground to +12, passing through a
LPF will keep an average DC component of six volts. This should be just what
is needed. Is the CMOS running at 12 volts?
 
D

David White

If the 16 Hz square wave were going from ground to +12, passing through a
LPF will keep an average DC component of six volts. This should be just what
is needed. Is the CMOS running at 12 volts?

Yes 12V, but I am only getting 1Vpp out of the LM358. That's what is
going in pin 3 after C4 to deck. I will have a look at the loading
tomorrow, as others suggested.

Thanks all,

David
 
D

David White

The filter time constants are not right for 16Hz and the DC-offset is
all messed up. For 16Hz, you need soemthing like this:
Please view in a fixed-width font such as
Courier.

Many thanks, Fred. I will try this one. Still stumped as to why my
original circuit worked though.

David
 
J

Jamie

Fred said:
Many thanks, Fred. I will try this one. Still stumped as to why my
original circuit worked though.

David


The configuration below looks more like what may have been the
original and does the same thing with a lot less parts:
Please view in a fixed-width font such as Courier.

.
.
.
. 0.33u
. .-----------||---------.
. | |
. 9V | |
. | | .---[68K]----+
. |CD4060 | | |
. ----+----- | | 9V |
. | VDD | | | | \ | |
. | | | '--|- \|LM358|
. | | | \ |
. | | | >----+->
. | | | /
. Qout|--[33K]--+--[33K]--+--|+ /
. | | | / |
. 0.33u| |
. --- |
. --- |
. | |
. --- ---
. com com
.
.
.
.
.
. Fc=15Hz Q=2 K=1
.
. Gain at Fc = -jKQ ~ -j2
.
. Low frequency gain= K= 1
. 2
. High frequency gain= - (15/F)
.
.
.
.

I think this is more of what he is trying to do? This circuit does
not use the 358 but I picked one that should act as one.

Version 4
SHEET 1 880 680
WIRE 240 -32 128 -32
WIRE 16 0 -80 0
WIRE -80 16 -80 0
WIRE 128 64 128 48
WIRE 176 64 128 64
WIRE 288 64 256 64
WIRE 16 96 16 64
WIRE -80 112 -80 96
WIRE 208 144 208 128
WIRE 128 160 128 64
WIRE 176 160 128 160
WIRE 288 176 288 64
WIRE 288 176 240 176
WIRE 352 176 288 176
WIRE 368 176 352 176
WIRE -64 192 -80 192
WIRE 16 192 16 160
WIRE 32 192 16 192
WIRE 128 192 112 192
WIRE 176 192 128 192
WIRE 352 192 352 176
WIRE 352 192 336 192
WIRE -80 208 -80 192
WIRE 128 208 128 192
WIRE 208 224 208 208
WIRE 128 288 128 272
WIRE 352 288 352 272
WIRE -80 304 -80 288
FLAG -80 112 0
FLAG 208 224 0
FLAG -80 0 P+
FLAG 208 128 P+
FLAG 128 288 0
FLAG 368 176 OUT
FLAG -80 304 0
FLAG 352 288 0
FLAG 16 64 OUT
FLAG 304 -32 0
SYMBOL voltage -80 0 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 12
SYMBOL res 272 48 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 33k
SYMBOL res 112 -48 R0
SYMATTR InstName R2
SYMATTR Value 10k
SYMBOL cap 112 208 R0
SYMATTR InstName C1
SYMATTR Value 1µ
SYMBOL res 128 176 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 33k
SYMBOL cap 0 96 R0
SYMATTR InstName C2
SYMATTR Value 1µ
SYMBOL res 32 176 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 33k
SYMBOL Misc\\signal -80 192 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 0 0 0 0.03125 0.0625)
SYMBOL res 336 176 R0
SYMATTR InstName R5
SYMATTR Value 270
SYMBOL Opamps\\LT1006 208 112 R0
SYMATTR InstName U1
SYMBOL cap 304 -48 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C3
SYMATTR Value 1µ
TEXT -104 -48 Left 2 !.tran 0 1 0 startup
 
J

Jamie

Fred said:
Fred said:
On Feb 26, 2:36 pm, [email protected] (David White) wrote:
The filter time constants are not right for 16Hz and the DC-offset is
all messed up. For 16Hz, you need soemthing like this:
Please view in a fixed-width font such as
Courier.
Many thanks, Fred. I will try this one. Still stumped as to why my
original circuit worked though.

The configuration below looks more like what may have been the
original and does the same thing with a lot less parts:
Please view in a fixed-width font such as Courier.
.
.
.
. 0.33u
. .-----------||---------.
. | |
. 9V | |
. | | .---[68K]----+
. |CD4060 | | |
. ----+----- | | 9V |
. | VDD | | | | \ | |
. | | | '--|- \|LM358|
. | | | \ |
. | | | >----+->
. | | | /
. Qout|--[33K]--+--[33K]--+--|+ /
. | | | / |
. 0.33u| |
. --- |
. --- |
. | |
. --- ---
. com com
.
.
.
.
.
. Fc=15Hz Q=2 K=1
.
. Gain at Fc = -jKQ ~ -j2
.
. Low frequency gain= K= 1
. 2
. High frequency gain= - (15/F)
.
.
.
.

I think this is more of what he is trying to do? This circuit does
not use the 358 but I picked one that should act as one.

Version 4
SHEET 1 880 680
WIRE 240 -32 128 -32
WIRE 16 0 -80 0
WIRE -80 16 -80 0
WIRE 128 64 128 48
WIRE 176 64 128 64
WIRE 288 64 256 64
WIRE 16 96 16 64
WIRE -80 112 -80 96
WIRE 208 144 208 128
WIRE 128 160 128 64
WIRE 176 160 128 160
WIRE 288 176 288 64
WIRE 288 176 240 176
WIRE 352 176 288 176
WIRE 368 176 352 176
WIRE -64 192 -80 192
WIRE 16 192 16 160
WIRE 32 192 16 192
WIRE 128 192 112 192
WIRE 176 192 128 192
WIRE 352 192 352 176
WIRE 352 192 336 192
WIRE -80 208 -80 192
WIRE 128 208 128 192
WIRE 208 224 208 208
WIRE 128 288 128 272
WIRE 352 288 352 272
WIRE -80 304 -80 288
FLAG -80 112 0
FLAG 208 224 0
FLAG -80 0 P+
FLAG 208 128 P+
FLAG 128 288 0
FLAG 368 176 OUT
FLAG -80 304 0
FLAG 352 288 0
FLAG 16 64 OUT
FLAG 304 -32 0
SYMBOL voltage -80 0 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 12
SYMBOL res 272 48 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 33k
SYMBOL res 112 -48 R0
SYMATTR InstName R2
SYMATTR Value 10k
SYMBOL cap 112 208 R0
SYMATTR InstName C1
SYMATTR Value 1µ
SYMBOL res 128 176 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 33k
SYMBOL cap 0 96 R0
SYMATTR InstName C2
SYMATTR Value 1µ
SYMBOL res 32 176 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 33k
SYMBOL Misc\\signal -80 192 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 0 0 0 0.03125 0.0625)
SYMBOL res 336 176 R0
SYMATTR InstName R5
SYMATTR Value 270
SYMBOL Opamps\\LT1006 208 112 R0
SYMATTR InstName U1
SYMBOL cap 304 -48 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C3
SYMATTR Value 1µ
TEXT -104 -48 Left 2 !.tran 0 1 0 startup

--

Jamie- Hide quoted text -

- Show quoted text -


Not sure, but I think the whole thing runs off a single 9V. There is
no shortage of gain in that circuit.

The gain in your circuit is higher than the original however, wave
form is triangle. At least in the sim it is.

Even with my variant, it isn't perfect. the node on the (-) input with
the 10k and 1uf must have a Q = 1, otherwise, we'll get some effects
that we don't want. This also means the 16hz that is in the spec can not
vary too far from this point.

Jamie
 
D

David White

. 0.33u
. .-----------||---------.
. | |
. | |
. .--|--[390K]-+---[100k]---+
. | | | |
. --- | | |
. com | | | \ |
. 9V>------------[390K]-+--|- \ |
. | | \ |
. | | >----+->
. | | /
. IN>--[33K]--+--[33K]--+--|+ /
. | | /
. |
. ---
. 0.33u ---
. |
. ---
. com


This circuit works great. Nice 8Vpp sinewave output from 12V supply
rail. I will try the others Fred sent too, as a learning exercise, and
to discover how my orignal circuit went wrong. It keeps me awake at
night.

Thanks to everyone in this group for taking the time to look over my
shoulder.

David White
 
Top