PWM-ing the LSB of a DAC - Page 1
Forum section: electronics / projects

author: Circlotron
author_rank: Super Contributor
timestamp: December 03, 2021, 08:42:35 am
content: Say we have an 8-bit DAC that we want to squeeze a bit more resolution out of. We could PWM the LSB at one of 16 different pulse widths, and provided we do it rapidly enough and then low pass filter it we have greater analog resolution. What would it be though? 12 bits or only 11?

author: fcb
author_rank: Super Contributor
timestamp: December 03, 2021, 09:18:52 am
content: Can't see why it wouldn't work. Probably DAC dependent to some extent.As for theoretical resolution, look at it as a 7bit DAC plus a 4bit DAC = 11 bits.Upsides:Settling time for large transistions reduced considerably due to hybrid nature.Much faster than a pure PWM DAC.Uses an 8bit DAC which *might* be cheaper/more available than a 12bit DAC.Downsides:Slows down throughput by at least 16x (11bit) to 32x (12bit)Device dependent - might be some anomalies in the rise/fall times of the DAC leading to non-linearaties.Filtering will be more complex, probably get best performance with a 3rd+ order filter - (opamps may be cheap and you might already be filtering elsewhere so perhaps not a downside).

author: artag
author_rank: Super Contributor
timestamp: December 03, 2021, 10:00:47 am
content: You can do it. It's called dithering.

author: tszaboo
author_rank: Super Contributor
timestamp: December 03, 2021, 10:08:09 am
content: Depending on the DNL and INL of the DAC, you might get better accuracy and resolution, or worse accuracy and better resolution.

author: Psi
author_rank: Super Contributor
timestamp: December 03, 2021, 10:19:55 am
content: It gets even more complex when you have 3 DACs and you use two to dynamically set the Vref min and max of the 3rd.

author: Circlotron
author_rank: Super Contributor
timestamp: December 03, 2021, 11:35:53 am
content: Quote from: fcb on December 03, 2021, 09:18:52 am

author: langwadt
author_rank: Super Contributor
timestamp: December 03, 2021, 11:53:35 am
content: Quote from: Circlotron on December 03, 2021, 08:42:35 amyou can also use deltasigma modulation, taken to the extreme with a single bit DAC

author: Berni
author_rank: Super Contributor
timestamp: December 03, 2021, 12:11:33 pm
content: Yep this is how delta sigma works.Most audio DACs you listen to only have around 1 to 6 bits of resolution, but they run them at >10MSPS and use modulation to get those 24bits out of them at audio frequencies. The faster your DAC is the more leftover samplerate you have to turn into extra bits. Tho there are practical limits to all of this, the DACs used for audio are particularly designed for being well suited for delta sigma.

author: peter-h
author_rank: Super Contributor
timestamp: December 03, 2021, 05:35:53 pm
content: Yes this is done with ADCs too - you inject noise into the input voltage and then take say 100 readings, add them up, and divide by 100, for a 10x resolution improvement.The problem is that you just get more resolution, not usually more accuracy, and the ADCs and DACs which are on-chip in most micros are crippled by noise, so the last 1-2 bits are just fiction.

author: fourfathom
author_rank: Super Contributor
timestamp: December 03, 2021, 05:50:08 pm
content: Quote from: peter-h on December 03, 2021, 05:35:53 pmNo, they are free dithering! (or not, of course, depending on the noise.)