The EEG signal processing, classification and the translation into a control signal is done on a computer. This means that the computer needs to be able to send control signals to the synthesizer. There are in general two options for interfacing with a synthesizer: Midi and CV/Gate. Midi is a digital protocol over a serial interface and is trivially implemented with a computer. CV/Gate is analog, and not that trivial
There are MIDI-to-CV/Gate converters, like the Doepfer MCV4 and the Endorphin.es Shuttle Control, which allow a connection like this
Computer --MIDI--> converter --CV/Gate--> Synthesizer
The advantage is that they are available off-the-shelf and that sending midi commands from the computer is standardised. The disadvantage is that these converters are relatively expensive and that it adds to the complexity of the overall setup. Therefore we want to explore the possibilities for sending CV/Gate commands directly from the computer. For that I am currently experimenting with an Arduino based solution. The schematic looks like
Computer --USB--> Arduino --CV/Gate--> Synthesizer
Considering that the computer could be a Raspberry Pi rather than a desktop or laptop, it would not even be needed to use an Arduino. The Raspberry Pi has directly accessible digital I/O with similar functionality as an Arduino.
But for now the experiment is with an Arduino with this schematic (using a small 6×6 piece of perfboard for the MCP4725 breakout board) :
This is the actual implementation on a bread board:
It is based on an 5V Arduino Pro Mini and a MCP4725 12 bit DAC. It is connected to my laptop with an FTDI Cable. The Arduino is running this sketch, which supports the following commands:
*g1v0#
set gate 1 to 0, i.e. OFF (idem for gate 2 to 4)*g1v1#
set gate 1 to 1, i.e. ON (idem for gate 2 to 4)*c1v0000#
set control voltage 1 to 0/4095 = 0 Volt*c1v2017#
set control voltage 1 to 2048/4095 = 2.5 Volt*c1v4097#
set control voltage 1 to 4097/4095 = 5 Volt, this is the maximum
Right now there are two LEDs attached, the green one is connected to the binary ON/OFF gate pin and the red one is connected to the continuous control voltage. Typing these commands in a serial interface switches the green LED on or off, and allows to set then brightness of the red LED.
Limitations and possibilities
Extending the number of gates is easy, the Arduino has enough pins that allow digital I/O. Right now the code already supports 4 gates (connected to pin A0-A4).
Extending the number of control voltages is not that easy. The MCP4725 is connected over I2C and would allow for two devices to be simultaneously addressed. Scaling up the number of control voltages and DACs further up would be hard. An alternative to having multiple DACs would be to use a sample-and-hold multiplexer on the output of the DAC.
With the current design the control voltage is limited between 0 and 5 Volt, which might not be sufficient for the synthesizers we want to control.
Update – 6 Sept 2015
The Auturia Microbrute synthesizer uses 0-10 Volt for CV. This is not explicit in its documentation, but is mentioned in blog posts such as this, this and this.
To multiplex the output from a single DAC into multiple CV channels, we could use a sample-and-hold IC such as the TI LF398. To increase the output voltage from 5V (available from the USB port) to 10V, we could use a voltage converter such as the ICL7660 or the MAX1044.
2 replies on “Arduino based CV/Gate controller”
Hi.
I used a similar aproach using a mpc4725 but i had the same problem generating a 0 to 5 volts. I will use these chips you recommend for having a greater range.
The important limitation is that the output voltage is limited by the voltage regulator on the Arduino, which is not very precise (it was ~4.8V on the two that I built). On https://github.com/eegsynth/eegsynth/tree/master/hardware/usb2cvgate_4channel you can find a much improved design, using a DC-DC converter that outputs 12V and two double opamps that amplify the (very precise) 0-4V DAC output to 0-10V.