SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By olestordal
#195854
Hello,

My first post here, so please bear with me :)

I have been struggling with some kind of noise issue with my WAV Trigger board (I have tried two boards to try to rule out hardware faults).

I am not 100% sure where to begin, so I guess from the top:

I have several sound files I wish to play that will be controlled by an arduino micro controller. This bit actually works. However I have a noise issue when playing said files.

I have created an example sound in Soundcloud (https://soundcloud.com/oleshobbyblog/noise-combined). The file first plays the output from the WAV Trigger with the noise just trailing it, it then plays the sound as it should be (i.e. the original). The speaker used is a tiny one so the sound is tinny and awful :? . The issue is the noise heard after the first time the sound plays, there is a distinctly jittery sound.

I have tried several things to remove this, most did not work:
  • I have tried different sound files
    I have tried two different WAV Trigger boards
    I have tried different amplifiers, even used USB speakers with a built in amplifier (powered on the same 5V bus as the rest of the circuit)
    I have tried messing with the settings in the initfile editor. Almost nothing works
What works is:
  • Using head phones (not really an option as the project calls for the use of speakers, but I did it just as a test)
    Using the on-board mono amplifier (I wish to avoid this to minimize the heat on the WAV Trigger, and I want stereo)
    Using two power supplies (5V), one for the WAV Trigger, and one for the amplifiers (with common ground)
What has thrown me off a bit is the fact that while testing I would simply short the trigger points to play the selected files. This always generates the noise, as if on cue. However, pressing the "play the first file" button on the board does not always generate the noise. I will try to explain: For ease of explanation let's say I only have two files, labeled 001 and 002. Triggering them using the physical shorting of trigger points, they both generate noise. Pressing the button playing the first file, 001, it does not generate noise. Now, to complicate matters, if I delete 001 and replace it with a copy of 002, renamed to 001 I now have noise even when pressing the button on the board. Very confusing :think: It makes no sense, which is why I have had a look at the audio files, and even made them a second time making sure to use Audacity and create them as shown in this video (https://www.youtube.com/watch?v=B9iIxnMUk7E( by Jamie Robertson. From what I can tell they are the right make and model..

I am at my wits end, and starting to think I will have to resort to using the on board mono amplifier. I thought however I would give it a shot on here, see if anyone had any clever ideas I could test out before throwing in the towel.

Please let me know if you need more input. I was thinking of adding a drawing, but as I have changed the circuit layout so many times trying different things, I am not sure that would be of any use at this point.

One thing I have not tried is upgrading the firmware.. (I do not have the hardware to do this yet, and I am not sure what I am running atm..cards were purchased a few weeks ago). Could it be that simple?

Another thing, might not be related..but then again, I am no expert.. This happens to both WAV Trigger boards. When I power them using 12V through the barrel connector they get REALLY hot after a while. Like burn your finger hot. This happens on the underside of the barrel connector. It doesn't seem to matter if the on-board amplifier is in use or not. Some heat I would understand, but this feels a bit excessive.

Any input is greatly appreciated!
User avatar
By robertsonics
#195860
It seems as though the issue is related to the analog connection to the WAV Trigger output, since all 3 items in your list of "What works is:" relate to how the WAV Trigger is connected to a speaker. If the problem were related to, say, the flash card or file formats, you'd certainly hear it in the headphones as well.

I don't understand the "Using two power supplies". In the "What doesn't work" list, you say you tried different amplifiers. Weren't any of them self powered and therefore using two power supplies?

How is the level of your wav file? Is it really low, forcing you to have a high gain in the output amplifier?

It's unlikely related, for reasons stated above, but how is your microSD card formatted? You want to make sure that you use a file allocation size of 32K in any event, as values lower than this affect how fast the WAV Trigger can get data off the card.
By olestordal
#195863
Hello and thank you for the quick response!

I agree with your assessment, I just wanted to bring as many observations as possible to the table.

I can try to add more meat to the bone as it were. First the "two power supplies". I should have specified that all my attempts have used amplifiers or amplfied speakers that were all powered from the 5V circuit I am using for the project. However, at one point I separated the 5V into two separate PSUs, but with a common ground. So one 5V 2A USB fed the WAV Trigger, and a second 5V 2A PSU fed the amplifiers. This was "noise free". This led me to think that maybe the amplifiers were draining too much power from the circuit (pardon my mangling of the technical terms here, I am not an electrical engineer.. :oops: ).

Either this, or that there is some kind of noise component on the 5V or ground feeding the WAV Trigger.

Not sure how much of this I mitigated by 1) trying a pair of Creative USB speakers (..again powered from the same 5V circuit, single PSU), or 2) by trying a second amplifier (this one: https://www.adafruit.com/product/1752, but then using a 12V PSU).

To clarify, when I power the WAV Trigger by 5V i use the pins on the "rigth side", and when I power it using 12V I use the pins on the "left side".

The level of the audio file. I haven't adjusted it, and when I play it on my Mac it plays at decent volume if I leave the volume control at 60%. I hope that answer it. I will try out a few different levels and see if that makes any difference. I really don't think I have had to up the gain too though.

It is formatted as FAT32.

I have gotten hold of a USB FTDI dongle now, trying to connect to see if I can flash the firmware, but no luck yet. The card must be powered separately to work with FTDI control?

Update #1:
So I was able to flash with a newer firmware (it was running 1.28, so I guess it was OK, but I was curious if the "Fixed issue with last block of file (about 20ms) not being played" part would have any impact. Sadly it did not. I also want to add that with the last amplifier I have tried (the one linked to above. I would use an amp from Sparkfun since this is their forum, but sadly I do not have one at hand right now..) I connected to using a store bought 3.5 male/male cable. Jack to jack.

Update #2:
Actually, instead of me messing around with audio files (also not my main area of expertise), I downloaded the piano test files. The noise can be heard almost all the way through each note as they are triggered. Changing the gain on the amplifier does little to help. I mean I can adjust it way down to where the noise is barely audible, but then the wanted sound is also kinda low.
One thing I forgot to mention earlier, at one point during testing I forgot to ground the signal out of the audio jack on the WAV Trigger (I think that it, some ground at least), and that really increased the audible noise.
/ Ole
User avatar
By robertsonics
#195864
As I mentioned before, your symptoms suggest analog noise, so flash cards, file formats and firmware won't make any difference.

The WAV Trigger has 2 voltage regulators. The first takes the barrel jack input and regulates it to 5V, which feeds the second regulator and the on-board mono audio power amplifier. The second regulator produces the 3.3V used by everything else on the board, including the audio DAC. When you power the WAV Trigger with 5V, you are bypassing the the first regulator.

If it's a true statement than whenever you power the WAV Trigger 5V with the same power supply that's powering your amplifier, then the likely problem is that your 5V supply is noisy, unregulated or badly regulated, and that noise is getting through the 3.3V regulator into the audio output.

The best isolation solution is to power the WAV Trigger off a separate 9V DC supply to the barrel connector, and use something else for your audio amplifier. This minimizes the likelihood of supply noise getting into the audio output.

If you must use 12V, the 5V regulator will run pretty warm. Adafruit sells tiny little aluminum heat sinks that I've used successfully on the WAV Trigger's 5V regulator, and will certainly help.
By olestordal
#195867
Right, yeah I guess I just wanted to rule out as many things as possible in the meantime.

Thank you for the suggested solution, I guess I could run my project on two supplies, though I would like to keep the foot print down. I will keep at it a bit longer, and if I cannot get the noise to go away then I think I will end up using the on-board amplifier and going mono.

Interesting information about the two regulators. I should probably have mentioned, though, that I have run it on a single 12V 3A supply as well, now that I have an amplifier that supports 12V. This still generates noise unfortunately. Also I have tried 3 or 4 different kinds of supplies in total..starting to think its the the wall power in my apartment.. :neutral: To this end, I tried using a battery bank. I really thought this would remove the noise..it didn't! :shock: The noise is still there, just like with a wall wart supply..could both my cards be damaged somehow? :think:

Off topic, but I just have to ask, when I connect a 9V (I also tried a 12V earlier) supply using the two pins next to the barrel connector I do not experience excessive heat. It gets warm to the touch, but it seems to level out and doesn't get uncomfortable. However, when I connect the same supply, but using the barrel connector I get worried fairly quickly. Within seconds it gets so warm I don't want to check with my fingers any more, and I can smell the hot electronics heating up. Its like there is a short somewhere. The 9V supply is only rated to provide 400mA. Is this normal, and am I being a bit too cautious? Again, this is without the on-board amplifier powered on, and not even playing sound. Just being idle.
By olestordal
#195868
I know it isn't good form to answer one's own posts, but the edit button wasn't there any more.

TL;DR
Keep the cables as short as possible! That way you avoid introducing more noise than necessary.. :doh: :doh: :doh:

Full story..
So I couldn't let it go, even though it is getting late here ..and to be honest, I am have a mix of emotions right now. Mostly elated, but also kind of embarrassed..

As described in earlier posts, I had tried a bunch of things, to almost no avail. As the evening progressed I kept coming back to that one little thing; when I forgot to ground the output from the WAV Trigger the noise would increase..hmm.. "How do I ground this even more?" :? .. This is probably where I should explain that at this stage this project exists only on a breadboard, using dupont header cables..sometimes the actual length the signal/5V/ground has to travel is pretty long.. I guess everyone can see where this is going.. I cut a bunch of cables to length, real short actually.. Then I hooked it all back up, both to the battery bank and to one of the 5V supplies I tested earlier.. Noise gone :dance: ..well, it is there if I put my ear inside the speaker, but wow its faint! Barely audible! I bet when I get this baby properly soldered up it will be gone entirely, at last to a point where I feel ok about it (I am there already actually..) This was without any sort of capacitors on the 5V as well, so I am pretty satisfied with this now.

Thank you for answering my questions robertsonics, I really appreciate the input you provided! It helped me avoid the very wild goose chases I could still have been exploring at this point :D
User avatar
By robertsonics
#195869
Glad you figured it out.

Regarding supply voltage, if memory serves, the WAV Trigger draws about 80ma when quiet and somewhere around 120ma when playing, but that's without the audio amp enabled. Once you enable the audio amp, your current goes up dramatically with volume. Even without the amp on, regulating 12V down to 5V with that amount of current produces quite a bit of heat for that little 5V regulator. I've never had a failure, and the Adafruit heat sink makes a difference, but I try not to use 12V to begin with.

I typically use 9V or even 6V - I purchased a bunch of 6V adaptors from Digikey for this purpose.