The Process of Designing and Ordering a PCB- Signal Generator Using FPGA
Introduction: The Process of Designing and Ordering a PCB- Signal Generator Using FPGA
As an electrical engineering student, we had a class in the 5th semester that was entirely evaluated on a project done in less than 2.5 months.
This project was a Direct Digital Synthesizer (DDS) based on a Field Programmable Gate Array (FPGA).
After brainstorming the idea was to make a device that synthesizes signals (Sinus, Cosine, Triangle, Saw-tooth, Rectangular and Noise). The frequency range should be between 1Hz and 1MHz, and the whole system should be based on FPGA (Read more about it here and why an FPGA is super cool).
The FPGA was programmed in VHDL- a hardware description language using Xilinx software. The FPGA should have a block memory or a BRAM that has the values of each signal to be synthesized or what is known as a look up table (LUT). The FPGA clock would trigger the LUT that has 1024 values and on each cycle, the value in the respective address will be read and sent as a hexadecimal number (12bit).
The cool thing about FPGA's everything is done parallel inside its core unlike a microcontroller for example that has to wait a full clock cycle to make a change in a General Purpose Input/Output (GPIO) for example. This allowed the12 bits from the LUT to be sent to 12 different GPIO at the same time.
Since FPGA are only digital interfaces, those 12bits from the different GPIO's were sent to a 12 bit Digital to analog converter (DAC) which spits out an accurate analog converted signal with the correct clock timing as programmed.
The last step of this system is a two stage operational amplifier (Op-Amp)which converts the differential signal coming out of the DAC to a steady pos/neg signal in the first amplification stage. The second stage of aplification was added to change the amplitude of the output signal.
This Instructables will only cover the Printed Circuit Board(PCB) design and schematics. More to the theory of the whole device and how it works follow in the next Instructables.
This is an entry to the PCB Challenge by Instructables.
Step 1: Understanding the Functionality Helps With the Hardware Design!
As most engineers would say, a good design starts on a paper with a pencil!
In this case it was a white board and a marker! I wish I was more organized but this is the only photo that I have and lots of sketches on my notebook that are summed up in the next few steps!
To start with the design process, I started laying down all the functionality that I needed in my device to understand the different sections there is and what components I'll need and how everything should be working with each other.
After the brainstorming those were the main functions that I needed for my device in terms of hardware:
1. FPGA connected with headers (So that it can be replaced)
2. To have two channels at the output (meaning 12 pins on the FPGA x 2 = 24) + extra GPIO for input/output/clock signals
3. 552
Frequency Range (Output signal) 1Hz-1MHz
4. 2 channels 12 bit DAC
5. 2 channels, 2 stage Op-amp. The First stage is differential and the second is to change the amplitude
6. The signal should be variable between +/- 1v on the output
7. Power consumption does not exceed 300mA at any time, and no component use more than 5V
8. Variable frequency using a Linear Potentiometer, also a Linear Potentiometer to change the amplitude
After gathering this information it was time for component hunting!
Step 2: Component Hunting! FPGA+ DAC
Now we know what the board should do a week long component hunting/adventure took place!
Given that this was a project for the university almost all the components that are used were provided from the university (Except for the PCB itself).
Two of the most important components in this device were already in the university, and we used what's available. Those were the FPGA and the DAC. Provided in the university there was a couple of the CMOD S7 from Digilent and
It featured:
* 32 FPGA digital GPIO pins
* 2 Internal analog input (Analog to digital converters- XADC)
* An external power input rail
* 4 LED's, RGB LED, 2 Buttons all on board
* Small factory size
* USB-UART built in with a micro USB onboard
* 12 MHz onboard RC Clock
Perfect! 552