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

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.

What you need to do is use a little voodoo to transfer a human soul into the doll. I hear it works really well, they made a movie about it. Child's Play I think was the name of it.

What you need to do is use a little voodoo to transfer a human soul into the doll. I hear it works really well, they made a movie about it. Child's Play I think was the name of it.

Yea but that, you have to make sure the soul your using is not from a psychotic serial killer. Having a killer doll will ruin anyones day.

The desired effect is to make her go "awwww", not "EEEEEEK!" lol

I added the limit switches to the mouth. I managed to find 2 identical switches with long levers which made them easy to install. A dab of superglue gel, and tada! I now have feedback whether the mouth is open or closed. I am holding off on installing the speaker yet. I stopped at a thrift store and found a pair of USB powered speakers for $5. It would cost that much in parts to make my own amp. I may just gut those and use them. Not sure yet, they also make handy prototyping speakers as I can power them right off my breadboard.

Anyway, attaching pictures of the limit switch upgrade.

pooh 004.jpg

pooh 007.jpg

pooh 008.jpg

Well, "mouth opened" work perfectly, but not "mouth closed". When I reassembled, I noticed that the body of one of the switches is in the way of a screwpost on the motor gearbox. I will need to tweak things a bit. I also will add bump-stops to one side of each of the switches so they are more reliable when pushed together.

Got the library done for the MP3 module. You can now install it on any pin, not just a serial pin. Having some issues with the way the module works, though (not my code, I don't think.) Already see some enhancements I can make to the library.

When you select an MP3 that doesn't exist, it just plays a random one. These modules have no feedback for number of files or errors, so you have to keep your code tight and file naming of the MP3s well controlled.

I decided to go with a MM74HC942 300-baud single-chip modem IC for storing and retrieving the data in an audio track. This chip is a bit hard to find (and may even be obsolete), but it does all the things that I need and comes in a prototype friendly DIP package as well as surface mount.

For a mini-tutorial, I will likely revisit this using more common and easily-sourced components. The advantage to using a special purpose IC is that it is simple to build a circuit and write code. The disadvantage is that these types of chips tend to go obsolete quickly and are hard to find. A discrete method (using common parts) is not especially complicated, but requires a lot of components.

The other advantage to using a single-chip modem is that I can use it to transmit as well and just record the output directly to the audio. No need for a program to handle it.

Using the 74HC942, all you need is a 3.58Mhz crystal, some caps and a few resistors. You may or may not need some audio amp ICs depending on what you are interfacing with. In my particular case, the MP3 module output is max at 200mVpp, which happens to be about perfect.

The SPACE and MARK frequencies are 1070Hz and 2025Hz (SPACE = 0, MARK = 1) since this uses the BELL 103 standard

I also ordered an RTC module. One that will be easy to mount in a remote location so I can access the battery externally. It is using the DS1307 chip. I will be replacing that chip with a MCP7940 once I can get sample ordering from Microchip to work (or breakdown and place an order with Digikey.)

I guess I should give up on asking for more ideas. Nobody has even been following this thread in quite a while. But, hey, if you stumble in here and have some, I'd still love to hear them. Until then, plugging away...