Download free music MP3s on genuine quality, the world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, The world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, stats, charts, biographies and concerts. stats, charts, biographies and concerts.
Tuesday, May 7, 2024
Selecting Microcontrollers for Music
I was browsing some of the newer ATtiny chips the other day and started to make a note of some of their properties and it made me realise I actually have quite a few different microcontrollers at my disposal and many more I could be having a look at. …
I was browsing some of the newer ATtiny chips the other day and started to make a note of some of their properties and it made me realise I actually have quite a few different microcontrollers at my disposal and many more I could be having a look at.
But having committed to not attempting to get hold of every variant of every device to put a MIDI interface on it, I thought it would still be worth a post summarising some of the features to make selecting them in the future a little easier.
There are many comparison charts and tables online, but this is my own summary of the things that are important to me right now in terms of using them for musical purposes.
Note: I think the data is correct at the time of writing. Feel free to let me know of any mistakes. Also feel free to let me know what microcontrollers you use for music, and why, in the comments.
8-bit Microcontrollers
MCU
Freq
PWR
GPIO
ADC
PWM
DAC
Comms
RAM
Flash
ATmega328P
16MHz
2.7-5.5V
23
6/8
6
0
UART, I2C, SPI
2K
32K
ATmega32U4
16MHz
2.7-5.5V
26
12
8
0
UART, I2C, SPI, USB
2.5K
32K
ATtiny85
8/20MHz
2.7-5.5V
6
4
6
0
USI
512
8K
ATtiny88
12MHz
2.7-5.5V
28
6
2
0
I2C, SPI
512
8K
ATtiny21(2|4) ATtiny41(2|4|6)
20MHz
1.8-5.5V
6|12 6|12|18
6|10 6|10|12
6
1
UART, I2C, SPI
128 256
2K 4K
32-bit Microcontrollers
MCU
Freq
PWR
GPIO
ADC
PWM
DAC
Comms
RAM
Flash
SAMD21 (M0+)
48MHz
1.6-3.6V
30/38
14
30?
1
SERCOM, I2S, USB
4-32K
32-256K
SAMD51 (M4)
120MHz
1.6-3.6V
51
32
37?
1
SERCOM, I2S, USB
128-256
256-1024K
RP2040 (2xM0+)
133MHz
3.3V
30
4
11
0
UART, I2C, SPI, USB, PIO
264K
external
ESP32 (LX6)
160MHz
3.0-3.6V
34
18
16
2
UART, I2C, SPI, I2S, Wi-Fi, BT
0-2M
0-4M
ESP32-S2 (LX7)
240MHz
2.8-3.6V
43
20
8
0
UART, I2C, SPI, I2S, Wi-Fi
0-2M
0-2-4M
ESP32-S3 (2xLX7)
240MHz
3.0-3.6V
45
20
8
0
UART, I2C, SPI, I2S, Wi-Fi, BT
0-2-8-16M
0-4-8M
ESP32-A1S (2xLX6)
240MHx
3.0-3.6V
14
?
?
2
UART, I2C, SPI, I2S
520K+4M
0?
Points of Note
The ATmega and ATtiny devices are all 8-bit AVR architecture and might be either 3V3 or 5V operation depending on the device. Whereas the others are all 32-bit, 3V3 operation, and either ARM or Tensilica Xtensa architectures.
The SAMD51, ESP32 and ESP32-S3 are all interesting as they include a floating point unit, which might be useful if I get into requiring mathematical synthesis.
ATtiny2xx, ATtiny4xx, SAMD21, SAMD51, ESP32 all include a DAC which would be really useful for generating control voltages.
ATmega32U4, SAMD21, SAMD51, RP2040 all support USB directly.
The last one is an interesting device. The ESP32-A1S is a single module that includes an ESP32 and a CODEC module. More recent versions use the ES8388 and support two audio in/out channels. There is an Espressif Audio Development Framework for use with all ESP32-based devices.
Other MCUs of possible interest might include some of the newer RISC-V devices (e.g. ESP32-C3), the STM32 device range (the higher performing devices include floating point support, for example), the Teensy boards (which have a strong following for audio applications), and even running with the broadcom devices used on the various Raspberry Pis in "bare metal" mode.
A key tradeoff already would be choosing between a more powerful, probably 32-bit, 3V3 logic devices or a less capable 5V device.
Development Boards
I'm unlikely to be working with a microcontroller directly though, given my own level of knowledge, so I'm probably going to be looking at some kind of development board.
The following could all be possibilities if I'm happy running at 3V3.
Note, many of the form-factors, e.g. Adafruit's QT Py or Feather, support most of the architectures - but not all are listed - just those I have or might consider. I've also added in some other boards that I know are often used (or shout about being used) for audio applications.
Prices are approximate at time of writing (Feb 2024).
Board
MCU
Arch
Speed
RAM/Flash
GPIO
ADC
PWM
I2S
DAC
Cost
RPi Pico
RP2040
2xM0+
133MHz
264K/2M
27
3
16
PIO
0
£4
XIAO
SAMD21
M0+
48MHz
32K/256K
14
11
11
1
1
£6
XIAO
RP2040
2xM0+
133MHz
264K/2M
11
4
11
PIO
0
£6
XIAO
ESP32-S3
2xLX7
240MHz
8M/8M
11
9
11
1
0
£8
XIAO
ESP32-C3
RISC-V
160MHz
4K/4M
11
4
11
0
£6
QT Py
SAMD21
M0+
48MHz
32K/256K
11
9
9
1
1
£9
QT Py
RP2040
2xM0+
125MHz
264K/8M
13
4
13
PIO
0
£10
QT Py
ESP32-S3
2xLX7
240MHz
512K+2M/4M
13
10
13
1
0
£15
Trinket
SAMD21
M0+
48MHz
32K/256K
5
5
2
1
1
£9
ItsyBitsy
SAMD21
M0+
48MHz
32K/256K
23
11
13
1
1
£12
ItsyBitsy
SAMD51
M4
120MHz
192K/512K+2M
23
7
18
1
2
£15
Feather
SAMD21
M0+
48MHz
32K/256K
20
6
20
1
1
£19
Feather
SAMD51
M4
120MHz
192K/512K+2M
21
6
16
1
2
£23
Feather
RP2040
2xM0+
125MHz
264K/8M
21
4
16
PIO
0
£12
Feather
ESP32-S3
2xLX7
240MHz
2M/4M
21
6
21
1
0
£17
BananaPicoW
ESP32-S3
2xLX7
240MHz
512K/2M+8M
27
18
8
1
0
£4
WROOM32
ESP32
2xLX6
<240MHz
500K/448K+4M
34
15
25
1
2
£3
Teensy 3.6
MK66FX1
M4F
180MHz
256K/1M
64
25
22
1
2
N/A
Teensy 4.0
IMXRT1062
M7
600MHz
1M/2M
40
14
31
2
0
£26
Teensy 4.1
IMXRT1062
M7
600MHz
1M/8M
55
18
35
2
0
£30
Arduino MKR Zero
SAMD21
M0+
48MHz
32K/256K
22
7
13
1
1
£30
Arduino Giga R1
STM32H747X
M7 M4
480MHz 240MHz
1M/2M
76
14
13
?
2
£70
It is interesting to note which boards support a DAC and which support I2S, both very useful for audio applications and the number of ADCs is relevant too.
Boards specifically designed for audio processing, which I've no direct experience of, include:
Pico ADK - A RP2040 based "audio development kit" with 8 ADCs and SPI DAC.
Daisy Seed - an ARM Cortex-M7 with audio IO designed for DSP and audio applications (£35)
Bela and Bela Mini - designed for use with Beaglebone for real-time, low-latency audio processing (~£130-£160).
Software Audio Frameworks
There are a number of software frameworks for use with some of the above for audio processing:
No comments:
Post a Comment