Hello. I'm designing a MIDI to CV converter with Arduino. Arduino receives 0-127 values of notes, and along with the DAC and opamps it generates a DC voltage according to each note, in a 1v/oct scale, this is 83,333mV each note. Right now the MIDI part doesn't matter.
I'm using a DAC0808 which is 8bit. I have it connected like this but using 15v ref instead of 10v http://ecee.colorado.edu/~ecen4618/dac0808d.gif but I used 4.7k instead of 5k. I'm just starting with DACs so there are things I don't understand.
Well, i'm just using 7bit of the converter, then the Vo goes to an opamp to scale it to 1v/oct.
I write the DAC like this:
for(byte nBit = 0; nBit < 8; nBit++){
bitNota = bitRead(nota, nBit);
digitalWrite(nBit, bitNota);
}
I just read each bit of a byte, and write it to the DAC. Every 12 notes(octave) I should have 1V. At the output of the DAC i scale it to 1v/oct like this http://musicfromouterspace.com/analogsynth_new/THE_CAVE/MIDI%20to%20CV%20Old%20Design%20I/midi2cv_files/D2Aconvert.gif but without the offset adjustment.
If I look at my DVM, it looks like it's ok, first octave is 0,996V, second octave 1,99V, third 3V and so on. But when I look at the smaller steps between each semitone they're not scaled at 83,33mV. They're close, pretty close but just not there. And a very small diference is noticeable when I connect it to a VCO.
I read here Midi to CV Gate Converter – Obsoletetechnology that he had the same problem, but he shifted all the bits one to the left, this is, leaving the LSB at 0, this however would double the scale, so I changed the op amp gain to atenuate to 1v/oct scale. It was better I think.
Now the questions
is it just that the DAC isn't precise enough? Why would a 12bit DAC be better?(i read that by shifting all the bits to the left and leaving the 4 lsb would make it more precise)
maybe the scale goes off at my op amp scaling? How can I generate 83,33mV steps directly with the arduino and the DAC?
I can get some AD7541AKN 12bit, would it be better? Or I also can get a MCP4922 which is a 12bit dual DAC, and i've seen it used a lot in MIDI-CV devices
is it smart to use a 12bit DAC when I only need 7bit?
What is a good Vref to use? Apart from being stable, supposing I only need a range from 0-5v, should I use a ref of 5v or 10v?
lot of questions... i'm just starting with DACs and reading a lot, but i'm still confused.
thanks