In the end, I went back to adafruit and worked a bit with their support people:
I used the mute functionality from the navigation system's 10-12 volt input to shutdown the amp, adding a diode to protect the source of the mute signal.
Note: The SHDN and GRND pins are on AdaFruit's packaging, not the MAX9744 chip itself.
simulate this circuit – Schematic created using CircuitLab
The values were chosen based on AdaFruit's packaging of the MAX9744 and their schematic. This is what I wrote on their forum:
I've learned a lot about voltage dividers -- I was bench testing
resistor values and found that a value of 10K didn't activate SHDN (I
really want SHDN, not MUTE, since 99% of the time, this device can be
off.) I then found the diagram for the ADAFRUIT MAX9744 board. Turns
out adding another resistor to GRND is essentially a voltage divider
with a 10K connected to 3.3v.
The MAX9744 specs say that the voltage has to go under 0.3*Vdd for LOW
(the internal 3.3 volt Vdd) and over 0.7*Vdd for HIGH. So, I
determined (using the voltage divider formula and 0.3*3.3v=1.1v) that
I needed to connect SHDN to GRND with something less than 4.2K. But I
also didn't want too much current from the MUTE signal, which would
also be connected to this resistor, so I picked something on the high
end. Then I picked a value for the other resistor that would raise the
voltage greater than 0.7*Vdd assuming a voltage around 11 volts (which
is what I measured from MUTE, and the diode drops another volt.)
I put it all in an aluminum box (also grounding the box.)
I ended up with a ton of audio noise from the car. I recorded the audio on my iPhone (don't have oscilloscope), put it in Audacity, and noticed what was probably the spark plug noise along with the alternator noise.
I isolated the cause of the noise to the car power supply using an external 12v wall adapter power supply on an extension cord.
I added a 12v voltage regulator (NTE1914) per their recommendation with a 100uf electrolytic cap on either side -- didn't make much of a difference.
I then bought a prepackaged power filter for cars, IBNF10.
The one I received had a 1000uf 16v electrolytic cap, a 1uf 50v electrolytic cap, and a ferrite toroid with about 10-11 wraps:
Noise is only barely audible now. I am curious, should anyone read this, why the 1uf cap wasn't a ceramic one. I'd heard that you usually pair a bulk electrolytic cap along with a small ceramic cap in order to soak up the high frequency AC noise.
This sounds like a software issue of the I2S bus on the Raspberry PI.
In these cases I would be very tempted to break out the scope to probe the BCLK and DACLRC lines of the DAC board. The LRCLK signal should tell you the sampling frequency of the DAC. It could be the audio sounds like lower/higher pitch or distorted, because an incorrect sample frequency is used.
Also make sure the BCLK is correct. You can verify that by looking at the bit depth of the DAC and the sample frequency. The product of these 2 should give you the BCLK frequency.
It seems like the WM8731 is pretty flexible in the audio format it accepts. You should be able to send it 48kHz 16 or 24-bit I2S data without any issues. Make sure your RPi software is configured to output those exact settings to the DAC. Maybe the software is still configured to 44100Hz. I am not sure if this DAC supports that sample frequency (because it does not fit nicely between 8, 16, 24, 48, 96 kHz)
Best Answer
Yes, you can simply use a rectifier circuit and a smoothing/filter capacitor. You can adjust the value of the resistor and capacitor to suit your particular conditions.
simulate this circuit – Schematic created using CircuitLab