Sei sulla pagina 1di 4

1.

Presentation
Hello, we are ................ and we will present a project about a function generator describing its characteristics, capabilities and drawbacks.

2. index 3. Explanation about a function generator


In the following, I will explain what a function generator is. A function generator is an electronic device capable of generating different electrical waveforms, over a wide range of amplitudes and frequencies. The function generator implemented in this case, uses a FPGA (field programmable gate array) and a DA (Digital-Analogic) converter to output a waveform. FPGA is a device composed of programmable logic gates to perform a determined function, this device is endowed with a FLASH memory for program storing, a RAM memory to store variables, operational blocks, switches for interacting with the program, also it has leds, 7 segment displays and digital inputs and outputs. DA is a device capable of converting the digital output of the FPGA in an analogical signal.

4. Function types
This device is capable of generating four different waveforms, mentioned in the following: Square: A square function is one that switches between 2 voltage levels. Triangular: A function that has a constant slope either for its increase or decrease. Sawblade: A function similar to the previous one, but in this case it has a constant slope during its increase and decreases to its minimum value instantly. Sinusoidal: Its self explanatory, this waveform follows a sinusoidal function.

5. Frequency selector
The device is capable of switching in between different frequencies ranging from 312 Hz to 2,5 kHz.

5.1

Amplitude selector

The device is capable of attenuating the signal with a 1, 2, 4 or 8 ratios.

6. Implementation
RAM (Random Access Memory)
The device uses a RAM, to store the values of a period of the signal to output. Each period is composed of 1000 points to represent. It has been used a memory of 1024 memory addresses per 16 bits, one per each signal type. Of the 1024 memory addresses, there has been used 1000 to store the values of the period of each signal. The maximum output value is 2.5 Volts, which can be divided in 65536 steps, resulting in a resolution of about 38 uVolts. These 65536 values are achieved due to the fact that the memory is a 16-bit memory, since 2^16 is 65536. To generate the 1000 values that correspond to each signal, it has been created a program which generates the values automatically.

7. Frequency selection
The selectable frequencies are: 2.5 kHz, 1.25 kHz, 833 Hz, 625 Hz, 500 Hz, 357 Hz i 312 Hz. To select the frequency it is used a combination of three switches to select it. To make this possible, a second counter is used as a frequency divider.

7.1

Amplitude selection

To select the amplitude it is used a combination of two switches to select it. The selectable amplitudes are eighth, fourth, half and original amplitude. To select the amplitude, it is done by shifting the register to the right, thus decreasing the amplitude by half of the original each shift.

8. Function generator design


The function generator has been implemented in the FPGA following a simple procedure. It consists mainly of introducing different memory blocks the discretized values in amplitude of the different functions and, at the moment of generating the desired function, it is just made by accessing the corresponding memory blocks, accessing

progressively at all of its directions. For the correct generation of the function, it is loaded in the memory a complete period of the signal with the purpose of continuously outputting the signal. Once a storing method has been chosen, it is proceeded to introduce the values of each function in the memories. As simple it may look, it is an extremely tedious task to realize manually taking into account the 16-bit value to introduce in hexadecimal format, totalling to an amount of 262144 (two hundred sixty two thousand one hundred fourty four )values to introduce. Arrived at this point, the memories are loaded with the values of its respective functions, being available to load the values on the DA converter. For this purpose it has been used a code in which the memory is accessed each time that a signal goes to high value.

8.1 Data sending to the DAC


The DA converter works by series transmission. There has been created a clock which controls the transmission to the DA, since it only supports 30 MHz. At this point, it is already implemented a function generator in binary code, the only thing missing is to load the 16-bit data of each memory position for each function in an output. However it is desired to obtain at the output of an analogical function requiring the use of a digital analogical converter. The DAC used receives data in a serial communication format, requiring the use of a code which loads bit per bit every single memory position. To realize correctly the serial sending of data to the DAC, there is a certain group of conditions that delimitate the start and finish of each data transmission.

9- 11 Result!!!

12. Drawbacks
With the most attenuated signals, there were some problems due to noise effects. Also the quality of the signal generated is inversely proportional to attenuation.

13. Conclusions
The frequencies achieved are not very accurate. It would be an interesting option to use an adjustable frequency selector. Changing the attenuation method with the purpose of increasing the quality in attenuated signals In general it has been a satisfactory result. This project has been a good experience for the assimilation and application previous knowledge. It has been proven that with an FPGA and a DA, it is possible to make a function generator that is both good and practical.

Potrebbero piacerti anche