1Hz - 2MHz Function Generator
Abstract
Using DipTrace a function generator PCB was designed that can produce an oscillating square wave, sine wave, or triangle wave with a frequency between 1 Hertz to 2 Megahertz. A kit was purchased from DIY-Electronics.com which included the parts and schematic and the board was designed from scratch and was manufactured overseas. The board was soldered by hand and tested using the EE senior project lab instrumentation. The board worked, but constructing a case was difficult due to the board design. The conclusion of the project taught that designing electronic components requires a lot of forethought and problem solving.
Project Description
A function generator system capable of producing an AC signal ranging from 1Hz-2MHz was designed using DipTrace. The components and schematic for the device were purchased from Electronics-DIY and arrived within 10 business days. The kit came with a PCB board and the required components costing 40 dollars and after tax and shipping the total came out to around 50 dollars. A bill of materials was made using excel in order to keep track of all the parts and their functions.
Figures 1 and 2: DipTrace Schematic and PCB layout of Function Generator
In DipTrace the schematic was drawn using components created from the component editor. Each component was assigned a pattern created from the pattern editor that would determine what was physically created on the PCB. Then the completed schematic was tested for errors and then imported to the PCB layout file. From here the component patterns where placed on an outline of a board measuring 3 in. X 3.75 in. and then autorouted followed by manual routing. There was going to be an accidental open in the circuit due to the way the board was originally autorouted, but luckily the error was caught and prevented later debugging of the circuit. Once everything was checked twice the Gerber files were generated as well as the NC drill file and those were sent with a copy of our schematic and layout files to a PWB manufacturer.
A prototype board using a bread board, wire, and a 9V battery was made before the design was finalized. The waveforms that the prototype produced were close to the right shapes, but the signal had a lot of noise probably caused by the messy wires. This was noted and hopefully on board circuitry and soldering would solve this problem.
Figure 5: Function Generator PWB
The board was completed and shipped in around 5 days and it was time to solder the components to the board. The solder was supplied by the IME 458 lab room as well the solder wands, sponge, and PCB stands. Tape was used to hold components in place as they were carefully soldered to the board. Solder remover wick was used to remove unwanted extra solder from the board. After the soldering was complete alcohol was used to clean up the flux from the underside of the board.
The most important part of the device, the function generator DIP IC, was referenced as FG on the board as opposed to U1, just to be different. It was very important not to solder the package leads incorrectly. The IC receives a DC signal and creates an AC signal based on the capacitance applied using the DIP switch circuits. The function output can be measured with an oscilloscope at the RCA out and three potentiometers can adjust both the frequency and the amplitude. The black switches running along the board determine whether the output AC signal will be a square, triangle or sine waveform.
Figures 6, 7, and 8: Square, triangle and sine wave example outputs
Conclusion
The board worked after the first time soldering the components to the board and was tested using the senior project EE lab oscilloscope. Some tinkering with the potentiometers needed to be done in order for the system to output a clean looking signal of all three waveform types. The potentiometer controls aren’t linear and take time to get used to how much they affect the signal. The different wave types also are affected by the frequency modulation slightly differently.
The function generator was designed to use anywhere from a 9V to 18V DC voltage source, but the function generator was able to work perfectly using only an 8V DC source from the EE senior project lab DC power box. This made testing the circuit very easy as only two banana to probes and one oscilloscope probe was needed to test the circuit. The Banana to probes where attached to the input power headers and the oscilloscope was attached to the RCA out as seen in the figure below.
Figures 9 and 10: Completed Function Generator and Square wave output
The position of the onboard components was not designed well to accompany and external case. Having outputs and switches on three sides of the board makes adjusting the switches difficult. The DIP switch for example which faces upwards is impossible to reach when inside the case and therefore the lid of the case must be removed to use the device. Therefore in order to design a PCB properly all intentions for the board must be thought of and developed for throughout the design phase. To make another board now with the correct dimensioning for a specific enclosure would now cost the entire price of another kit and PCB manufacturing proving that an error not caught at the design level can cost a lot later down the line.
References
Downloads
Downloads
- Presentation (PDF)
- BOM (PDF)
- Schematic (JPEG)
- Layout (JPEG)