Go Down

### Topic: Question about DAC with Arduino UNO (Read 2525 times)previous topic - next topic

#### tayip

##### Mar 08, 2011, 06:12 amLast Edit: Mar 08, 2011, 06:24 am by tayip Reason: 1
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

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

Here are my problems.
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

#### Magician

#1
##### Mar 08, 2011, 08:06 am
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?

#### tayip

#2
##### Mar 08, 2011, 04:33 pm

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.

#### Grumpy_Mike

#3
##### Mar 08, 2011, 06:47 pmLast Edit: Mar 08, 2011, 06:49 pm by Grumpy_Mike Reason: 1
Quote
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

Quote

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

No the ADC outputs nothing it is an input.

Quote
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.

#### tayip

#4
##### Mar 09, 2011, 01:30 am
Thanks for reminding, I was just not sure which forum to post, so I cross posted.

Quote

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?

Go Up