Maker Pro
Maker Pro

Phase Shift Oscillator Puzzle

ShawnS

Apr 4, 2020
8
Joined
Apr 4, 2020
Messages
8
Hello all - my first post here! I've been developing an oscillator circuit in which I want to place an RTD (1 kohm nominal) to develop an output frequency that is dependent on the resistance. The op amp RC oscillator does the trick, but for various reasons (due to environment) op amps are not an option. The BJT phase shift oscillator is an option though (see BJT OSC), and I found by including the RTD as one of the resistors in the phase shift network, the output frequency varies linearly over about 0 - 100C. Problem is the BJT circuit is sensitive to bias changes, temperature, and oscillation dies.

I tried incorporating the phase shift network with an inverter IC (74HCU04) but it did not oscillate (see INV OSC). This puzzles me because the gate is biased for gain and has the required (-)180 deg phase shift. I thought as long as there was the (-) 180 deg with adequate gain, plus the 180 deg shift from the RC network, the circuit meets all the oscillation requirements.

Any thoughts from the experts out there on why this will not oscillate?

PS Among things I tried, I replaced the high pass network with a low pass network and it does oscillate and at the frequency prescribed by analysis (rt6/2piRC).

Thanks!

Shawn
 

Attachments

  • GEN PHASE SHIFT OSC.jpg
    GEN PHASE SHIFT OSC.jpg
    38 KB · Views: 13
  • INV OSC.jpg
    INV OSC.jpg
    77.5 KB · Views: 12
  • BJT OSC.jpg
    BJT OSC.jpg
    84.3 KB · Views: 13

Cannonball

May 6, 2017
193
Joined
May 6, 2017
Messages
193
You said you used a lower pass network and it worked. Try using a higher frequency transistor.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
The digital inverter oscillator should work when made like this:
 

Attachments

  • phase shift osc.png
    phase shift osc.png
    309.3 KB · Views: 13

ShawnS

Apr 4, 2020
8
Joined
Apr 4, 2020
Messages
8
You said you used a lower pass network and it worked. Try using a higher frequency transistor.
Hi Cannonball thanks for your reply. Please take note that I was able to get this to work with a transistor (lowly 3904 in fact). It's getting it to work with the inverter gate is the issue.
 

ShawnS

Apr 4, 2020
8
Joined
Apr 4, 2020
Messages
8
The digital inverter oscillator should work when made like this:
Audioguru - thank you for the info! I have some of those on hand and will be trying them soon. Stand by for the results.....
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
Yes, your oscillators use highpass filters. Here is one that uses lowpass filters. The amplifier gain must be about 27 times because the filters are not buffered and affect each other. The output needs a high impedance load.
 

Attachments

  • phase shift oscillator.png
    phase shift oscillator.png
    19.2 KB · Views: 7

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
A single inverter will oscillate with a capacitor from the input to ground and a resistor from its output to the input.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
I've always preferred the lowpass version of the phase shift oscillator. Better behaved, and a lower distortion waveform available.

ak
 

ShawnS

Apr 4, 2020
8
Joined
Apr 4, 2020
Messages
8
A single inverter will oscillate with a capacitor from the input to ground and a resistor from its output to the input.
Whonoes - thanks for the reply. I would rather if possible keep to a phase shift network to define the frequency. As I understand the "relaxation" kind will be somewhat dependent on trigger thresholds, vary a lot over temperature, and not as reproducible.
 

ShawnS

Apr 4, 2020
8
Joined
Apr 4, 2020
Messages
8
I've always preferred the lowpass version of the phase shift oscillator. Better behaved, and a lower distortion waveform available.

ak

Thanks AK. I have not ruled that out, but the low pass type puts the output in the frequency range I prefer ( < 10 kHz).
 
Last edited:

ShawnS

Apr 4, 2020
8
Joined
Apr 4, 2020
Messages
8
Yes, your oscillators use highpass filters. Here is one that uses lowpass filters. The amplifier gain must be about 27 times because the filters are not buffered and affect each other. The output needs a high impedance load.
Update - unfortunately the circuit as drawn using "RNEW" would not oscillate for me, so I turned back to using the HCU04 and a low pass phase shift network which seems much more stable. I am somewhat surprised that the frequency is affected so much by the supply voltage though since the phase shift is not affected by the amplitude. I blame strays within the IC. I did learn something from this so I appreciate your help!
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
Why don't you post your schematic that might have resistor values that might be much too low?
Did you feel the temperature of the 74HC04 and measure the DC current of the circuit?
 

ShawnS

Apr 4, 2020
8
Joined
Apr 4, 2020
Messages
8
Why don't you post your schematic that might have resistor values that might be much too low?
Did you feel the temperature of the 74HC04 and measure the DC current of the circuit?

Good idea! Please see attached. The HCU04 shows no sign of abnormal heating. All unused gate inputs were pulled low. Current to IC is around 8 mA from 3.3 V.
 

Attachments

  • Oscillators.jpg
    Oscillators.jpg
    93 KB · Views: 7

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
As i suspected, your resistor values are Way Too Low for a low power CD4069
Also its gain is trying to be 2000 times with the extremely low 500 ohms value for the input resistor instead of about 27 times using a 33k resistor.

I thought you wanted to make a sinewave but your circuit with digital buffers makes a squarewave. A circuit to make squarewaves is much simpler.
 

ShawnS

Apr 4, 2020
8
Joined
Apr 4, 2020
Messages
8
As i suspected, your resistor values are Way Too Low for a low power CD4069
Also its gain is trying to be 2000 times with the extremely low 500 ohms value for the input resistor instead of about 27 times using a 33k resistor.

I thought you wanted to make a sinewave but your circuit with digital buffers makes a squarewave. A circuit to make squarewaves is much simpler.
You are correct - the square wave is the desired output. Waveshape is not a concern here since the output frequency is what is needed. I will experiment with larger resistor values and smaller caps and see what happens. The 1k ohm resistors was selected to match the RTD's on hand nominal resistance. Thanks again!
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
Here is a simple Cmos squarewave oscillator using an MM74C04 which is the same as a CD4069. It has a fairly low output current.
A 74HC04 can be used with reduced resistor values if you want and it has a higher output current but it might get hot.
An even simpler Cmos Schmitt Trigger squarewave oscillator can also be made with ordinary CD4xxx or 74HCxxx ICs.
 

Attachments

  • Cmos oscillator.PNG
    Cmos oscillator.PNG
    23.2 KB · Views: 1
  • Cmos Schmitt oscillator.PNG
    Cmos Schmitt oscillator.PNG
    19.2 KB · Views: 2

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
@ShawnS: Welcome to ElectronicsPoint! We DO cater to newbies here, so feel free to ask lots of questions. The better you can describe what you want to DO, the better the advice you will receive. A lot of folks come here with some idea of how they want to DO something, but if they are inexperienced their idea may be impractical. Your idea of using an RC oscillator, either a phase-shift version or a relaxation version, is very practical. But as you may have noticed, depending on the circuit and component values, it can be subject to unwanted frequency drift. I will describe an approach that is not susceptible to such problems.

If your design goal is to have the RTD produce a stable square-wave frequency (< 10kHz) that is a function of its resistance, then I would suggest that you use a PIC microprocessor to (1) generate appropriate frequencies at one of the PIC output ports and (2) measure the RTD resistance using the PIC's built-in 10-bit analog-to-digital converter.

A simple look-up table translates the digitized RTD resistance values to frequency (or period) constants that are used by firmware you write to generate the output wave forms. The wave forms are rectangular in nature (square waves) since the output is from a digital port.

OTOH, if later you want something approximating a sine wave, say for purity of audio tone, that will require some extra effort. The extra effort could be as simple as a low-pass filter to remove the higher-order harmonics of the square-wave outputs. Considerably more complicated would be a digital-to-analog converter (not recommended or necessary, based on what you have revealed so far) driving an appropriate low-pass filter.

A possible disadvantage of the PIC approach is the discrete nature of the frequency increments as a function of temperature. Depending on your application, this may or may not be a serious problem. With the 10-bit A/D in a PIC16F15325-I/P (for example) the RTD will be digitized to a resolution of one part in 1024 (0 to 1023), which is 210. That's a fair sized lookup table, and with 16-bit values for each table entry, a frequency resolution of one part in 65,536 (0 to 65,535), which is 216.

Some arithmetic on your part would be required to set the range of RTD resistance values that are digitized to fit into a 0 to 1023 "measurement range," and some more arithmetic and careful thought on how to use those 1024 digital values to address a lookup table stored in non-volatile program memory along with your program. Even more thought on what 16-bit values to place in those 1024 locations to achieve the frequency range you want your RTD to span as its resistance varies with temperature is required. This is perhaps the hardest part because the values will depend on the algorithm you decide to code to implement the square wave frequency output. If you can tolerate the coarseness of the frequency resolution, you could ditch the lookup table and use the digitized RTD resistance values as the input to your square wave generation algorithm. That does limit the frequency range to one of 1024 discrete frequencies, compared to one of 65,536 discrete frequencies with 16-bit lookup table entries.

Moving from an all-analog solution to a hybrid analog/digital PIC solution has some advantages. The number of components, required to implement a PIC design, is minimized. Most of the "design" is moved to the software/firmware domain, meaning it is much easier to troubleshoot (debug) than tweaking component values in the hope of finding the right recipe for success.

You could also implement a prototype hybrid analog/digital design using an Arduino platform, which eliminates the considerable amount of learning required to select and program a PIC, but at the expense of a much larger "footprint." Later, if so inclined, you can translate the Arduino design to a more compact PIC design.

Please let us know if a PIC-based or Arduino solution is attractive. There are folks here who can help you with either choice, plus Microchip has a forum too.
 
Top