Giving Toys An Electronic Voice

sound

Whether it’s a Furby or Buzz Lightyear’s button that plays, ‘To infinity and beyond’, most digital audio applications inside toys are actually simple affairs. There’s no Arduino and wave shield, and there’s certainly no Raspi streaming audio from the Internet. No, the audio inside most toys are one or two chip devices capable of storing about a minute or so of audio. [makapuf] built an electronic board game for his kids, and in the process decided to add some digital audio. The result is very similar to what you would find in an actual engineered product, and is simple enough to be replicated by just about anyone.

[makapuf]’s game is based on Game of the Goose, only brought into the modern world with electronic talking dice. An ATtiny2313 was chosen for the microcontroller and an AT45D 4 Megabit Flash module provided the storage for 8 bit/8khz audio.

The electronic portion of the game has a few functions. The first is calling out numbers, which is done by playing recordings of [makapuf] reading, ‘one’, ‘two’, ‘three’, … ‘twelve’, ‘thir-‘, ‘teen’ and so on. This data is pumped out over a pin on the ATtiny through a small amplifier and into a speaker. After that, the code is a simple matter of keeping track of where the players are on the board, keeping score, and generating randomish numbers.

It’s an exceptional exercise in engineering, making a quite complicated game with a bare minimum of parts. [makapuf] estimated he spent under $4 in parts, so if you’re looking to add digital audio to a project on the cheap, we can’t imagine doing better.

You can see a video of [makapuf]’s project after the break.

20 thoughts on “Giving Toys An Electronic Voice

  1. I think you missed the point regarding arduino and easier. Of course arduino isn’t used in commercial products. I like how arduinos are so simple. I am currently in the process of learning to code some C and use AVR studio.

  2. Ok, maybe you do not like Arduinos, fine. Many less experienced people, on the other hand, like it because it is a easy tool for a beginner to play around. I think it is not even meant to be a professional tool and the Arduino users probably know that. Also, maybe the choice of words in this article is not the best and may create a false understanding that Arduino is the “bee’s knees”. Maybe you are right and you definitely have the right to have an opinion.

    Your emotional outburst, however makes me worry a little that you may be stressed out because of overworking. Honestly, when was the last time you had a vacation. I mean a real vacation, when you could turn off your phone and just relax for a week or so and not think about work? If the answer is “I do not remember” or “5-6 years ago” then you need it more than you realize.
    What I mean is that does a normal, sober, mentally healthy and rested person say things like that?:

    * Threaten to attack those who say things he/she does not like: “…I punch whoever says “Arduino””
    * Threaten to break his/her property for no real reason whatsoever: “…im going to smash it [Arduino] with a large rock. smash it to bits.”
    * Calling other people idiots because they are less experienced: “It makes idiots who don’t know any better think…”

    If your answer to the question is “no”, please, go to a holiday. If it is “yes”, well, then the problem not so easily solvable in your case.

    Also, there are 5 “Arduinos” in my post.

  3. I dislike the Arduino (are you going to punch me now?) too, but not really for the same reasons.

    The idea of having a uniform platform for development is great, the things i dislike about it include the fact that they used GCC but decided not to code in pure C, that they renumbered the pins instead of using the proper internal names, and that they just strap on more and more hardware instead of making the board cheaper and simpler.

    1. That’s not because they renamed the pins that you can’t use the original names or write your own low-level code.

      A strength of Arduino against over other RAPs (Rapid-Application-Platform, don’t ask me if this term really exists) such as Basic Stamps is that you can choose to optimize or not your code.

  4. hum… the parts may be cheap, but you still have to get the audio data on the flash module, right? so unless you have proper hardware for this it gets much more difficult and expensive.

    to add to the arduino hate discussion: i dont like it either, but simply because i cant really afford it and about more than every second hack nowadays is either 3d printed or run by an arduino/raspi etc… or both.
    its the same as in the projects where the article says “it costs close to nothing. oh, the parts were 3d printed”. if you dont have a 3d printer at home or access to one, this would either involve building the parts by hand (which is often not possible) or letting somebody else with a 3d printer make it and pay very high prices for it.

    …then again, i might not be the financial target group of hackaday :P

    1. Sure, to get the audio you will need an arduino and some diy programmers ( i put a photo of theones I used) , or maybe borrow one arduino or a avr programmer. To record the sound, any borrowed pc will do with free software for the sound recording and preparation . You’ll also need a pc to read this site, a soldering iron, and some extra tooling. Here the arduino was the cheapest thing for me to write to the flash and attiny since I have one ( note that clones of arduinos can be found for really quite cheap) also, bitbanging a flash programmer with an old pc parallel port is still possible. be cheap, be smart, nether do I have proper programmers.

  5. I was just being overly dramatic, I would never punch anyone in the face. I just really dislike the arduino because people talk about it like its the only thing out there, like it was “the first microcontroller” and like any bad or false rumor or your sister, that idea tends to spread far and wide with the newbs, and to us guys who have been around long enough, its kind of insulting. I also think the HAD guys like to stir people up by talking about it so much, kind of like reverse trolling.

    As for the ardunio itself, It’s cheap, easy to use (too easy, if you can just steal code from the library, but shamefully is exactly how you should be doing code if you ask a good programmer) and if it makes kids interested in electronics and science, great. But talking about it like it’s what you would find if you lifted the hood of comercial or professional electronics is kind of not true. an AVR yes, all day long, PICs? yep… ARMs? yes sir! a basic stamp? noooo…. (PIC based however) a full on ardunio? nope…

    I love seeing people build fantastically cool widgets and gizmos, but doing all the wiring, all the fabracating, all of the major work by hand, all by themselves, and then go and “borrow” someone elses “sketch” or code off the web is super freaking weak.

    1. okey, but.. the story here is about a bare AVR attiny, using an arduino as a programmer, nothing to do basically with arduino in fact. The author is also making the point of saying arduinos are typically not in toys… so, what is your point, besides making the whole thread about arduino instead of electronics ?

    2. You do know not everyone has the knowledge to program all these other types of electronics, work with timers and such, or write their own sketches? I’ll lay money down I can do things that you have no idea how to do so how about you get off your high arduino troll horse and go worry about something else. Any time arduino is mentioned here we have idiots all over the comments running the thing down because its popular…sounds like a damn PC vs Mac, Android vs iPhone, Xbox vs PS3 bs flame war. The simple fact is that it enables people who have skills ELSEWHERE to do things they previously couldn’t do without requiring them to sit and learn or spends hundreds to get all the other parts and find ways to program it.

    3. If by using someone’s code to make a project work is not any good, you have to reflect a bit further on your definition of “weak”.
      I was formally trained to be able to work as a programmer, so I know some reasonably “good programmers”, are they all cheating when they include stdio.h & friends? Is every java or .net developer cheating because they are using a framework or a database engine? “But those are tools!” you would probably say, but Arduino’s libraries are also tools, it only depends where you draw the line.

      Why did you drew the line in the PIC, AVR ans ARM? You could also implement a microcontroller with discrete components… Actually, you could make most of the discrete components… We usually draw the line at a higher level because winding our own resistors when the store bought ones are suitable and cheaper is usually silly. If you decide to build your own transistors for the heck of it, good for you! Teach me how you did it and I will thank you, but when the goal is something else it will be a loss of time.

      If using an Arduino library saves time, why is it wrong? When you connect an LCD to a PIC do you use a library or do you always lose the time creating the necessary code? You don’t need to be ashamed to use someone else’s library, if you keep reinventing the wheel you will not have the time to create new stuff.

      Sometimes an aruino or similar “hobby” dev board might be overkill, but spending an additional 8 hours just to save 1 or 2 euros in a project that will not enter production is just dumb.

  6. Those little PC speakers can really be improved audio quality- and volume-wise by putting them in a small enclosure. Back when I played around with the ISD chips, I used the little cardboard boxes that business cards come in — about 30-35 in^3 or ~550 cc. I didn’t do any calculations to optimize that or even experiment with different sizes. I just pulled the box out of my desk and cut a hole in it and it sounded okay. The more advanced hacker may want to do a little more research into dimensions, as well as trying other materials like wood, plastic, partially de-weaponized plutonium, etc.

  7. @Makapuf: Nice work! Simplicity is always a plus ;)

    @ arduino discussion: Yeah I have never been a big fan of the arduino as far as the way things have been handled in the business community. Kinda like the Gatorade of hacking sports lol. I found the community support lacking so some projects just died. There is a whole other can of worms that dare not speak its name… so it shan’t.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.