November 22, 2024, 04:09:39 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Connecting A Cheap mp3 to Prop1

Started by brad g, March 25, 2007, 08:52:39 PM

Previous topic - Next topic

brad g

There has been alot of discussion on the various Halloween forums about those little 16m mp3 players and how best to remotely activate them. One really good site shows how to use a Prop1 to both start and stop the player, as well as how to modify it for hook-up to the Prop1 terminals (site posted below). I'm not 100% sure of the where the wires should be attached to the Prop1 to best avoid a catastrophic failure of both the player, or worse yet, the board. Here's the site:
http://www.teambac.com/web_hall/MP3_player_hack.html

JonnyMac

Since the battery holder has just one 1.5v cell there may be DC-to-DC circuitry in there to bump it up to 5v because that's what should be on the USB port.  This suggests that you *might* be able to connect the MP3 player guts (sans battery holder) to the Prop-1/2 using a 3-pin cable that has been cut-off at one end.  The B wire goes to ground, the R wire goes to +5 (on the USB connector), and the W wire goes to the pulled up side of the switch.  To simulate a pressed button with the Prop-1 you would make the pin low, hold it for two seconds (I think the player needs that long to get going or stop), then the pin would be made an INPUT so that the pull-up could do its thing once again.

Note: Direct connection as suggested above could harm your Prop-1 if you're not careful, so do make sure you have good handle on electronics before proceeding.  I found one of those players in my junk box and will see if I can get my suggestions to work.
Jon McPhalen
EFX-TEK Hollywood Office

brad g

According to some tests I had read at the Wolfstone homepage, this mp3 player uses the voltage that it "sees" to determine which mode it should be in, i.e. 5 volts=USB mode, 1.5v =player mode. Apparently, according to the person who ran the tests, this unit is very voltage sensitive, and will switch to USB mode if it gets anything more than the 1.5v.  The only thing I've done with the unit so far is to attach the wires as recommended by the site I posted above.  If you just touch the ends of the 2 wires together for about 2 seconds and release, the unit plays, do it again, and the player stops. Now I guess the question is, can the Prop1 be used to simply make that connection with those 2 wires, time it for 2 sec., release for play, and then repeat for stop?

JonnyMac

Yes, just use the B (for ground) and W (signal wires).  Before connecting you will and to connect a voltage meter across the wires you have on the MP3 player to determine which is ground and which is the button input.
Jon McPhalen
EFX-TEK Hollywood Office

brad g

Just as a point to consider, since touching the wires that are attached to the mp3 per the instructions listed on the TeamBourne page start and stop the player, would it be safer to have the Prop1 one trigger a relay switch to turn the player on and off ? Since the players seem to be voltage sensitive, and the wires just accomplish the same thing as pushing the button, it would seem to me that a relay would probably work. You'd know the current required by the relay for activation, and since there would be no other current running through the contacts the player was hooked to, there should'nt be a problem there. If this would work, what type of relay would you need and how would it be connected to the Prop1?

JonnyMac

Yes, that would in fact be the best bet; use a 12v relay (they're cheap) and connect it between the V+ and OUTx terminals.
Jon McPhalen
EFX-TEK Hollywood Office

brad g

Last question on the matter and I'll consider it done! Would the Radio Shack relay listed below be considered a good choice or is there a better model that you would recommend for the application here?


http://www.radioshack.com/product/index.jsp?productId=2049722&cp=2032058.2032230.2032277&parentPage=family

JonnyMac

That's pricey, but it will work.  You might try All Electronics or Jameco for cheaper relays.  All you want is a coil voltage of 12 vdc at about 3W or less (250 mA coil current).  You don't need to worry about contact current because... there really isn't any!
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

I was testing my links and found this:

http://www.allelectronics.com/cgi-bin/item/RLY-461/500/12_VDC,_SPDT_RELAY_.html

You can buy eight of these for the price of that RadioShack unit -- and it would have been a shame to spend more on the relay than the MP3 player!
Jon McPhalen
EFX-TEK Hollywood Office

Clad In Shadows

Has anyone written a BS-1 source code for this ? I can't seem to make it work properly.

According to the mp3-player instructions , the player needs 2 seconds to turn on , 1 brief push to start playing and 2 seconds to stop playing.
And this using a PIR sensor on pin7 and the mp3 player connected to P0.
The message on the player is about 50 seconds long.

Any input would be greatly appreciated.

Thanks

JonnyMac

How are you connecting to the MP3 player from your Prop-1?
Jon McPhalen
EFX-TEK Hollywood Office

Clad In Shadows

I'm making the board that Otaku ( over at the Hauntforum ) came up with.
http://halloweengallery.com/displayimage.php?pos=-3678
I'm planning on hooking it up  to the GND-OUT0 output .

JonnyMac

On that diagram you'll see a relay between the circuit and the MP3 player -- that's all you need.  Connect a 12v relay between V+ (which is the common line) and OUT0.  To simulate pressing a button you would do this:

  HIGH 0
  PAUSE 2000
  LOW 0


That will "press" the button for exactly two seconds.  If you connect a second relay to the fast-forward button you could actually have more than one file on the MP3 player and access them randomly as the Prop-1 can "press buttons" much faster and more precisely than humans can.
Jon McPhalen
EFX-TEK Hollywood Office

Clad In Shadows

Oh I see.

So , to do the whole routine which is about 50 seconds long , it should look something like this :

  HIGH 0
  PAUSE 2000 ( to turn on player )
  LOW 0
  PAUSE 1000 
  HIGH 0
  PAUSE 1000 (to start playback)
  LOW 0
  PAUSE 50000 ( to wait 50 seconds till the audio file is done playing )
  HIGH 0
  PAUSE 1000 ( to stop the playback )
  LOW 0

Does that look right?
Thanks for the fast reply

JonnyMac

It think it can be a bit shorter; I have one of those players and it will go from off to playing with the first 2-second press.  I'm going to pop over to All Electroncis today and get some relays so I can do the hack myself.  It think the code will work out to be something like this:

Main:
  HIGH 0
  PAUSE 2000
  LOW 0

  PAUSE 50000

  HIGH 0
  PAUSE 2000
  LOW 0

  END


Note that this is not very "professional" programming in my books.  The toggling of the MP3 should be put into a subroutine and the control pin should be named with SYMBOL.  Once I get the hardware working I'll write a full program that uses these (professional) techniques.
Jon McPhalen
EFX-TEK Hollywood Office