A MUX is the digital equivalent of a 16 position rotary switch. Both more or less do the same thing except one is controlled by a binary number input and the other is controlled by rotating a knob.
The Qwiic MP3 Trigger is looking for a binary input on it’s 4 pins just like the MUX is so that’s unfortunately not going to work. (It’s the opposite of what you’re looking for)
A regular 10 position rotary switch has one common terminal that connects to 10 outputs so that’s not going to work either since the Qwiic MP3 is looking for 4 inputs.
What you need is a rotary switch that has the binary output the Qwiic MP3 Trigger is looking for and then a button to play the selected sound. We don’t carry them but you can get binary coded switches and connecting them like in the photo below you can achieve what you’re looking for without needing a microcontroller or writing any code.
Since the Sparkfun description mentionned that “the connections function in either direction”, and that “The internal switches are bidirectional”, I thought it could do the job. My mistake.
A binary switch seems to be the solution thanks, but why couldn’t I connect the COM pin directly to the GND pin ?
I don’t realy want that button, can’t the sounds play as the switch rotate ?
PS : do you know any Sparkfun re-seller in France ? in Europe ? Lately I’ve been paying A LOT of customs fees…
(maybe I should, and shall, move this question to its one topic)
PSS : is there any software where I could mount protoptypes to virtually see if they work out before ordering ?
If you connect COM directly to ground, you’re always selecting the selected trigger. If you want to loop that trigger forever, that would probably work just fine but if you want to play the selected trigger on demand, you need that extra switch.
PS : do you know any Sparkfun re-seller in France ? in Europe ? Lately I’ve been paying A LOT of customs fees…
(maybe I should, and shall, move this question to its one topic)
Yes, we do! :-)
Just click the “find a retailer” link in the upper right hand corner of the SparkFun website, or you can [click here.
PSS : is there any software where I could mount protoptypes to virtually see if they work out before ordering ?
That would be a super awesome feature, but sadly I don't know of any software you could use for something like that at the moment.](https://www.sparkfun.com/distributors)
Connected as you indicated, those outputs would play :
nothing for position 0 file 1 for position 1 file 2 for position 2 file 3 for position 3 file 3 for position 4 file 4 for position 5 file 5 for position 6 file 6 for position 7 file 4 for position 8 file 5 for position 9
I’ve looked into different coded switches but it never seems to match :
I’m not sure why the board was designed this way either, I figured the firmware was expecting a binary input rather than just adding together the value of the pin numbers to trigger a particular track. It’s very odd that we designed it that way as it’s really non standard for this type of input.
Unfortunately because of the non standard way the firmware in the board is setup, the switch I recommended won’t work and you would need to use a micro controller to translate a 10 position input to the correct 4 pin output. I apologize for sending you down the wrong path, I’ve never seen inputs done this way before.
It’s more expensive but you could use a WAV Trigger along with a [10 position rotary switch and a button do the same thing without needing a controller in between to do any translating. The common pin on the switch goes to your button and then to ground and then the 10 outputs go to the first 10 triggers. Select output 3 and press the button and track 3 plays, select output 9 and track 9 plays.](https://www.sparkfun.com/products/13253)
Thanks again for your insights, here what i’ll do after all :
Connect 4 momentary push buttons to the 4 pins, adding a signage clear enough for the public to understand that they have to push different buttons simultaneously to hear every files.
It’ll be like a little game…
The only problem is that the buttons must be pushed simultaneously AND released exactly at the same time too !
(you can play file 7 by pushing buttons 4 and button 3 together, but if you release button 4 first, it will play file 3…)
Or is there buttons that turn ON just the moment you click them, and are OFF even if you maintain the buttons pressed ?
Latching buttons are an option, but it would loop the files.
Thanks again for your insights, here what i’ll do after all :
Connect 4 momentary push buttons to the 4 pins, adding a signage clear enough for the public to understand that they have to push different buttons simultaneously to hear every files.
It’ll be like a little game…
That would be a work around if you didn’t want to use a micro controller.
The only problem is that the buttons must be pushed simultaneously AND released exactly at the same time too !
Or is there buttons that turn ON just the moment you click them, and are OFF even if you maintain the buttons pressed ?
I'm not aware of any buttons that will release at the exact same time on their own, that would be up to whoever is pushing them to control. Digitally via a micro controller this is possible but a human pressing buttons is not going to be able to release multiple buttons at precisely the same time.
Oh I didn’t mention it but it works fine if you’re a bit careful (had it tested by a friend unaware of the whole dilema).
And I didn’t use any micro controller, the signage I mention will just be written somehow, no screen needed.
As for the buttons, I wondered if it existed mechanically : buttons that turn ON the moment you press them, and instantly turn OFF, even before you release them. Such buttons would imply, in my case, that you only have to “press” them simultaneously, and not “press and release” simultaneously (as the release would be induced by the pressing…)
As for the buttons, I wondered if it existed mechanically : buttons that turn ON the moment you press them, and instantly turn OFF, even before you release them.
Not that I’m aware of, but it’s possible they do exist. Not sure what they’d be called or what search terms to hunt for to find them if they do exist. If they do, they would likely be pretty old, micro controllers do this sort of thing in code now so there wouldn’t be any reason to keep building such a switch.
What about wiring up the 4 buttons to the inputs, but add a 5th normally open button between the commons of the first batch and COM. Then you would press and hold the first 4 buttons, not worrying about the timing between pressing them), and with the other hand, press and release the 5th button.