Tags

,

Post for August 28, 2014

As noted in this blog post where I walked through SparkysWidgets’ miniEC, the first stage of the E.C. circuit is a Wien Bridge Oscillator.  The goal of the Wien Bridge Oscillator is to create a low distortion sine wave.  The sine wave is used to inject current into the E.C. probe so that the probe can measure conductivity.

The Goal

The goal of this post is to explore a bread board implementation of the Wien Bridge Oscillator circuit used in the Healthy E.C. Shield (Healthy E.C. Shield project files are available on this GitHub repository).

Thanks To Those That Go Before 

I like to take a moment to reflect on folks who have positively impacted my life by sharing their knowledge.  Certainly I would not be able to write this blog post without advice, guidance, and insight from:

  • The incredible wealth of information that has been shared on the Internet.  THANK YOU.  I grew up in the pre-Internet age where there was very little knowledge sharing.  Learning was focused on one test after another.  Now for most of my learning the only thing stopping me is the quality of my Google Search terms.
  • Chris Gammell.  Chris is the real deal.  He knows his electronics.  He is an incredibly great teacher.  I highly recommend his Contextual Electronics course.  You can start to get to know Chris by listening to The Amped Hour podcast.  
  • Ryan (SparkysWidgets).  Ryan’s work and sharing knowledge on his pH and EC sensors have been the basis of my knowledge of these circuits.  Ryan is an incredibly sharp person who is indefatigable in his effort to share his knowledge.

LTSpice IV Model

Using LTSpice is a great way for me to learn and feel more comfortable with a circuit.  This LTSpice IV model shows the three parts of a Wien Bridge Oscillator:

LTSpice Wien Bridge

  • Bandpass Filter:   A bandpass filter is used to set the frequency at 1.6KHz.  

    I’ve been told a frequency of at least 1 KHz is needed to avoid electrolysis: 

    • based on comments found on this web page:  “If the frequency is high enough (>1khz it seems) the molecules dont have time to move apart before they are pulled in the opposite direction.” 
    • Ryan uses this frequency for the miniEC – which he has tested with. Ryan’s reasoning:Really anything over 1khz should work well, the idea is get into a higher speed AC signal so that you do the least amount of damage to the water chemistry that you are trying to read, Passing DC through salty water breaks down the salts and causes electrolysis.  Both of which are really bad if your intentions are to measure that salt content and not disturb the SUT. 
    The R’s and C’s that make up the bandpass filter has R3 = R6 = 1K and C5 = C6 = 100nF. applying the frequency formula: f = 1/(2∏RC) = 1/(2*3.14*1000*.0000001) ~= 1.6K
  • Start Oscillation:  This post notes a property of Wien Bridge Oscillators:Initially the gain set by R5 and R4 will be just slightly greater than 3, this will allow oscillations to start. The Gain =  1 + 22K/10K = 3.2. 
  • Stabilize:  Once the oscillation gets going it stabilizes to 3 using diodes to reduce the resistance of R5.
Results from running the simulation:

  • The op amp output has a VPP ~= 460mV
  • The inverting and non-inverting inputs have a VPP of ~= +/- 163mV.

Bread Board

I am using the LMC6041 op amp and 2 diodes I had purchased earlier from our local electronics store, the NTE519.

Op Amp Pins

I broke the circuit int three sub circuits so that bread boarding would be easier.  I checked the values for the resistors, capacitors, and diodes with my Extech 330 DMM.

Group A Subcircuit

Group A sub circuit goes from the inverting input of the LMC6041(pin 2) to the output of the LMC041 (pin 6)

Group A Subcircuit Wien Bridge

Group B Subcircuit

Group B Subcircuit goes from the inverting input of the LMC6041 (pin 2) to the non-inverting input (pin 3).

Group B Sub Circuit Wien Bridge

Group C Subcircuit

Group C subcircuit goes from the non-inverting input (pin 3) to output (pin 6).

GroupC Subcircuit Wien Bridge

Results

I am using a Rigol DS1052E Scope.  On my first try, I was just getting noise!  Ach!  I removed all wires and components, leaving the op amp’s pin 4 connected to GND and pin 7 connected to +4.68V.  I then checked the voltage on pin 6.  Nothing…hmm…luckily I had gotten two op amps since what can go wrong will go wrong.  The other op amp showed +4.68V on the output pin 6.  Switching over to this op amp….doing the wiring again….and again….

Pin 2 – Inverting Input

Pin 3 – Non-Inverting Input

Pin 6 – Output

Advertisements