Input voltages for Audio Shield

Status
Not open for further replies.

Mortjo

Member
Hi

I want to build a guitar effect pedal using a Teensy 4 and the Audio Shield. I have built many analog effect pedals and understnad the need for a high impedance buffer / preamp and for keeping analog and digital signals and supplies separated. What I don't know is what signal levels are OK with the SGTL5000 and how I should protect it against input voltages that would damage it. I looked in the SGTL5000 datasheet but couldn't really find an answer. Some guitar pickups (and guitar effect pedals) can have quite high output voltages (7V peak-to-peak for some active pickups) which I guess could harm the codec. Is there a recommended way to protect the codec - and is it needed or is there already some protective circuit inside the SGTL5000? Clipping the signal with diodes to ground and audio is an easy solution, but will still allow a big voltage swing due to the forward voltage of the diodes. Would that work or can you recommend some other solution?
I have looked at blackaddrs guitar audio shield, and it uses a diode clipping setup, but it also uses another codec (WM8731) that might be different with regards to protection/voltages.

Best regards

/MJ
 
Most codecs are designed for good performance at roughly around 1 Vrms as the normal operating point, however the SGTL5000 datasheet specs @ 3.3V supply a max input level of 2.83 Vpp. It's not clear if this is already saturating the ADC but I suspect that's the case. Normally as long as the input voltage does not exceed the analog supply, you are not at risk of damaging the codec.

Some forum members here have reported blowing their Teensy Audio board by sending their guitar signal from a home made preamp or pedal directly into the line in on the audio board.

Unless you buy a dedicated IC build for this exact purpose, "protection diodes" are the standard way to protect any circuit in the the case of voltages that go out of range.

It's easy to get audio into the Teensy Audio board. Just plug a guitar pedal in first to get the impedance the guitar needs. However, it's also very easy to damage the codec too.

If you want to plug a guitar directly into a CODEC without needing pedals in front, and doing it safely, you need a LOT more stuff from your preamp:
OPTION 1:
- very high input impedance (500K, 1M is better)
- very low noise preamp circuit
- lots of gain, or potentially lots of attentuation
- circuitry to protect the codec to ensure you never send it voltages above 3.3V.

OPTION 2:
- build a compander circuit, as this eliminates the need to worry about input gain settings for best SNR, and also reduces (but does not eliminate) the risk of frying the ADC input. This squashes the 0 to 9Vpp input range down into something like 0.8V to 1Vpp (compressor), then expands it back up to 9V after the CODEC. This is how many digital guitar pedals work (look at the schematics for the Boss DD-2). Note: this means 0V in ismapped to 0.8V and 9V in is mapped to 1.0V. It literally squashes the full dynamic range to a a few hundred millivolts right around the peak SNR of the ADC. Very low risk of digital slipping, but also means quantization error is quite high. Yet, guitarists who claim to hear the difference with different resistor materials don't seem to comment on the DD-2 squashing the sh*t out of it. In facdt the DD-2 is considered a highly sought have 'vintage' pedal.

In fact, the DD-2 is a great reference.
https://www.hobby-hour.com/electronics/s/dd2-delay.php

It's just a digital delay, so it really just wants to digitize the input with an ADC, send it to a micro for delay and tone processing, then back out to the DAC.

Notice how much analog circuitry is required just to do that seemingly simple task!

So, it's simple to get something that "works", but very complicated to get something that works as well as a commercial digital pedal. That's why I created the TGA Pro, most people want to spend their time learning to make digital effects, not dissecting the DD-2 or designing proper mixed-signal low-noise preamp/CODEC circuit boards.
 
Is there a recommended way to protect the codec - and is it needed or is there already some protective circuit inside the SGTL5000? Clipping the signal with diodes to ground and audio is an easy solution, but will still allow a big voltage swing due to the forward voltage of the diodes.

Use schottky diodes to the (analog) rails with a 1k series resistor in front - that will protect the CMOS protection diodes
already inside the SGTL5000 chip (standard practice for externally protecting CMOS). Schotty diodes typically conduct
at 0.25 to 0.3V.

By itself the chip may take moderate overload, but too much overvoltage from a low-impedance source will
fry any CMOS chip, the internal protection diodes are tiny.
 
Hi guys, thanks for the quick replies. I'll try clipping with low forward voltage diodes and maybe a voltage divider after that to 'tame' the input to the audio shield. And then i'll see if I end up frying the board...

Blackaddr, you mention a 'dedicated IC' for that voltage clamping purpose. What are such ICs called?

Regards,

MJ
 
Hi guys, thanks for the quick replies. I'll try clipping with low forward voltage diodes and maybe a voltage divider after that to 'tame' the input to the audio shield. And then i'll see if I end up frying the board...

Blackaddr, you mention a 'dedicated IC' for that voltage clamping purpose. What are such ICs called?

Regards,

MJ

No idea, but there seems to be a dedicated IC for everything the days. I'm sure I've seen something, somewhere, sometime in relation to audio protection ICs. But it seemed overkill. The dual diode ICs I used in the TGA Pro did the job well, were small, and very cheap.
 
Status
Not open for further replies.
Back
Top