Audio board line in transient protection

ihatemornings

Active member
I’m working on a drum machine where the Teensy is triggering analog drum circuits, then the audio is fed into the Teensy (audio board line in) for processing. The drums with big transients are distorting.

I simplified the audio code to route the input directly to the output, and recorded the audio at line in and line out (input top, output bottom):

CleanShot 2022-04-12 at 15.11.46.jpg
CleanShot 2022-04-12 at 15.02.39.jpg
CleanShot 2022-04-12 at 15.04.51.jpg

The audio input is coming from a TL072 op amp connected directly to the line in pin on the audio board, and the transients measure around 0.2V peak to peak (I reduced the gain a lot to see if that made a difference, but it doesn’t). The op amp has +9V/-9V supply, biased to the Teensy’s audio ground.

I’ve tried adding a series resistor between the op amp and the Teensy with a capacitor to ground from the line in pin (tried 100ohm/47pF and 1k/4.7pF). It changed the sound slightly, but the distortion is still there.

I feel like I need to add more protection against the peak current of the transients, but not sure how! Any ideas?
 
The audio input is coming from a TL072 op amp connected directly to the line in pin on the audio board
The op amp has +9V/-9V supply

You need to protect the audio adapter from over voltage on its inputs, there is no protection on the adapter and
there's a definite risk of frying it if you have +/-9V. I worry you've already done damage.

A series resistor and Schottky diodes to the Audio Adapter rails would be one way, but at the very least a series resistor to limit
current is vital.

I don't really understand your circuit, and you've not posted your code, so its not easy to progress further - the actual issue
you see may or may not be related to overvoltage. Aliasing is a definitely possiblilty. You tried adding an RC low pass filter.

However 47pF or 4.7pF is doing nothing at all at audio frequencies. 1k/47pF has a cut-off at 3.5MHz... Try 10k and 1nF.
 
Thanks @MarkT! Here’s the relevant part of my circuit as it stands:
CleanShot 2022-04-13 at 11.39.36.jpg

Since I only added the series resistor after testing it without I may well have blown the Teensy Audio board – I’ll try rebuilding the circuit with a new one and see if the extra protection helps. But first I’d like to make sure I know what you mean by overvoltage.

The output of the op amp is around 0.2V peak to peak, which should leave plenty of headroom for the Teensy Audio board. But since you mentioned using Schottky diodes to limit the voltage to the audio board rails (0v and 3.3V), I’m starting to think that maybe I’ve made a mistake by not biasing the output of the op amp to something like 1.6V. If the audio signal is going positive and negative around 0V, the negative part would be outside of the audio board rails and might well cause trouble, right?

(edit) So maybe my question should really be: what’s the correct way to connect an op amp with a bipolar +9V/-9V supply to the line in of the Teensy audio board?
 
Last edited:
Have you tested with the 10k/1nF yet - that ought to keep the slew-rate down to something a sigma-delta ADC can actually handle without aliasing issues. The TL072 is fast from what I remember (20V/µs?). The SGTL5000 is more used to 0.25V/µs (or whatever a 2V 20kHz sinusoid involves).
 
I think @ihatemornings (great name. ditto) might usefully use some help in setting up the op-amp circuit to have it's output centred about 1.65V.
 
Right! I was thinking I could use the other side of the TL072 to centre the audio signal around 1.65V like this:
CleanShot 2022-04-13 at 17.55.24.jpg

But I think there’s a hole in my understanding: if the audio board has a capacitor between the line in pin and the SGTL5000 that removes the DC component, the ADC won’t see the bias voltage. So why would it make a difference if I centre the audio signal around 1.65V to prevent it going below 0V?
 
Ok. Thanks for clarifying!

I guess I’ll revert to the theory that I blew up the audio board by omitting the current limiting resistor. I’ll try building another one with the additional resistor/cap and see how it goes.
 
Well I’m sure the current limiting resistor is a good idea, but it turns out that wasn’t the problem. The distortion is still there.

But I have made some progress: I tried feeding in audio from an external source instead of the analog drums and when the beat is running I still hear the distorted ghost beat. So it must be something to do with the fact that the Teensy is also sending trigger signals to the analog drums (via a multiplexer). The audio board is stacked on top of the Teensy and shares the 3.3V pin, so maybe there’s an issue there. I think that’s a topic for another post, but I’ll do some more experiments to narrow down the possible causes before starting a new thread...

Thanks for the help!
 
Back
Top