Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

connecting two DACs to double the digital to analog precision

Status
Not open for further replies.

Garyl

Full Member level 5
Full Member level 5
Joined
Mar 28, 2017
Messages
253
Helped
6
Reputation
12
Reaction score
7
Trophy points
18
Visit site
Activity points
2,633
I was looking for DAC for project, I need at least 16 bits of precision, or maybe even more (few more at least, 18 bits would be good, 24 would be already too much), and I checked here:
https://www.microchip.com/ParamChartSearch/chart.aspx?branchID=11028
but those DACs are only up to 12 bits!
My question is, can I use two 12 bits DACs to get 24 bits of precision?
 

Hi,

I assume when you say "precision" you mean "resolution".
I recommend to look at a distributor for a wide area of different DACs and different manufacturers.

Using two 12bit DACs gives only theoretically 24 bits resolution.
But you need to learn what DNL and INL means.

While you may improve resolution...I doubt you will improve precision significantly.

Klaus
 

Precision, yes. Accuracy, not bloody likely. You
"could" make the second DAC's contribution scaled
down to 1/4096 LSB of the first. You will not be
able to dead-match the internal values to the
external ones you will necessarily use to connect
them, so you would be looking at a one-off tweaked
in assembly (also not holding up over temperature
in all likelihood) to get close to your goal, presuming
you meant "accuracy" and "repeatability" and
"stability" along with your request.

Consider a simple 2^N:1 ratio summing network and see
what a lashup of cheap 12 bit DACs (or even cheaper
8 bit, 10 bit) does and what it costs (expect settling
time, major carry DNL, maybe strict monotonicity).
 

Will using the single "port expander" chip with 16 outputs as simple DAC give me more precision?

I mean, just get 16 IO binary pins working and connect them with resistors to make analogue output.
 

Will using the single "port expander" chip with 16 outputs as simple DAC give me more precision?
This way, you'll have a hard time to achieve at least 10 bit precision.

You didn't yet specify the DA application. If it's very slow data rate, discrete sigma delta or PWM might be a solution. Otherwise consider a precision DAC from a major manufacturer (Analog, TI, Linear). Or give up.
 

You didn't yet specify the DA application.
I want to replace the potentiometer in the variable frequency oscillator circuit for the radio receiver.
The circuit is such or similiar:
vfoschematic.png
I need to control the voltage with MCU instead of potentiometer.

I've been also considering using software PWM for that but right now I am trying the simpler (I hope) approach.

This way, you'll have a hard time to achieve at least 10 bit precision..
I'm not sure about that. I've seen other project where guy replaced pot with simple DAC made of resistors ladder and two 74HC595 here:
(check the schematic):
https://serwis.avt.pl/manuals/AVT5527.pdf
and he claims he got 16 bit (2^16 = 65k~ states) resolution that way.

Otherwise consider a precision DAC from a major manufacturer (Analog, TI, Linear).
Is there any 16+ bit DAC in DIP package and in reasonable price?
https://mouser.com/Semiconductors/D...-Converters-DAC/_/N-4c44d/?P=1z0w2wt&pop=4f3l
 

Is there any 16+ bit DAC in DIP package and in reasonable price?
You can check the vendor and distributor search engines. I see e.g. AD7849 in DIP package, LTC1655 has been already suggested.

he claims he got 16 bit (2^16 = 65k~ states) resolution that way.
He's also specifying 1 % ladder resistors. You can calculate respective worst case steps in linearity curve. There can be e.g. a 0.5 % of range unreachable dead band in the center.

You don't get more than 8 bit resolution with 1% resistors.
 

You can make like this with 0.1% resistors. I am not sure if 1% resistors will work fine or not.

The simulation shows 24 bit DAC using R-2R ladder and 3x 74HC595. If you can get good resistors for cheap then you can build it and use it.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <built_in.h>
 
sbit SH_CP at GP0_bit;
sbit DS    at GP1_bit;
sbit ST_CP at GP2_bit;
 
unsigned long i = 0;
 
void HC595_Send(unsigned char data_) {
    unsigned char mask = 0x01;
    unsigned char j = 0;
    
    for(j = 0; j < 8; j++) {
       if(data_ & mask) {
          DS = 1;
       }
       else {
          DS = 0;
       }
       
       mask <<= 1;
       
       SH_CP = 1;
       Delay_us(100);
       SH_CP = 0;
    }
}
 
void HC595_Strobe() {
    ST_CP = 1;
    Delay_us(100);
    ST_CP = 0;
}
 
void main() {
 
    CMCON0 = 0x07;
    ANSEL = 0x00;
    TRISIO = 0x00;
    GPIO = 0x00;
    
    Delay_ms(100);
    
    while(1) {
    
          for(i = 0; i < 16777216; i++) {
              HC595_Send(Lo(i));
              HC595_Send(Hi(i));
              HC595_Send(Higher(i));
              HC595_Strobe();
          }
    
    }
}




Code for quick testing.


Code C - [expand]
1
2
3
4
5
6
7
for(i = 0; i < 16777216; i = (i + 3355443)) {
              HC595_Send(Lo(i));
              HC595_Send(Hi(i));
              HC595_Send(Higher(i));
              HC595_Strobe();
              Delay_ms(1000);
          }

 

Attachments

  • DAC - Rev A1.rar
    42.4 KB · Views: 171
Last edited:
  • Like
Reactions: Garyl

    Garyl

    Points: 2
    Helpful Answer Positive Rating
Hi,

Forget about making your own DAC with a resolution of 10bits and good precision.
It's not worth the time and the money.

8 bits is easy, 16bits about impossible.

Klaus
 

>You don't get more than 8 bit resolution with 1% resistors.

This is true if you insist on a R-2R scheme. The major
carry is a b!tch. Whether "resolution" in this particular
case equates to DNL (which is what the major carry
hits foremost) is for the OP to decide / declare. Again
it's accuracy (across all points) vs precision (raw bit
count).

It's also useful to distinguish between 1% tolerance
discretes, and matched-set resistors. The IC world lives
mainly by matching of 10%-make-tolerance sheet resistors
(with a bit of trim when you get fancy). Discretes have no
intrinsic match but SIP resistor networks can be a lot
better (although, matching any two given ones and you
are back to square one).

I still think the voltage mode major / minor summed
DAC may be the ticket. Especially if minor weight is
trimmed in correctly.
 
Last edited:

The present discussion was related to discrete resistors and R2R ladder topology.

High resolution DACs (with the exception of single bit sigma delta) aren't feasible without correction tables and /or trimming. One prerequisite for digital correction is however bit redundancy, otherwise linearity errors aren't correctable.

But that belongs to the analog IC design topic and is obviously beyond the scope of the original question.

In this scope it's simply misleading to use off-the-shelf 1% (or even 0.1 %) resistors and claim 16 or 24 bit resolution. If you use 0.1 % and hope for a typically better matching, you probably reach 12 or 13 bit, that's it.
 

So, to sum up, the guy in the mentioned article is wrong with his "16 bits of precision DAC ladder"?

Okay, one more question... when building the 8 bit DAC (let's stay with 8 for now), is there any difference whether the resistors are driven by:
a) HC595 shift registers
b) MCP23017 IO expander (I2C or SPI version...)
c) directly by MCU pins?
I assume that c) is the fastest way (fastest state change), but then is a) or b) faster?
 

Hi,

You want some kind of "analog performance" where voltages and resistances matter, therefore I won't rely on digital pins, but use analog switches.

Klaus
 

Any of the solutions can be good for 8 - 10 bit performance assuming CMOS push-pull outputs. Basic limitations are
- the logic supply voltage acts as reference
- MCU and other complex ICs involve a certain internal voltage drop between VDD and GND pins and output drivers which add as output voltage error

Low cost 8 to 12 bit DACs would be preferred though.
 

Okay, now....
How do I convert 0-3.3V from MCP4922 DACA to 0-8V?
 

Hi,

Amplify with gain +8/3.3.

"+" means non inverting. Look for noninverting Opamp circuit.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top