ADC as DAC

Thread Starter

Kitt.Rainbolt

Joined Jan 16, 2026
36
So, I'm under the impression that there aren't a lot of cheap 16 bit through hole DACs out there from reliable suppliers.

There are, however, 16 bit through hole ADCs cheaply available.

I'm curious if anyone has tried this:
- Charge leaky capacitor circuit slowishly with microcontroller digital pin
- Check cap voltage with ADC, continue charging if below target, stop charging and let fall if higher than target
- Buffer voltage with op amp and send to destination

Slew rate target would be <1ms ideally.

Thoughts?
 

BobTPH

Joined Jun 5, 2013
11,505
If you only need such a low sampling rate (1KHz based in a 1ms ramp), then averaging a many readings of 12 bit ADC with a noise source added in may give the accuracy you need. 12 bit ADC can be found built in to many microcontrollers.
 

MrChips

Joined Oct 2, 2009
34,796
You can build an ADC from a DAC. You can also do the reverse.
But that does not make sense since building a DAC is simpler.

Another technique is to use PWM which can achieve very high resolution.
 

BobTPH

Joined Jun 5, 2013
11,505
but keep in mind that ADCs in MCUs are rather noisy. so even getting 12bit out of 12bit ADC is an accomplishment.
Oversampling requires that there is noise in the signal. It still produces more accuracy by averaging over many samples, the noise gets cancelled out as ling as it is symmetrical around zero. A 12 bit ADC that can sample at 1 MSOS could average over 1000 samples getting, theoretically, 10 more bits. I think it could reliably get 4 more bits.
 

Ian0

Joined Aug 7, 2020
13,126
Same problem that was identified in post #2. You would need 15ns resolution on the duty cycle to get s 1ms sample time.
I would suspect that processors that run at 200MHz or so would be able to clock their timers at 66MHz and produce PWM with 15ns resolution
 

panic mode

Joined Oct 10, 2011
4,973
agreed. but that means trading response time.

it helps getting lower SNR value or slower response.
and since built in ADC is noisy that 12bit is down to maybe 9bit. so with oversampling you boost it by 4bits to get 13bit. and that is pushing it. the other issue is that many built in ADCs are not able to run as fast. and that means reaching 12-13bit is just not practical unless system is ok with glacial response.

Arduino Uno/Nano only do up to 10ksps. that is 100x slower than your example. Arduino Due has different chip and can to 1Msps.
integrated ADC resolution is rather low, 10bit is common, often as low as 8-bit.

so, rule of thumb still holds: for higher speeds or more precision, use external ADC.
anyone hoping to get 24bit resolution by oversampling 8,10 or 12bit signal is dreaming.
 

Thread Starter

Kitt.Rainbolt

Joined Jan 16, 2026
36
Thanks for all your replies!

New idea. How accurate could an integrator be without a feedback loop?

Say, set the charge pin high for a specified amount of time to acheive a specific value.

In this instance, the cap would only discharge when a reset pin goes high or low or whatever.

I figure the resolution would be proportional to the charge pin's effective sampling rate and inversely proportional to the charge rate set by the charging resistor on that capacitor.

Low ripple, 0.1% accuracy, and <1ms response times are the goal here.

I also wonder if some sort of timing IC could handle this job more precisely?
 

panic mode

Joined Oct 10, 2011
4,973
i would not bother with 1-bit charge/discharge capacitor theme proposed by TS.

the cheapest reputable 16bit DAC with about 1ms settling time:
LTC1655 for THT package.
DAC8551 which costs 75% less than LTC1655 and SIOC8 is easy to hand-solder. also if DIP8 is wanted for breadboarding, use SMD/THT adapter board.
 

Ian0

Joined Aug 7, 2020
13,126
Thanks for all your replies!

New idea. How accurate could an integrator be without a feedback loop?

Say, set the charge pin high for a specified amount of time to acheive a specific value.

In this instance, the cap would only discharge when a reset pin goes high or low or whatever.

I figure the resolution would be proportional to the charge pin's effective sampling rate and inversely proportional to the charge rate set by the charging resistor on that capacitor.

Low ripple, 0.1% accuracy, and <1ms response times are the goal here.

I also wonder if some sort of timing IC could handle this job more precisely?
That’s precisely what a PWM output and a filter is doing. The filter capacitor charges when the PWM output is high and discharges when it is Low. The net outcome is that the capacitor voltage is the supply voltage multiplied by the fraction of time that the PWM output is high.

And the timer is the processor’s built-in timer.
 
Top