Question about DAC with Arduino UNO

Hi all,

I am currently working on a project that I need an adjustable voltage (3V, 3.5V, 4V, 4.5V) to feed in to the reference voltage input of the comparator. See the circuit diagram below.

I was surfing the forum and the playground from the Arduino website, there are few ways I can achieve the DAC from the Arduino.http://arduino.cc/playground/Main/InterfacingWithHardware#adcdac

[u]Using OpAmp[/u] http://www.avdweb.nl/arduino/simple-10-bit-dac.html [u]R/2R Ladder[/u] http://blog.makezine.com/archive/2008/05/makeit-protodac-shield-fo.html?CMP=OTC-0D6B48984890

[u]Here are my problems.[/u] 1) Which method do you recommend for my application? R/2R Ladder or the one using the op amp? 2) Can the ADC output an DC voltage (0 to 5V) ? 3) Am I using the PWM output pin to achieve the process of DAC?

Best Regards, tayip

More info required:
What is precision of the DAC, in bits (8 - 18) or volts (1mV - 0.5V);
How fast do you need to check on your voltage from input?

Magician: More info required: What is precision of the DAC, in bits (8 - 18) or volts (1mV - 0.5V); How fast do you need to check on your voltage from input?

Ideally, I hope I can get 0.1V precision of the DAC. No longer than 500ms would be fine.

1) Which method do you recommend for my application? R/2R Ladder or the one using the op amp?

Given the resolution go for the latter

2) Can the ADC output an DC voltage (0 to 5V) ?

No the ADC outputs nothing it is an input.

3) Am I using the PWM output pin to achieve the process of DAC?

You either use PWM or R/2R ladder you don't use both.

You will win no friends on this forum if you cross post. Please don't do it again.

Thanks for reminding, I was just not sure which forum to post, so I cross posted.

2) Can the ADC output an DC voltage (0 to 5V) ? No the ADC outputs nothing it is an input.

I am confused by your answer. For example, in a ideal case, If I input an 1kHz sine wave, 5Vp-p with 2.5V offset to the analog input of the Arduino, it should read the value from 0 to 1023 level moving up and down. 0Vp-p should read 511 ~ 512. Then if I output an PWM signal with a fixed value, 511 for example, to the DAC. The DAC should have 2.5V, right?