Cheap DAC and OP AMP for "20bit" C/V V/Oct?

Hi, After a long time having the perfect DAC for arduino and analog synths taking to much time for my brain I decided to test my toughs on breadboard and calculations.

There are a lot of cheap dual 8,10,12 bit DACs out there they are kind of low end but there is a trick that has been missed in a lot of builds I have seen. As an example take the easy obtainable DAC MCP4802/4812/4822 family.
In my case the MCP4812.

It is dual channel, internal voltage reference, 10-bit, SPI, Rail to Rail, and have a DAC Latch pin to change both DAC’s at the same time.
Well here is the nice part. Two DAC’s in parallel gives the double amount of bits if combined. Aka in my case 20bit for less than 2€. I will not include the OP AMP as that should be used as an buffer anyway.

Combining the DAC outputs to a inverting summing OP AMP and get the right gain on the second Inverting OP AMP will give me the range over 0-8 (almost 9) Volt at a resolution of 1/4 cent of pitch ! If my calculations is correct :wink:

Look at this and give me feedback if I’m into something or did something wrong in my calculations. The Iron is hot and the code is on the arduino nano.

One Cent is: 1 Octave / 12 notes / 100 cents
Gives in 1V/Octave one cent is 1/1200 of 1V = 0.0008333333V (8.333333e-4)

To ease math and only use unsigned int we could use 960 steps that would give us
120 steps / Octave and 10 steps for each note. We are actually reducing the resolution on DAC A to match 1 volt / octave and 12 notes in a octave (8*12 in 10 cent steps).
That is done by trim the total output gain to 8.00V ( Gain x 2.0833) at value 960 on DAC A. This will get the following tables:

//Octave-Volt = 0, 1, 2, 3, 4, 5, 6, 7, 8
octaveTable = { 0, 120, 240, 360, 480, 600, 720, 840, 960 };

// Note = A, A#, B, C, C#, D, D#, E, F, F#, G, G#
noteTable = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110 };

The reference voltage internaly on the MCP4812 DAC is 2.048V
Internal gain at 2x that gives 4.096V/1024 = 4 mV
0.0V to 1023/1024 * 2.048V when gain setting = 1x.(2mV)
0.0V to 1023/1024 * 4.096V when gain setting = 2x.(4mV)

With an additional gain of 2,0833x (960 x 4V / 1000) we will jumped to
2.083 x 4.096V / 1024 = 8,33 mV per step and that’s the magic number for 10 cent.

By reducing each note by 1 step we will always be around max 10 cents of.
This gives that the fine adjust on DAC B must be in the range of at least 20 cents.

20 cent is 1/1200 x 20 = 0,01666V
Using 1x gain on DAC B gives range 2.046/1024 = 1mV. Reducing to 1/200 in to sum OP AMP will give:

2.0833 x 0.0005mV per step at output and 0.0010416666V/step = 1/4 cent of tune.
A range of 2.0833 x 0.0005mV x 1023 = 0-1,066 Volt.

We do not like low voltages as they tend to get a lot of noise from other circuits.
The above calculations gives us the resolution needed and a range over one octave. If we offset the course DAC A into half octaves we will need to gain back that half in the fine DAC B and raising the voltage to around 1 V out from DAC and 0.5V to sum OP AMP in the above tables.

Later we could use a voltage divider to feed back the 0-8V to the NANO ADC and check the 0-4 volt range at 10 bit for easy calibrations.

Where am I wrong ?

// Agge

Here’s a couple of question and answer pages about doing this kind of thing:

A couple of quotes:

Combining two DACs in parallel for current summing would in theory lead to better resolution - if the device-to-device gain mismatches and clock skews could be calibrated out. But in practice the device to device mismatch in clock propageation would be an issue and precisely controlling the relative gain between two separate devices would make the proposition be not really feasible.

There are two main issues: Noise, linearity, and timing.

Nose is the easiest to understand. Noise in the first DAC will be added to noise in the second, resulting in more noise.

Next is linearity. The DAC has more than just noise on the output. Let’s say that you have a 2 bit DAC, so it outputs 4 levels. It should output 0%, 33%, 66%, and 100%. Instead it might output 0%, 25%, 82%, and 100%. This will make combining the output of the DACs together more difficult to do while increasing accuracy.

Timing is also difficult. And by that, I mean getting the various DACs to output the correct data at exactly the same time. If one DAC outputs it’s new value slightly ahead of the 2nd DAC then you could end up with noise and spikes where you don’t want any.

My limited experience with MCP4822 (12 bit) is that resolution is not as much of a limit on accuracy/precision as nonlinearity. Integral nonlinearity can be up to ±12 LSB. Combine two DACs and the nonlinearity in the high order DAC is effectively up to ±12x4096 = ±49152 LSB! If I’m thinking about this right and I may not be… but the point is it’d be nonlinear at a much, much larger scale than a real 24 bit DAC would be.

1 Like

Thanks for the reply.
I will read the links just after my response

I’m investigating my ideas right now. But true values is a bit hard to gain without real measurements on calibrated equipment. Timing of the dual DAC’s is done by it’s latch pin. This will send the buffer to both channels at the same time.

Second part is that this will not be good (latching) or precise enough for audio at descent sample rates but as V/oct or CV we do not actually need the same resolution. We need the resolution at the right place, “the cent”. Calibrating the gain and have a coarse table for the octaves and notes gives the possibility to have 10 bit (not perfect linear) resolution around each note. With 1K / 200K resistors at the summing inverted input we are at 1.25 cent resolution. Higher is possible but I think a higher resistor than 200K will introduce more noise than I would like

The possibility to actually calibrate the coarse and fine DAC’s with a lookup table is in my thinking the trick.

MCP4812 datasheet

On page 30 there is an example circuit for doubling the resolution

For this to be accurate you will need to use at least 0.1% resistors, as the ratio of those resistors will need to be very precise to realise the resolution you are seeking.

Well actually no. 0.1% resistors would give you a good linearity but we already got 10bits to mess with using a calibration table.

approx. 1Volt/1024 is our resolution and the 1/200 is the ratio into the summing opamp. The relation between them is not critical as we will use two calibrations tables for coarse and fine for each DAC.

To clarify my thoughts. We are not looking for resolution. The resolution for 1V/Octave is 10 x 12 = 120. We need precision for 10 Octaves Voltages and 12 Notes Voltages. That is at 120 points over 0-10 Volt
The resolution is not used as we are not doing 1V/Octave pitch bend over all 10 Octaves

OK, I think I might have missunderstood your methodology.