This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OPA134: Improve circuit for audio tone generator from microcontroller

Part Number: OPA134
Other Parts Discussed in Thread: DRV135, ISO7710, TINA-TI

Hi,

In the last post "OPA134: Useful opam'p for audio tone from microcontroller", was unfinished and now I attach a new and improved design with Single-Channel Digital Isolator ISO7710F for avoid problem for use no common ground, increased value of R6 to 100 ohm in low pass filter in order to obtain cutoff frequency of 16 kHz about and decreased R9 to 10ohm for lower limit on the volume.

I want to know which is the volume range or how I can calculate.

  • Hi Samuel,

    The ISO177F is a digital isolator and its output levels will be close to the 0 and 5 V extremes. Its digital output will then pass through the R6, C5 integrator where the digital tone will be filtered removing higher harmonics. Since the low-pass filter is only a first-order filter, the level reduction in harmonics will be limited. How much depends on the relationship between the harmonic frequencies and the filter cutoff frequency. Do note that the ISO7710F switch ON resistances and series output resistor (~20 Ohms) will move the filter's cutoff frequency down somewhat from 16 kHz.

    The gain calculation really starts with the output of the low-pass filter through to the output of the DRV135. There is the high-pass filter consisting of C6 and R7 having a lower cutoff above 0.16 Hz. Above that lower frequency the gain will be +1 V/V (0 dB) through the high-pass, and +1 V/V (0 dB) through the OPA134UA unity gain buffer stage. R8, P1 and R9 form a resistive divider that will have a gain less, to much less than 1 V/V.

    When P1's wiper is at the high end the resistance is 20 k (R8) on the high sider, and 20.01 k (P1 + R9) on the lower side. However, this lower side resistances will be loaded by DRV135UA input impedance, which is listed as 10 k. The 10 k in parallel with P1 plus R9 results in a total lower end resistance of about 6.67 k. Therefore, the divider looks like a R8 in series with a 6.67 k resistance to ground. That voltage divider results in a gain of 0.25 V/V, or -12 dB.

    When P1's wiper is on the low end the resistance is 40 k (R8 + P1) on the high side and 10 Ohms on the low side (R9). The DRV135UA input impedance loads the 10 resistor, but its effect is tiny. The divider results in a gain of 0.00025 V/V, or -72 dB. The resistive divider is followed by the DRV135UA which has a gain of 2 V/V, or 6 dB.

    The overall gain:

    P1 set to the high end G = (+1 V/V) (+1 V/V) ( +0.25 V/V) (2 V/V) = 0.5 V/V (-6 dB)

    P1 set to the low end G = (+1 V/V) (+1 V/V) (0.00025 V/V) (2 V/V) = 0.0005 V/V (-66 dB)

    Regards, Thomas
    Precision Amplifiers Applications Engineering
  • Hi Thomas,

    Good analysis with respect to cutoff frequency but output wave frequency of the microcontroller will be approximately 1,4kHz. C6 block DC componen and R7 is for input bias current of the OPA134. Balanced audio will be applied to microphone-level inputs of the amplifier equipment. P1 is to set gain to microphone-level.

  • Hi Samuel,

    first, I don't think that you need the OPA134 anymore. This scheme brings nearly the same performance:

    Then, I would adjust the corner frequencies of the low pass filter and the high pass filter. If you only transmit 1.4kHz you can increase the corner frequency of the high pass filter and decrease the corner frequency of the low pass filter. Your filter circuit can look like that then:

    This will reduce the pop noise a bit when turning on the square wave and will further decrease the harmonics and make the square wave sound less harsh.

    Kai

  • HI Kai,

    I use OPA134 for impedance coupling like a HiFi audio circuit where between output signal microcontroller and volume control have a high impedance. In your circuit, VF2 is connect to DRV135?

  • Hi Samuel,

    yes, VF2 is connected to the input of DRV135, like in your circuit. And VF1 is connected to the output of ISO7710. I think the ISO7710 is also low ohmic and can properly drive the volume control.

    Kai
  • Hi Samuel,

    If the RC low-pass filter has a 16 kHz cut-off its peak-to-peak output at 1.4 kHz will depend very much on the input waveform characteristics; amplitude, symmetry and duty cyle, etc. However, keep in mind a first-order RC, 16 kHz low-pass filter will have little effect on a 1.4 kHz square-wave because even the 11th harmonic is below that cutoff. A waveform resembling containing the first nine odd harmonics produces a pretty decent square-wave. You could move the filter cutoff down to provide more attenuation of the harmonics, but a simple first-order low-pass may not provide the performance that you need.

    If you really want to clean up the microcontroller 1.4 kHz tone and have an output signal that more closely resembles a sine wave, then simply reconfigure the OPA134UA buffer stage as an active, second-order low-pass filter. A single op amp can even be pressed into third-order low-pass service if higher attenuation of harmonics is desired.

    Should you decide to go with an active filter soultion, you can use TI's FilterPRO or Webench Filter Designer programs can be used to synthesize the filter. If you need help, we can assist with the filter synthesis.

    Regards, Thomas
    Precision Amplifiers Applications Engineering
  • HI Kai,

    I use ISO7710F where its default output is low. In the transient stage when C3 and C4 are fully discharged and the output microcontroller change from low to high and vice versa.Could the circuit have a problem in those stages?

  • Hi Samuel,

    no, there's no danger, because the output current of ISO7710 and the current into the both caps C3 and C4 is limited by R10=20k.

    Kai

  • Hi Kai,
    In your circuit, the cutoff frequency for the low pass filter (R10, C3) is 1.17 kHz, but I can not calculate the cutoff frequency for the high pass filter. Please explain it.
  • Hi Samuel,

    let's run a TINA-TI simulation:

    The 10k in the right is coming from the input impedance of DRV135.

    Kai

  • Hi Kai,
    Simulation was fixing a value of P1, Could run simulation for high and low value of P1?, What is peak of the “pass-band” frequency range? In picture I can see 380Hz as center, Is so ok?
  • Hi Kai,

    If value of R2 is decrease to 10 ohm, Which is effect on cutoff frequency?

  • Hi Samuel,

    this will not have a noticable effect.

    Kai

  • Hi Thomas,
    I consider the simple solution by Kai since I don't require a high effect on square wave. I don't know how slide filter cutoff for high and low pass with the goal to center 1.4kHz if I reprogram microcontroller output frequency .
  • Hi Samuel,

    Based on the simulations that Kai provided it appears that 1.4 kHz is at the beginning of the high frequency roll-off for each of the different gain settings. His simulations show that the higher P1 is set to the high end, the lower the upper -3dB cutoff will be. The harmonics will be attenuated in accordance with where they fall on the roll-off curve. The low frequency cut-off moves only a few Hertz across the P1 range.

    Is there something more that you need?

    Regards, Thomas
    Precision Amplifiers Applications Engineering
  • Hi Thomas,
    That's right, 1.4 kHz is close to high frequency roll-off, for this reason I want to move cutoff frequency to 2 kHz at high pass and 500Hz at low pass and 1.4 kHz at center. I don't how to calculate or place value for each capacitor and resistor, Could you teach me how to calculate it?
  • Hi Samuel,

    I have simulated my scheme for you and highlighted the -3dB corner frequencies. Depending on the 20k pot setting the low pass corner frequency shifts from 2.5kHz to 4.8kHz. This is intended because with a higher corner frequency the low pass filtering will become useless and the higher harmonics of square wave will kill your ears.

    What exactly do you want? A bandpass with a center frequency of 1.4kHz? Or do you want to shift the low pass corner frequency downwards to lower frequencies?

    Kai
  • Hi Samuel,

    The passive circuit although looking pretty simple has a very involved transfer function (see below). Deriving any partiulcar compenent value is very involved and time consuming. Changing the potentiometer wiper position has a big effect on where the high-end -3 dB cutoff frequency occurs, and much lesser effect on the low frequency -3 dB cuttoff.

    As currently designed the - 3dB frequencies are far apart; around 15 Hz on the low end, and about 2.1 kHz on the high end when the potentiometer is in the mid position. However, when an attempt is made to move the low-end cutoff up to 500 Hz while maintaining a near 2 kHz high-end cutoff things become complicated for this passive filter circuit. Basically, the high-pass pole of the low frequency cutoff and the low-pass pole of high frequency cutoff move very close to each other. Essentially, their responses cut into each other and additonal attenuation occurs within the passband.

    If you really want a decent band-pass response with accurate 500 Hz and 2 kHz cutoff frequencies, and the ability to have them hold as the gain potentiometer is adjusted, I recommend that an active op amp filter be used instead.

    Regards, Thomas

    Precision Amplifiers Applications Engineering

  • Samuel

    We haven't heard from you so we assume this resolved your issue. If not, post a reply below, or create a new thread if this one has timed-out.

    Thanks
    Dennis