Wednesday, February 26, 2014

MIDI2VC, output levels

I haven't been writing a lot about the project in a while. This is because I have been working on some solutions and I haven't wanted to write about them before they were solved. So, first thing first:

Lost MIDI symbols

The lost symbols I wrote about in the last post seems to be an issue with the MIDI keyboard. I tried using MIDI ox instead, which worked. I tried another keyboard, also worked. Right now, I'll leave it there. When I go back to work I'll troubleshoot this with a digital scope.

MIDI2VC calibration

I realised there was to much work calibrating the MIDI2VC by hand. There are 48 keys to be entered in a look up table, which may need recalibration under various conditions. No good. 
 My first idea was to use the PICs ADC to read the DAC outputs and do the calibration. The ADC is 10 bits, and my thought was to do some measurements and then do a least squares fit to find the right values for the DAC. This proved difficult due to the large numbers needed to be multiplied. Also, a quick test showed bad accuracy.
 The solution was instead to swap the 4.096V voltage reference for a 5V, and bypassing the 1V addition. This way the output is only dependent on the voltage reference and the DAC. I believe their accuracy will be enough. Some small offsets in voltage will not matter much, since the VCO will still need to be tuned. The important factor is the linearity of the DAC, and reading the data sheet shows that it should not defer more than two bits. Two bits is about 2mV, and should not be audible.
 Anyhow. I'm trying out this and working on a new PCB simultaneously. The new approach seems to work, but there is a problem when playing MIDI-keys to fast. I believe this is caused by the PIC having to much to do in the interrupt routine, and I'm working on rewriting some of the code to get this fixed.