Hello and thanks for taking the time to read this,
I was looking to increase the audio volume and clarity in my project so I just swapped out:
1x - TPA2016 3w amplifier from Adafruit (Stereo 2.8W Class D Audio Amplifier - I2C Control AGC - TPA2016 : ID 1712 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits)
2x - 3" 4 Ohm 3 Watt speakers from Adafruit (Speaker - 3 Diameter - 4 Ohm 3 Watt : ID 1314 : $1.95 : Adafruit Industries, Unique & fun DIY electronics and kits)
in my project for:
1x MAX9744 20w amplifier from Adafruit(Stereo 20W Class D Audio Amplifier - MAX9744 : ID 1752 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits)
2x - 20W 4 Ohm Full Range Speakers from Adafruit (20W 4 Ohm Full Range Speaker [XS-GTF1027] : ID 1732 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits)
Nothing else in my project has changed other than to code to control the gain of the amplifier which is very simple. You just write what gain you want via i2c,
Strangely though, I'm now getting LESS volume out of the 20w speakers than I was from the 3w speakers with the gain set to max (60). I'm getting almost no volume at all until up around 30 or so too.
The audio signal is coming from a Musical instrument shield from Sparkfun. (SparkFun Music Instrument Shield - DEV-10587 - SparkFun Electronics) It's a shield but I'm not using it as one since it only uses 4 pins. I soldered headers only onto the pins that are actually used and tied those to where they belong on my micro controller (teensy3.1).
See attachment for how its all hooked up. It's pretty simple.
I'm also getting a fairly loud high pitched hum from the speakers. I assume this is a grounding or interference issue so I tried using the analog ground on the amp without any improvement. I'll post more info about what I've tried as I do more tests.
I tried removing the Musical Instrument Shield and just connecting an iPod via the headphone jack to the amp and it worked beautifully. No hum, uncomfortably loud. So it isn't a problem with the amp.
Does anyone have any ideas as to why I would be getting less sound and more noise out of this 20w amplifier then I did with a 3w amplifier? I'm pretty new to audio projects so even the most basic of advice would be very welcome. Thanks again for taking the time to read this. Your help will be much appreciated.
Also, let me know if any pictures I attach are difficult to read.
Thanks,
Nick
EDIT 7/14/2014:
Conclusion:
The use of the op amp in the circuit led me to believe that I could achieve a much greater volume than this amplifier can handle in a realistic application. With this hardware at least, single notes with a decent interval between them can be played, distortion free, at significantly higher apparent volumes then multiple notes in rapid succession. The best implementation of the devices I'm using is to simply connect the midi shield directly to the power amplifier. The individual notes, set to max volume, produces a ~2.7Vpk-pk signal which, when adding a little headroom, is just within the operating range of the power amp's input. Setting the gain of the power amp to a value which produces an output just below the operating range gives me the maximum volume I can achieve with this hardware. The result is a noise and distortion free sound with decent, though not what I was hoping for, volume.
Solutions to problems in this thread:
-
The initial noise I was experiencing was due to a ground loop caused by connecting both the midi shield (-) to the power amp input (-) and the power amp's GND to circuit GND.
-
The low volume was due to my misunderstanding of what the velocity value of a midi noteOn command meant (increasing this value increased the signal volume significantly) and my incorrect assumption that increasing system wattage would equal a directly proportional increase in apparent volume . Confounding factors included, no proper baseline for comparison, single notes vs rapid notes producing signal amplitude that was not directly proportional to apparent volume and different, and often not well controlled, input signals producing different apparent volumes at given signal amplitudes.
-
The "repeating" source of noise was caused by noise on the USB connection I was using that was greatly amplified by the op amp and power amp in the circuit. Removing the USB connection, reducing total gain and the use of decoupling capacitors mitigated this noise.
-
The "squeal" noise was caused by the Musical Instrument Shield introducing noise on the circuit GND and was greatly amplified by the op amp and power amp in the circuit. Reducing total gain and adding a large (1000uF) capacitor directly across the 5v/GND connection on the shield mitigated this noise.
-
The distortion, in the later portion of this thread, was caused by either the op amp, power amp input or power amp output clipping. Bringing the signal at all of these points within their operating range eliminated the distortion.
Results of original (3w) setup vs current (20w) setup:
- Improved, though not stellar, volume.
- Greatly improved sound quality.
- Greatly improved bass response.
What I've learned throughout the course of this thread:
- Increasing amplifier/speaker wattage does NOT equal a directly proportional increase in apparent volume.
- The "velocity" value in a noteOn midi command, at least in this midi shield, controls the volume of that individual note. Not the speed at which the note reaches it's maximum volume.
- The difference between the AC and DC portions of an audio signal.
- How to use an op amp to amplify the voltage range of a signal.
- How to configure an op amp's gain and offset.
- The use of high-pass and low-pass RC filters.
- A tone control method.
- Noise reduction techniques and troubleshooting.
- The basic usage of an oscilloscope.
- Using an oscilloscope to identify certain values of an audio signal. Namely the DC bias and Vpk-pk values.
- General electronics troubleshooting techniques.
Thank you everyone that was willing to help me work through this issue and improve my understanding of audio systems, especially Jiggy-Ninja. Frankly, I'm shocked that you stuck with me all the way through this thread. You sir, are a gentleman and a scholar (literally) and I can't thank you enough for your invaluable help.
If at some point I decide that this hardware is insufficient for this project, I'll create a new thread asking for hardware suggestions. For now though, I can resume work on other aspects of the project. I'll also post the finished results (or a link to them) here when it's done. It should be pretty cool.
Thanks again.