Shop OBEX P1 Docs P2 Docs Learn Events
RFID / TTS / Vmusic2 Based Toy Project, need some ideas...... — Parallax Forums

RFID / TTS / Vmusic2 Based Toy Project, need some ideas......

uxoriousuxorious Posts: 126
edited 2007-10-12 23:47 in General Discussion
I am in the middle of making a toy for my daughter that makes use of the following components:

1) BS2
2) RFID Reader and tags
3) Text to Speech Module OR Vmusic2 for verbal communication
4) VM-24 case with boot from Polycase modified for 9 volt battery (vs 2 AAs)
5) audio amp circuit and 2" speaker
6) USB memory stick if I use the vmusic2

Setup:
Place the RFID tags at various locations in the house (front door, toybox, fridge, etc)
Program the BS2 with Tag ID / Location matrix
Load text into memory for TTS or create MP3s for Vmusic2 module

Selectable programs
Program #1 "Show Me":
Device prompts to find a location, "Please show me to the fridge"
Liberty takes it to the fridge and touches the device to the tag.
Device praises Liberty for a completed task and asks for another location, "Good job, now show me to the toybox"
If Liberty took the device somewhere other than the fridge, IE the front door, "Uh-oh, that's the front door. Can you please show me the fridge"

Program #2 "Tell Me":
Device prompts to find a tag.
When the tag is read, the device tells Liberty about it, "Toybox. This is where we put your toys. Can you say Toybox?" etc
After a pause, prompt to find another tag.

I am leaning towards the Vmusic2 setup because it makes it easier to change the function of the device based upon the voice prompts/praises/corrections. Kind of like a verbal setup of IF/Then/Else functions driven off of RFID tag reads.

My questions, etc:

Can anyone think of other uses for this project?
Does anyone have solid working code for the BS2 and Vmusic2? I can only tell it to play something, haven't mastered start/stop/etc but that may be due to my poor coding knowledge when using the vmusic2.
Any comments on this idea?

I will post pictures of my setup and my code shortly. The code is just past the "sample code" stage and I am still learning, so please be nice with comments. I basically pieced together the sample code from the TTS module and RFID reader example setups. Right now, when you present an RFID tag, it checks the tag as a usable one, grabs the tags 'nickname', and has the TTS module say "Hello 'tagnickname' ". If the tag is not authorized, it says "I'm sorry, I am not allowed to play with strangers".

I modified the case so the RFID reader will fit inside of it. I really like the VM-24 from Polycase and have 4 that I have queued for projects. The rest of the components would already fit without mods. I am also working on my own RFID antenna and modular reader circuit, but that's another post for down the road.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~~ dRu ~~

Comments

  • uxoriousuxorious Posts: 126
    edited 2007-09-28 01:10
    Here's a pic of everything.

    Top: Professional development board with the TTS module and RFID reader. I bent the pins on the reader so it lays flat. The speaker is from a store demo display and runs straight off the TTS output.
    Bottom left: VM-24 case from Polycase
    Bottom center: RFID tags
    Bottom right: Homework board with the Vmusic2 for learning it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ~~ dRu ~~

    Post Edited (&y) : 9/28/2007 1:17:18 AM GMT
    564 x 566 - 130K
  • uxoriousuxorious Posts: 126
    edited 2007-09-28 01:23
    Here's my code.......

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ~~ dRu ~~
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-28 01:25
    I believe the Parallax webstore page for the VMusic2 has links to some sample VMusic2 programs. The nice thing is that you can also store information (not just sounds) on the drive. For example, you could have lots of little text files on the VMusic2, each with a file name consisting of the RFID tag code and an extension for the type of activity. The file could contain information on how to act, what sound to play, etc. You could even use subdirectories to help. The subdirectory could be the name of the "state" of the program and would contain several sounds and the RFID tag code named files for that state. If there's no file by that name, there would be some other sound file with default instructions. When you have several gigabytes to play with, you could get very complicated, yet the underlying Stamp program could be very simple.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-28 01:32
    I just finished a sound sequencer using the Propeller and the VMusic2 (http://forums.parallax.com/showthread.php?p=677691) that uses subdirectories to organize the sound fragments. This particular project requires the Propeller because there are two VMusic2 devices running simultaneously. In your case, there's only one and a Stamp could handle it.

    The main limitation using the Stamp is the limited variable storage space. Keep the file and directory names in numeric form, use integers (words or bytes) for holding the current names, use the fixed length formatters (DECn) as much as possible to form file and directory names, etc.
  • uxoriousuxorious Posts: 126
    edited 2007-09-28 16:18
    Mike, Thanks for the responses, you are right on track with my thinking for this project. My filenames will all be alphanumeric, 2 letters: A1, A2, A3, B1, B2, B3, etc. Mainly to make it easy for me to remember setups.

    I can't find anything on the Parallax site for the VMusic2??

    I checked out your setup for the gallery. That is very nice work. I wish I had more time to allocate towards learning the propeller. I am stuck with BS2 just because I know basic from junior high (mid 80s). A friend bought me the new Cypress PSoC microcontroller development kit that's only $30 to try to get me to learn those, but so far just got the software installed.......

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ~~ dRu ~~
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-28 16:25
    Sorry. I meant the memory stick data logger (www.parallax.com/detail.asp?product_id=27937). It's really the same control chip and firmware as the VMusic2. There are specific commands for playing files that are only used on the VMusic2, but everything else is identical.
  • uxoriousuxorious Posts: 126
    edited 2007-09-28 19:15
    Thanks, I didn't realize they sold that so the sample code should help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ~~ dRu ~~
  • uxoriousuxorious Posts: 126
    edited 2007-10-12 23:46
    Well, I finally have some dependable code for the Vmusic2 and the BS2 on my homework board. It's been crazy trying to get everything to work, but here it is. The code is still in working stage, so it's messy. I have tried to add comments where necessary to help anyone viewing it. Right now, it plays a sequence of 70 songs on a memory stick. While a song is playing, it "blips" the song number every second on a debug window. This is from the loop required to wait for the Vmusic2 to say it's ready for my code to send the next song to play. Now, I just need to clean it up and move it to my BS2P40 with the RFID setup.

    Things I have learned about the Vmusic2:

    1) sometimes it must be hard reset (powered down) to cleard out previously sent settings. I found this while removing lines from my code, but not seeing changes with settings on the VM2. The biggest culprit was switching to the short command set. In my debugging I was going back and forth between short and extended, but not getting expected results. When I started disconnecting power from the VM2 between downloads, things started happening right.

    2) The firmware codes outlined by Vinculum are a little flaky. The code paper I downloaded says preliminary on it, so that may be an issue. I will be checking the firmware of my VM2 this weekend

    3) Use a memory stick that works. insert "duh" response here. Anyhow, the VM2 works great with my 2GB Lexar Firefly and a very old no namer 64MB stick. It does not work with my PNY Attache' 512MB, Victorinox Swiss Army Knife USB 512MB, or my T-one 2.0GB from Cyberguys.

    4) The sample code for the datalogger from Parallax got me started, but doesn't work well with the VM2. I never could get the "dataloggertest" code to work at all. I had to make some changes to the DataloggerDemo code to get it to work, but was able to get it to work fine. I'll post my modified dataloggerdemo code as well. I didn't use a cds to create a value to store, I just made a variable. (didn't have a cds around)

    attached:
    Seq_Vmusic_1_.bs2 my code
    debug.txt the debug window from the first five songs playing

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ~~ dRu ~~
  • uxoriousuxorious Posts: 126
    edited 2007-10-12 23:47
    Here's the datalogger code modified to work with the Vmusic2 module and a BS2 homework board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ~~ dRu ~~
Sign In or Register to comment.