Raspberry Pi Zero, audio and Axoloti

I’ve been busy porting the amazing Axoloti digital modular audio system from its own STM32F4 platform to the Raspberry Pi Zero. The idea is to build a preset machine, using Axoloti patches as presets. This port started out of pure curiosity, it is intended as a totally different application of a great DSP engine and platform as a whole.


Axoloti is described as “Sketching digital audio algorithms with the musical playability of standalone hardware. The Axoloti Patcher offers a “patcher” environment similar to Max/MSP, Pure Data or Reaktor. The patches run on a standalone powerful microcontroller board : Axoloti Core.” (axoloti.com). Sometimes described as the Nord Modular for 2016+, Axoloti makes it easy to assemble not so common instruments with an ever growing number of components created by the vibrant Axoloti community.


It would be really cool to have an Axoloti DSP engine running on a cheap but powerful Raspberry Pi Zero. Experimental audio on a €5 board just opens up an amazing array of possibilities, be it in art or music or education etc.etc. The Axoloti core board itself is closely linked to the editor and can controlled, programmed and edited via that editor. This project aims to only port the DSP engine over. Patches created with the Axoloti editor can be run and controlled over midi on the Pi Zero. MIDI in will be build on the GPIO ports. On with the project!

Grab a Rpi Zero and install Raspbian lite. Use raspi-config to maximize the free space on the sdcard and the set the hostname to something different than “raspberrypi”. From now on I’ll use the hostname “pi3”.

Follow the instructions in this gist to setup the Pi Zero as an USB ethernet device

Share your systems internet connection with the Pi Zero (the USB ethernet device). On OSX under system preferences > Sharing > Share WiFi to RNDIS/Ethernet gadget. Reboot / restart the Pi Zero and make an ssh connection with the Pi.

Update: because we’re using an USB audio device, a direct connection to the host PC as USB ethernet device is not possible. The USB data port on the Zero has to be shared with at least the USB audio device. So now I’m using a powered USB hub with a cheap 3D Sound USB audio stick and wireless network via a tl-wn823n wifi stick. Also connected a monitor with a miniHDMI to HDMI adapter. When things are up and running, I intent to configure the USB port as USB midi device. On with the plan:

The Jack audio connection kit is going to handle the audio duties of the new system. Jack offers an audio callback which we will supply with data generated by the Axoloti DSP engine. Jack is offered via the rasbian apt-get system, but that version is linked to something called d-bus, part of the Graphical Desktop Environment. Since we’re not running a GUI, this dependency is very inconvenient. So, install jack without d-bus by following step 4 from these instructions (you might need stuff from steps 1-3).

Together with the Jack audio connection kit, the Avahi zero-conf daemon is configured and installed. Establishing a ssh connection with the zero is done easy with “ssh -l pi pi3.local”. Automate the login (e.g. skipping the password bit) with this post from serverfault. We’re going to need that with the patcher software to automatically upload new patches.

Grab the files from my github repository “git clone https://github.com/sinneb/axoloti_zero.git”. The file “startsys.sh” starts the jack audio daemon and stops the system serial service, to not interfere with the midi in. Change dir to axoloti_zero and run the file “startsys.sh”.

Check the github repo for more instructions to get up and running. Right now I’m reworking the process to have the compilation process done on the host computer instead of on the zero. Compilation on the zero is taking too much time.



Development with STM32F7 discovery

A few pointers regarding development with an STM32F7 discovery board. My intention with this powerful board is to be able to sync wave files to a tap-tempo BPM (kinda Ableton Live like), and take the device up on stage with my band.

The board:


The STM32F7 disco runs at ~200Mhz, has support for DSP instructions (hardware floating point unit) and a lot, lot more. My first step was to make development easy, fast and “Arduino” like – since I’m really comfortable with that. I tried available options like STM32WB, Keil, Eclipse IDE plugins, etc but those did not work for me.

My current development setup is build around the great examples by postspectacular who offers a day-course synth building focussing on the STM32F7 disco. Check out his github repo! His setup offers a flexible makefile that compiles all projects without the need for an IDE. The examples are clear, step by step and easy to follow and extend upon.

My only extra need was more debug information. The Arduino way of just outputting over Serial.print did not work. So I did some research regarding gdb, the GNU project debugger. Since the makefile also supplies an ELF file, setup was quick:

I’m working in example 05, so to make debugging possible I edited the ex05.make file and changed the CFLAGS line to this:

CFLAGS += -O2 -ffast-math -g

Less optimisation (O2 instead of O3) and a -g flag to include debugging symbols.

I compiled the st-link gdb-server for OSX (texane on github). From the directory: /Users/Arthur/Development/embedded/tools/stlink/build/Release/src/gdbserver I’m running the st-util utility with: ./st-util -m -n

In an other terminal I’m running the arm gdb with the compiled ELF from example 5:

arm-none-eabi-gdb -tui –eval-command=”target extended-remote localhost:4242″ bin/ex05/app.elf

Or, if I just want to test the compiled application:

cp bin/ex05/app.bin /Volumes/DIS_F746NG/

update: guess you’ll have to upload the new compiled binary to the board using the last command, before initiating a debug session!

Matrix mixing craziness

A few weeks ago I did a small experiment with summed matrix mixing:

sounds great, crazy, untamed etc. I decided to explore summed matrix mixing a little bit further and today I started building a new prototype, that got out of hand quickly!

A single attenuverting channel (a 1 to 1 matrix) looks like this:

Screen Shot 2016-04-01 at 20.52.44

Although interesting, a more advanced matrix would offer a lot more possibilities. I decided to go for a 4 x 3 matrix, since I had those parts available. A 4 x 3 matrix offers 4 input channels that can be annenuverted and routed to 3 output channels, in any configuration. The test configuration will be configured like this:

Screen Shot 2016-04-01 at 20.56.58

And, it got out of hand. 4 channels “in” means:Screen Shot 2016-04-01 at 20.58.42

this, and to have 3 channels “out” — multiple this by three! Which leads to a breadboard like:


;) Time for extensive testing!

Schematics, eagle files and build notes for the umodular

As promised, attached to this post you’ll find the schematics in PDF and the eagle files for the umodular. Released as open source hardware, so hack away and please provide feedback! The eagle designs are not editable using the free version because of the size of the PCB, sorry. Check the list below; one of the outstanding wishes is to divide the large board into smaller, attachable boards – all below the 100mm x 80mm constraint.



Following is a list of todo’s, build notes and other observations I did while building the prototype. Future versions will include features and fixes from this list.

vco: own design, open source and open source hardware
vco: replace CA3046 with modern matched transistors BCM847DS
vco: pulse should also work, even without controlling it through PWM width with a voltage
vco: triangle out
vco: sine out
vco: trimpot for base frequency
vco: option to follow osc 1 pitch

vcf: for now working with MFOS “Simple State-Variable VCF” design, open for non-commercial use but (c) Ray Wilson
vcf: replace ray’s filter with own variant
vcf: voltage controlled resonance in LP filter
vcf: more filter options (BP, HP, LP)
vcf: dual filter?

adsr: Working with a design by Rene Schmitz, permission for use granted.
adsr: vc for d and s?

vca: cost effective to develop version without THAT 2180?

mix: Update mixer volume control. Sounds like highpass filter now

pcb: all TL274 -> TL074
pcb: fix potentiometer orientation. All pots are inverted! full left is now +5 should be -5
pcb: check log pot instead of lin pots
pcb: footprint 78xx != footprint 79xx! Replace footprint of 7909 with actual footprint!
pcb: a nice manual routing, reducing the amount of via’s. Busses for power.
pcb: general layout
pcb: add small capacitors for decoupling
pcb: integrate Arduino more
pcb: split pcb in two for better shipping etc? multiple parts, max 100*80 to also enable eagle free software
pcb: add designators for capacitors! value, type and placement. For all components!

power: work on a DC adapter solution
power: replace the 6 3300’s with 6×1000’s because 2×3300 seems to be enough power

functional: Have “standard” switchable (flip switch) connections between vCO’s VCF VCA and mix out
functional: Dual/triple VCO mixer
functional: all individual modules with dedicated cv and audio paths? Save in shipping, saves in prototyping costs.
functional: have a module connector with +9v, GND, -9v and 4 audio and 4 cv paths. Modules can grab audio or cv from one of the paths and return audio or cv on the paths.
functional: 4 oscillators with LFO switch
func: digital LFO using Arduino

vcf: 560nF -> 560pF
adsr: replace 10uf with 10nf or 1nf
adsr: R72 -> 1k
adsr: R86 -> 1k
vca: 1n34a -> 1n60 (1n4454)
vca: QUAD_OPADMPP TL274-6A should be non-inverting
vca: add 100ohm to GND and 1000uF to GND inbetween TL274-6C out and THAT2180A pin 2.

edusynth, the boards!

Boards have arrived from China, PCBWAY.com. Fast service! Ordered 10 board 24 hour rush on friday night because of Chinese new year and tuesday (today) the boards have arrived already. Boards look great, unfortunately green because of the 24h rush service but good quality.  20160202_212549 copy-1600  Unfortunately I made some errors, which I’ll document here for future reference.

The picture above shows the board missing Eagle layer 25 (tNames) which I used to designate the input and outputs pins… Illustrated below:


The Gerber file for production was created (by me) without this layer. I have to better check the Gerber’s in the next round.

20160202_212606 copy-1600

The holes to mount the board are only 2mm which seems too small to be of actual use. Well, during construction of the boards I might find a handy solution. Next time: bigger mounting holes. Also, the holes for the capacitors are too small. Update the capacitor footprint for the next time.

20160202_212619 copy-1600

The footprint for the various pots have a small error. The drilling holes for the three connectors are as big as their soldermasks, resulting in soldermasks being completely drilled away. Measurements with a DMM indicate that the holes will work because of the through plate connection. Next time: fix footprint for pots

20160202_212717 copy-1600

Last one (rotated). Some traces are very close to the edge of the board. Extend the board a little with regard to the traces.

Now on to the actual construction!

edusynth, getting there!

Making progress! Because of the start of a new semester at my university, I tried to finish a first version of the edusynth. And, also to my own amazement, I did! Here’s a first 3d brd view of the eagle file:


Dual VCO, VCF and VCA. Dual ADSR and a number of OPS (CV, mix and split). Board are ready according to pcbway – I’m waiting for delivery… First try outs to follow. Also, the edusynth is full open source / open hardware thus schematics and code also underway.

edusynth, successor to senk

Not out yet and already succeeded… poor Senk ;)

Anyways, now presenting edusynth with an updated VCO design because the previous design had bad performance over 500hz. Also, hardsync is an option here and sounds absolutely great! Here’s the ltspice schematic: edusynth_vco1

and the amplifier and output section:edusynth_vco2

understandable and low part count. Nice.

Senk, a 5v µModular

Been busy building a 5v µModular system for students to learn about and experiment with sound. Design should follow the classic synth setup like for example a Minimoog, with added patchpoints. Part of the design is finished, as follows:


Input of [1] is an Arduino PWM wave. This wave is passively filtered to a DC voltage (ranging from 0v to 5v). This resulting voltage will be one way to drive the voltage controlled oscillator. [2] is necessary to shift the voltage to a more musically interesting range including lower frequencies (-2v to 3v). The range is not amplified to i.e. -5v to 5v because the Arduino PWM only has limited resolution (10 bit = 1024 values). The shifted voltage is inverted because of the sawtooth oscillator under [4].


[3] shows the voltage scaler (1v -> ~18mV) and the exponential converter as already discussed on sinneb.net.  The 1k tempco should be coupled to the CA3046 array.


and finally [4] shows the sawtooth core for the Senk. Previous designs of me had an inverting schmitt trigger followed by an inverting buffer in the waveform reset loop. This design features a non-inverting schmitt trigger, sidelining the inverting buffer and a number of resistors. Deploying of the BC550 resulted in the best waveforms, as shown by this youtube video:

Next features I’m working on:


Oscillator pulse out, oscillator sub out and mixer section.

Screen Shot 2015-12-08 at 22.23.45

Mixed waveform looking cool in simulation :) Output needs AC coupling.

A temperature controlled CA3046

So, finally started work again on the heated CA3046. First, the results of the previous post regarding the CA3046 were reexaminated. Indeed, when building the schematic from that post: tempchip

and heating that circuit with a hair dryer:

the base voltage of the NPN transistor changes along with the temperature.

The next step I took was connecting that output to an opamp comparator to be able to switch a heating circuit on and off. Passing a certain voltage level, should turn off the heater. Tested with LED’s and, once again, the hair dryer:

Ah, nice! The heater section is inspired by one of the (great!) electronotes from the past (S-019). The LED section of the circuit was given an own comparator because the heater and the temp sensor are in so close balance, that the opamp doesn’t switch to negative.

And the result, the schematic:

Screen Shot 2015-10-29 at 12.29.47

Nice touch (I think) is that the circuit contains 2 LED’s: one is lit when the CA3046 is not at temperature and the other lights up when the CA3046 is at temperature (because of the comparator U1).

Next step: combine this heater with the actual exponential converter circuit.

Oh don’t forget to GND the substrate of the CA3046 (pin 13). Update: or should this be the most negative potential (-15V?). Better be sure before connecting that CA3046…