Valentine's Day project - Animatronic stuffed animal - Need ideas

Taking a break from my other project and working on a Valentine's day project for my girlfriend. Just looking for ideas and suggestions for features to add...

The background:
I have the guts from an old Winnie the Pooh "Read with me!" toy. The mechanism will be installed inside another stuffed animal.

He was designed to open and close a book, and to move his mouth. Originally, he had cartridges that you plugged into the book to have him read different books. In his head is also an IR receiver for some unknown (future) purpose. Obviously, as these toys go, no other carts or peripherals were ever made. Anyway, I am not using him as designed. I stripped him to his bare guts.

What I am planning is to have him open a valentines day card and read it upon power up. I would also like him to sing "our" song. But looking for other suggestions of what I could do with this.

The peripherals I currently have at my disposal:

A button switch that is sewn into him (I forget where, but I could install it anywhere as well as other switches/sensors as needed.)
An IR receiver in his forehead
An MP3 module that plays from a SD card, easy to use

Code:

I have written the code to open/close the book (which also tilts his head down when the book is open or up when it is closed) The book mechanism has limit switches that I can use to sense whether it is opened or closed.

I have written the code to run the mouth. There are no switches or other feedback here. COntinuing to run the motor, just cycles the mouth. I will be adding switches to sense the open and closed positions for more control.

I have written the code to control the MP3 module and am currently working on wrapping that into a library.

Control details:

He is designed so that moving the motor in forward direction opens/closes the book and moving in reverse runs the mouth.

There are holes where the eyes will be that I could install sensors, IR LEDs, etc.. There is also plenty of room inside the head shell for anything I want to add.

Control of movements will be done by adding signals into the Left audio tracks of the MP3s.

The whole mechanism goes down just under his arms, and there is a battery box and on/off switch that gets installed in butt. But I have plenty of room for anything else within the torso box where the original electronics were stored.

It has an IR receiver in the forehead, but no IR leds. No idea what the original purpose was for as it wasn't used. One idea is to add IR LEDs to the eyes transmitting 180 degree out of phase signals. That would reflect off of objects and allow sensing of motion.

Great ideas/suggestions may involve adding hardware... no problem. I don't HAVE to have it completely done by valentine's day (and probably won't), but that would be cool. I would rather it be impressive/useful than have it done half-arsed, but on-time.

Hardware is not an issue. I build stuff like this for children's museuems as a consultant, so I have thousands of parts. So go wild with your imagination, please. I want this to be something she would enjoy, not just a valentine's day gimmick.

Some ideas that I have are to say "good night" to her when she goes to sleep, "good morning", etc... not sure how I would realistically do that, though. Rough ideas for "hidden" things that she may discover by playing around with it (tilt sensors, etc..)

I've attached pictures of the guts. Also, feel free to ask any questions about it.

Here is a list of great ideas suggested so far:

RTC to trigger on special events, recognize bed time/morning, etc...
LDR sensor to sense the light in the room
Use the IR receiver to interface with a remote
Provide some control to swaying side to side/etc...
Voice recognition

Still looking for more ideas and suggestions...

BTW, the MP3 module is an MD-FLY. Very easy commands, but I intend to throw together a library for it anyway since I didn't find one. Would be useful to me later since I have several of these boards.

One thing I can't do with this module is read a text file (or any file besides an MP3) which would store the animation commands. But, it does play stereo and I only need need mono. My plan is to set it up so that I have the audio on the right channel, and encoded control data on the left channel.

I think that the code, circuit, and encoder program would be useful for other projects and to other people. So I will be posting that once it is complete.

I attached the spec sheet for the MP3 module. The audio power at full volume is 200mVpp so an amplifier will be needed for a decent volume on a speaker.

MP3 Module.pdf (83.1 KB)

Anything we can think of, because I see a great holloween decoration. Puts some tank treads or even spider legs, and tweak the MP3 sounds, and you got one hell of a holloween decoration.

HazardsMind:
Anything we can think of, because I see a great holloween decoration. Puts some tank treads or even spider legs, and tweak the MP3 sounds, and you got one hell of a holloween decoration.

LOL. Plenty of other parts for something like that. I tend to snag up moving or interactive toys at thrift shops, clearance bins, flea markets, etc... so I have lots of stuff similar to this. This one was chosen for the valentines day present only because the opening and closing arms are perfect for a valentine's day card.

I attached a picture of what I started out with. He is the Winnie the Pooh "Read with me" stuffed toy, if anyone is interested. Made in 2000, so you won't find him in stores. I found a few on ebay but they are more than I would pay for one, though. lol

Ummm, does the head move or tilt? Maybe give it some movements so that when it is reading the card, it will look up or at her and tilt its head. (Non creepy like)

You could run an RTC and make it say "Happy Valentine's day" etc for a number of significant days in the year. You could also add a LDR so that if it suddenly gets light at around her wake-up time then it could say "Good morning" or similar. Not every day, perhaps, just every now and again.

Also, if there's an IR receiver and she has a TV in the room then can you program it to recognise the "on" TV signal? He could say "Hey, can I watch too?" occasionally.

VOICE RECOGNITION!!! Have it so that she can interact with it. Have it respond to certain words like "Hello" or "Winnie" and have it respond back with a preset library of words.

HazardsMind:
Ummm, does the head move or tilt? Maybe give it some movements so that when it is reading the card, it will look up or at her and tilt its head. (Non creepy like)

The head tilts with the opening and closing of the book. Not separately controllable. Only one motor in this. His head tilts down when the book is open and up when the book is closed. I could simulate it a bit by cycling in between the open/closed state (making him nod "yes" for example.) Tilting side to side would not be simple without Adding another motor and mechanism.

Dr_Ugi:
You could run an RTC and make it say "Happy Valentine's day" etc for a number of significant days in the year. You could also add a LDR so that if it suddenly gets light at around her wake-up time then it could say "Good morning" or similar. Not every day, perhaps, just every now and again.

Also, if there's an IR receiver and she has a TV in the room then can you program it to recognise the "on" TV signal? He could say "Hey, can I watch too?" occasionally.

Great suggestion regarding the RTC. The only issue is how to re-set the time if the batteries die. I know to use a backup battery for the RTC, but I am thinking if that dies, too. Perhaps through the IR interface? Hmm... something to definitely consider.

I had thought about the LDR idea, but didn't want it going off every time she turned off and on her light. Though I do know approximately the times she gets up and goes to bed, so I could use the RTC to help filter that. Another good suggestion.

I definitely thought of using a TV remote of some sorts to interact with it. I really like the idea of "can I watch, too." Unfortunately, she doesn't watch TV and no TV in her room. I was thinking of getting a generic IR remote though to interact with it. Perhaps to put it in certain modes while I am over there to change it up and surprise her with different behaviors when I am not there.

Keep the ideas coming!

HazardsMind:
VOICE RECOGNITION!!! Have it so that she can interact with it. Have it respond to certain words like "Hello" or "Winnie" and have it respond back with a preset library of words.

That might be a bit beyond my skills, software-wise. Any modules that make something like that easy on the code?

You can maybe look into EasyVR.

HazardsMind:
You can maybe look into EasyVR.

I also found this. Would have to order from China, though. Looks like a neat module:
http://www.ebay.com/itm/Voice-Recognition-Module-Arduino-Compatible-/280793964171?pt=LH_DefaultDomain_0&hash=item41609fde8b
I will check out the EasyVR.

Looking at RTC modules, they all seem to be missing the one most useful feature: an alarm interrupt output. Maybe the newer RTC chips don't have that feature anymore. Hmm... I may have to design my own (not very difficult.)

Seems simple enough, see if you can download an example with any libraries. Also see how much memory it uses when it compiles.

Speaking of RTC modules, I found the Microchip MCP7940 which is pin compatible with the popular DS1307 used in most RTC modules. It provides two alarms that generate an output using the pin normally used by the squarewave out on the DS1307. So one could simply remove the DS1307 from an existing module and pop in this other chip. Then when one of the alarms are triggered, it will output an interrupt. alarms can be set on-the-fly, so this is a very useful feature to have.

The two alarms are independent, so you could set one to trigger at the same time every day, and one to trigger on a specific date/time. You could set one alarm to trigger the beginning of a day so the arduino knows a new day has started without having to poll it. With the second alarm, you would load in a bunch of events somewhere in the memory of the arduino and set the RTC alarm for the next event coming up. When that one goes off, it does what it needs to do and then it sets the alarm for the next event. That way if power is lost, it would still set the alarm for the next event to happen.

Digikey also sells them for about $1 with a minimum quantity of 1, however Digikey requires a minimum order of $25 or they will charge you a fee! I am looking at ordering samples from Microchip to evaluate. I will post up how to perform the mod, write code for it, etc.. once I am done with it.

BTW, if anyone is curious how you could store data on an audio track, there are lots of different ways.

Use a tone-decoder IC such as the NE567 which would output LOW in the presence of the selected tone and HIGH in the absence.

Another way is to use a DTMF decoder IC. The just encode DTMF tones into your audio track. These are designed to recognize 16 different tone combinations, so you could encode 16 different commands this way.

The old-school way would be to use a discriminator circuit (really just a comparator) that looks for a certain amplitude level and sets to 1 on the presense and 0 on the absence. This is how it is done on magnetic media, for example.

A fancier way is to actually use a modem IC. Since a modem is meant to transmit over telephone wires, it is already in the audio range, and the output will be asynchornous RS232 serial already. Older chips will just connect to your serial port. Newer chips have all kinds of nice features like I2C and SPI interfaces, auto-baud generation, and single-chip design to limit the number of support components required.

I have some older modem ICs that I will play around with. It's a bit overkill for this, really, and I probably wouldn't go that route for this if I didn't already have some ICs. A DTMF decoder is more than enough for something like this. I will experiment with both and post details/code separately as it will likely be useful to others (and probably wouldn't think to look inside this thread to find that info!)

Just wiriting code and doing some research on already suggested ideas. Keep 'em coming!

Tonight, I will be adding microswitches into the mouth mechanism in order to sense when the mouth is open or closed. I decided I needed to do this because there are times when I want to have the mouth left open, for example when singing. I can really only envision needing to know when it is open, not when it is closed, but while I am in there, I will just add both.

Microswitches are ridiculously expensive even on the surplus market (unless you order from china). I will be scavenging the switches from old CDROM drives or other equipment.

Some simple mods to my controlling code is all that will be needed to sense the mouth movements and I can still "run" it (just cycling open and closed) while ignoring the switches for normal talking.

I will also be installing the speaker in the head while I am in there. I will also throw together an amp circuit on breadboard tonight. Final circuit will use SMD components and a properly laid out board.

I have also started working on the serial command format that will be encoded in the left audio track.

Right now, there is only:
Thinking logically here, the idea is to sync movements to the audio. So, at the bare miminum, all that would be required is periods of mouth running and not running. Adding in commands for opening/closing the book would also be useful.

Once I add switches for sensing opened/closed state of the mouth, this would add two other commands. To seem moderately realistic there are times when opening the mouth and keeping it open for a period of time would better match the audio. For singing, this would be appropriate.

I have no current plans for speed control, though that is a possibility for a little more syncing realism. That would require encoding speed data on the audio as well.

Some experiments might be to even listen to the audio and do some auto-lipsyncing. This would probably be fairly straightforward for talking, but with singing, you would have to distinguish between vocals and instruments. Or have one track with only the vocals. Measuring the beat frequency would indicate speed, amplitude would indicate how open or closed to make the mouth. Though, without linear feedback, I imagine the code would be fairly simple. Again, cleanly separating vocals from background noise/instruments is the real issue. Thankfully that could be processed ahead of time.

Moving along, but still open to great ideas and suggestions. What would you do with this project?

I was thinking about your solution for the mouth, you want to use just switches? But that will give you only open and close, not inbetween. Why not use a pot, or a flex sensor, that way you will be able to see exactly where the mouth is.

HazardsMind:
I was thinking about your solution for the mouth, you want to use just switches? But that will give you only open and close, not inbetween. Why not use a pot, or a flex sensor, that way you will be able to see exactly where the mouth is.

Because I don't really think it is necessary for this application. The mouth movement is so small anyway and would be barely noticeable in in-between states. Second, there is difficulty to adding a pot to the mechanism. Adding limit switches is pretty simple. I will just glue them at the point of the levers so the levers themselves actuate them at extreme position.

If I were to add a pot, I would probably be best disassembling the gearbox and finding a common gear. Remember that the single motor runs both the mouth and the book open/close. So either one pot could be on the common gear for both movements, or one on the outputs of either movement.

It's not impossible, but I don't really think the effort will result in any noticeable difference.

I will have this appart again tonight, so I will take some pictures of the various mechanisms.

Well if you use a flex sensor, you can just glue that to the mouth lever or somewhere that moves with the mouth and that will work just like a pot, without the mess.

HazardsMind:
Well if you use a flex sensor, you can just glue that to the mouth lever or somewhere that moves with the mouth and that will work just like a pot, without the mess.

True. I can look into that. But, again, I don't think it will add all that much to know exact position of the mouth. Once you add the fur and the stuffing, the movement of the mouth will be very very small. As it is, I can't really tell if the mouth is in-between fully open or fully closed just by looking at it.

The switch idea was just meant to stop the cycle at either extreme so I don't just keep cycling the mouth movement on points where the voice is 'sustained' like when you are singing, shouting, or adding emphasis to something. Or stopping the mouth on the fully open position when the voice pauses.

The flex sensor would make it easy to measure exact position, though. I wouldn't mind picking one up to play with anyway.