element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Transistors: Phase-Shift Sine Wave Oscillator
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: jc2048
  • Date Created: 19 Jul 2018 8:05 PM Date Created
  • Views 6913 views
  • Likes 10 likes
  • Comments 18 comments
  • sine wave
  • oscillator
  • circuit design
  • transistors
Related
Recommended

Transistors: Phase-Shift Sine Wave Oscillator

jc2048
jc2048
19 Jul 2018

Introduction

 

More oscillators!

 

At some point, for reasons I can't remember now, I tried simulating some simple sinewave oscillators. Here's one of them. This one uses a single transistor to provide the gain and a series of RC elements to provide the phase shift. The original circuit might have been from one of Graf's collections of circuits (I borrowed the Oscillators one from the library last year), though it's a fairly common circuit and you'll find it reproduced elsewhere. Books tend to simply present it as being a sine-wave oscillator along with a formula for determining the frequency from the values of the RC elements. In this blog, I'm going to use the simulator to look at it in a bit more detail and see how good it is at producing a sine wave.

 

Basic Circuit

 

Here's the basic circuit as it's usually presented. The original had a 3k3 resistor for the collector load, but I changed that for a 2k2 (the transistor I'm using evidently has a much higher hFE than what was used originally in that circuit).

 

image

 

Here is the output waveform from running a transient test on the circuit

 

image

As you can see, the output sine wave isn't all that good a shape. A sine wave can have a modest amount of harmonic distortion and still look quite reasonable to the eye so, if we can see that it actually looks poor, it really is.

 

How Does it Work?

 

The transistor is configured as a common-emitter amplifier. We say the emitter is common because the input is applied between the emitter and base and the output is between the collector and emitter (as the transistor has three legs, one always has to be shared by input and output). The common-emitter configuration gives us voltage gain - it amplifies the signal at the base - and it also inverts the signal, giving a 180 degree phase shift. The output signal is fed back through three RC networks to the input. At some frequency, the delay through those elements will result in another 180 degrees of phase shift (nominally 60 degrees for each RC pair) and we meet the conditions for oscillation from positive feedback (360 degrees of phase shift around the loop and enough gain to balance the losses).

 

That's kind of an ideal picture where we might imagine the transistor makes a good (linear) amplifier, the gain works to just balance the losses, and we'd see nice sine waves all around the loop. The reality is much different.

 

At start-up, the signal will build (it initially comes from noise generated by the power being applied). After a few cycles, it limits because it has grown to be almost the same, peak-to-peak, as the supply voltage. At the top end, it slows just short of the rail (giving quite a soft top) because of the very non-linear characteristic of the base as the voltage there reduces. It's also the case that each RC stage loads the previous one, with the last one working into the very non-linear load that the transistor represents, so any idea that we get a nice, neat 60 degree phase shift from each stage flies out the window. It's very messy and a simulator approach rather than an analytical one makes a lot of sense. 

 

Further Investigation

 

Here's the circuit as I extended the scope of the simulation, with test meters to measure the waveforms at various points. I included an initial condition of 0V at the transistor base to ensure that it started properly [needing something extra to kick an oscillator into life is common with simulation - this one sits sulking with its output at 4.3V if you don't give it a bit of encouragement].

 

image

 

Here are the waveforms

 

image

Looking at those waveforms, you can see that the reality is miles (kilometers, if you prefer) away from the ideal. For large signals, the single-transistor common-emitter amplifier is very poor in its linearity [I ought to do a 'Transistors' blog on it, really] and the signal out is very different in shape to the signal at the base that generates it. We also have a situation where the transistor input is loading the RC networks, so they don't really filter the output signal in the way you might expect.

 

It's occured to me that one interesting way to think about what is happening is that we have an analog computer that's solving the problem of: 'what waveform do we need at the output so that, fed round the circuit and amplified by the transistor, it results in a perfect copy of itself?' The waveform we see on the 'scope is a solution to that problem (I say 'a' rather that 'the' because it's possible that there might be more than one solution - in fact there is, because a bit more thought shows that there's a static dc level that is also a solution, though whether that would actually happen in reality - as opposed to the simulator, where it's the natural solution - is a different matter).

 

Breadboard

 

Here it is built on a breadboard. You can see how simple it is.

 

image

 

Here's the 'scope trace of the output. On the breadboard, my transistor has a different gain to the one in the simulator and that has moved the dc operating point of the output slightly lower. As a consequence, the limiting is at the bottom, as the transistor runs into saturation, rather than at the top.

 

 

image

 

Here's the result if I get the oscilloscope to do an FFT of that waveform

 

 

image

 

That gives us a better idea of just how poor a sine wave it is. Ideally, there would just be the fundamental (half a division in from the left-hand edge), but as it is there seems to be every harmonic possible in addition (except, curiously, for the 8th harmonic - perhaps they take it in turns to have the day off).

 

Well, I think that's enough experimenting with this. There may well be other uses for the circuit, but if you want a good quality sine wave then it either needs considerable improvement (several transistors, with feedback around them to linearise the response, would be a good start) or you'd need to consider something else, maybe a Wien bridge oscillator. Here's an interesting application note (page 29 onwards) that will help if you ever want to try for one with a really, really low distortion figure [this must rank as one of the best application notes ever written]:

 

http://www.analog.com/media/en/technical-documentation/application-notes/an43f.pdf

  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 7 years ago +5
    Hi Jon, Excellent blog post and detail : ) It is always fun seeing your oscillators and sound generators. The technique you mention about breaking the loop and pretending that the oscillator has an input…
  • jc2048
    jc2048 over 7 years ago in reply to shabaz +5
    In case it's of interest to anybody, I did try having a look at the open-loop response whilst I was doing the blog but didn't publish it because I'm not altogether clear about the results. On the surface…
  • mcb1
    mcb1 over 7 years ago +4
    Nice work on both simulation and real world. In my mind adding RC filters to a sinewave that will be amplified is going to create filtering of the signal at certain frequencies. Applying the RC filtering…
Parents
  • mcb1
    mcb1 over 7 years ago

    Nice work on both simulation and real world.

     

    In my mind adding RC filters to a sinewave that will be amplified is going to create filtering of the signal at certain frequencies.

    Applying the RC filtering to the feedback is going to affect some frequencies more than others, and therefore to me seems wrong to start with.

    However you do need 180 degs inversion to create the oscillation effect.

     

    One question though.

    If R2 was shifted from the collector to the supply, would it have a positive or negative affect on the waveforms?

    It strikes me that it is also part of the feedback loop, and therefore must be having some influence, although minor because of the value.

     

    Mark

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • mcb1
    mcb1 over 7 years ago

    Nice work on both simulation and real world.

     

    In my mind adding RC filters to a sinewave that will be amplified is going to create filtering of the signal at certain frequencies.

    Applying the RC filtering to the feedback is going to affect some frequencies more than others, and therefore to me seems wrong to start with.

    However you do need 180 degs inversion to create the oscillation effect.

     

    One question though.

    If R2 was shifted from the collector to the supply, would it have a positive or negative affect on the waveforms?

    It strikes me that it is also part of the feedback loop, and therefore must be having some influence, although minor because of the value.

     

    Mark

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • jc2048
    jc2048 over 7 years ago in reply to mcb1

    Good question. Just tried it.

     

    Biasing the transistor can be done by taking the resistor to the rail. Here's the circuit if I do that. I've adjusted the resistor so that the dc level at the collector is more or less in the middle between the rails.

     

    image

     

    image

     

    The waveform that results is broadly similar. The transistor stage has a bit more gain now, but the only real difference it makes is that the output waveform limits a bit harder top and bottom (so there would be a bit more distortion).

     

    It's a very poor biasing scheme, though. The resistor would either need to be chosen to suit the individual transistor used or a pot used for adjustment. Neither are very nice for a production design.

     

    The feedback bias arrangement, with the resistor from collector to base, is far from perfect but it does self-adjust to some extent and at least copes with some variation in transistor characteristics even if it does so at the expense of some stage gain.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 7 years ago in reply to jc2048

    Thanks for trying it.

     

    As you say production would be nearly impossible.

    Stage gain is always limited by clipping, so sometimes something that never quite reaches the rails will be better in the long term.

     

    Bit like stereos ... yes they do produce that much noise but some of it is not the noise you want, and certainly not a reproduction of the input.

     

     

    Mark

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Problemchild
    Problemchild over 7 years ago in reply to mcb1

    Even EdX's electronics course uses similar methods .Arnant Agarwall does a good entertaining job of it!

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Problemchild
    Problemchild over 7 years ago in reply to mcb1

    By limiting the gain you should improve the quality of the out put as well!

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube