0% found this document useful (0 votes)
51 views7 pages

Microcontroller Synthesized Function Generator: Visa M. Ibrahim .Oni Taiwo .Uyoata E. Uyoata

This document summarizes a research paper that designed a microcontroller-based function generator. The system uses a microcontroller and digital-to-analog converter to synthesize common waveform signals like square, sawtooth, triangular and sine waves. The microcontroller coordinates the system based on a program stored in its memory. It converts numeric values from a keypad into analog waveforms at the output. Software was developed in assembly language to calculate parameters and timing delays needed to generate each type of waveform. The system provides an easily reprogrammable, low-cost solution for generating standard test signals with improved accuracy and flexibility compared to traditional function generators.

Uploaded by

IJERD
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views7 pages

Microcontroller Synthesized Function Generator: Visa M. Ibrahim .Oni Taiwo .Uyoata E. Uyoata

This document summarizes a research paper that designed a microcontroller-based function generator. The system uses a microcontroller and digital-to-analog converter to synthesize common waveform signals like square, sawtooth, triangular and sine waves. The microcontroller coordinates the system based on a program stored in its memory. It converts numeric values from a keypad into analog waveforms at the output. Software was developed in assembly language to calculate parameters and timing delays needed to generate each type of waveform. The system provides an easily reprogrammable, low-cost solution for generating standard test signals with improved accuracy and flexibility compared to traditional function generators.

Uploaded by

IJERD
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

International Journal of Engineering Research and Development e-ISSN : 2278-067X, p-ISSN : 2278-800X, www.ijerd.

com Volume 2, Issue 7 (August 2012), PP. 19-25

Microcontroller Synthesized Function Generator


Visa M. Ibrahim1.Oni Taiwo2.Uyoata E. Uyoata3
1,2,3

Department of Electrical and Electronic Engineering, School of Engineering and Engineering Technology, Modibbo Adamma University of Technology Yola, Adamawa State. Nigeria

AbstractThe need to ascertain the reliability and performance of electronic systems under test and in operation using electronic instruments such as the function generator cannot be over emphasized. The output responses of most electronic systems under test operation is the waveforms they generate on a scope; in consonant with the function generator waveform responses which could be in the standardized or non-standardized format. The continuous clamour for an easily re-programmable, simplified hardware, decreased power consumption, and high in performance function generation is the major set out goal of this paper. Practical results obtained show an appreciable degree of accuracy and repeatability of the system moreover, the microcontroller makes the system user-friendly. KeywordsMicrocontroller, DAC, Synthesized Function Generator

I.

INTRODUCTION

The performance of most electronic systems under test and in operation using the function generator are basically to extract vital information based on the generated signals displayed on a scope, and in some other case be used to initiate control for systems and as such there is need to inhabit special signals for such operation [1] Various approaches have been adopted in the past, but with the ever increasing need for flexibility and userfriendliness evolves the digital synthesis approach based on the use of microcontrollers [2, 3]. The microcontroller approach; are easily re-programmable, a simplified hardware design, allow user selectivity by a matrix keypad [4]. Time varying signals in digital format are generated from the microcontroller, as it is converted into the corresponding analogue format at a high processing speed. It is worth mentioning here that the system performance is enhanced by using a faster microcontroller and the digital to analogue converter which is the 12 or 16 bit categories [5, 6]. Practical result shows the high in performance, integrating more functions such as to generate square, ramp, sine, and triangular wave signals in the micro-controlled synthesized function generator [7]. In addition, problem on stability, accuracy, reproducibility, and the need to change external components when certain desirable parameters are to be obtained have been achieved.

II.
4*4 Matrix keypad Microcontroller

SYSTEM DESCRIPTION
DAC Current -voltage converter Output to scope

Regulated power supply

Figure 1: system block diagram The block diagram shown in figure 1 describes the overall system. The system comprises of a 4 * 4 matrix keypad which allows user selectivity of the various waveforms at desired frequencies. The user-friendly matrix keypad sends signals in the digital format to microcontroller. The microcontroller which is the brain and control circuit behind the entire design circuitry is controlled with a written program stored into its read only memory (ROM). The co-ordination of the systems operation are with the direction of the written program, allowing: i. Conversion ofnumerical value of zeros and ones to their corresponding time varying current value.

19

Microcontroller Synthesized Function Generator


ii. Comparing the numerical value based on the calculated time delay in other to interpret it in the corresponding current train before it is being sent to the digital-analogue converter unit.

In this paper, the design utilized a circuit assembly of a digital-analogue converter, current-voltage converter and a few other basic electronic components to achieve the final generation of the waveform in the analogue format to be displayed on a scope. The power supply provides the voltage and current requirement for effective performance of the system. The uniqueness of this power supply is the generation for a negative rail for compensation on the digital-analogue converter.

III.
1.1 1.1.1

DESIGN FRAMEWORK

The design process is divided into two viz., the hardware and the software designs. Hardware Design The Microcontroller Unit The system is designed around the Intels AT89s52 microcontroller. The Intel AT89s52 microcontroller is a complete computer on a single chip. This is because it has read only memory (ROM), Random Access Memory (RAM) and central processing unit (CPU) embedded in it.The AT89s52 is a low-power, high performance CMOS 8-bit microcomputer with 8k bytes of memory [8]. The device is manufactured using Atmels high-density non-volatile memory technology and is compatible with the industry standard 80c51 and 80c52 instruction set and pin out. The on-chip flash allows the program memory to be reprogrammed in-system or by a conventional non-volatile memory programmer. It also provides programmable timer, programmable I/O ports together with 256x8-bit RAM for use as scratch book and also for stack purposes [8,9]. Voltage regulation was achieved through the use of LM 7805, LM 7815 and LM 7915 regulators. 1.1.2 Interfacing Microcontroller to Coordinate the Entire System Numerical value of zeros and ones selected from the 4 * 4 matrix keypad are sent to the microcontroller through port one bit zero through port one bit seven (p1.0-p1.7). The digital format generated from the selectively on the matrix keypad is sent to the combined digital-analogue converter circuitry (DAC) which allows it to be represented in the analogue format on the scope through port two bit zero through port two bit seven (p2.0-p2.7). Figure 2 gives clearer view of this hardware.

R14

R13

R12

R11

R4 C3 U1
19

U3
P0.0/AD0 P0.1/AD1 P0.2/AD2 P0.3/AD3 P0.4/AD4 P0.5/AD5 P0.6/AD6 P0.7/AD7 P2.0/A8 P2.1/A9 P2.2/A10 P2.3/A11 P2.4/A12 P2.5/A13 P2.6/A14 P2.7/A15 P3.0/RXD P3.1/T XD P3.2/INT0 P3.3/INT1 P3.4/T0 P3.5/T1 P3.6/WR P3.7/RD 39 38 37 36 35 34 33 32 21 22 23 24 25 26 27 28 10 11 12 13 14 15 16 17 2 6 3

R2 C4 R7

X1
18

XT AL1

XT AL2

7 1

4 5

OPA637AU

RST

C5 R8

29 30 31

PSEN ALE EA

8 7 6 5 4 3 2

R9
0R1

80C52

R1

9 10 11 12 13 14 15 16

A5 A6 A7 A8 VCC VREF(+) VREF(-) COMP

1 2 3 4 5 6 7 8

P1.0/T2 P1.1/T 2EX P1.2 P1.3 P1.4 P1.5 P1.6 P1.7

A4 A3 A2 A1 IOUT VEE GND

U5
DAC0807

R3

C2

R5

R10

C1

Figure 2: Complete Circuit diagram

20

Microcontroller Synthesized Function Generator


VCC U1 7805
VIN OUT GND

C1 0.1uF

TR1

D1 BRIDGE

R1 1M

C4 6800uF

U2 7815
VIN OUT GND

TRAN-2P39

C2 0.1uF R2 1M C5 6800uF U3 7915


VIN OUT GND

GND

C3 0.1uF

GND

Figure 3: Circuit diagram for regulated power supply 1.2 Software Design 1.2.1 Software Development The program was written in assembly language using the 8051 instruction set. Calculated parameters were carried out in other to achieve the program software development for the various waveforms generated. These and the flowchart are discussed in this paper as: i. Development of square wave program The square wave signal is generated by a suitable digital logic of Ton and Toff and is equivalent to the analogue output.

V ref

Tc
Figure 4: Square Waveform Tp = Ton + Toff = T c Where Tp = is the time period between Ton and Toff F And F = desired frequency Ton = Toff Tp = 2 Ton Tc Ton = 2 The program time delay equivalent to theTon of the square wave generated is: Tc Tpdsq = Ton = 2 ii. Development of saw tooth program:
1

21

Microcontroller Synthesized Function Generator


The logic in generating a saw toot wave is such that once the maximum output digital logic is attained, there is a sudden drop of voltage at a negative level.

V ref

0 T
Figure 3.2: Saw tooth Waveform Step Size = 255 Vref

Where Vref = reference voltage 1 And Tp = Ta = F Ta = time for an ascending level to achieve a step size F = desired frequency Ta T pdsq = the program time delay for a generated saw tooth (Ramp) signal
step size

iii. Development of triangular wave program

255

Ta

Td

Figure 5: Triangular Waveform Tp = Ta + Td Where Tp = time period Ta = time for ascending level Td = time for descending level But Tp = 2Tp Ta =
Tp 2 255

But also step size = Vref The program time delay to generate a triangular waveform is Ta TaVref TpdTR = orTpdTR =
step size 255

Development of sine wave program: The technique used for the generation of sine wave as presented in this paper is the use of a look-up table where predetermined values of the sine function are calculated and loaded on a separate memory bank.

iv.

22

Microcontroller Synthesized Function Generator

Vref

Figure 6: Sine Waveform Vout = 2.5v + (2.5 sin ) 255 The value sent to DAC (decimal)= Vout But t = 4 Where T = periodic time 1 Also T =
f T Vref

Where f = desired frequency; t = The required program time delay for sine wave generation is given by Where So is the total number of samples from the look-up table.

1 4f

T pds =

t So

Angle()

sin

Vout voltage Mag 2.5V + (5V sin)

Values sent to DAC (Dec) voltage 256 mag


s

Hex value

Table 1:Look-up table for waveform samples

23

Microcontroller Synthesized Function Generator

Initialize

Prompt

Read wave form

Square

No

Calculate No

DAC

Saw

Calculate Train No Cycle DAC Calculate d DAC End No Cycle No

End

No Cycle

Sine

No

Calculate d
DAC

End No Cycle Yes End No

Figure 3.5:system flowchart

24

Microcontroller Synthesized Function Generator

IV.

PERFORMANCE EVALUATION AND TESTING

Practical tests were carried out on the system performance during and after the construction. From the experimental results show a stair case appearance of the square and at a more fast processing speed for the sine wave generated.

V.

CONCLUSION

The use of the microcontroller to actualize the ever needed flexibility thereby eliminating the need of changing the hardware whenever certain desirable functions are needed have been achieved by the evolution of this design. However, with little modifications on the hardware especially with regards to the use of a 16 bit microcontroller and 16 bit on chip digital-analogue converter (DAC), the frequency are varied adequately with the waveform from the keypad.

BIBLIOGRAPHY
[1]. [2]. [3]. [4]. [5]. [6]. [7]. [8]. MT Abuelmatti A. RAL-Ali (1995) Fourth Saudi Engineering conference Department of Electrical Engineering King Fahd University of Petroleum and Minerals. Eva Murphy (2000) DDS Control Waveforms in Test, Measurement and Communications Analog devices co-operation htt//www.analog.com M.M.S Ananad (2006) Electrical Instruments and Instrumentation Technology. Dag Stranneby (1996) Digital Signal Processing and Applications Muhammed Ali Mazidi (2nd edition) The 8051 Microcontroller and Embedded System Using Assembly and C Thomas C. Hayes (2002) The Art of Electronics Student Manuals, Cambridge University press. Hall F. and Lister P.F (1980), Microprocessor Fundamentals, Pitman, London. Horowitz P. and Hill W. (1989), The Art of Electronics, 2nd Edition, Cambridge University press.

25

You might also like