INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB
5

Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

(OP)
I am building a wien bridge oscillator using an LMV751 opa with an output frequency of 20khz.



The breadboard version of the circuit above works perfectly, the output voltage is around 400mV pp at 20kHz. The breadboard version uses the SMD version of the LMV751 on a breakout board, and 1N4148 diodes.



The SMD version of the circuit is constructed exactly the same, with the only difference that it uses BAS16 diodes. However, a version was tested where 1N4148 diodes were soldered to the board instead.



Both circuits are completely isolated from any other components, and tested using the same power supply, which outputs 3.1V for Vcc, 1.52V Vcc/2.



The issue is that the SMD version has a much higher amplitude of 2Vpp, although it oscillates at extacly 20kHz also. The circuit was tested with two LMV751 chips incase it was a chip defect.



As you can see in the pictures, the breadboard version takes much longer to start oscillating than the SMD version.


Breadboard version at startup


PCB version at startup (NOTE: frequency is the same as the previous image, it appears lower due to aliasing on the scope screen) Also, the circuits were analyzed again using exactly the same input voltage and the results were the same, I just didn't take a picture.


The circuits were build from scratch again and checked over multiple times for any error or difference between them. All passive components (0.1% tolerance ) are confirmed to be exactly the same.

I am completely stumped and have know idea what would be causing such behavior. Any suggestions are greatly appreciated.

Thank you!!

Sorin

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

I'm enjoying your problem even though you're probably not - due to your nice information rich question.


I'm not real up on Wien bridge oscillators but the difference between breadboarding and an SMD layout and components is probably an order of magnitude less inductance with virtually everything. I believe that's why you're ending up with a greater amplitude - less inductance.

Hang out though as there are a lot of more experienced analog guys than me here who will be chiming in.

Keith Cress
kcress - http://www.flaminsystems.com

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

3
One fundamental error in your measurements is that you sample at 100 kSa/s in the breadboard version and 20 kSa/s in the SMD version.

Nyquist wouldn't like the latter at all and I don't like any of them.

For a good optical (scope screen) result, try sampling at at least ten times oscillator frequency or higher. I don't think that the HP scope is limited to 100 kSa/s, so set sampling rate to 1 MHz - that way you will see what is really going on.

Also, check that the diodes are REALLY connected as shown in the diagram. Mounting those little devices with the correct polarity isn't always easy*.

Good luck!


*Yeah, I know - but do the check all the same.

Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

Excellent point Gunnar!

Nyquist is probably turning in his grave at a substantial RPM over that.

Keith Cress
kcress - http://www.flaminsystems.com

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

"...20 kSa/s..." Well spotted Gunnar. Need to get a reliable measurement first. There's a small chance that the entire problem is a measurement artifact. Or, more likely, this error may be adding confusion and leading the OP astray. This must be fixed (adjusted) first.

The amplitude will be critically dependent on the characteristics of the diodes. So it might simply be variation in the diodes. Traditionally a small incandescent ("grain of wheat") light bulb was used instead. I'd focus in that area after sorting out the measurements.

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

You probably don't want to hear this but I spent some time modelling your circuit in Simetrix (a P-Spice program) and although I did not have a model of the LMV751 I used a slightly slower slew rate model of the LMV321. I found that the type of diode made virtually no diference to the amplitude (703mV rms for 1N4148 and 715mV rms for BAS16). I did find that the frequency was 18kHz, not 20kHz with those component values shown in your circuit. I tried several other amplifier models that would work at that low supply voltage and they all came out within a few Hz of 18K. Curious to say the least!

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

"...the type of diode made virtually no difference to the amplitude..."

I wonder if that might be because the diode models are all very similar?

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

(OP)
Thank you everyone for your input. I did some more tests today and below is what I found out. Basically, the punch line is that Wien bridge oscillators are apparently horribly unstable in terms of voltage, that or my breadboards are haunted...

Firstly, let me be clear that C9 was never included in any of these measurements/circuits, I soldered it off my PCB to test this circuit ..

Secondly, Brian, the frequency is just a simple RC time constant: 1/(2*pi*820e-12*9.76e3) = 19.886 kHz.

Thirdly, sorry for the sampling/data I showed, those were just quick and dirty pics for me. I can assure you the frequency is correct for all the circuit versions I tested so far. Also the rest of the pics are taken with the same parameters

Although my original question was regarding my breadboard (BB) vs PCB I decided to eliminate all the variables and breadboard a whole new oscillator from scratch. I even took the BAS16 SMD diodes and mounted them on break outboards.

As you can see from the next two pictures, the same circuit, made with exactly the same through hole components (and the LMV751 on a breakout board), acts relatively the same using BAS16 or 1N4148 diodes. This is surprising, since they are what I thought would have the largest impact on the amplitude, since they are what cut it off technically. The only observable difference is that the BAS16 are quicker to ramp up.


New breadboard with BAS16


New BB with 1N4148

As you can see, both these breadboards give me much higher Vpp (1.2V) than my original BB but not as high as the PCB (1.8V)

The next picture is old BB that was giving issues (posted again to appease Nyquist and the rest of you ;)


Old BB with 1N4148

The old BB was measured again with another LMV751 chip and it acted the same as before (Vpp=680), furthermore, the LMV751 chip from the old BB was put on the new BB and the new BB acted the same (Vpp=1.2).

At this point I had two IDENTICAL BB, checked over 3 times by myself, as well as a lab tech with 30+ years of experience at Phillips and neither of us could explain the readings we observed..the only physical difference was that one BB was slightly smaller than the other, and a slightly different shade of white !!

However, touching the components here and there, I noticed that if I touch either side of the 200k resistor, the amplitude of the osculations increased dramatically (~2Vpp). This was replicated on both the old and new BBs. Assuming this was my stray capacitance, I added a 3nF capacitor from the node between D2 and R17 to ground and this confirmed my belief. The cap increased the amplitude of the oscillations.

To see if this was the cause of the increase on my PCB (since I have a large ground plane under my oscillator circuit) I measured the capacitance from that node to ground and got a reading of 3pF... no dice!

I gave up at this point, and while touching the circuit some more, I realized that touching the ceramic part of C14 slowly (~10mV per sec) kills the signal while touching the ceramic part of C13 increases the signal. This turned out to be due not to my capacitance but due to temperature.. Apparently the 1% through hole capacitors I bought are garbage at Temp sensitivity and change their capacitance even from the heat of ones finger..

Long story short, unless any of you have something to add that I missed (I really really hope you do!!) let this be word of caution for those trying to get a predictable amplitudes from a diode controlled wien bridge..

Now, onto my actual question, how to deal with this, since the rest of my PCB cant be changed and was designed for an output around 600mVpp (based on the old BB)...

One idea I had, was to use a shotkey diode since it has the same footprint and should technically cut out the oscillations quicker, since they have a smaller forward voltage.

Another was to use thermistors, however I doubt the tiny amount of current this thing drives will heat it up significantly.

Basically, I need to generate a sine wave that has a constant amplitude over time, and which cannot ever go above 600mVpp. Does anyone have any suggestions for a good voltage throttle circuit, or where I can start looking?

Also, since the wien bridge seems to be pretty rubbish in the reliability sector, what other oscillator designs would you recommend? I dont necessarily need to run at 20kHz, I can probably go up to 100k, so maybe a wien bridge using a watch crystal would be a solution.

Another is to output the clock signal from my ATtiny45 micro controller and lowpass filter that into a sine wave, would that work?

What do you think of those solutions?

Thank you again for all your help, and even if this never gets figured out completely, hopefully it will be useful for anyone trying make a signal generator this in the future...

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

1. You are still sampling at a rate that is equal to the expected frequency. You cannot get any valid measurements from that. Increase the sampling frequency to at least 200 kSa/s I would use more. Didn't you read my and other guy's posts?

2. Don't be ridiculous. "Brian, the frequency is just a simple RC time constant: 1/(2*pi*820e-12*9.76e3) = 19.886 kHz" is being ridiculous.

3. If you need a simple sine-wave source - why not try a Wien Bridge oscillator? wink

4. "Thank you again for all your help, and even if this never gets figured out completely, hopefully it will be useful for anyone trying make a signal generator this in the future..." - Did you REALLY mean that???

Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

(OP)
Skogsgurra, my oscilloscope chooses the sampling rate based on the time interval I as it to sample (at least as far as I figured out how to use it).. In this case, sine I am sampling 5ms it samples at 20k.. I dont care about the fact that it cant accurate measure frequency at this point since all i want to see are the start up characteristics.

The frequency measurements are made at 5MEGA samples per second, and thats how i know everything runs at 20k.. i just decided not to show boring pictures of sine waves to everyone...

Whats ridiculous about my time constant equation?? Obviously the real frequency is not that due to tolerances, but Its definitely within 1% of that. I just wanted to see how Brian calculated it..

Lastly, not sure what your getting at with the last one...

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

What I mean is that you behave like a kid when your toys don't do what you want them to do.

One example: " the wien bridge seems to be pretty rubbish in the reliability sector" - Well, it is NOT. It is one of the most proven LF oscillator designs there is. It is with a Wien bridge oscillator that Hewlett-Packard, later Agilent and now Keysight started their business back in the thirties.

There is something with your attitude that doesn't bode well. You need help from someone that knows about Electronic design. No matter how good you are as a bioenginner - you are, if I may say so, a lousy Electronics designer.

If you need a sine oscillator, you could have bought one, or several, for the money that you have cost your employer dabbling in a field that you don't understand.

My last comment? I think it is obvious what I meant with that. You seem to think that you have discovered several flaws in a well proven technique. Which is wrong. And then, you think that you help others by "warning" them about the "problem". Which is not only preposterous but also completely wrong.

Now, read up on the Nyqist theorem. Then set your sampling frequency to at least 200 kHz (yes, it is possible) and you will see that your problems are gone.

Just do it!

Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

"Another (idea) was to use thermistors, however I doubt the tiny amount of current this thing drives will heat it up significantly."

As mentioned previously, the traditional amplitude regulating element is a small incandescent ("grain of wheat") light bulb. Many designers spend a great deal of time and effort eliminating the bulb, perhaps not realizing that the bulb operating point isn't normally set to glow, and thus their lifespan might be essentially indefinite.

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

(OP)
Skogsgurra, I didnt realize kids thoroughly troubleshoot and work through fault finding in their circuits and then post detailed results for others to analyze.

As great as the wien bridge that HP made (which used a bulb as im sure you know) the diode version doesn't seem that great at AMPLITUDE control.. Most people probably dont care about this since they only want the oscillator to have a specific frequency, which it definitely does.

Anyway, Im only drawing conclusions from my experiment, I have two wien bridge circuits with identical components in front of me that both give me different results. I can heat up a capacitor by a few degrees (with a heat gun) and I can see the a great swing in amplitude. My circuit is up there, these are my results. If Im so rubbish at electronics than please help me understand what fundamental error I made that resulted in my wien bridge to act like this..

I know a fair bit about Nyquist, and the aliasing would have nothing to do with how the ramp up time is displayed.. like i mentioned before the actual amplitude and frequency measurements were made at 2 MEGA samples per second so Nyquist can rest easy..

Overall, I presented all my data, every step I took, the result I got and the conclusion I drew. Im sure Im not the only person to ever take a Wien bridge from BB to PCB, and if anyone else ever has this issue than I really do think seeing these results will help .. but anyway, you don't have to agree. You come off as knowing alot about electronics, so I'd hope you'd give me some feedback on the actual design/circuit rather than just criticize my attitude.

RE: Wien bridge oscillator, diode stabilized, inconsistent amplitude b/w breadboard and PCB

OK. You did check the waveform at 2 MSa/s. That's fine. But all we can see is that you are worried about the sinewave's amplitude when you measure with 20 kSa/S, which is the same as the expected signal frequency. That means that you can't see the actual waveform. Instead, you see an alias that is dependent on where on the sinewave you happen to sample. And that causes HUGE amplitude variations as seen on the scope screen, but no variation in reality.

That is what I was trying to tell you. And, since the circuit diagram looks OK and you assure us that all component are in working condition and correctly connected and that all is fine and dandy - I cannot see any other problem than that obvious mistake with the sampling frequency.

Sorry if you feel insulted (I would also feel insulted in the same situation - I'm also human) but you have not given me any reason to believe that you are listening to what we are saying or that you are prepared to try what we recommend.

Instead, you complain about components and circuit topology. To that I can only say that you have chosen those "crap" capacitors yourself - didn't you check tempco before buying - and repeat that that circuit works quite well in many applications. You may try with other values of R17, higher values will reduce distortion but also make regulation worse. Lower values work the other way round and, when taken too low, will make the amplitude hunt.

Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close