Re: LM358 - Combined Filter & Amp

Feb 24, 2012 21 Replies


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


Start by connecting the opamp power pins.

And return the - side of the opamp to Vcc/2 or add a huge cap in series with R5.

The average voltage out of U2 is Vcc/2, so the - side of the opamp should be biased to Vcc/2. As is, it's biased to Vcc, which pushes the opamp output off-center.

I'm free, if it's fun. Otherwise, I don't sell engineering: it's too valuable. Good hardware/software/FPGA contractors go for $100-170 per hour, more for superstars.

John Larkin, President Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

Your jpg is hard to read. What is the frequency of the square-wave going into the OpAmp? ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

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

-- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

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

David

The thing about electronic design is that I'd rather not sell it just once. If I design a cool product, my production people can sell many copies, for years to come.

John Larkin, President Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation

David, what are you trying to do? .. is being 'exactly' 16 Hz important? Or is a nice sine wave at 15 Hz OK?

(The cool thing about the SED is you can pick 'million dollar' brains, for free...)

George H.

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

Same circuit or a replication? ...Jim Thompson

-- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

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

gh a

what

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.

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

. | | / . IN>--[33K]--+--[33K]--+--|+ / . | | / . | . --- . 0.33u --- . | . --- . com . . . Fc=3D15Hz Q=3D0.67 K=3D1.5 . . Gain at Fc =3D -jKQ ~ -j . . Low frequency gain=3D K=3D 1.5 . 2 . High frequency gain=3D -K(15/F) . . . . . . . If your input frequency is variable then you have to do something else.

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

David

Is the incoming square wave 12V or 9V or 6V?

The "spec" keeps dancing around ;-) ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

The LM358 doesn't like inputs getting closer than 1.5V from the positive rail. So to avoid distortion, you will need to attenuate the counter output like shown below. It's the same circuit except the 33K from the counter is replaced with a 68-120-120 K divider. Please view in a fixed-width font such as Courier.

. . . . 0.33u . .-----------||---------. . | | . | | . .-----[390K]-+---[100k]---+ . 9V | | | | . | --- | | 9V | . | com | | | \ | | . +----------+---------[390K]-+--|- \|LM358| . | | | | \ | . | [120K] | | >----+->

. |CD4060 | | | / . ----+----- +------+--[33K]--+--|+ / . | VDD | | | | | / | . | | | | 0.33u| | . | [68K] [120K] --- | . | | | --- | . | | | | | . Qout|----' --- --- --- . | com com com . . . . . . Fc=3D15Hz Q=3D0.67 K=3D1.5 . . Gain at Fc =3D -jKQ ~ -j . . Low frequency gain=3D K=3D 1.5 . 2 . High frequency gain=3D -K(15/F) . . . .

Fred's solution works irrespective of supply... just change the 9V connection to 12V if you're using a 12V supply.

I might AC couple and pre-bias the input. Some OpAmps might lock up initially. Just try it. If it does weird things add the pre-bias and AC couple. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

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=3D15Hz Q=3D2 K=3D1 . . Gain at Fc =3D -jKQ ~ -j2 . . Low frequency gain=3D K=3D 1 . 2 . High frequency gain=3D - (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

=A0 =A00.33u

------.

=A0 =A0 =A0 =A0 =A0 =A0 =A0|

=A0 =A0 =A0 =A0 =A0 =A0 =A0|

---[68K]----+

=A0 =A0 =A0 =A0 =A0|

=A09V =A0 =A0|

| \ | =A0 =A0 |

--|- \|LM358|

=A0 =A0| =A0 \ =A0 =A0 |

=A0 =A0| =A0 =A0>----+->

=A0 =A0| =A0 /

| =A0| / |

=A0 =A0 =A0|

=A0--- =A0 =A0 |

=A0--- =A0 =A0 |

=A0 | =A0 =A0 =A0|

=A0--- =A0 =A0---

=A0com =A0 =A0com

=A0 =A02

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

Typical Jamie, all mouth and no math. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required