November 22, 2024, 11:00:08 AM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


SparkFun MP3 Trigger with Prop 1

Started by freakyland, December 31, 2010, 12:40:16 PM

Previous topic - Next topic

freakyland

I believe I may have found an option for using the Sparkfun MP3 Trigger with the Prop 1 with firmware update.
The players are quite compact compared to the Rogue uMP3, and for $50 are not a bad player (I've used a few in our haunt coupled with X10 wireless modules for some portable gun effects). 
The link below includes firmware updates and instructions to allow Baud rates of 2400, 9600 to the SparkFun MP3 Trigger for serial comm with slower devices.

http://makerjam.com/projects/updating-the-mp3-trigger-firmware/

The glitch is that you need to have the "Cypress MiniProg for around $25" (I found online 12/31/10 for about $34 shipped).  Still doesn't seem like a bad deal, as long as it works.

Any thoughts from those with a bit more seasoning than I regarding the viability of this option to allow serial control with the prop 1. 

freakyland

So, 2 minutes after starting this thread I discovered that SparkFun has already addressed the need for the MiniProg described above by including a native bootloader on their MP3 trigger that allows firmware updates directly off of the microSD card.  (Yeah for saving $35!!!)

http://www.sparkfun.com/products/9715

The firmware updates are located here:
http://makerjam.com/support/

It seems to me that if the player can communicate at 2400 baud we should be able to control it with the Prop 1.   I have one on order already with the plan of using relay control of a couple sound files with the Prop 1, but controlling serially would definitely simplify things and of course allow much more flexibility.  I will probably get to the "try-it-and-see" phase once the parts all come in.  I have not yet experimented with serial control yet, but reading over these forums I at least feel I know enough to give it a shot.  That being said, are there any Red flags I am missing before I dive in?

bsnut

December 31, 2010, 09:13:54 PM #2 Last Edit: December 31, 2010, 09:21:26 PM by bsnut
Welcome to the forums and Happy Year.

Now, let me answer your questions.
QuoteIt seems to me that if the player can communicate at 2400 baud we should be able to control it with the Prop 1.
The Prop1 (Basic Stamp1 processor) can only do 2400 baud not 38.4K baud. This means that you will need to use trigger inputs on this MP3 player, if you want to use with the Prop1. If, you want to use the serial option you will need to use the Prop2 (Basic Stamp 2 processor), which can communicate at 38.4K baud. Here is the User Guide for the MP3 player that you looking at.
http://www.sparkfun.com/datasheets/Widgets/MP3Trigger/MP3TriggerV2-User-Guide-2010-04-16.pdf

I hope this points you in the right direction    
William Stefan
The Basic Stamp Nut

freakyland

Thanks for the welcome, and the New Year's Eve response! I hope you didn't start your New Year's festivities late on my account ;)  These forums are one of the many reasons I use EFX-TEK for all my prop control needs (maybe I've seen a few to many infomercials recently!)

From docs/previous threads I know that Prop 1s are limited to the slow Baud rate. My intrique was peaked when I found that a Firmware updates from SparkFun was released to reset the player to communicate at 2400 (prop-1), 9600, or the as-manufactured 38.5k.  Wiring concerns aside, this means with a "simple" mod, serial control with a Prop-1 should be possible, right?  Also, is there any reason why this slow of a baud rate would impair the function of triggering MP3s (obviously NOT a to-the-millisecond critical process)?

JonnyMac

Happy New Year.

I don't know that product but the baud rate thing is just a matter of how serial is handled in the processor (PSoC).  The project is setup to set the onboard serial hardware to a fixed baud rate.  Once you have the correct baud setting for the Prop-1 (2400) you should have no trouble.
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

If you want to use the trigger inputs you can easily use any of our controllers.  According to the docs:

Trigger inputs: Logic level 3.3V – 5.0V, active low inputs, w/ internal pull-ups. (Connector provides individual
grounds, allowing switches or jumpers to be connected directly to each trigger input).


The key part of this is "active low inputs, w/ internal pull-ups" -- this means you want to pull the low and you can do that with the ULN outputs.  Connect the GND terminal to the player, and one OUTx terminal per trigger input.  You'll want to pulse the output channel briefly (50ms should be fine) to trigger the selected track.
Jon McPhalen
EFX-TEK Hollywood Office

freakyland

Thanks for the assistance!!

It turns out that there is a tiny switch on the MP3 Trigger which allows for powering the device via its own power source or via a USB or other serial connection.  Flipping that to the USB mode cleared up the grounding/short circuiting I was getting back on the Prop-1/EZ-8.  I have since managed to get 4 different sounds firing off the Prop-1 using the direct triggering mode.   There is hope for this project yet!

Next up is tackling the serial control to free up channels for a couple more blinky lights!!!  I'll probably be posting questions regarding that quest as they come up...or maybe I'll just have to post a how to when it all goes perfectly the first time! (We can all hope...can't we?!)

IMTim

Even though this thread is approaching eight years old it was never completed.  No mention on how to connect the Sparkfun MP3 Trigger to the Prop-1 via serial connection.  As an option for my Halloween controllers I wanted to experiment with different components.  I love the Prop-1, it is the best controller of this application you can find.  The AP16+ is an excellent sound player.  It might be a little expensive for some, but very full of features and can be used as a stand alone controller.

As the geeky person I am, I wanted to try to get the MP3 Trigger to work with the Prop-1 via serial connection.  I make a re-usable prop controller box that is standard to nearly every prop we set up from year to year in the haunted house.  It has the Prop-1, audio player, a couple relays for 120vac items with terminal strips to hook up all the external goodies.

When we want deep, rich sound we'll use a home stereo amplifier, which you can pick up at a garage sale cheap.  When I use an external amp I don't need all the bells and whistles of the AP-16+.  But I also wanted the versatility of a serial connection to play multiple sound files during the scare.

I played with the Sparkfun MP3 Player with the Arduino, but could I make it work with the Prop-1?  I found this thread which started the thought processes going, but it was never finished.  Hopefully this will answer someone else's questions and help them out on their project.

Set up is easy.  On the Prop-1 I change out the ULN2803 chip with a ULN2003 to prevent it from interfering with the serial communications on P7.  The Prop-1's P7 Pin Header is connected to the MP3 Trigger's "FTDI Basic Port".  I run three wires, from P7 "W" goes to "Rx", "R" goes to "USB/VCC" and "B" goes to "GND".  On the MP3 Trigger you need to change the switch next to the external power connecter from "Ext" to "USB", it a little slide switch.  This will power the MP3 Trigger from the Prop-1, do not hook up external power to the audio player.

To set up the MP3 Trigger, load up the micro SD chip with the Initialization File, you can find an example on the support page.  Make sure you edit the first line from "#BAUD 38400" to "#BAUD 2400".  The Prop-1 uses 2400 Baud for serial communication.  Load your sounds files onto the micro SD card.  They must be in the following format: 001xxxx.MP3, 002xxxx.MP3.  Put the micro SD card in the MP3 Trigger and it should be good to go.

Here are the lines of program I used to get the Prop-1 to talk to the MP3 Trigger.  This not the whole thing, this is just the parts of it you'll need to add into your program.

SYMBOL Sio = 7                                ' identifies which pin the Prop-1 will use for serial communications

SYMBOL Baud = OT2400                   ' sets baud rate for the Prop-1

SEROUT Sio, Baud, ("T", "1")             ' make sure you use a capital "T", this will tell the MP3 Trigger to play the file 001xxxx.MP3

SEROUT Sio, Baud, ("T", "2")             ' this will play file 002xxxx.MP3, of course make sure you have a pause between them with enough time to play the first sound

The ("T", "1") part stands for the following:

"T" is the ASCII command line for the MP3 Trigger to play a track.  I believe this will only support up to 9 sound files. (See MP3 Triggers documentation for more info.)

"1" is which sound file to play, 001xxxx.MP3 in this example.

That should be it.  I added a push button, a couple of LEDs to tell me the program was running and looped it back to MAIN.  I was quite happy when I hit the button and it played the sound.  If you were wondered why I didn't hook anything up to the "Tx" pin on the MP3 Triggers FTDI port it's because I didn't see any reason the MP3 Trigger needed to communicate back to the Prop-1.

Again, the MP3 Trigger does not have a built in amplifier like the AP-16+.  Your options are use a set of computer speakers, buy a kit and solder one together, an old home stereo amp, or you can search eBay for a "Motorcycle Amplifier" and you can find a simple one for around $12, it's a good little unit in a nice case.

Hope this helps.  Let me know if you need clarification.  If you want you can heap vast amounts of praise on me. 
"We had become the thing we hate. We are better dead."

Sparlimb Keelsetter "The Illearth War"