APPLICATION NOTE Tone Generation - An Application of the MX105A This Application Note describes how to configure an MX105A as a tone generator. It may be helpful to refer to the current MX105A data sheet before reading this document. The MX105A was primarily designed as a tone detector with user configurable center frequency, detection band width and response/de-response time (refer to the MX105A data sheet for this use). However, it can also be configured as a low distortion sinusoidal tone generator with minimal filtering. Figure 1 depicts a recommended circuit configuration for tone generation. Figure 2 details the circuit of Figure 1 by showing a block diagram of the active circuits in the MX105A used for tone generation. TONE OUT C 5A V DD C6 R 5B R 5A C 5B R3 R2 1 16 2 15 3 14 4 5 MX105A R1 13 12 6 11 7 10 8 9 C 1A C 1B RL V SS Figure 1. Simple Tone Generation Circuit using MX105A. (c)1998 MX-COM Inc. www.mxcom.com Tel: 800 638-5577 336 744-5050 4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA Fax: 336 744-5054 Doc. #20830069.002 All trademarks and service marks are held by their respective companies. TONE GENERATION An Application of the MX105A 2 Application Note 1. Circuit Description for Tone Generation. An RC oscillator (pins 13-15) generates an internal clock at six times the center frequency. This clock is internally decoded to sequentially enable four analog switches configured between pins 3 and 5 (SW3A), pins 3 and 6 (SW3B), pins 4 and 7 (SW2A), and pins 4 and 8 (SW2B). The control signals for these switches are shown in Figure 3. The switch connections to R2 and R3 form a simple Digital to Analog converter to produce a three level approximation of a sine wave ( 1 1 0 -1 -1 0 . . .) as shown in Figure 3. This waveform is well suited for tone generation as described below. Finally, a simple low pass filter formed with the on chip buffer amplifier smoothes the three level sine wave to produce a low distortion sine wave. Note: A large value DC blocking capacitor should be used at pin 2 if pins 6 and 7 are driven for tone level control or amplitude modulation as shown in Figure 2. VDD or Optionally drive signal here for amplitude control or AM modulation 8 SWITCH CONTROL LOGIC 7 6 5 VDD/2 4 1k 200k 15 14 13 4 C1A Optional DC blocking cap 3 R2 R1 SW3A SW3B RC OSCILLATOR SW2A SW2B 1 R3 1 2 C5 C1B C5B R5A VSS 6x TONE FREQUENCY OSCILLATOR DIGITAL TO ANALOG CONVERTER R5B TONE OUT C5A LOW PASS FILTER Figure 2. Block Diagram of Tone Generation Circuit. (c)1998 MX-COM Inc. www.mxcom.com Tel: 800 638-5577 336 744-5050 4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA Fax: 336 744-5054 Doc. #20830069.002 All trademarks and service marks are held by their respective companies. TONE GENERATION An Application of the MX105A 3 Application Note Three Level Sine Wave SW2A SW3A SW2B SW3B Figure 3. Internal Switch Control Signals and Resulting Three Level Waveform. 1.1 Fourier Series Analysis of the Three Level Waveform. The periodic three level approximation of a sine wave can be represented by the following formula: T for t A 6 T T f(t) 0 t 6 3 A for T t T 3 2 where T is the period Fourier Series Expansion of f(t) yields the following coefficient formulas after some calculus: 2 an T T f(t ) cos n 0 2 t dt T 2A 1 1 sin n 1 2 cos n n 3 3 1 1 1 1 2 A 3 1 , 0, 0, 0, , 0, , 0, 0, 0, , 0, , 5 7 11 13 1 bn 2 T T f(t ) sin n 0 2 t dt 0 T for positive integer n for positive integer n These coefficients result in the following fourier series representation: f (t ) 2A 3 1 2 1 2 1 2 1 2 2 t cos 5 t cos 7 t cos11 t t cos cos 13 T 5 T 7 T 11 T 13 T This function is plotted in the time domain in Figure 4 and in the frequency domain in Figure 5. It is clear from the frequency domain plot that the first harmonic spur above the fundamental, the fifth, is already about 14 dB down. Thus the required filtering to pass the fundamental while suppressing the harmonics is simplified compared to a square wave. (c)1998 MX-COM Inc. www.mxcom.com Tel: 800 638-5577 336 744-5050 4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA Fax: 336 744-5054 Doc. #20830069.002 All trademarks and service marks are held by their respective companies. TONE GENERATION An Application of the MX105A 4 Application Note Fourier Series Expansion of D/A Output to 31 terms A 0 -A -1 -5/6 -2/3 -1/2 -1/3 -1/6 0 1/6 time (normalized to period T) 1/3 1/2 2/3 5/6 1 Figure 4. Time Domain Plot Harmonic Content of D/A Output 10 5 0 dB (w.r.t. fundamental) -5 -10 -15 -20 -25 -30 -35 -40 1 3 5 7 9 11 13 15 17 19 21 23 frequency (normalized to tone frequency) 25 27 29 31 33 Figure 5. Frequency Domain Plot (c)1998 MX-COM Inc. www.mxcom.com Tel: 800 638-5577 336 744-5050 4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA Fax: 336 744-5054 Doc. #20830069.002 All trademarks and service marks are held by their respective companies. TONE GENERATION An Application of the MX105A 5 Application Note 1.2 Analysis of the Low Pass Smoothing Filter A simple second order filter can provide 12 dB per octave roll-off in the filter's stop band. Thus we can expect as much as 27 dB (i.e. 27dB 12 log 2 5 ) attenuation of the fifth harmonic and above with such a filter. This should produce a sine wave with distortion of about 1% (i.e. harmonics more than 40 dB down). More complex filtering can be used if lower distortion is required. A simple second order low pass filter (formed with R5A, R5B, C5A, C5B, and the internal buffer amplifier between pins 1 and 2) suppresses the harmonics of the three level waveform to produce a low distortion (<1%) sine wave at pin 2. The transfer function of this low pass filter including effects of the input impedance of the MX105A buffer amplifier is: Ri R5A R5B Ri R5A R5B Ri C5A C5B R5A R5B Ri H( j ) R5A R5B Ri 1 1 1 2 C5A C5B R5A R5B Ri C5A R5A C5A R5B C5B Ri j choosing to let R = R5A = R5B and C5A = 2 C5B and substituting C = C5B results in H( j ) Ri 2R Ri 2R Ri 2 2C R 2 Ri 2R Ri 1 1 2 2 j 2 2C R Ri C R C Ri From this expression the equation for the pole frequency is: (fp is plotted in Figure 6 to help in component choices). 2R Ri 2R Ri p2 2C 2 R 2 Ri fp 2C 2 R 2 Ri 2 The equation for the Pass Band DC Gain is: (plotted in Figure 7 to help in component choices). DC Gain Ri 2R Ri 10000 Approximate Cutoff Frequency (Hz) 100pF 150pF 220pF 330pF 470pF 680pF 1000 1000pF 1500pF 2200pF 3300pF 4700pF 6800pF 100 0.01uF 0.015uF 0.022uF 50 75 100 125 150 175 200 225 250 275 300 325 350 375 400 425 450 475 500 R (k) Figure 6. Approximate Cutoff Frequency Design Chart (c)1998 MX-COM Inc. www.mxcom.com Tel: 800 638-5577 336 744-5050 4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA Fax: 336 744-5054 Doc. #20830069.002 All trademarks and service marks are held by their respective companies. TONE GENERATION An Application of the MX105A 6 Application Note -2 -3 -4 Approximate Pass Band Gain (dB) -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 50 75 100 125 150 175 200 225 250 275 300 325 350 375 400 425 450 475 500 R (k) Figure 7. Approximate Filter Gain vs. R Note that this filter provides attenuation in the pass band due to the input impedance of the buffer amplifier. The filtered tone level will be: Approximate Tone Level (in Vp-p ) Ri 2A 3 1.1 A 10 2R Ri dB Gain 20 where A is VDD or optionally the level driven into pins 6 and 7 and dB Gain is read from Figure 7. (c)1998 MX-COM Inc. www.mxcom.com Tel: 800 638-5577 336 744-5050 4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA Fax: 336 744-5054 Doc. #20830069.002 All trademarks and service marks are held by their respective companies. TONE GENERATION An Application of the MX105A 7 Application Note 2. A Worked Design Example - 1700 Hz Tone Generator The tone frequency is set according to the standard formula in the MX105A data sheet: F0 1 6 R1 C1A ln(2) with C1A = C1B To generate a 1700 Hz tone while choosing C1A = C1B = 680pF R1 1 1 208 k 6 F0 C1A ln(2) 6 1800 680 10 12 ln(2) Choosing R1 = 150k in series with a 100k potentiometer will allow frequency tuning if required. Referring to Figure 6 to pick R after choosing C = 680pF for the low pass filter results in: R = R5A = R5B = 130k C = C5B = 680pF and C5A = 2 x C5B 1500pF Calculating the approximate pole frequency to check design choices: 2R Ri f C5A C5B R 2 Ri 1838 Hz 2 (seems reasonable) Calculating the approximate tone level for VDD = 5V results in: Tone Level 1.1 A 10 -7 20 2.46 Vp p 870 mVRMS If tone amplidude control is required, drive a DC level (A) into pins 6 and 7 and use DC blocking capacitor C5 as shown in Figure 2. Finally, choose R3 and R2 sufficiently low compared to R so as not to significantly affect the filter's frequency response and gain. For example, choose R3 = R2 = 10k The filter graphs and design example are based on the typical buffer input impedance of 200k This parameter varies from device to device and with supply voltage. The input impedance is approximately 4 proportional to and may vary from 160k to 360kat VDD = 5V. These figures are given to help the VDD 1 designer analyze for device variation; they are not guaranteed specifications! Refer to the MX105A for all specifications. A smoothing filter built with an external amplifier may eliminate these issues. Note: In this design example the filter cut off may vary from 1720 Hz to 2120 Hz and the filter gain may vary from -8.2 dB to -4.6 dB due to the buffer `s input impedance. Even with these variations the second order filter should provide good attenuation of the 1700 Hz tone's 5th harmonic and above. (c)1998 MX-COM Inc. www.mxcom.com Tel: 800 638-5577 336 744-5050 4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA Fax: 336 744-5054 Doc. #20830069.002 All trademarks and service marks are held by their respective companies.