Gakken SX-150 MIDI Interface

SX-150 MIDI Interface

Gakken SX-150 synth, with MIDI interface circuit
Gakken SX-150 synth, with MIDI interface circuit.  A Sparkfun AVR programmer was used to program the attiny2313 microcontroller used in the circuit.

The Gakken SX-150 synth has a stylus which is touched on a continuous strip to control the pitch of the sound. It’s hard to play tuned notes using the stylus and so a MIDI interface for the SX-150 is a good mod to make the synth more usable. For this reason, several MIDI interface designs have been developed, including designs by RJ, Stray Technologies, Narbotic Instruments and Mrbook. All of these interfaces convert MIDI to a voltage (MIDI to CV interface) which is connected to the stylus.

The Narbotic and Mrbook design are both Arduino based, the others microcontroller based standalone circuits. I’ve had a go at making RJ’s design, prototyping it on a breadboard. The circuit works well, although as RJ points out, the accurate tuning range is about 2 octaves. Beyond that, the tuning needs tweaking to the higher octaves using the pot included in the circuit.

 
 
SX-150 MIDI Interface Breadboard

The circuit uses all the components described by RJ, except I swapped the TLP552 optocoupler for a 6N137. I used avrdude to program the attiny2313 microcontroller using a Sparkfun AVR programmer.

One gotcha that’s worth pointing out in getting this circuit to work is that the attiny2313 ships programmed to use the internal clock oscillator at 1MHz, but the circuit is designed to work at 20MHz using the connected crystal. The serial interface to the MIDI input is set up in the code to work at 20MHz, and will not work at 1Mhz. This is because, roughly speaking, the UART in the attiny2313 cannot be set to run quickly enough to accurately receive MIDI at 31.25kHz baud for a system clock of 1MHz in asynchronous receiver mode. The clock can be set to use the external 20MHz crystal by programming the ‘configuration fuses’ using avrdude. The oscillator configuration is set in the lower fuse bits. These can be read using avrdude as follows (this is for a Sparkfun programmer, option -c may need to be changed for other programmers):

avrdude -c usbtiny -p attiny2313 -U lfuse:r:-:h

Avrdude shows the default lower fuse configuration as 0x64. To use the external 20MHz crystal, the following avrdude command can be used:

avrdude -c usbtiny -p attiny2313 -U lfuse:w:0xE8:m

The attiny2313 should be ready to be programmed with the hex code provided by RJ. This can be uploaded using avrdude using the command:

avrdude -c usbtiny -p attiny2313 -U flash:w:SX150MIDI.hex

Update: I prototyped the MIDI interface onto a stripboard to have a permanent version of the circuit, here it is:

SX-150 MIDI Interface Complete

SX-150 MIDI Interface Stripboard
The prototype stripboard. A programming header (top centre of board) is included for programming the attiny2313 microcontroller with the Sparkfun AVR programmer.

Update 10/22: RJ’s original project page doesn’t appear to be online any longer so I’ve made a copy of RJ’s firmware available for download here.

The schematic for the interface is shown below.SX-150 MIDI interface schematic

Gakken SX-150 Synth Kit

The Gakken SX-150 analog synth kit, distributed by Make, came in stock again recently and so I ordered one. Here’s the finished article:

Gakken SX-150

This is a nice kit for anyone starting out making, it simply screws together (no soldering needed). The SX-150 is played with a stylus with a continuous contact strip, there are no individual contacts tuned to notes, unlike the Stylophone. This makes it hard to play notes, but is good for sliding pitch effects. However, because it has a small but fully analog synthesis circuit, it can still make usable sounds. Make have published a hack to allow it to be controlled by MIDI which should make it usable for playing notes and sequencing.

The instructions for the SX-150 describe the principles behind the analog synthesis circuits so it’s potentially a good starting point for creating analog synth circuits or maybe even hacking the SX-150 itself. One hack could be to add more synthesis controls such as LFO depth and resonance level, amongst others.

Gakken SX-150 PCB Front
SX-150 PCB front, the controls and synth circuit capacitors are mounted here.

SX-150 PCB Back
SX-150 PCB back, most of the synth circuit components are surface mounted here.

The kit comes with a chronicle of synthesis which includes a section on hacking projects. I guess it would help if you can read Japanese… although a few ideas can be got just from the images.

Gakken Synthesizer Chronicle
Gakken Synthesizer Chronicle.

SX-150 Box
SX-150 Box.