This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
This report will mainly describes objective and information that I been researched before week 9. All this information is useful for me to build up the complete DDS Function Generator.
In this report, sort of hardware information will be explain, with the functionality of each component. The hardware part of project: Microcontroller, LCD, operational amplifier and some simple components such as keypad.
Besides this, some flowchart and simple block diagram will be attached inside this report, with the explanation of the flow and functionality of project. This will shows the basic flow of overall project and logic of the program.
Of course, the components needed and budget will be stated below. This will helps to control the financial cost of this project. Besides, systematic plan and Gantt chart will be attached, in order to make the project complete in time.
This may help to improve understanding of this DDS Function Generator with more of information provided in this report.
A DDS function generator, that DDS stand for direct digital synthesis which is a type of frequency synthesizer used to create arbitrary waveform [ [i] ]. This waveform can be either repetitive or single shot. DDS Function Generator plays an important role in development, testing and repair electronic equipment.
This DDS function generator is user friendly and easy to use the features that are ideal for accurate, simple and quick to generate signals.
The main purpose of this DDS function generator is generating electrical waveforms. The function generator is designed and features two outputs; one for the high speed output [1 - 8 MHz] square wave signal and another for DDS signal. DsPIC plays an important role here because it is programmed to control whole system. In order to generate the signal, a control keypad is built so user can select the waveform and the selection of waveform will displayed at LCD module. Keypad module will allow user to start the signal generate, changing function type and changing frequency value.
For the high speed output, signal is direct output without control the amplitude and offset value. The only thing can control is the frequency of signal. The high speed waveform is direct output from dsPIC microcontroller, so only positive side of square wave can display.
DDS signal will be generating from another output pin. It will generate via "resistor network circuit module" and "offset and amplitude regulating module". Offset and amplitude regulating circuit will be control by two potentiometers. DDS signal will work within certain frequency range. This DDS function generator will be power up by DC power supply.
This Project will be great learning experience about discovering potential of DDS function generator in industrial and design a low costs function generator.
Successful to create a user friendly DDS function generator
Gain the knowledge on dsPIC and able to program with C language for development
LCD able to display for user to select the input.
Keypad module able to let user to press the input
dsPIC and regulating circuit able to work and generate the signal.
Scope and Limitation
dsPIC used as medium and programmed to control the system work
LCD module will be display the actions of input from user
Keypad used to changing frequency value, signal type and enable signal to run
Regulating circuit: offset value can be regulated in certain range [+5V to -5V] and amplitude able to regulated from 0 to 10V.
Overall: able to generate sine wave, triangular wave, noise signal, sawtooth and reverse sawtooth signal.
High speed signal could not adjust amplitude and offset value
DDS signal may generate in certain frequency range [0 to 1000Hz]
Offset and Amplitude regulating circuit
High Speed signal
This simple block diagram is overall circuit for DDS Function Generator.
Microcontroller will be connect to LCD display module, Resistor Network Circuit Module and Keypad module
The dsPIC microcontroller will be the "brain" for whole circuit.
dsPIC Microcontroller will be programmed and produce the High Speed Signal
DDS signal will be pass through Resistor Network Circuit and Offset and Amplitude regulating circuit
Waiting User Input
DDS signal or HS signal?
Select signal and frequency
dsPIC read the values, process the signal
No, then loop
dsPIC read the values, process the signal
Did stop button been press?
No, then loop
Did Stop button been press?
Simple Flowchart shows the moves of programming.
Literature Research for Hardware Needed
It known as PIC microcontroller, which PIC is stand for "Peripheral Interface Controller". The PIC architecture is been characterized by its multiple attributes [ [ii] ], which is:
Small number of fixed length instructions, and most of the instructions are single execution, with one delay cycle on branches and skips
All RAM location as resisters as both source and other functions
Hardware stack for storing return address
A small amount of addressable data space
The reason to choose PIC microcontroller is because PIC have these advantages:
Small instructions set to learn
Built in oscillator with selectable speeds
Easy entry level
In this project, I will be using dsPIC microcontroller, which are 16-bit microcontrollers. Compare to another 16F, 18F and 24F series of PIC, it is quite high end because this dsPIC devices was include digital signal processing capabilities. I had randomly chosen a 16F876A PIC compare to 30F4013 dsPIC and see the difference between both.
The difference between 16F and 30F series PIC
16F series PIC
30F series PIC
Only 35 Single word instructions
83 Base instructions
Up to FIVE 16-Bit Timers/Counter
8K x 14 words of FLASH program memory
Up to 48Kybtes On-Chip Flash Program Space
20Mhz clock input
40Mhz clock input
From the table above, we can know that the 30F series is much better than the normal 16F series. So In this project, the dsPIC I chosen is the dsPIC 30F4013, which is high performance, 16-bit digital signal controller. It features a set of 16 working registers, 24-bit wide instructions and 16-bit wide data path. It is up to 18 Kbytes on chip flash program space, which means can store lot of data.
It can up to 30 MIPS, which means 30 million instructions per second. DC to 40 MHz external clock input. Of course, this dsPIC 30F4013 has analog features, which is 12-Bit Analog to Digital Converter (ADC) with 200ksps conversion rate and up to 13 input channels. This analog feature is used in project to send out 8 bit data so can produce a waveform after pass through DAC.
Besides, this dsPIC is low power consumption, high speed IC, with an operating range from 2.5V to 5.5V. dsPIC 30F4013 have 40 pins, which is enough for me to connect to other circuit module. There is many types of 30F4013 dsPIC which is PDIP, TQFP or QFN. I will be choosing PDIP type of dsPIC because it is easy to find the socket and soldering in PCB.
Figure 1.1: The Pin Diagram for dsPIC30F 4013
Figure 1.2: The actual component for dsPIC30F4013
Figure 1.3: The Actual component of LCD 2x16
LCD 2x16 is chosen for this project. It's low electrical power consumption, with low operation support up to 2.7 to 5.5V enables it to fits perfectly into the design specification. Yet it is able to correspond to high speed MPU bus interface at about 2MHz when Vcc = 5V. Besides, with its 2x16 character size, will just enough to perform a great job on displaying so user can choose the waveform and frequency.
Data bus line 7 (MSB)
Data bus line 6
Data bus line 5
Data bus line 4
Data bus line 3
Data bus line 2
Data bus line 1
Data bus line 0 (LSB)
Enable signal for row 0 and 1 (1stcontroller)
0 = Write to LCD module
1 = Read from LCD module
0 = Instruction input
1 = Data input
Power supply (GND)
Power supply (+5V)
Enable signal for row 2 and 3 (2ndcontroller)
Table 1.4: Pin assignment for > 80 character displays.
Figure 1.5: Pin diagram for LM 358
LM358 is a high gain operational amplifier. It consists two independent, high gain, internally frequency compensated which were designed specifically to operate from a single power supply over wide range of voltages. It's low power consumption, low input offset voltage and current, and have large DC voltage gain: 100dB. In this project, Offset and Amplitude regulating circuit will need a comparator and an inverting amplifier to adjust the amplitude and offset of output waveform. So, an LM 358 low power dual operating amplifier is selected.
C:\Users\Thomas Kho\Desktop\Momentary Push Button Switch 10pcs.jpg
Figure 1.6: tact switch that will be used to build as keypad
In this project, a keypad module will be used as input module for user to select the waveform type and frequency .So this keypad is built using few switches, straight connect to dsPIC pins so we can select the waveform and frequency that display in LCD.
PCB is stand for Printed circuit board, which is used to mechanically support and electrically connected electronic components using conductive pathways, tracks or signal traces etched from copper sheets laminated onto a non - conductive substrate [ [iii] ].
Figure 1.7: a sample PCB
PCB can be used in this project, because PCB can provide more reliable pathway than other alternatives. PCB requires more layout effort such as UV exposure, development and etching and also requires higher initial cost. But PCB is much easier to soldering and compact. Hence, it will reduce the size of the project which makes it more compact and efficient.
In order to design and draw the PCB layout, software which named Eagles is needed.
Vero board also as known as strip board is a widely-used type of electronic prototyping board characterised by a 0.1 inch regular grid holes, with wide parallel strips of copper cladding running one direction all the way across one side of the board [ [iv] ].
Figure 1.8: a sample VeroBoard
Vero board can be an option too for this project. By using Vero board, size of the project will be reduce and more reliable than build a project on bread board. It requires soldering of components on it, and it doesn't need any pre-work layout before soldering. Hence, it save time and increase product reliability.