Hi,
I'm new to microcontrollers but I have a specific project and I'm wondering which microcontroller would best fit my requirements:
* Needs at least one DA and one AD converter suitable for 44,1 Khz audio (mono)
* I need at least 8MB of persistent flash RAM (for sample data + code)
* I have to do a 256 or 512 point FFT on ingoing audio, some processing and multi-channel WAV playback
* Builtin clock source
* Programmable in C, C++, Basic or other but not only ASM
* Would be great if there are existing libs for FFT and audio
* As small as possible and low power consuming
* The price should not exceed 20,- EUR / $25 Dollar each
* Less surrounding parts as possible
In short words, I like to analyse the input audio signals (FFT). Based on the results, I like to trigger playback of various samples.
Any recommendations about the best microcontroller for such project? I already found Teensy 3.1 a nice product, but 64KB of flash is way to less...
I'm also interested in any tips and recommendations about architecture. Maybe some Arduino + some extra chip? Or try a DSP? Or something else and add some micro-SD? It all has to be very small.
Thanks,
Kukulkan
Which microcontroller to chose for my project?
Re: Which microcontroller to chose for my project?
Hi,
I am currently trying to port PureBasic to 86duino (ZERO). It is x86 (PPro class) SoC that fits your needs, in some aspects, more than sufficient (since it can be programmed as standard Arduino).
It has ADC interface (11 bit), 200-400MHz x86 CPU with L1 and L2 cache, 128 MB DDR3 RAM, SD Card for storage, consumes ~2W full load and costs 30€ in Europe.
DAC can always be purchased separately, it is a few $ chip.
Perhaps I wouldn't even recommend it as an option, but as I've said, it can run Linux (even Windows or some other RTOS, but not important right now) which is great to start with and, hopefully, fully fledged PureBasic on it.
Perhaps the biggest issue would be the size, what is your maximum?
Best regards,
Bruno
I am currently trying to port PureBasic to 86duino (ZERO). It is x86 (PPro class) SoC that fits your needs, in some aspects, more than sufficient (since it can be programmed as standard Arduino).
It has ADC interface (11 bit), 200-400MHz x86 CPU with L1 and L2 cache, 128 MB DDR3 RAM, SD Card for storage, consumes ~2W full load and costs 30€ in Europe.
DAC can always be purchased separately, it is a few $ chip.
Perhaps I wouldn't even recommend it as an option, but as I've said, it can run Linux (even Windows or some other RTOS, but not important right now) which is great to start with and, hopefully, fully fledged PureBasic on it.
Perhaps the biggest issue would be the size, what is your maximum?
Best regards,
Bruno
Re: Which microcontroller to chose for my project?
If you are doing a one-off, then just about anything over 50MHz will work. There are C fft libraries, and they work with any c compiler. Sorry, do not have a bookmark; it's been a while. Read the fft documentation to see how much ram you need to process the fft in your desired precision/range, then triple that ram amount for your project size (just as a rule of thumb). That lets you queue one buffer while you process a second, and still leaves room for other tasks. Depending on what you are doing, an autocorrelation algorithm may also be suitable. They are better at lower frequencies.
If you are doing multiple parts (i.e. production), then I think your best bet is an ARM; most likely any one of their architectures will work, as long as they have the mips you need. For 44.1KHz playback with FFT, my guess is you need something over 40MHz. You will really need to put your project together to see the exact demands. I have done FFT at 20MHz on an 8-bit mcu, but it is low resolution and leaves very little processing time for other things.
I like NXP.com 's ARM chips. They have a wide product range, and competitive prices. The M0+ and older M0's are most power efficient--but division is not a part of the core architecture (although some mfr's hack one in, most compilers choke on it because of the way it accesses the registers); the M3's are about 30% faster (iirc), and have native division by default.
The d/a capabilities of mcu's vary wildly; you will have to search for one that meets your needs. It is very likely that an mcu paired with an audio processing chip might be a good match--with a good codec, you might even get by with a more affordable mcu.
Good luck...
If you are doing multiple parts (i.e. production), then I think your best bet is an ARM; most likely any one of their architectures will work, as long as they have the mips you need. For 44.1KHz playback with FFT, my guess is you need something over 40MHz. You will really need to put your project together to see the exact demands. I have done FFT at 20MHz on an 8-bit mcu, but it is low resolution and leaves very little processing time for other things.
I like NXP.com 's ARM chips. They have a wide product range, and competitive prices. The M0+ and older M0's are most power efficient--but division is not a part of the core architecture (although some mfr's hack one in, most compilers choke on it because of the way it accesses the registers); the M3's are about 30% faster (iirc), and have native division by default.
The d/a capabilities of mcu's vary wildly; you will have to search for one that meets your needs. It is very likely that an mcu paired with an audio processing chip might be a good match--with a good codec, you might even get by with a more affordable mcu.
Good luck...
Re: Which microcontroller to chose for my project?
Thanks both of you for the hints.
I do not need a high resolution FFT. I think that 256 or 512 bands would be sufficient enough for my needs. Or even less...
I think a full blown computer with Linux is way to much for this job. I plan to make this a commercial product later and the size is really a factor. It is allowed to be 5 to 6cm in length but only 2.5cm in width. Height is also limited to 2.5cm (some sort of tube). Thus, it has to be a really small solution (finally). During development it can be a little bigger, but still needs to be small enough to prove that it is possible.
I just found that the AT32UC3A0128AU with 66Mhz seems to be the right one (http://www.atmel.com/devices/AT32UC3A0128AU.aspx). Will have a look at the documentations. Maybe I can find a good book on them, too.
Best,
Kukulkan
I do not need a high resolution FFT. I think that 256 or 512 bands would be sufficient enough for my needs. Or even less...
I think a full blown computer with Linux is way to much for this job. I plan to make this a commercial product later and the size is really a factor. It is allowed to be 5 to 6cm in length but only 2.5cm in width. Height is also limited to 2.5cm (some sort of tube). Thus, it has to be a really small solution (finally). During development it can be a little bigger, but still needs to be small enough to prove that it is possible.
I just found that the AT32UC3A0128AU with 66Mhz seems to be the right one (http://www.atmel.com/devices/AT32UC3A0128AU.aspx). Will have a look at the documentations. Maybe I can find a good book on them, too.
Best,
Kukulkan
-
Num3
- PureBasic Expert

- Posts: 2812
- Joined: Fri Apr 25, 2003 4:51 pm
- Location: Portugal, Lisbon
- Contact:
Re: Which microcontroller to chose for my project?
Found this, maybe under $20

Now back on the subject, the AT32UC3C0128C seems a better choice because it has native Floating point unit (FPU), and since you're going to do some math that might help alot!
You probably wont need 128kb of flash, maybe 64k or even 32k is more than enough. Btw, to achieve those speeds 44/66Mhz you'll need an external cristal oscilator and two capacitors.
You can add ram chips via I2C protocol (very easy with atmel chips).
Atmel have audio specific chips check here: http://www.atmel.com/Images/doc32174.pdf
Also be prepared, 144 pins means it's a LQFP or BGA chip, so you can't prototype unless you buy some adapters or have the PCB manufactered for you and a reflow hoven
Now if you're looking for a 32bit prototype machine, maybe an arduino galileo might be the thing, check here:
http://arduino.cc/en/ArduinoCertified/IntelGalileo
or even an Raspberry PI, that runs linux from SDcard and goes for 32€~39€ (i've seen these on the back of airport info panels xD)
http://www.raspberrypi.org/

Now back on the subject, the AT32UC3C0128C seems a better choice because it has native Floating point unit (FPU), and since you're going to do some math that might help alot!
You probably wont need 128kb of flash, maybe 64k or even 32k is more than enough. Btw, to achieve those speeds 44/66Mhz you'll need an external cristal oscilator and two capacitors.
You can add ram chips via I2C protocol (very easy with atmel chips).
Atmel have audio specific chips check here: http://www.atmel.com/Images/doc32174.pdf
Also be prepared, 144 pins means it's a LQFP or BGA chip, so you can't prototype unless you buy some adapters or have the PCB manufactered for you and a reflow hoven
Now if you're looking for a 32bit prototype machine, maybe an arduino galileo might be the thing, check here:
http://arduino.cc/en/ArduinoCertified/IntelGalileo
or even an Raspberry PI, that runs linux from SDcard and goes for 32€~39€ (i've seen these on the back of airport info panels xD)
http://www.raspberrypi.org/
Re: Which microcontroller to chose for my project?
Hi Num3,
thank you very much for your suggestions. Indeed, this sounds good. I'll take a look if the current setup does not work. I decided to start with a Teensy 3.1 running at 72 Mhz (https://www.pjrc.com/teensy/) and the audio adaptor board incl. SD slot (https://www.pjrc.com/store/teensy3_audio.html). Currently this seems to fit my needs.
The bigger ones like Raspberry Pi are not an option because of the size and the price. Everything needs to be as small as possible. And if it works, I like to make it a commercial product.
Thanks,
Kukulkan
thank you very much for your suggestions. Indeed, this sounds good. I'll take a look if the current setup does not work. I decided to start with a Teensy 3.1 running at 72 Mhz (https://www.pjrc.com/teensy/) and the audio adaptor board incl. SD slot (https://www.pjrc.com/store/teensy3_audio.html). Currently this seems to fit my needs.
The bigger ones like Raspberry Pi are not an option because of the size and the price. Everything needs to be as small as possible. And if it works, I like to make it a commercial product.
Thanks,
Kukulkan

