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

MCUFreqPWRGPIOADCPWMDACCommsRAMFlashATmega328P16MHz2.7-5.5V236/860UART, I2C, SPI2K32KATmega32U416MHz2.7-5.5V261280UART, I2C, SPI, USB2.5K32KATtiny858/20MHz2.7-5.5V6460USI5128KATtiny8812MHz2.7-5.5V28620I2C, SPI5128KATtiny21(2|4)
ATtiny41(2|4|6)20MHz1.8-5.5V6|12
6|12|186|10
6|10|1261UART, I2C, SPI128
2562K
4K

32-bit Microcontrollers

MCUFreqPWRFPUGPIOADCPWMDACCommsRAMFlashSAMD21 (M0+)48MHz1.6-3.6VN30/381430?1SERCOM, I2S, USB4-32K32-256KSAMD51 (M4)120MHz1.6-3.6VY513237?1SERCOM, I2S, USB128-256256-1024KRP2040 (2xM0+)133MHz3.3VN304110UART, I2C, SPI, USB, PIO264KexternalESP32 (LX6)160MHz3.0-3.6VY3418162UART, I2C, SPI, I2S, Wi-Fi, BT0-2M0-4MESP32-S2 (LX7)240MHz2.8-3.6VN?432080UART, I2C, SPI, I2S, Wi-Fi0-2M0-2-4MESP32-S3 (2xLX7)240MHz3.0-3.6VY452080UART, I2C, SPI, I2S, Wi-Fi, BT0-2-8-16M0-4-8MESP32-A1S (2xLX6)240MHx3.0-3.6VY?14??2UART, I2C, SPI, I2S520K+4M0?

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).

BoardMCUArchSpeedRAM/FlashFPUGPIOADCPWMI2SDACCostRPi PicoRP20402xM0+133MHz264K/2MN27316PIO0£4XIAOSAMD21M0+48MHz32K/256KN14111111£6XIAORP20402xM0+133MHz264K/2MN11411PIO0£6XIAOESP32-S32xLX7240MHz8M/8MY1191110£8XIAOESP32-C3RISC-V160MHz4K/4M?114110£6QT PySAMD21M0+48MHz32K/256KN119911£9QT PyRP20402xM0+125MHz264K/8MN13413PIO0£10QT PyESP32-S32xLX7240MHz512K+2M/4MY13101310£15TrinketSAMD21M0+48MHz32K/256KN55211£9ItsyBitsySAMD21M0+48MHz32K/256KN23111311£12ItsyBitsySAMD51M4120MHz192K/512K+2MN2371812£15FeatherSAMD21M0+48MHz32K/256KN2062011£19FeatherSAMD51M4120MHz192K/512K+2MY2161612£23FeatherRP20402xM0+125MHz264K/8MN21416PIO0£12FeatherESP32-S32xLX7240MHz2M/4MY2162110£17BananaPicoWESP32-S32xLX7240MHz512K/2M+8MY2718810£4WROOM32ESP322xLX6<240MHz500K/448K+4MY34152512£3Teensy 3.6MK66FX1M4F180MHz256K/1MY64252212N/ATeensy 4.0IMXRT1062M7600MHz1M/2MY40143120£26Teensy 4.1IMXRT1062M7600MHz1M/8MY55183520£30Arduino MKR ZeroSAMD21M0+48MHz32K/256KN2271311£30Arduino Giga R1STM32H747XM7
M4480MHz
240MHz1M/2M?761413?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).

And it is worth noting that the Teensy has many features well suited to audio processing, including a dedicated software audio toolkit (see below).

Software Audio Frameworks

There are a number of software frameworks for use with some of the above for audio processing:

There is a bit of discussion about these here: Arduino Audio and MIDI Frameworks.

Closing Thoughts

I expect this page will evolve with new information, but it will be good to have a single post to refer back to.

Kevin

https://diyelectromusic.wordpress.com/2024/05/07/selecting-microcontrollers-for-music/

#adafruit #arduino #attiny #esp32 #raspberryPi #raspberryPiPico #samd21 #samd51 #teensy

GitHub - espressif/esp-adf: Espressif Advanced Development Framework for Multimedia Applications

Espressif Advanced Development Framework for Multimedia Applications - espressif/esp-adf

GitHub
Wio Terminal Makes Passable Oscilloscope

There was a time when getting a good oscilloscope not only involved a large outlay of capital, but also required substantial real estate on a workbench. The situation has improved considerably for …

Hackaday

instead of a samd51 + esp32, we've got a version with ESP32-S3 WROOM which has 8MB of flash, and 2MB of PSRAM. the S3 has a nice peripheral that can be used to drive these matricies very fast, and the 2 MB of PSRAM will make this possible to drive lots of panels! we kept the same outline shape and functionality, including the built in accelerometer, which makes this LED sand demo a quick port.

#adafruit #electronics #esp32 #opensource #opensourcehardware #EndOfAnEra #SAMD51

This would probably explain the big pile of unmerged pull requests

https://github.com/micropython/micropython/releases/tag/v1.20.0

Guess now need to rebase the grand central port #micropython #samd51

Release v1.20.0: New mip package manager, compressed type structs and Pico W support · micropython/micropython

This release of MicroPython introduces a new lightweight package manager called mip, which uses a custom protocol to query and install packages that is optimised for embedded systems. It is intend...

GitHub

Run UNIX On Microcontrollers With PDP-11 Emulator

C and C++ are powerful tools, but not everyone has the patience (or enough semicolons) to use them all the time. For a lot of us, the preference is for something a little higher level than C. While Python is arguably more straightforward, sometimes the best choice is to work within a full-fledged operating system, even if it's on a microcontroller. For that [Chloe Lunn] decided to port Unix to several popular microcontrollers.

This is an implementation of the PDP-11 minicomputer running a Unix-based operating system as an emulator. The PDP-11 was a popular minicomputer platform from the '70s until the early 90s, which influenced a lot of computer and operating system designs in its time. [Chloe]'s emulator runs on the SAMD51, SAMD21, Teensy 4.1, and any Arduino Mega and is also easily portable to any other microcontrollers. Right now it is able to boot and run Unix but is currently missing support for some interfaces and other hardware.

[Chloe] reports that performance on some of the less-capable microcontrollers is not great, but that it does run perfectly on the Teensy and the SAMD51. This isn't the first time that someone has felt the need to port Unix to something small; we featured a build before which uses the same PDP-11 implementation on a 32-bit STM32 microcontroller.

#microcontrollers #arduino #mega #microcontroller #pdp11 #samd21 #samd51 #teensy #unix

Run UNIX On Microcontrollers With PDP-11 Emulator

C and C++ are powerful tools, but not everyone has the patience (or enough semicolons) to use them all the time. For a lot of us, the preference is for something a little higher level than C. While…

Hackaday

Portable Game Console with #SAMD51 Arm Cortex-M4... Powered by two AAA batteries...

https://www.tindie.com/products/makerfabs/circuitpython-pewpew-m4-kit/

CircuitPython PewPew M4 Kit by Makerfabs on Tindie

An affordable game console Kit, programmed with CircuitPython

Ron Evans on Twitter

“The new cube lives! Thank you so much #adafruit for the urgent parts shipment. #tinygo #golang #ledcube #samd51 #itsybitsym4 #microcontrollers”

« Cool badge, but had to make a few special modifications :) check out #gobadge 2.0 thanks to hardware from @adafruit & code from @_CONEJO see you at #FOSDEM everyone! #golang #tinygo #embedded #microcontrollers #samd51 https://t.co/jWZS2kspod »

— Retweet https://twitter.com/deadprogram/status/1222588063899095046

Ron Evans on Twitter

“Cool badge, but had to make a few special modifications :) check out #gobadge 2.0 thanks to hardware from @adafruit &amp; code from @_CONEJO see you at #FOSDEM everyone! #golang #tinygo #embedded #microcontrollers #samd51”

Ron Evans on Twitter

“First @TinyGolang program to run on an @adafruit #itsybitsym4 board! #tinygo #golang #embedded #atsamd51 #samd51 #microcontroller #adafruit #arm #cortexm4 https://t.co/PNoOXlRNpx”

Twitter