Can anyone please explain really well, how an Oscillator works

Discussion in 'Analog & Mixed-Signal Design' started by IssacSutt, Nov 22, 2017.

  1. IssacSutt

    Thread Starter New Member

    Jan 6, 2017
    25
    0
    I can build and design many different circuits on my own past a certain point, and this is one of the specific topics I have the most trouble in. I have tried to draw up and simulate my own multiple times before, and failed, I really think I have a good idea on what needs to happen to get it to oscillate, I just don't know how to get there cause nothings working, it just seems like the conditions have to be too precise. I'm mainly just focused on square wave oscillators for now though cause it's the most basic I think. Anyways, here's my interpretation of the whole thing: For oscillation to occur, the output has to trigger its input, but with some time delay, otherwise it will not oscillate. So, this cannot happen if the output is exactly in phase with the input and in some cases, it must be ampified with a gain higher than 1??? Is this right, how does it happen?
     
  2. BR-549

    AAC Fanatic!

    Sep 22, 2013
    4,760
    1,294
    There are several different types of oscillators. Some use just the timing of charging networks. And some use a resonance state.

    What's your fancy?
     
  3. BobTPH

    Senior Member

    Jun 5, 2013
    1,543
    367
    There is a specific problem with simulatng oscillators. Real oscillators rely on moise or minute dofferences in idemtical components, which do not soe up in simulstions.

    When you simulate an oscillator in LTSpice, it will often not start up unless you turn off the initial static analysis or turn pn a switch to start
     
  4. BobTPH

    Senior Member

    Jun 5, 2013
    1,543
    367
    Finishishing previps post since I cannot edit on phone,

    Set the initisl voltage to zero on simulator.

    Bob
     
  5. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,208
    1,977
    What type of oscillator are you talking about?

    When discussing circuits, it's always best to include a schematic so we know what you're talking about. You mentioned a trigger which oscillators don't typically have. They're designed to be self starting.

    It's also a good idea to use paragraphs to organize your thoughts. That will make your questions stand out instead of being buried in one long rambling paragraph.
     
    absf and cmartinez like this.
  6. IssacSutt

    Thread Starter New Member

    Jan 6, 2017
    25
    0
    Ok thank you, I believe this schematic may help show you where I'm at and what I'm having trouble with in particular.
    http://everycircuit.com/circuit/5543676379136000
    I really don't think it works quite like this in the real world though, cause I tried simulating it with transistors and got nothing; but this simulation does a good job theoretically.
     
  7. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,208
    1,977
    That silly simulator was taking too long. Post a screen shot of the circuit.
     
  8. crutschow

    Expert

    Mar 14, 2008
    21,757
    6,271
    Can't help you unless you post an exact schematic of the real world circuit.
     
  9. wayneh

    Expert

    Sep 9, 2010
    16,024
    6,119
    For the square wave oscillators you've likely looked at, you're correct but it may be more a description of what happens as opposed to a helpful principle that applies more broadly. Those simple square wave oscillators usually use the charging and discharging of a capacitor to delay the voltage change from keeping up with the output state. The voltage on the capacitor is always trying to catch up to the output but as soon as it gets close, the output state switches and the cap goes the other direction. This is not the same thing as resonance. There are many types of oscillators with different principles of operation. Explaining one doesn't help with the other.
     
  10. ebeowulf17

    Distinguished Member

    Aug 12, 2014
    2,722
    545
    For the benefit of those not wanting to deal with app:
    IMG_3625.PNG
    Sorry about size/resolution. Best I could do from my phone.

    I'm no expert on oscillators (to be honest, I barely understand them,) but two things jump out at me:
    1. Building a circuit with some transistors is nothing like using the logic gates in the schematic (unless you've put an unlikely amount of work into designing discrete transistor logic gate equivalents.)
    2. The LED needs a current limiting resistor. Without the resistor you could easily blow up the LED and/or have the LED pull the logic high outputs down to the LED's forward voltage, which would of course severely disrupt real world circuit behavior.
     
  11. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,208
    1,977
    Edited schematic:
    upload_2017-11-22_16-25-14.png
    Two of the inverters are extraneous. The LED is loading the output and, as previously mentioned, needs a current limiting resistor.

    We need to know the technology for the inverters. CMOS? Schmitt inputs?

    Ignoring the LED which loads the output. The circuit starts out with the input to the first inverter grounded. That makes the last inverter output HIGH. The capacitor will start charging to the HIGH logic voltage level through the 1k resistor. When the input to the first inverter reaches the threshold for HIGH, it will switch state and the third inverter output will now be LOW. That will discharge the capacitor through the 1k resistor until it reaches the threshold for LOW. Then the process repeats itself.

    The two extraneous inverters will add some delay.
     
    absf and ebeowulf17 like this.
  12. IssacSutt

    Thread Starter New Member

    Jan 6, 2017
    25
    0
    Sorry for the loading issue, it came from the everycircuit app, and doesn't ever seem to work well enough when loading it elsewhere such as chrome. SmartSelectImage_2017-11-22-12-22-38.png
     
  13. IssacSutt

    Thread Starter New Member

    Jan 6, 2017
    25
    0
    Good point. I never really thought it would have that much of an effect on the operation of the gates themselves, and if what you say about implementing them with transistors is true, then that would definitely explain the phenomenon of why it' so difficult to recreate or model circuits like that with them. -Thanks
     
  14. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    7,701
    2,167
    Disagree.
    Agree, and that makes them important.

    Normally, this circuit is built with one Schmitt Trigger gate (NAND or simple inverter). The voltage difference between the two hysteretic trip points and the R-C time constant combine to set the operating frequency. Without the Schmitt input, the operating frequency is dominated by the propagation delay through the three inverters. Depending on the chip technology (CMOS, LSTTL, etc.) this can be very short, as in nanoseconds. The R-C delay still affects the output frequency, but not nearly as much since it takes only a few millivolts of change at the R-C node to cause the inverters to change state.

    ak
     
    absf likes this.
  15. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,208
    1,977
    That the inverters are extraneous or that the circuit will oscillate?

    Single CMOS inverter (CD4069) oscillator buffered by another inverter to avoid loading:
    aacclip5.jpg
     
  16. Danko

    Active Member

    Nov 22, 2017
    652
    263
    Maybe you wish something like this?
    Oscillator.png
     
  17. Papabravo

    Expert

    Feb 24, 2006
    12,043
    2,591
    Understanding how oscillators work is the end of a fairly long road that begins with understanding DC circuits and passive components. It is hard to get to the end without starting at the beginning. Seems self-evident, but you would be surprised at the number of people who think there is a shortcut. There really are no shortcuts. For a bit of background it might be helpful to familiarize yourself with:

    https://en.wikipedia.org/wiki/Barkhausen_stability_criterion

    This applies to linear systems, but there is a whole class of non-linear oscillators, which by their nature defy solutions in closed form to the governing equations.

    https://en.wikipedia.org/wiki/Van_der_Pol_oscillator
     
Loading...