[ click here for a printable version (PDF) of this page ]

Finally! Cheap Mp3 Audio controlled by a Prop1 or 2!

For years now the Prop1 and Prop2 have offered great bang for the buck when it comes to micro-controllers for the home haunter. Truth be told, most of Efx-Tek's product line is at least a fair value, often a great value, and the support is top notch.

In case you're thinking, "Why are these guys blowing a bunch of sunshine up Efx-Tek's skirt again?" Well, it's not to get free stuff. We already tried that and we can't even milk a T-Shirt of those tightwads.

At least it keeps us honest.

Nope, it's because we're about to do the unthinkable - that's right - we're going to say something unpleasant about an Efx-Tek product. You see, when it comes to audio control the only product they offer [the AP8] is… how should we put this…lacking in many departments.

Namely, and foremost in the cons department is the actual time you can record - 60 seconds. For $50 bucks, plus a $10.00 power adapter, and shipping you're going to be well north of $1.00 per second of recorded sound. In these days of cheap USB thumb drives, storage costs next to nothing. Heck, you can buy a 1 gig Mp3 player for about $7.00 bucks if you shop around online.

To be fair, the AP8 does come with a built in amp so no powered speakers are needed. And if convenience is important it's very simple to interface with the Prop1 and 2. Then again, these pros are offset by the (we're being very diplomatic) awkward manner in which you need to record sounds into the AP8's Chipcorder. While we don't have any doubt that the Efx-Tek gang is working on a better solution, it isn't on any roadmap we know of.

In terms of alternatives the most obvious choice out there is the uMp3 from Rouge Robotics. Unfortunately, it's $100.00 and involves some effort and know-how to get working with the Efx-Tek controllers.

So what's out there aside from the uMp3? Short answer: Not much.

This has left people searching for a cost effective solution, namely in the form of hacking cheap Mp3 players with very mixed success and even more varied reliability.

Enter [cue temple gong] the vMusic2 from Vinculum.

This fantastic little module has a built in Mp3 decoder and accepts storage in the form of that now ubiquitous storage medium, the USB thumb drive.

Hallelujah brothers and sisters!

Not only that, but it performs like a poor mans iPod; letting you choose what track to play, or random play, repeat, volume, etc. This little bugger is also easy as pie to make work with a Prop1 or Prop2. Oh, and did we mention it's under $40 bucks?

Oops… Oh god, I think I just had a nerdgasm. I need a moment.

Before we begin

In the "give credit where credit is due" department please let me take a second to thank Jon from Efx-Tek for his help and guidance and of course "Scary" Terry for bringing this product to light in the 1st place.

The fact that Jon often gives help getting competing products to work with Efx-Tek controllers is testament to how selfless his support philosophy is. As for Terry, if you've been building props for any length of time you've no doubt already "borrowed" ideas from Terry's site. There isn't much more you can say than that about how valuable to the community he is.

To define the scope of this how-to, the goal is a relatively painless setup and the accomplishment of playing tracks off the vMusic2 via controller commands. This unit has a lot of different things you can do, and to honest I haven't played around enough to make them all happen. As I get more comfortable with it there's a good chance we might amend this how-to. Until then, this will get you going and of course replace the functionality of the AP8 with a much better storage medium using mp3s instead of wav files.

Making it work

Without further blabbering let's get going on making our new gem take it's marching orders from Prop1 or Prop2 controllers. First things first you need a parts list. Thankfully, it's a short one.

Items required:

  1. A vMusic2 player. I got mine here: http://www.surplusgizmos.com/FTDI-Vmusic2-USB-Interface-For-Microcontrollers-w-MP3_p_47-198.html [note: sold out at time of writing, get your google on if it still is]
  2. A 3-pin extension cable to plug it into the controller. I always order a couple of these when getting stuff from Efx-Tek. Cut it in half, and you have two. Great for an improvised button, or hooking stuff up like our vMusic2 module. http://www.efx-tek.com/php/store/index.php?main_page=product_info&cPath=5&products_id=18

And that's it, assuming you have a Prop1 or 2 already. If you're that new to all this go here: http://www.garageofevil.com/tech/prop1_101_episode4_the_beginning.php and get edumacated.

Note: The vMusic2 gets its power from the 5 volts on the controller's pins, so there's no need for an external adapter. You'll need powered speakers of course and if you're like me you probably have a spare pair of PC speakers hanging around. They'll work fine.

Preparation

First things first, check out the jumper on your vMusic2. We need to keep this jumper, but it may need to be moved. Make sure it looks like this, and yes you can take off the case like I did. It unsnaps pretty easily, just be careful doing it.

vmusic2 pin setting

Because you're reading this sentence it's a fair guess that you read the bit about moving the jumper as illustrated above. Take a moment and appreciate what you've just done. I say this because any poor sap that reads a how-to, which doesn't mention moving this jumper, is going to go bat-shit crazy trying to figure out why the vMusic2 isn't working. Trust me, I know this from experience.

Now that the jumper is setup right, we need to make the harness to connect it to the controller. The vMusic2 comes with a handy little harness that we'll hack to make this work.

vmusic2 harness

The Prop controller only needs 3 connections to talk with the vMusic2: ground, power, and transmit.

From the harness the applicable colors would be these:

  • Black and Green will be used to make our ground.
  • Orange will be transmit
  • Red is power

Yellow is required to transmit from the vMusic2, to the controller. This can be used if you want to do a serial-in (SERIN) command to let the controller know when a song is done playing. We aren't going to use this feature and chances are you won't either so we're just going to lop this wire off. Keep it uncut if you want to experiment with this in the future.

Now, pick an end of the harness and cut it off close to the end. Then cut back the following wires:

  • Blue
  • Brown
  • Yellow

This will leave the green, black, orange and red wires.

Then, cut the extension cable, and solder the wires together as pictured below. Use electrical tape, or preferably some shrink tubing on the joints to make sure the connections are well insulated.

Completed Harness
vmusic2 harness

Almost there!

We're going to use serial commands to the vMusic2, so we need to connect this to a pin free of ULN interference. If you're

    not
going to use any other serial devices, like an RC4 or FC4, then just use our old buddy the ULN2003 to free up pin7. Chances are however, that you might need two pins free from ULN interference.

Because we can daisy chain Efx-Tek serial devices, one pin will suffice for all of them, so you will need two ULN-free pins to allow for the vMusic2 and other Efx-Tek serial addressed devices. If you're using the ULN2803 in your 1st socket (the only socket in the Prop1) you can modify the ULN2803 like this:

Then just use p7 for the vMusic2, and p6 for your Efx-Tek devices.

Only one other change is needed on the controller, and it's an important one. Make sure you change the pin that the vMusic2 is on to be set as "UP" on the controller. You do this by moving the jumper on the controller over to the "UP" position. Once again, this is one simple step that will cause you a lot of grief if you don't implement it.

With the ULN cut back to prevent interference, and the pin for the vMusic2 set to "UP" it's time move on to the vMusic2.

There are two things that need to be changed on the vMusic2 to get it ready for business. One, we need to make sure the firmware is using the "extended command set", and two, we need to make sure the vMusic2's firmware is set for the correct baud rate. The baud rates will be T2400 for the Prop1, and OT9600 for the Prop2.

Luckily for us, both of these changes are done in one very simple step. First off, download the correct firmware set for your controller:

Prop1 firmware

Prop2 firmware

Extract the "ftrfb.ftd" file to your desktop, and then move it to your USB drive. Ensure that it's the only file on your USB drive, and then let's do one other step.

Don't connect the vMusic2 yet. If you're like me, you probably have the remains of another program on your controller from a previous project. Frankly I don't know if this step is even needed, but I don't want our vMusic2's firmware upload to get corrupted. Let's make 100% sure that the controller isn't sending anything out to the vMusic2 during this important step.

Unhook anything on the controller except the serial cable (and power of course).

Lets load a program into the controller that we're sure won't be sending out any commands that might get to the vMusic2 during the firmware upload. Something like the following will suffice:

'====================================================================== ' {$STAMP BSX} ' Use the proper directive for your controller ' {$PBASIC X} ' Use the proper directive for your controller Main: IF PIN0 = 0 THEN main '======================================================================

Load that program into the controller, and then turn off the controller.

Now, hook up the wiring harness to the vMusic2 and then connect it to p7 on the controller, which has its jumper set to "UP", and the ULN modified to avoid any interference.

With the controller still off, insert the USB drive (with the proper firmware version on it) into

the vMusic2, and then turn on the controller.

You should see the vMusic2's LED's cycle green and red, then within a few seconds the LEDs on the vMusic2, and the USB drive (if it has an LED) will start to sequence as the firmware is updated. After about a minute, the LEDs will go off and the firmware update is done.

Holy crap, we're ready to make some music happen!

You can take the firmware off the USB drive now (or not, it doesn't matter as far as I can tell) and load up some mp3's.

Note: The vMusic2 does have a limitation on file names as it uses the "8.3" format for a file naming convention. That's fancy talk for a file that consists of 8 characters followed by 3 characters used for the file type extension. Basically, keep the filenames at 8 characters or below.

Program examples:

In the below examples we're going to make an mp3 named "x.mp3" play.

Prop1 example:

'====================================================================== ' {$STAMP BS1} ' {$PBASIC 1.0} PAUSE 4000 'allow VMusic2 to initialize Main: SEROUT 7, T2400, ("VSV $00", 13) 'set volume full (in hex), 'insert carriage return SEROUT 7, T2400, ("VPF x.mp3", 13) 'play x.mp3, insert carriage return '======================================================================

Prop2 example:

'====================================================================== ' {$STAMP BS2} ' {$PBASIC 2.5} t9600 CON 84 open CON $8000 baud CON open + t9600 PAUSE 4000 'allow VMusic2 to initialize Main: SEROUT 7, baud, ["VSV $00", 13] 'set volume full (in hex), ' insert carriage return SEROUT 7, baud, ["VPF x.mp3", 13] 'play x.mp3, insert carriage return '======================================================================

The command set for the vMusic2 is as follows:

("VPF X.mp3", 13)Plays file - wherein "X" is the file name
("VST", 13)Stop playback
("VP", 13Pause playback, use again to resume
("V3A", 13)Play all files
("VRF X.mp3", 13)Repeat single file wherein "X" is the file name
("VRA", 13)Repeat play on all files
("VRR", 13)Repeat play random file
("VSF", 13)Skip forward one track
("VSB", 13)Skip back one track
("VF", 13)Fast forward
("VB", 13)Rewind
("VSV X", 13)Set volume - 0 is max, 254 is minimum

That's it for now! Have fun making your prop sing Foghat. I know I did.



AddThis Social Bookmark Button



This page was last modified on: July 27, 2008 02:42:37 pm