a modern take on the exponential converter

In the previous post, I investigated the possibility to replace the CA3046 and expo pair with modern components in a synthesizers’ exponential converter, while retaining the temperature compensation. Continuing on the findings from the previous post, I worked out a schematic:

Screen Shot 2018-02-17 at 14.27.49

CV inputs are summed in opamp U7, then scaled with regard to temperature over R1 through R4 for the expo converter build up out of a BCM847DS matched transistor pair. R1 is a specific SMD NTC thermistor. The value of R2 is calculated via a linearization formula I found on the internet. The actual value for linearization was something of 7.5k, but an Excel sheet approximation showed that 9k would work better in normal room temperatures (15 – 25 degrees). R4 determines the to-ground part of the voltage divider (with R1-R2-R3) and thus sets the 1V per octave setting and should be variable for a small part.

Simulation of 3 temperatures shows the following:

Screen Shot 2018-02-17 at 14.35.09

The top plot shows the difference in ua output over R7 for the three temperatures (20, 25 and 30 degrees Celcius). The bottom plots shows the outputs for the temperatures over R7, but this time compensated by the thermistor circuit. Yes, no difference!

Now on to building my first commercial Eurorack component. A triple VCO under the bennis|budge brand. Keep watching this space ;)

Replacing the CA3046 & understanding and replacing the tempco

Let’s get rid of the CA3046, because it’s large and almost obsolete, even the one in a SOIC package (LM3046). The temperature dependant resistor (tempco, 1k, 3300ppm) is also obsolute and very hard to source – so let’s also get rid of that. On this blog, the CA3046 part has been examined in depth, but the tempco part can use some investigation.

First the CA3046, a General Purpose NPN Transistor Array. The exponential converter only uses the matched pair transistors in this five transistor package. A suitable replacement is the BCM847 matched pair from Nexperia. I’ve read good stories about this transistor pair in exponential converters. So I’ve downloaded the LTSPICE model for the BCM847DS (BCM847 with acceptable reflow soldering package: SOT467) and did some experimentation, very much inspired by Rene Schmitz’s tutorial on exponential converters. Setup:

Screen Shot 2018-01-08 at 20.15.50

BCM847 matched pair is behaving correctly and shows a decent logarithmic response. DC sweep for V4 from -200mV to 500mV, measured current over R4. Vertical scale is logarithmic:

Screen Shot 2018-01-09 at 20.26.41

The control voltage for the exponential converter is thus set by voltage source V4. Mmm opamp U8 is not connected at all ;). Through the exponential converter, a voltage V4 related current is put out over R4. This outgoing current is influenced by temperature in a number of ways, but the one under investigation today is the room temperature effect on the thermal voltage. In spice with simulated temperature from 5C till 50C in steps of 5 the current over R4 this looks like this:

Screen Shot 2018-01-09 at 22.22.36

The thermal voltage determines the adjustment needed to the voltage from V4  to accurately double the outgoing current over R4. In calculations for a (nice, warm, cosy – but obviously standard?) room temperature of 300K (26.85C):

vt=kT/q -> 1.38064852*10-23 * 300 / 1.60217662 * 10-19 = 25.85mV

vt = Thermal Voltage, k = Boltzmann’s constant, T = temp in Kelvin, q = electronic charge.

Required for an octave: ln(2) * 25.85mV = 17.92mV. So if we increase V4 with 17.92mV, the current over R4 should double. But only if the room temperature, or better said the component package temperature, is 26,85C.

To better understand this relation between temp, thermal voltage, control voltage and current out, I created the following table:

Screen Shot 2018-01-09 at 20.13.55

The relation between temperature and thermal voltage and control voltage is linear. Further, per centigrade difference, there is a 0.06mV difference in mV. Instead of just feeding the 1V/oct control voltage from the panel / CV inputs / other inputs to the exponential converter, a temperature correction needs to be made. The exponential converter’s input cannot just be divided down from 1V/oct to 18mV/oct. Let’s have a look at the concerning schematic:

Screen Shot 2018-01-09 at 20.09.06

V4 above is in fact this schematic. Multiple CV inputs are summed and inverted. Thereafter, the resulting voltage is divided down to 18mV/oct. The tempco is shown, with a ppm of 3300. This tempco will be replace with a more current device, and based on above insights -> the divider should have a 0.06mV difference per centigrade.

Temperature compensation options: NTC, PTC and Platinum RTD. Platinum RTD is too expensive, PTC has too much tolerance over the resistance and the temperature sensitivity. So, that leaves NTC. I’d like a small NTC SMD component, to mount closely to the BCM847 matched pair and perhaps thermally bond both with resin. A search on Mouser revealed the following part as a good contender: TDK NTCG163JF103F. A narrow tolerance product in 1608 SMD shape, with a B of 3450 with 1% tolerance and a resistance of 10k also with a 1% tolerance. Probably little finetuning is needed with such tolerances.

From the datasheet I plotted the resistance values over temperature for this NTC:

Screen Shot 2018-01-09 at 21.50.48

Non linear. Fortunately that will be solvable by adding a fixed value resistor in parallel. Well, that’s up for now!

bennis|budge VCO v2.0 smd finished!

After a number of important revisions, the very first reliable, stable and interesting VCO is finished! Some features:
– Instead of a classic configuration where the sawtooth core is reset by a voltage comparator and a small capacitor, this sawtooth core is reset by a Schmitt trigger configuration, allowing LFO functionality by switching on an extra capacitor in the sawtooth core. This because the reset pulse does not rely on the size of the reset-capacitor but is determined by the Schmitt trigger.
– Double reset transistors over the same capacitor(s), one for the Schmitt trigger saw and one for the hard-sync in.
– Cheap, almost all components are easily available. The total cost of the base-board (without jacks, pots and PCB) is €6,-.
– Outputs: Saw, Ramp, Triangle and PWM. Multiple voltage inputs, of which a number are attenuated. PWM settable via input or direct via potentiometer.
– Base-board can be used without top-board in e.g. polyphonic configuration.
– Most resistors and capcitors are smd, saving PCB space but not having influence on the raw, gritty sound.
– Routed by hand ;)

Following is a link to a demo on YouTube where I’m learning to use 3 of these VCO’s together, the schematics in PDF and the schematics and board design in Eagle format.

bennis|budge VCO v2 schematics PDF
bennis|budge VCO v2 schematics and board Eagle

topviewVCO topview which shows the correction on the hard-sync input. Further SINE and LINFM were discarted. So, the topboard will need a revision ;)

20171217_090320All 3 VCO in perspective view. Switches are added to switch between VCO and LFO functionality.

New VCO prototype: bennis|budge VCO v1

So, finally I combined all experiences and experiments of the last couple of years into a new VCO prototype. And, IMHO it rocks!

In this post you’ll find some development notes, the LTSpice simulation files and the Eagle schematics and board design. The Eagle files correspond to the actual prototype version, the LTSpice simulation is already an iteration further. See following notes for the differences.

VCO prototype schematics png (viewable in browser)
VCO LTSpice simulation files (v1, released october 2nd 2017)

– The idea was to have both a heater and a tempco for the exponential converter. I found out that this combination was just impossible to tune and get stable. I did some experimenting with the tempco only and found that tracking and tuning were quite stable. Ditched the heater circuit.
– I designed a triangle converter which consisted of 3 opamps and a lot of additional components. Upon receiving the PCB’s I immediately decided not to solder that huge amount of components, but instead look for a smarter design. Right now I working with a Moog-like design (opamp and two resistors) which will need a little trimming but seems to be small and ok.
– I added a buffered rate indicator. Looks cool and the VCO can also function as an LFO.
– The simulation uses 2.2nF as the sawtooth core capacitor. The actual design uses 22nF which allows for ~6 tracked octaves in the 40-1200Hz range. Still working on optimalizations regarding the tracking and available ranges.
– Hard sync just sounds fantastic.

– Add potentiometers to the board for freq / tune and PWM
– Figure out a good way to combine onboard PWM with external input
– Redesign the header (get rid of the expo in / out, more GND outs?). Dedicated power header, 12V? Right now the prototype runs on bipolar 15V.
– Add thonkiconn’s for patching (ordered, are on their way from the UK).
– Design a nice casing / front in the fablab of Arnhem.
– Set up a group buy for the SSI2144 VCF – the new stage of development.

The company name on the VCO will be bennis|budge which is a combination of my last name, with the word “budge” which means to disturb or set into motion. Further does budge have a “budget” like sound to it – I like to keep the modules very affordable. And, bennis|budge does have certain burr-brown sound to it, the analog IC technology company from Arizona.

This all from the top of my head. Please use the comments for additions, corrections or encouragements ;)

Serial midi on the Raspberry Pi Zero W

The Raspberry Pi Zero W (rpi0w) has a lot of properties to make it a great musical instrument (CPU power, affordability, portability, power demands). First thing on my list is serial MIDI in, to hook up my octatrack. I compiled the following guide to equip the rpi0w with MIDI in.


  1. Install Rasbian (my version is 2017-04-10)
  2. Midi requires the serial device “/dev/ttyAMA0” to be exposed through the rpi0w’s header pins. Unfortunately, the bluetooth service is internally connected to this serial device and only the “/dev/ttyS0” soft serial device is available through the GPIO. Lets change this:
    1. Disable bluetooth: “sudo systemctl disable bluetooth.service”
    2. Add “enable_uart=1” and “dtoverlay=pi3-disable-bt” to /boot/config.txt
    3. Remove “console=serial0,115200” from /boot/cmdline.txt
  3. Midi has a typical baudrate of 31250, a non supported one by the rpi0w. Let’s reprogram the 38400 rate to behave like a 31250 one.
    1. Add “init_uart_clock=2441000”, “init_uart_baud=38400, and “dtparam=uart0_clkrate=3000000” to /boot/config.txt (each on its own line, do not add the double quotes). The 38400 baud rate will now operate at 31250 baud.

The last lines of your config.txt will look something like this:

Screen Shot 2017-04-26 at 20.10.59

Reboot your rpi0w to make the changes effective.

Upon login, install “wiringpi” to check the configuration of the GPIO. Issue a “gpio readall”. Physical GPIO pins 8 and 10 should display an ALT0 mode:


The configuration of your rpi0w is good to go!


On the hardware side, I followed Joseph’s instructions on SamplerBox, using this schematic:


Run the python program supplied on the SamplerBox page to test the Midi in. The python program should output “note on, note off” messages upon incoming midi notes.

Midi & Alsa

To hook up the midi input to the Alsa audio system, I’m using ttymidi. To install ttymidi, you have to make a small change in the Makefile.

  1. Download ttymidi with “wget http://www.varal.org/ttymidi/ttymidi.tar.gz”
  2. Untar and edit the toplevel Makefile, add “-lpthread” to the all: statement.
  3. Make and sudo make install
  4. Run with: “ttymidi -s /dev/ttyAMA0 -b 38400 -v”

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!