Skip to content
mxmxmx edited this page Apr 6, 2018 · 36 revisions

basics

  • eurotrash mk2 is (still) a fairly simple incarnation of the PJRC ‘audio adapter’ as a eurorack module, fully compatible with the PJRC audio API. the provided firmware is a two channel .wav player, streaming regular .wav files (16 bit mono, 44.1kHz), with CV over start and end-of-file positions. it's fairly identical to eurotrash mk1 in functionality and hardware, but simpler+cheaper to build, which was the main reason for redoing it.

  • as far as the PJRC audio API is concerned, the only differences pertain to the (somewhat better) codec being used: PCM5102a not SGTL5000. the PCM5102a codec doesn’t need to be initialised, so, when writing code, you can safely ignore any (i2c) code relating to the SGTL5000 part; otherwise, pin usage is identical (with the exception of the onboard pot, A15, which isn't featured here).

  • unlike eurotrash mk1, which had an additional mcu as co-processor of sorts, here the OLED is driven by the teensy 3.x. the OLED display being used is the common/cheap i2c SH1106 variety. the main advantage being, as noted, it's simpler to build now. on the downside, i2c is slow, even when maxed out pretty much, so prone to interfere with time-sensitive user code. the good news is, u8glib (used as driver code) with i2c is very resilient, so there's workarounds to that (ie it's possible break up the OLED refresh routines) which minimize any interference. still, it's a trade off. audio per se isn't affected, as this runs with much higher priority. a better OLED driver / non-blocking code (DMA) hopefully will emerge, eventually.

  • the board features both, micro SD and a/the 16MB SPI flash (soic-8), both of which are supported by the firmware / available as different banks. streaming from flash generally provides lower latency (~ 4ms total), but then there's only 16MB available. streaming from SD is approx. double that figure, worst case. (latency depends on a number of factors, the audio block size (128 samples, 44.1k), addressing etc., the SD streaming class has been modified to minimize latency; it's probably good enough for many purposes).

  • screenshot of latency (SPI flash, 1ms grid):

  • screenshot of latency (SD card, 5ms grid): best case scenario (= sample start point unmodulated):

  • (note the firmware fades in the files: const uint16_t FADE_IN = 1;, which can be disabled)


hardware:

  • The remaining circuitry mainly consists in what’s required to turn this into a eurorack module; being a digital module, that’s all fairly boring and generic (more here).

  • over and above the "audio adapter", the board provides some basic i/o. pin usage is as follows:

    • digital inputs/ext interrupts: pins 5, 8

    • CV inputs: pins A2, A3 (ADC0/ADC1) (†); and A6, A1 (ADC0)

    • encoder: pins 1, 2 (switch: 0)

    • tact switches: pins 21, 13


  • (†) in terms of the pjrc audio API, either A2 and/or A3 (ADC1) might alternatively be used as a not-so-hifi DC coupled-audio input; the signal is centred at ~1.65 V. currently the AudioInputAnalog object doesn't work for ADC1 (yet), however; nor does it work in stereo (yet).
Clone this wiki locally