Oscillator Circuits
Oscillators
circuits are essential in almost all system designs.
Oscillators provide the system clocks and interface timing that is
required by almost all systems. There
are mainly two methods to producing a periodic signal, crystal oscillators and
RC oscillators.
Crystal
oscillators are precise and are less prone to environmental distortions such as
temperature and noise. Thus,
crystal-oscillators are stable and do not require calibration.
RC oscillators cannot offer the same precision or stability as crystal oscillators but are simple to construct and oscillation frequency can be controlled relatively accurately. The fact that RC oscillator circuits are less stable and prone to environmental factors can make them interesting system components. For example, RC oscillators can be manipulated and act as an interface to the user by resulting in variance of the oscillating frequency.
The
following are circuit designs for square wave oscillators.
Schmitt RC Oscillator
This simple RC circuit produces a periodic square waveform. The frequency of the output waveform is controlled by the charging and discharging time of the capacitor.
The period of the oscillation can be approximated by:
This circuit is simple and easily analyzed. The
oscillating frequency can be set by changing either the resistor or capacitor
value. The accuracy of this oscillator is highly dependant upon component
tolerance values.
555-Timer Multivibrator
Similar to other RC circuits, the output oscillation frequency is dependant on the Resistors (R1,R2) and capacitor values.
Period of output - '1':
Period of output - '0'
Thus the period of the resulting waveform is:
From the equations above, it is evident that through corresponding resistor and capacitor values, the oscillation frequency can be controlled. Also, if a 50% duty cycle is required then it is evident from the equations that R2>>R1.
FPGA Implemented Oscillator
The previous two designs are implemented using discrete and IC package components that are external to the FPGA system. In many situations, it is advantageous to implement the oscillator circuit with the FPGA and to reduce the number of external components.
The follow application note from Actel Corporation provides in detail the implementation with a FPGA:
Actel Application Note: Oscillators For Actel FPGA's
Debugging and Design Tips
In our project, the oscillator circuit was used by the user to manipulate the system. Through the use of an antenna, the user is able to interact with the oscillator by controlling the proximity of the user's hand to the antenna. This results in slight variances of the capacitance in the circuit, altering the oscillating frequency of the circuit. Although this capacitance is quite small, the change can easily be detected from the frequency of the resulting output.
The effectiveness at which the slight change in capacitance is highly dependent upon the initial oscillation frequency chosen in the design. Through experimentation in the lab, it was found that the observed effectiveness of the user's interaction with the antenna to change the oscillator frequency was more evident as the oscillator frequency increased. The effectiveness was measured as the percent change in the frequency of the oscillator due to user interaction. The oscillator was observed to be in the range of +/-15% for an oscillator frequency of 22 MHz. While offering greater resolution in user interaction at high frequencies, it is important to keep in mind that the circuit is also more prone to external noise and fluctuations due to system parameters such as temperature and component tolerance values. As mentioned before, such circuits are not as stable as crystal oscillators and fluctuations in frequency is highly evident at high oscillation frequencies.
Also through experimentation in the lab, data collected indicate that the effectiveness to change the oscillator frequency through the user's proximity to the antennae is a decaying exponential relationship. At close proximities, small changes in proximity result in relatively large changes in oscillator frequency while only small changes in oscillator frequency can be observed when the user is further from the antennae.
Frequency Conversion/Comparator
Although high frequency oscillators provide greater
resolution, timing constraints and/or chip resources limit the oscillation
frequency. Thus it is sometimes desirable to reduce or scale the frequency
but maintain the information that the signal contains. This is
accomplished through the use of a D-Flip-Flop. Mapping the input
oscillator to the Data ('D') input of the flip-flop and a reference signal to
the clock input. The resulting output signal will oscillate at the beat
frequency of the two input signals. Such a circuit can also be used as a
frequency comparator.
In situations where the frequency of a particular signal need to be determined, a counter is often used to accumulate the number of oscillations in the sample period. In specific situations where only the incremental change in frequency needs to be determined to extract the information, the above techniques proves valuable in reducing the required data width of the counter.
In implementing the user interface with an oscillator, only the difference in frequency caused by the manipulation of the user needs to be determined. Thus the frequency comparator was implemented to compare the oscillating signal against a signal with a reference frequency. The resulting signal was of much lower frequency and still encoded the relative change in frequency that the user induced. Since a lower frequency signal needed to be processed, the data width of the counter needed in the system was decreased, reducing the number of resources (logic blocks) required in the FPGA.
Useful Resources
Below are a list of link that we found useful during the design/testing of our circuit.
National Semiconductor: Data Sheets and Application Notes
Best of luck on your projects and future endeavors…
Spatial Mouse Group
Jimmy Wong, Jeff Chan, Vincci Liu, Gordon Young