Shop OBEX P1 Docs P2 Docs Learn Events
Budget Voice and music from a BS2 — Parallax Forums

Budget Voice and music from a BS2

UghaUgha Posts: 543
edited 2008-12-01 02:00 in Robotics
I was looking on the net and ran across a $9.99 SD-card based MP3 player.

It hit me that if I were to put some voice clips (R2D2? Johnny-5? Wall-E?) or
music on the MP3 player... use some simple transistors to control the play,
stop, forward and backward buttons... Couldn't this be used as a kind of
voice box for a robot?

True, there may be a slight delay (skipping to the right track) before the
expected sound is played, but wouldn't this work rather well?

Comments

  • ercoerco Posts: 20,256
    edited 2008-10-13 17:05
    Yes, sir. I've done it and the sound quality is infinitely better than standard digitized sound chips. And yes, the delay is noticeable, and varies from player to player.

    Biggest mods are supplying 1.5 volts (normally powered by one AAA battery) through a voltage regulator and hacking into the controls to push the buttons with the Stamp. I used 5V reed relays to isolate stamp circuitry from the player.

    My app was a synchronized lights/amplified sound/motion art piece where I could manage the MP3 delays through software. I'll have to post a vid on Youtube.

    BTW, I see complete 1GB MP3 players (no SD card required) on sale for $15. New, in package.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Lord SteveLord Steve Posts: 206
    edited 2008-10-13 18:58
    Maybe it would be better to use an MP3 decoder chip for this.

    http://www.sparkfun.com/commerce/product_info.php?products_id=8819
  • ProxyProdigyProxyProdigy Posts: 7
    edited 2008-11-20 12:26
    I know it's a little late for this. But, I thought I'd throw in my suggestion. To add a "voice box" to my projects, I use Parallax's Emic Text-to-Speech SIP Module found at www.parallax.com/Store/Accessories/Sound/tabid/164/CategoryID/38/List/0/Level/a/ProductID/108/Default.aspx?SortField=ProductName%2cProductName. I know it's a bit on the pricier side. But, it's very simple to use and has done wonders for my projects. I've even used an SD memory card to store different sayings in a regular text file that the Emic can read and say out loud. On one of my wireless projects, I could send it messages from either my PC or even from my cellphone as SMS and the Emic would read my messages out loud in real time. That made my project more dynamic instead of using pre-determined messages only. I've used the Emic module with both a BS2 and with a Cubloc CB280 from Comfile and haven't had any issues out of either. Plus, I like the fact that I can tweak speed, pitch, tone, etc... on-the-fly with added pots. That alone added a lot of extra functionality.

    Anyways, good luck.
  • UghaUgha Posts: 543
    edited 2008-11-21 00:35
    I've been drooling over the Emic module for quite some time, but its a bit out of my budget.

    I suppose you could use the Speakjet or Speakgin for a robot's voice. But it now seems much cheaper to go the mp3
    player route if the slight delay isn't a big deal.

    Anyone know the best transistor to use for a project like this? (Or is there a better way than transistors to activate
    "buttons" on a hacked device?)
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-21 01:26
    Reed relays are the "best" way to interface a Stamp to some kind of unknown device with pushbuttons. They have the advantage of being a pure contact closure and being completely isolated from the Stamp itself. They're fast and a Stamp output can drive it directly (making sure you have a reverse connected diode across the coil). You are limited in the number of relays that can be driven simultaneously by a Stamp (one or two per group of 8 I/O pins).
  • GWJaxGWJax Posts: 267
    edited 2008-11-22 02:45
    Instead of using and being limited to a reed relay to contol all the buttons you can use what I use the Opto-Coupler circuit this only acts as an LED as far as the stamp can tell and will isolate all your I/O lines from the Stamp. I use these in building and running my own H-Bridge circuits using the LM298N daul h-bride chip. Theres only a few parts needed to connect it up to the stamp and its only a few resistors and a diode. You can see a demo of this in action on a video that I have just testing out the circuit and later a short clip in my gallery showing the test drive circuit for a Wall-E that I am helping out a buddy of mine 4mem8. Blelow are the links to the videos:

    http://www.youtube.com/watch?v=hvLdXw_CoEY· 'LED testing

    http://www.youtube.com/watch?v=za4wH6yenmU· ' Hbridge testing using the same program in the LED Testing

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • UghaUgha Posts: 543
    edited 2008-11-22 13:07
    Cool, I hadn't thought to use opto isolation.

    I kinda just had an idea based on yours...

    So I don't have to order opto-couplers (broke)...

    Can I use the photovoltaic properties of LEDs... plus a transistor... to make a poor-man's version of a opto-isolation chip?

    Or would there not be enough juice to trigger the transistor properly?

    If it would work, what's the best configuration for the transistor in this case? (I'm still somewhat fuzzy about the whole
    emitter-follower, ect stuff)
  • GWJaxGWJax Posts: 267
    edited 2008-11-22 13:45
    Ugha it can be done with an IR-LED and a IR Photo Transistor placed in a black shrinkwrap tube. The speed will not be there but you can get it to act like the opto-couplers. Also if you have junk machines around like printers and faxes you can pull the chips from the fax boards and power supplies. Most likely these will be made by Toshiba and are a 4 pin white chip. I get alot of them when we scrap out our old copiers. I'll see if I can make a trust worthy switch using your method and upload you the schematics.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-11-22 15:45
    Here's another one of those cheap MP3 players for $6.99
    www.geeks.com/details.asp?invtid=MPC01-BLU-BLK&cpc=SCH

    I've actually considered something like this myself, but it's a little farther down
    my TODO list. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • UghaUgha Posts: 543
    edited 2008-11-22 19:03
    GWJax: I was actually thinking of the whole using an LED as a light sensor thing.

    Sorta like this:

    Stamp->Resistor->LED->LED->Transistor->Button pads

    If the two LEDs are covered in heat shrink or even black electrical tape, wouldn't that act as a cheap optoisolater?

    Reason being is I also don't have any photo-transistors handy [noparse];)[/noparse] Just tons of LEDs and a few CDS cells.

    I may have a printer or two handy that I could rip apart if I can't find anything else... Thanks for the suggestion [noparse]:)[/noparse]

    Oldbitcollector: Good suggestion... but that mp3 player maxes out at 512MB... It sounds like a lot, but I'd think
    this one:
    http://www.dealextreme.com/details.dx/sku.5045
    Would be better because of the higher limit and no shipping. (That, and I have a ton of 1GB SD and microSD cards
    lying around)
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-11-22 19:19
    How will you keep track of the tracks?·

    These things have next and previous buttons, but there's no way to directly access any given track.· Mine (an iomega) doesn't reset to track 1 when the power is cycled, it resumes the same track,·and the track numbers wrap around with next/previous.

    Post Edit -- This is an aside, but an Emic is $75.· A VMusic (MP3) is $40 (less thumbdrive) and it interfaces via serial, way easy; you won't be kluging together a bunch of dodgy maybe that'll cost you time and money, too.

    Post Edited (PJ Allen) : 11/22/2008 7:34:48 PM GMT
  • GWJaxGWJax Posts: 267
    edited 2008-11-22 19:22
    using an LED and the CDS resistor just might work to triger the base of the transistor, I'll have to plug that into the computer to see if I can simulate it, then make a live circuit of it. I'll try to keep it on the cheap side for you. Though this does seen like a fun project to do as I have a ton of CDS's that I don't use.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • UghaUgha Posts: 543
    edited 2008-11-22 23:13
    PJ Allen: I own a farm. When your on a small farm, $40-$75 for a hobby turns into a lot of money, especially this time of year.
    I was kind of counting on the resetting to track 1 to keep track of what mp3 to play... but I guess if the el-cheapo MP3 player
    I'm planning on ordering doesn't reset on power cycle I could always store which track I'm on in EEPROM and use that as
    an index. It'll bloat my program and write to EEPROM more than I'd like, but I can't think of any other way.

    GWJax: I'm not sure but I don't think you need a CDS cell... just two LEDs.
    If you already know this, please excuse me but I'll explain in detail what I meant.

    LEDs have a photovoltaic property. Meaning when exposed to light they generate voltage.
    Generally you want to pair near-identical LEDs so they pickup on the proper wavelength and generate the most voltage.

    Once source I found on the net says the following colors generate these voltages:
    Red: 1.2V Yellow: 1.4V Green: 1.7V Blue: 2.8V

    My thought was that perhapse a couple green LEDs touching each other and wrapped in electrical tape may be enough
    to trigger a transistor to act as a switch.

    What do you guys think?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-11-22 23:36
    The LED as an input transducer has been covered*.· The phenomenon is not a photo-voltaic effect.· An LED has a photo-capacitive·property which can exploited (read) with RCTIME.·

    Post Edit -- * If you http://search.parallax.com long enough, you will probably find the thread with a link to the subject white paper.··· The intention/application was a one-pin "wireless" comm/serial link.

    I thought I saved it, but I can't find it anywhere.· PM sam_sam_sam, he likes to use LEDs for switches.· I like to use switches for switches, I'm weird that way.

    Final Update -- http://www.merl.com/papers/docs/TR2003-35.pdf
    http://forums.parallax.com/showthread.php?p=589699

    Post Edited (PJ Allen) : 11/23/2008 12:16:15 AM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-12-01 02:00
    PJ
    ·
    I thought I saved it, but I can't find it anywhere.· PM sam_sam_sam, he likes to use LEDs for switches.· I like to use switches for switches, I'm weird that way.

    Here Is what you are talking about see below

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.