Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

OP amp output oscillating

Status
Not open for further replies.

Veketti

Full Member level 3
Joined
Sep 14, 2014
Messages
164
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Activity points
1,700
Dear All,

Here's my circuit
voltage_amp_comp.JPG

When input voltage gets to 47mV LM358P OP AMP U1:A strengthens that voltage by 48 times and OP AMP U1:B compares it against reference voltage 2.18V and turns on output to PIC digital input. I get around 3.75V to the pic input pin. According to PIC12F683 datasheet min 2.0V needed to recognize it as HIGH state. So that is ok and it actually works just fine on breadboard.

However I decided to change the OP AMP to LM2902N and end up in troubles. Around 47mV +-~3mV if connected to pic input it starts to oscillate. If it is not connected anywhere it will not oscillate. Around 43mV it is low and around 50mV it is high stable. I have tried positive feedback resistor in U1:B but that didn't help. Please help me to understand why this type of OP AMP is not working and how could this be fixed?

Thank you in advance
 

Maybe you have higher noise? Are you sure it is oscillation, not supply/ground coupled signal or something else?
Could you tell something about the waveform you experienced (freq,amplitude,shape)?
 

It is noisy as well and oscillating.
Here is the oscillating:
OPAMP_Oscillating_signal.png

Here is the noise:
Noise.png
 

The 4 MHz "noise" can't be generated by a slow OP, it must be sourced from the µC or other circuit parts. Seeing so large interference signals raises doubts about proper circuit layout, particularly appropriate ground connections.

A you sure that the input voltage, Vref and supply voltage are sufficiently stable? How's the reference and input voltage generated?
 
Yes, I also think it is not self-oscillation, if the ground connections are good probably with some filtering on the reference/supply you can eliminate this.
By the datasheet of the LM2902N it has 15dB less supply noise rejection in worst case compared to LM358, maybe this caused a difference.
 
4MHz is the crystal frequency as well. It could be that crappy breadboard or jumper wires. I've already found few not conducting jumper wires..

Voltages are created by Lab power which can go to millivolt range.
 
Last edited:

If it's truly oscillating then it ought to do the same
powered from batteries and the input grounded at
the jack (?), no externalities.

Any differences you see, ought to point to something.
 
I isolated the microcontroller and put only BC547 transistor which controls 30mA led. Still oscillating. It is the signal from the amplifying U1:A which is noisy. As I had extra OP amp available I used one as a Sallen-Key low pass filter between amplifier and comparator (pin 1-5) and tried to filter the oscillation out. Went as low as 1hZ, 10uF and 15kohm values on that Sallen-Key but still there is few hertz on-off in the hysteresis area. Now it is only 3mv that oscillation area as well. Are those resistor values 1k and 47k in right range for it to work properly? But I have tried 10 higher and lower as well. 100ohm and 4.7k were better though..
 

Did you try to add a capacitor paralel with R3 to filter the input signal?
Oscillation frequency shouldn't change with adding a filter I think, interesting...
I would also try to add a filter capacitor with R4 instead of adding a Sallen-Key stage.
 

Hi,

* Do you have a solid GND plane for reliable GND?
* are there ceramics capacitors at each IC´s supply pin with low impedance connection to GND to stabilize VCC?
* is it a breadboard circuit?
* can we see a photo of your circuit or - even better - the PCB layout?

Klaus
 

Tried cap parallel to R3, no help. I added also cap to the ic supply pin, after taking this picture. Sorry, picture is huge for better visibility.
op-amp.jpg

0.049V starts oscillating. 0.054V stable. I checked this small input voltage from lab power by oscilloscope and it is stable.
 

Hi,

I assume you did not use all 4 opamps ... and you left some (unused) inputs floating.
A no-go.

Besides this I don't think a breadboard is useful for this application.

I see no GND concept.
Just connecting some components does not work.
Better use a simulation tool like Ltspice, it doesn't care about wiring.

Klaus
 
I terminated the not used op amp, but it didn't make any differences. Could it be then so that on breadboard this is not possible to make work?
 

Hi,

I'd guess Klaus's most recent reply is worth considering re breadboards. Apart, and I guess irrelevant here - on breadboards (and finished PCB designs) I always add 0.1uF, 0.1uF, 1uF or 0.1uF, 1uF, 10uF at the (bread)board supply pins and at least 0.1uF and 1uF (+ maybe a 10nF sometimes) on all IC supply pins. Perhaps OTT to some but it works well.

Does putting the MCU/PIC/the IC that has the 4MHz signal on another breadboard make any difference? I guess it won't.
 
Thank you all for helping me. This might be just bit off topic, hopefully ok. Bear with me please. I decided to ditch the idea of LM2902 & relays etc. as it was possible to achieve what I was looking for with much simpler design. I'm still using OP AMP this time LM258 so I'm afraid of the oscillation happening again in real pcb. So I'm asking your kind help to check this pcb design is there any issues which might cause OP amp to not work correctly? Or other detrimental design flaw?
I have followed rules: Chrystal as close to micro as possible, IC caps as close to power pin as possible, Ground plane.

It is double sided pcb. In the picture, top image is top copper.

circuitry.jpg
 

There's absolutely no reason to expect OP oscillations in this circuit.

Depending on the nature of the input signal fed to the circuit, you probably want some low pass filtering in front of the amplifier.

I wonder however why you are using an external crystal, FRC oscillator should be fine for this application.
 
I've taken your valuable feedback into account and added low pass filter. Signal should be somewhat steady DC voltage but in vehicle use I guess there is many interference sources.
circuitry_v2.jpg

What comes to the external crystal, true it's not needed as there is no accurate frequency dependent in this. I used to put it just in case. This like other my designs are just one off builds to solve some of my issues or demands so no need to think cost of every component...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top