How realistic is the idea of MIDI to CV with a 16bit DAC on Arduino Mega2560?

CV - control voltage on synthesisers uses 1V per octave. With a 16 bit DAC, I have 65536 possible voltages I can output, I thought that this would be a good solid way of definitely being able to hit the required voltages for 60 notes over 5V.

Their position across the output of the DAC doesn't seem linear. if I output 13780, for example, it results in 1V being read on a multimeter (while being fed into an analog synth CV input to Oscillator) with a pitch of 300Hz. If I output 13280*2 to the DAC, it is 2.055v, with an audio note of 626Hz coming from the synth.

I can get over the fact that it might not be linear, I suppose I could use a look up table and only program in acceptable western notes on the chosen temperament, but, should I ever expect to be able to accurately output 1v (+/- 0.01v) when I press a MIDI key of 64 for example and 2v (+/- 0.01v) when I press MIDI key 76?

If I even touch the insulated wires, the voltage changes (of course I could enclose the system in a box).

Are there some trick to make a DAC work in a more accurate manner?

You can check the specs for the DAC chip. It might not be accurate or linear within 1-bit you should be able to find one that's "close".

You will need a stable, low-noise, power supply, and your VCO also has to be accurate & linear.

Of course regular MIDI is digital so you don't have that problem. I don't know that much about MIDI, but I assume CV is more often used for tremolo, vibrato, pitch bending, or volume control, rather than to set the absolute pitch.

Thanks, yes, CV is used for pitch control on older synths, and even modern analog synths (although not necessary, as MIDI isi usually included on modern synths).

I am discovering that if I include an offset of 630 on the output of the DAC, then multiples of 1v work accurately, and it is acceptable. For example 65536/5 (5 octaves over the 5 volt range) ~= 13108. Then if I add 630 to it (which seems to account for the drain of the Synth on the output of the DAC) then I can use OUTPUT 13108+630 = 1v and 131082+630= 2v and 131083+630=3v etc.

I have just touched the DAC and wires around it to test and it has changed voltage again to 1.042v instead of 1v with an output of 13108+630, but thankfully it still works on a per octave basis, by reading 2.042v with an output of 13108*2+630. I suppose I could use a built in ADC to read the output of the DAC to tune the voltage each time it is run.. Should be okay to do that?

Without knowing anything about your surrounding circuitry or physical layout, I will point out that a 16-bit DAC with a 5V range is outputting 76 microvolts per step. That is a very small number that will easily be affected by stray capacitance, terminal contact resistance (this isn't in a breadboard, is it?) or you touching the circuit or even just waving your hand above it. That could account for some of the behavior that you're seeing.

As mentioned previously, you need to start with a precision voltage reference that's stable and low-noise. All your circuitry has to be laid out properly since at low voltage levels, noise will be a significant factor. In short, you're doing low-level analog control and having a high-resolution DAC is just a start. I'm willing to bet that most arduino boards with 16-bit DACs or ADCs aren't properly laid out in a manner that will provide precision behavior.

That's assuming it is a measurement or control application. For audio it might not matter. I've used 16-bit I2S DACs for audio conversion and they sounded fine.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.