Pages: [1]   Go Down
Author Topic: A 12-bit R/2R serial DAC  (Read 1476 times)
0 Members and 1 Guest are viewing this topic.
India
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi folks,

Just wanted to post a 12-bit R/2R serial DAC I built. I couldn't get hold of a DAC IC, so I decided to try and build one:

http://electro-nut.blogspot.com/2009/08/making-12-bit-serial-dac.html

Thanks to the forum for helpful discussions.

Best Regards
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34541
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry to disappoint you but that is not likely to be better than 7 bits. For a 12 bit D/A you would need resistors that are matched to better than 0.0244%, the absolute value does not matter it is how close they are to the same value that matters.

You will not have what is known as monoticity (sorry that is not the correct spelling). What that means is that a binary code sent to the converter will not be guaranteed to produce a high voltage for a higher code.

Thanks for sharing all the same.
Logged

Niagara on the Lake, Ontario
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yup, the precision of an R/2R is defined as 1/([2^n]-1) where n is the number of bits. It can be done (I havent looked at your link) but your resistors likely arent as accurate as they need to be for a true 12-bit DAC
Logged

India
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the comments.

So is the measured response graph linear only because of the spacing between the readings?
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34541
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So is the measured response graph linear only because of the spacing between the readings?

Basically yes. Also the accuracy / repeatability of the voltage measurements would have an effect as well.

If you were to measure the voltage out and only change the number in by a least significant bit at a time you would see the graph bobble about like noise. However, as you zoomed out and plotted it on a larger scale you would see the line look smoother and more liner.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
he's not a real doctor
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Check me on this Grumpy
In college I hacked together an 8 bit D2A for a PC parallel port (with numerous flaws).   It was critical that it never "step backwards", each step had to be equal or greater than the previous.

I had access to a BIG drawer of "blue" (1%??) resistors and good digital multimeter.  So I measured until I got a reasonable matched set of resistors.  As I recall I only had to test two or three times the number I needed.  So with a big enough stash of resistors (1% if you can afford it) you can do a lot better than "off the shelf" values.   Not sure how much real world improvement in your D2A you could expect.

My end product also included at least 8 trim pots and was generally regarded with horror by those more knowledgable.  
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34541
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent drspectro.
That's the way to do it.
Quote
It was critical that it never "step backwards", each step had to be equal or greater than the previous.
That's another way of saying monotonic
Quote
Monotonic
A sequence increases monotonically if for every n, Pn + 1 is greater than or equal to Pn. Similarly, a sequence decreases monotonically if for every n, Pn + 1 is less than or equal to Pn. A DAC is monotonic if the analog output always increases as the DAC-code input increases. An ADC is monotonic if the digital output code always increases as the ADC analog input increases. A converter is guaranteed monotonic if the DNL error is no greater than ±1LSB

A good page is:- http://www.maxim-ic.com/appnotes.cfm/appnote_number/641/CMP/WP-36

Quote
My end product also included at least 8 trim pots and was generally regarded with horror by those more knowledgable.

No I think "the boy done good"  smiley
« Last Edit: August 06, 2009, 07:00:00 am by Grumpy_Mike » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
he's not a real doctor
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 MV - I did a few expeiments and I think your accuracy may be a bit better than expected and it would be pretty easy to increase it a lot.  Check me again on this guys...

I measured two batches of resistors from different suppliers.
1) both differed from the nominal value by about 2%
2) One batch varied by 1/2% plus/minus, the other by about 1% plus/minus.  Much better than the stated 5%
3) about 1/3 were very close to the average value.
4) assuming my Fluke meter is accurate to .1 Ohm

So - you could measure 20 or 30 resistors (probably fewer), calculate an average then sort out the ones closest to that for your 2R resistors.  Then pair up the ones that are a bit high with the ones that are a bit low for your parallel "R" resistors.  0.1% should be pretty easy to get just by dividing them into high, low and just right.  On paper I can get to the .0244% mentioned earlier if I match pairs carefully.  

You only need to test enough to get the number of 2R resistors you need.  You should be able to pair up the remainder from a pretty small sample.  If you do this DONT mix resistors from different batches....
Logged

Pages: [1]   Go Up
Jump to: