Function Generator Sine / Triangle / Square / Saw ( PIC16F870 )
Description: After the recent demise of our multifunction signal generator, we decided to make one of our own. The circuit uses a PIC16F870 (about $3), an R/2R resistor ladder network (for a real fast and cheap D/A), and a few other parts. You can check out the schematic and the current source file. Also the object (hex) file. All of the sine wave functions utilize a full 256 byte by 8 bit lookup table. Contrary to what you may have heard elsewhere, it is possible to use a full memory page in the PIC for a lookup table - check it out. The only real elaboration was the design of the low-pass filter. With the present design running on a 20 mhz clock, you can get over 60 khz of very clean sine waves. The frequency is adjustable in 1, 25, and 500 hz steps. The unit produces accurate frequencies down to 1 hz.
Since all of the waves are generated in software, the 'user interface' had to be kept to a minimum. Three LED's indicate the functions (which vary depending on the type of wave being generated). Three more LED's indicate the step rate of the adjustment control. Pushing the RATE button advances to the next step rate and pushing the select button goes to the next function.
The wave function itself is selected by holding down the select button while rotating the adjustment control. Since there is no visible indication of the wave type or frequency, you need to have a scope hooked up to see what you are doing.
The design of the multifunction signal generator incorporates a microcontroller, specifically the PIC16F870, which serves as the core processing unit. This microcontroller is programmed to generate various waveforms including sine, square, and triangle waves using a software-based approach. The R/2R resistor ladder network functions as a digital-to-analog converter (DAC), providing a cost-effective means to convert the digital signals from the microcontroller into analog waveforms.
The architecture utilizes a lookup table that is 256 bytes in size, with each entry being 8 bits. This table is crucial for generating the sine wave functions, allowing for smooth and accurate waveform outputs. The design also includes a low-pass filter to ensure the generated sine waves are clean and free from high-frequency noise, which is particularly important when operating at frequencies exceeding 60 kHz.
Frequency adjustment is achieved through a user interface that consists of a minimalistic control scheme. The interface features three LEDs that indicate the current waveform function and an additional three LEDs that signal the step rate of frequency adjustment. The user can cycle through different step rates by pressing the RATE button and can select different waveform functions by holding down the SELECT button while adjusting the control knob.
The ability to generate frequencies down to 1 Hz, with adjustable steps of 1 Hz, 25 Hz, and 500 Hz, enhances the versatility of this signal generator. However, due to the lack of a visual display, users must connect an oscilloscope to monitor the output waveforms and verify the selected frequency and waveform type. This design approach emphasizes functionality and cost-effectiveness while maintaining the essential capabilities of a multifunction signal generator.After the recent demise of our multifunction signal generator, we decided to make one of our own. The circuit uses a PIC16F870 (about $3), an R/2R resistor ladder network (for a real fast and cheap D/A), and a few other parts. You can check out the schematic and the current source file. Also the object (hex) file. All of the sine wave functions utilize a full 256 byte by 8 bit lookup table. Contrary to what you may have heard elsewhere, it is possible to use a full memory page in the PIC for a lookup table - check it out.
The only real elaboration was the design of the low-pass filter. With the present design running on a 20 mhz clock, you can get over 60 khz of very clean sine waves. The frequency is adjustable in 1, 25, and 500 hz steps. The unit produces accurate frequencies down to 1 hz. Since all of the waves are generated in software, the 'user interface' had to be kept to a minimum. Three LED's indicate the functions (which vary depending on the type of wave being generated). Three more LED's indicate the step rate of the adjustment control. Pushing the RATE button advances to the next step rate and pushing the select button goes to the next function. The wave function itself is selected by holding down the select button while rotating the adjustment control.
Since there is no visible indication of the wave type or frequency, you need to have a scope hooked up to see what you are doing.
In an analog world, converting digital values to their analog equivalents is often necessary when using microcontrollers. Many low-cost microcontrollers lack built-in hardware digital-to-analog converters (DACs), but most feature an 8-bit or 16-bit timer capable of generating Pulse Width Modulation...
The circuit generates three square wave outputs with a 120° phase difference between each output. The reference clock frequency is set to twice the desired output frequency. This can be achieved using a crystal oscillator followed by a series of...
This circuit is intended to provide good square waves converting a sine wave picked up from an existing generator. Its main feature consists in the fact that no power source is needed: thus it can be simply connected between a...
The circuit employs a field-effect transistor (FET) at the input of a Schmitt trigger, allowing the use of a low-value capacitor. The trigger, controlled by Q1 and O2, exhibits a hysteresis of approximately 3V, regulated by a 3V zener diode....
This circuit utilizes a single active component, the 4069 IC, to convert sine waves into square waves without requiring an external power source. It is designed for testing audio instruments.
The circuit leverages the characteristics of the 4069 IC, which is...
This circuit utilizes a single active component, the 4069 IC, to convert sine waves into square waves without requiring an external power source. It is designed for testing audio instruments.
The circuit leverages the characteristics of the 4069 IC, which is...
Construct a sine wave generator using the TL082 operational amplifier and a 9V power supply. However, the output is producing a distorted waveform rather than a clean sine wave. There is a need for a list of components suitable for...
The process of converting a triangle wave waveform into a sine wave involves the adjustment of its transfer function using resistors R32 and R33. Modifying these resistors affects the linearity of the response. The differential output current from the Q1...
Simple triangle-wave generators have a limitation in that the waveform of their output signal typically cannot be modified. The circuit presented here makes...
The described circuit addresses the inherent limitation of conventional triangle-wave generators by incorporating adjustable components that allow for...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more