Comments: Qwiic MP3 Trigger Hookup Guide

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #1633783 / about 4 years ago * / 1

    Hello,

    I would like to build a custom talking doll. What I would like to do is to press a button that play a random sound from a sd card on a speaker. This product seem to fit my needs, however I am not sure about how to do it.

    I can't use the native triggers since I want to trigger a random sound in the 255 possible to load on the sd card. If I get it right I need to script a program that play a random sound and then to plug a button in the Qwiic connector to trigger my script. Is that right ? If so I need a button like this one => https://www.sparkfun.com/products/15591 ?

    If I get all of these, will I get everything to build my project ?

    https://www.sparkfun.com/products/15165 SparkFun Qwiic MP3 Trigger

    https://www.sparkfun.com/products/15107 microSD Card - 1GB (Class 4)

    https://www.sparkfun.com/products/9151 Speaker - 0.5W (8 Ohm)

    https://www.sparkfun.com/products/15426 Reversible USB A to C Cable - 0.3m (alimentation)

    https://www.sparkfun.com/products/15591 Qwiic Arcade - Red

    https://www.sparkfun.com/products/14426 Qwiic Cable - 50mm

    Thank a lots for your response :)

  • Member #1632280 / about 4 years ago / 1

    Has anyone had any luck triggering the mp3's with a relay?

  • Member #1023873 / about 4 years ago / 1

    I need track 5 and 5 played, is there a special 3 way switch I need to make them touch simultaneously or can I do something to the board to make the 4 pins have 2 sayings?

    • You should be able to pull pins 4 and 1 down at the same time to get track 5 to play. I forget the exact timing in the firmware but we made the amount of time to scan for pin changes large enough (~250ms or more) so that humans could press two buttons at the same time.

      If you need just track 5 to play, I would wire pins 1 and 4 to one side of a momentary switch with gnd on the other side. Pressing the button should trigger track 5.

  • Member #1605023 / about 5 years ago / 1

    Per the guide

    Indefinitely holding a pin low will cause the same track to play again. This allows for looping sound effects.

    Is there a way to not make the audio loop and only play once even if the pin is held low?

    • santaimpersonator / about 5 years ago / 1

      Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.

      That being said, not without reprogramming the Qwiic MP3 Trigger. However, you can attach a separate microcontroller and program it to do that instead. See the Qwiic MP3 Trigger Library and Example 1 sections to get started with that.

  • Member #1562968 / about 5 years ago / 1

    Hi, I've just received and test my Qwiic MP3 Trigger. I use the 3,5 audio jack out to listen to MP3s to headphones. However, I have a poor sound quality. The sound is absolutely clear but with a lack a bass. (I play 256Kb MP3s that sound perfect from my PC on same headphones) Is this normal? Thank you!

    • santaimpersonator / about 5 years ago / 1

      Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.

      That being said, it is probably due a combination of the mono output of MP3 chip and the frequency response of the Class-D amplifier (TPA2005D1) on the board. I've tried playing the imperial march on the board and you can tell when the lower tones are playing due to how the track was composed, but you are correct, the deeper bass notes are feint. Your computer should also have a higher end audio chip/card with a more powerful amplifier, which isn't a fair comparison for sound quality.

      What may help is that you make sure that the file is converted for a mono-channel output. Sometimes on the deeper tones are split to either the R or L channels on audio files. I've come across similar issues with older stereo amplifiers; if you change the speaker output between stereo and mono, based on how the input is configured, it can drastically change the sound quality.

  • NoiseMaker / about 6 years ago / 1

    Hi, The Qwiic MP3 Trigger Library Example 4 (stop/pause) will not run as is. Upon checking the code, it appears that the command set used is from a different mp3 library. 'Not sure which one, as the only library include in the sketch was for Wire/I2c. I modified the sketch using the Qwiic mp3 library and command set, and it worked fine. 'Great board, small footprint and plenty of volume.

    • Nice catch! I believe I fixed ex 4. It now compiles. I pushed a new library version so you should be able to grab v1.0.1 through the Arduino IDE. Please open an issue on the repo if there's more problems.

  • Member #1511145 / about 6 years ago / 1

    Hello,

    Sounds like the noise floor of the Qwiic MP3 Trigger when no audio is playing is really high. Is there a way to keep it completely silent when on standby for triggers?

    Thank you.

    • Member #469207 / about 5 years ago / 1

      Hi. I am having what appears to be the same problem. When standing by awaiting a trigger, there is a lot of noise through the minijack output. Can't notice it using the onboard amp and external speaker. It's kinda pulsing, digital noise. Way too much to be able to use the board plugged in to anything and amplified. I am only using the onboard physical triggers. Nothing else plugged in, and no additional programming. Interestingly, I also find that the noise stops if the SDcard is removed. Is there a solution out there that anyone has found? Cheers

    • I haven't experienced noise or static when a track is not playing. Can you describe your setup a little more? What is powering the Trigger? What commands did you send to the trigger before and after that caused the noise? Are you listening via headphones or external speaker?

      The external speaker should not experience any noise since it is powered down via the Playing net (found in the schematic).

      When you play silent MP3s do you still experience the noise?

      • Member #1511900 / about 6 years ago * / 1

        I'm member 1511145's colleague and I'll elaborate on the matter. Keep in mind we ordered two dozen Qwiic MP3 Triggers. I have tried 5 so far, and all exhibits the same issues.

        Observations and tests

        • Tried various 5V USB power supplies
        • Tried as many USB-A to USB-C cables
        • We only use the on-board physical triggers, no other MCU is tied to the I2C bus to send commands
        • When playing a generated silence clip, using an oscilloscope connected to JP10, there is and measurable noise in the 25 to 50mVpp range. It's classical whitenoise, and is sincerely acceptable.
        • But when in standby mode, awaiting a command or a trigger, the noise sounds more digital (squarewave'ish). It's base frequency seems to be is in the 16KHz range with all its associated harmonics. It is very distracting, and unacceptable.
        • A strange behavior to note: removing the microSD card stops this "digital" noise.

        As you can see, I am stomped by this digital noise. I was thinking to hook up my ISP AVR programmer to J7, and simply reprogram the MP3 trigger as a classical MCU to loop a generated silence clip in it's wait state, without the need of an external MCU sending commands via i2C. If it's possible, could I have access to the source code used in the ATtiny84?

        But the real question is: "Why is it that the digital noise stops when the microSD card is removed?
        

        • santaimpersonator / about 5 years ago / 1

          I tried to test this out. Even with ear buds, I had to wait for everyone to leave the office and configure the board for maximum volume to even discern a "noise" (you guys have some nice speakers or an amplifier). From my experience, I would suggest turning up the volume on your audio file. When I played my audio file... I almost went deaf (I could hear the audio file, from the ear buds... 2' away! I am still not sure if there is still "noise" or my ears are ringing).

          I did try to check the audio output on an oscilloscope:

          • There are square signals, but that is because of the digital audio output.
          • There did seem to be some noise around 16-18kHz range, when there wasn't a file being played. However, it was hard to accurately gauge if that was an actual signal pattern.
          • With a silent file, I couldn't detect anything. On the oscilloscope, from the signal I could isolate, it was at such a high frequency... you wouldn't be able to hear it anyways.
          • I did not experience a change in the noise with the SD card removed.

          Eventually, I tried to scope the outputs on the MP3 chip (WT2003S), I couldn't find the same noise pattern that I "saw" earlier and the S/N ratio was magnitudes different. I also scoped the power and ran into the same results. If there were an issue on my board, the "noise" would probably be coming from the amplifier.

          I would suggest increasing the volume on the audio file first. I am not sure how your system is set up, but based on the differences in the amplitude of my "noise" to the audio file I would say the noise was insignificant (i.e. comparing a pin drop at a rock concert). However, if you have more information to support this issue, please create a post on our forum with all the pertinent data and I'll see if I can dig up more information.

        • You can absolutely have access to the firmware. It's in the hardware repo here.

          I haven't experienced this but I'll try to replicate.

          • Member #469207 / about 5 years ago / 1

            Has anyone had success solving this? I'd really appreciate pointers, or even modified code. Thanks. Jules.

  • buffler / about 6 years ago / 1

    How do I hack to run from a 5 volt power supply? Can't use the type C connector. 5v input should be on this beast!

    • It's a heck of a hack, but if you solder to the capacitor next to the USB C connector, you can provide the board with 5V.

      alt text

      We've created an issue for this and will try to expose the 5V rail on the next revision.

      • Member #134773 / about 5 years ago / 1

        I, too, would like to see the 5V rail exposed. A few years ago, I built a "Flashy Santa Hat", with a 5V ProMini, addressable RGB LEDs, an accellerometer and ambient light sensor. Last week, my girlfriend wanted to "kiss Santa", and the song I Saw Mommy Kissing Santa Claus ran through my head -- making me think maybe I should add sound to the FSH!


If you've found an issue with this tutorial content, please send us your feedback!