Selection of a microcontroller for Childs Toy...

Hi,

We are designing a simple childs toy with the following features:

  • Must Respond to up to 5 buttons
  • Output up to 2 minutes of preprogrammed sounds through a speaker
  • Must be programmable to respond in different ways according to the order of the button pressed

It is preferred that the microcontroller contain an 8 - 12 bit onboard DAC, EEPROM programability, low voltage consumption...

Optional features would include melody output (To play music while sound is playing).

I have investigated the Winbond Powerspeech series. It seemed perfect at first glance, however it is not offered with EEPROM. We plan on producing these in bunches of 100-500 thus necessitating the EEPROM.

Any suggestions would be appreciated.

Thanks,

Tim

Reply to
hypnoplay
Loading thread data ...

'real' DACs will be expensive and rarely found on low-cost micros - you should look at using PWM etc. techniques. The Atmel ATTiny26 has a PLL peripheral clock mode that will do PWM with a 64MHz clock. With suitable software you should be able to get a decent audio signal using this. Sucks a bit of power in this mode but if you're driving a speaker this will not be too significant,

Reply to
Mike Harrison

Take a look at TIs 430 family. Low power less than $1 in low qty. A/D.

Look at this months Circuit Cellar for a novel speech design for a micro.

george

Reply to
GMM50

Must be school project time. (same question by a different poster).

should look at using PWM

It's not so much a cost issue. Placing DAC on micro is not expensive, but difficult to isolate the noise problems. For PCB, you should provide separate power and ground as much as possible. It would be more difficult to do so, if the DACs are on the micro.

You can easily build a flash DAC with an op-amp and 10 to 15 resistors. You wouldn't get commerical hi-fi quality, but good enough to pass the course.

64MHz clock. With

Sucks a bit of power

Reply to
linnix

Hi Tim,

If you can elaborate on what "2 minutes of pre-programmed sounds" means. I really think this is key to what hardware you should select. Are they tones? Is it speech or complex sounds? To pre-program a simple tone can almost be infinitely smaller (memory/complexity wise) than other type sounds.

Thomas

Reply to
Thomas Magma

Thanks Mike, george, linnix,

I have checked out the links & will investigate them furthur. Actually my background is in programming so I kind of feel like a fish out of water on this subject. (Although it may sound like a school project, its actually for end consumers)

I am familiar with PWM techniques in general. (it sounds like this is the way to go)

Once I land on a chipset & receive a development kit I think I will feel more comfortable from there.

Let me elaborate a little more on the project:

  • The toy is meant to play musical songs with a digital file running simaltaneously in the background.
  • Fairly high quality sounds are required (for a toy) minimum 8khz 8bit mono.
  • Melodies must play for 2 to 5 minutes in the foreground while digital sounds can repeat in the background(at least 20 seconds)
  • oboard EEPROM for code as well as data is preferred
  • However, this is meant to be an upscale item, so a chip/chipset costing would not be out of the question. (Quality is mandatory)

I am figuring on at least 20 secs of digital sounds (8khz 8bit mono) without compression off the top of my head probably comes to ~150k. Plus the 2 minutes of melodies which shouldn't take nearly that much.

At this much memory, any thoughts on hardware decompression, software decompression or going without decompression?

I do have some background in this field, as I wrote a custom Sound Blaster Driver years ago. I would prefer a chip capable of 2 seperate channels(mono) of audio as opposed to mixing the channels into one.

I really appreciate the help in making this selection, I feel a little overwhelmed with the choices...

-Tim

Reply to
hypnoplay

Look at the C8051F330P, comes in DIP20, and has a 10 bit DAC, and 25 MIPS core. It also has on chip debug. For the sound(s) you'll be best with separate SPI Flash, or DataFlash storage - consider using more than one, and probably plugable, if you want to simplify loading them. Look at some of the storage-cards for cameras, etc. Your toy is then a relatively simple tune/melody chooser/player. Another PC centric system is needed to create the sound files.

-jg

Reply to
Jim Granville

PWM is fine for simple tones, but it would sound flat. Namely, difficult to product quality sound.

How about space requirement? If you need small space, get an I2S DAC (a few dollars). Otherwise, building the flash DAC is cheaper and easier to work with, since you would likely need to build the PCB anyway. PCB (approx. 2 sq. in) costs 0.25, op-amp costs 0.10 and resistors costs 0.01 each.

You can use a simple AVR/PIC/etc. to drive the DAC.

A serial data flash should be more than enough.

Compression is probably not needed. You are generating tones from data anyway.

Reply to
linnix

How about this: CPU - PIC16F73 - has more than enough inputs for the buttons and two PWM outputs that you can use for your audio playback; one for the voice, one for the melody. A simple 3rd order or 4th order RC lowpass filter is all that's required on the output to get decent sound quality. Cost $3.50 in quantities of 250 from Digikey.

memory - M25P20 - serial flash memory 256KB which will hold 32 seconds of audio at an 8 KHz sampling rate. Cost $1.21 in quantities of 250 from Digikey.

audio amplifier - LM386 assuming you have more than +4.0 VDC to work with. Cost $0.27 in quantities of 250 from Digikey.

Total cost $4.98 and it fits all your requirements except for onboard EEPROM but it sounds like external FLASH will work just as well since you didn't mention any physical size restrictions.

--Tom.

Reply to
Tom

Winbond is an option, but Sonix is probably the best.

formatting link
They work with Kodec, so you could contact them also, I think it's Kodec.com. Also, Alpha has some cool stuff ealpha.com.tw.

I worked for Hasbro so I know these quite well

snipped-for-privacy@gmail.com wrote:

Reply to
Robert.F.Miller

look at using PWM

64MHz clock. With

Sucks a bit of power

How about RC-2 encoding ? There is a nice article in Circuit Cellar #180 about this using an AT89C4051 MCU.

Regards Anton Erasmus

Reply to
Anton Erasmus

Tim,

May I ask you point me to texts describing the Sound Blaster itself, what functions it offers like FM systhesis, etc. and to a programming manual.

I would like to link my theoretical knowledge of Digital Signal Processing to something physical like a sound card.

Thank you very much in advance.

--
Jean Castonguay
lectrocommande Pascal
Reply to
Jean Castonguay

Years ago I bought a Software Developer's kit for an early Sound Blaster. Contact Creative Labs.

Bob

Reply to
Bob Stephens

Hi Jean,

My apologies for taking so long to get back to you. I have been out of town...

There have been many versions of the soundblaster over the years. The early ones I believe had fm synthesis to be compatible with the "Adlib" family of boards. To that they added 1 channel of 8 bit wave file playback. Eventually, the "soundblaster 16" added 16 bit playback and more channels.

I used to have the sound blaster development kit but I do not know where to find it any more...

You are correct, this is a great place to apply theoretical knowledge of Digital Signal Processing Here is a link with a good place to start...

formatting link

The files are actually located on Programmers Heaven Website.

Hope this helps,

-Tim

Reply to
hypnoplay

Thanks for your advice Tom...

It looks functionally exactly what I need & at the price pt I need...

I am going to look into these furthur...

-Tim

Reply to
hypnoplay

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.