Help with audio quality!

Hi everyone -

I'm using the Sparkfun Audio-Sound Breakout (ASB) to play an announcement when people use their camera flash near a fish tank. I'm using an Arduino Pro Mini to record the flashes using a photo-resistor, and then pulling one of the ASB pins low for a fraction of a second to trigger the audio clip to play. It works like a charm, and I have had much success during the prototyping stage with a 0.5w/8ohm speaker. The unit has now been assembled and fitted into a box, with the photo-resistor neatly hidden in front of the fish tank, and the output going into a 50w amplifier before being distributed around a set of ceiling speakers installed above the tank viewing space.

The problem I am now encountering is that the sound quality through the amplifier/speakers is awful, despite there being no issue when using the smaller 0.5w speaker. My first thought is that the volume coming from the ASB is too high, so I have tried to decrease the volume coming from the ASB (to improve the signal:noise ratio) but have ben unsuccessful.

Does anyone out there have a suggestion on how to resolve the audio quality issues?

Thanks in advance,
Joe

This one ? https://www.sparkfun.com/products/11125
That is only ment for a speaker, since it has a PWM output to drive a speaker directly. There is no normal audio line-level output.
You should use short wires between that module and a speaker. Perhaps a different speaker or a speaker in a box will help.

When you need a normal audio signal, you have to buy an other board.
Like this one: Adafruit Music Maker MP3 Shield for Arduino (MP3/Ogg/WAV...) : ID 1790 : $29.95 : Adafruit Industries, Unique & fun DIY electronics and kits
That Adafruit board is designed to be able to connect it to a stereo system.

For this Sparkfun Audio-Sound Breakout - https://www.sparkfun.com/products/11125 - the blurb and datasheet both reference a DAC-based output for connection to an external amplifier. If you're using this device with the PWM output connected to the amplifier, try connecting the DAC output instead. If you're already using the DAC output for the amplifier, then the audio quality issues you mention may be related to the device's 4-bit format. If you're not using this device at all, but some other one, just forget I said anything.

Maybe you could mention exactly what device you're using, and either post a schematic or give us a list of your connections?

Is the DCLK pin the DAC output ? I didn't notice that.

Hi both,

Thanks for the replies so far!

Yes, I'm using the Audio-Sound Breakout from SparkFun as seen here: https://www.sparkfun.com/products/11125.

Peter, where did you see that the DCLK provided the DAC signal? From what I could make out from their schematic, the DAC signal is accessible by connecting the amplifier to PWM (and GND), and a direct speaker connection is made using SPK+ (and SPK-.)

I checked the datasheet and the schematic.

Peter_n:
Is the DCLK pin the DAC output ? I didn't notice that.

I don't think so. It looks like the datasheet describes two different modules - WTV020-SD-16P and WTV020-SD-20S - that use the same IC, WTV020SD-20S. The '-16P module has an output labeled, "AUDIO-L," which appears to be a DAC-ish output. The '-20S module doesn't have that output. Comparing the schematic linked to the Sparkfun product page with the schematics shown in the datasheet for both modules, the Sparkfun unit doesn't look like either one, but the functionality provided by the outputs at the card edge seems to resemble the '-16P. The AUDIO-L output comes from pin 10 in the IC, and, based on the Sparkfun schematic, that's connected to a pin called, "PWM," on JP-2 Pin 1. The datasheet shows this pin and GND as the output to an external amplifier, in the MP3/DAC output mode.

I don't know what mode the OP is using. I don't find clarity in the datasheet about how to select the various modes, if one actually selects them.

The blurb lists this as a feature:

Dedicated 16-bit DAC/PWM audio output to use with an external amplifier.

The datasheet, on page 20, shows this heading

8.4.MP3 MODE APPLICATION CIRCUIT(DAC OUTPUT)

, with this note shown in the text

WTV020-SD-16P DAC output,” Audio L” and module GND to amplifier. WTV020-SD-20S DAC output, “SPK+” and module GND to amplifier.

How is the external amp connected to the module when it's delivering lousy sound? The datasheet suggests driving an external amplifier from SPK+ and GND, and calls it a "DAC output mode" for the WTV020-SD-20S, whcih doesn't bring pin 10 of the IC to a connector. I don't know how the OP's amp is connected. If SPK+ and SPK- are used as input to the amp, I'd expect trouble. There'll be less trouble with SPK+ and GND, but, until it can be verified, I'd recommend keeping the volume on the amp turned down low, as I'd expect the PWM frequency to be well-represented in the output signal.

A search of the forum finds others having trouble getting the -16P device to work as expected. Solutions posed include making sure to format the microSD to FAT16. There's talk of fiddling with the SD card - apparently, not all of them are compatible - and of using a different supply voltage, but those suggestions appear to refer to module '-16P, which can use a standard non-mocro SD card. The OP seems to be getting his micriSD to work already.

Hi tmd3,

I'm not sure whether the Sparkfun breakout ships with a particular module, but the one I have here is the WTV020-SD-20S, and I have tried hooking up to the amplifier with both SPK+/SPK+ and PWM/GND. I have not however tried SPK+/GND, I suppose I viewed SPK- and GND as the same net.

I will change the input to the amplifier so that the SPK-/GND terminals are used instead, and see whether the audio quality improves. In either event, thank you for the guidance. :slight_smile:

Joe

jlavery31:
suppose I viewed SPK- and GND as the same net

My take is that SPK+ and SPK- are complementary PWM outputs, that deliver pulses in a fashion that keeps the time-average voltage across the speaker at or close to zero. A speaker coil doesn't like a DC voltage across it: as an inductive load, it'll draw more current at DC than it will at AC; and a DC voltage will drive the coil to some off-center point, leaving it less throw on one side. And, probably some other things that I don't know about. An amplifier typically likes to see a voltage that varies back and forth around ground.

There's a circuit shown in the datasheet, accessed from the Sparkfun product page, that claims to describe the MP3 mode for an external amplifier. I can't see how it differs from other modes, so I'm uncertain about how the MP3 mode is selected, or it there's any requirement to select it specifically. A lot of would-be users of devices like this one have posted about it in this forum. Some find them nearly intractable, while others get good results easily. I can't see what the magic bullet is.

[Edit: Fixed punctuation]

Tell us these things:

  • How are you connecting to the amplifier input? Tell us everything in the circuit between the sound module and the amplifier. A schematic drawing would be best.
  • What results did you get when you connected the amplifier input between PWM and GND?
  • What results did you get when you connected the amplifier input between SPK+ and GND?
  • What is that amplifier? A self-contained bit of consumer stereo equipment, an LM386, or something else?