PS201 - MIDI to CV

by Antti Pussinen and Wolfgang Spahn

UsbMidi/Midi to Controll Voltage converter is the interface that lets other computers, synthesizers and controllers integrate into the modular synthesizer world. While an old standard, Midi keeps its place as the universal data connector in synthesizer world, as well as for other creative controllers ranging from vj and dj controllers, to custom diy button banks, and media artworks.

Control voltage is the analog old school version of midi, where change in voltage means a change in pitch or some other parameter. One instrument is represented as a Volt/Octave output changing the pitch, Gate output telling if the note is on or off, and velocity output, changing the dynamics of the sound.

Our midi to cv offers two of such instruments, with additional midi clock to clock output, and two midi cc to cv output. The converter talks with both USBmidi and normal Midi via midi cable.

The converter offers:

  • 2 x 1V/Oct CV Out
  • 2 x Gate Out
  • 2 x CV Out (velocity)
  • 1 x Clock Out
  • 2 x Assignable Midi CC Out

It is powered over standard Eurorack power connector (+12V,-12V). A 12V powered box is also possible with adding an dc-dc converter in the box.

The Circuit is built around an Arduino Pro Micro controller, and a two channel precision digital-to-analog converter.


Hardware

Schematic

Midi In, Out or Thru:

Controll Voltage:

Board for Eurorack

USB powered board

ATTENTION! Powering this version with anything more than 5 volts will destroy the Arduino board IMMEDIATELY!

ps201_-_midi_to_cv_12-usb_powered.pdf
ps201_-_midi_to_cv_12-usb_powered_printout.pdf
ps201_-_midi_to_cv_12_usb_powered.zip

Faceplate

Parts

  • Resistors:
  • 3x 220 Ohm
  • 1x 910 Ohm
  • 14x 1 kOhm
  • 3x 2 kOhm
  • 1x 3.3 kOhm
  • 1x 10 kOhm
  • 1x 12 kOhm
  • 8x 27 kOhm
  • Capacitor:
  • 8x 1 nF
  • 1x 100nF
  • 1x 2.2 µF ELKO
  • Diodes:
  • 1x 1N4148
  • 4x Low Current LEDs (2mA)
  • Semiconductors:
  • Arduino Pro Micro
  • LM4040c41 (Precision Voltage Reference 4.096V)
  • MCP4922 (Digita Analog Converter)
  • TL072 (Op Amp)
  • TL074 (Op Amp)
  • 6N138 (Opto Coupler)
  • 74S04n (Hex Inverter)
  • ONLY FOR USB POWERED VERSION: AMD-0512DZ (DC-DC Converter)
  • Mechanical:
  • Push Button
  • 3 Pin & Jumper
  • 3x 14Pin IC Socket
  • 2x 8Pin IC Socket
  • 9x jack sockets (Thonkiconn)
  • MIDI Socket
  • 16Pin Ribben Cable Socket
  • 160x100mm 2.54mm raster stripboard

—-

Software

MIDI to CV code

The MIDI to CV code for the Arduino Leonardo Arcore is here on Github:
https://github.com/dernulleffekt/midi_to_cv.git

Arduino IDE hack

ARCORE USB-Midi hack for the Leonardo. One has to modify the Arduino IDE to run MIDI over USB.
https://github.com/rkistner/arcore

Arduino MIDI Library

The Arduino MIDI Library v4.2 for Midi over TX/RX is here:
https://github.com/FortySevenEffects/arduino_midi_library


Installation Guide

How to setup Arduino IDE for uploading or editing MIDI TO CV software on …

LINUX
  • Make sure that Arduino IDE is version 1.5.4 or higher.
  • Download the Arduino Midi Library, unpack it and copy it into /usr/share/arduino/libraries/ or in you Arduino-Sketchbook/libraries/ folder.
  • If not already there install “libtinfo”
  • Then download arcore-master.zip and folow the instruction on the Arcore-Side.
  • If that didn't work copy the folder avr and sam to …/arduino/hardware/arcore/
  • And if not already there copy: avrdude, arduino64, arduino.conf to your /arduino/hardware/tools/
MAC
  • First make sure that the version of Arduino IDE is version 1.5.4 or above.
  • If you install Arfuino for the first time, open it once, so it creates all the necessary folders in right places.
  • Download Arduino Midi library from the link above and move the downloaded “MIDI” folder into …/YouUserName/Documents/Arduino/library/
  • While you’re there, make a new folder into Arduino folder and name it hardware.
  • Then download arcore-master.zip from the linked github page.
  • Move the unzipped arcore-master folder into newly created hardware folder in …/YourUserName/Documents/Arduino/hardware/
  • The last thing is to move some stuff inside arcore-master folder. In Arduino/hardware/arcore-master/hardware/ there are two folders named avr and sam. They need to be moved up one folder, so that instead of being inside hardware folder, they are inside the arcore-master folder.
WINDOWS

*Download midi library from the link and unzip.

*Move MIDI folder to …/program files/arduino/library/

*Download arcore-master.zip from github and unzip.

*Move arcore-master folder into …/program files/Arduino/hardware/.

*Inside …/Program files/Arduino/hardware/arcore-master/hardware/ folder, you find two folders, aver and sam. They need to be moved up one folder to …/Program files/Arduino/hardware/arcore-master/

*Open Arduino software and select Arduino micro(archer) board.


Knowledge

The Arduino Pro Micro clone

https://www.sparkfun.com/products/12640

The cheap chinese clones don`t have the 3.3V converter on the board, they have a 5V converter. That means when powered over USB the Pro Micro runs on 4.7V. To close the jumper will avoid that (it´s next to the USB socket). But never power the Pro Micro again over the RAW input! Check the original sparkfun schematic for details.

LM4040c41 Precision Voltage Reference
Digital-to-Analog Converter MCP4922
Filter
Fast PWM

A super tutorial for the fast PWM on Arduino Leonardo:
http://r6500.blogspot.de/2014/12/fast-pwm-on-arduino-leonardo.html.
Due to the fact that the Pro Micro has no pin 11 or 13 I had to activate fast PWM on pin 5. It is the complementary channel A and thats why all values are 255 - value.

And here's the code:

void pwmSet5(int value)
{
 OCR4A = 255 - value; // Set the negativ PWM value
 DDRC |= 1 << 6; // Set Output Mode C6
 TCCR4A = 0x42; // Activate the complementary channel A
}
MIDI Library

Here are the links for the MIDI library for MIDI over the serial pins (TX, RX).
MIDI Library 4.2
MIDI Library Callbacks Description

MIDI Specifications

Modifications

Clock Divider Switch (coming soon)
A board and code for adding a rotary switch for selecting midi clock division

Duophony (coming soon)
A modification to control two synth voices in a duophonic arrangement. A rotary switch is added to switch between two separate midi channels, unison, duophony and different voice stealer arrangements while in duophony mode.



~~DISCUSSION~~