Go Down

Topic: How to use a DAC0808 with the arduino (Read 18082 times) previous topic - next topic

racemaniac



As pankake has shown the op amp deeds a dual rail supply


okay, thanks, then i'm going to experiment with adding the -9V as suggested, lets see if that brings things to life a bit :)

giving it -9V instead of the 0V does indeed bring this thing to life a bit :).
i now see the voltage vary depending on how the input pins are connected.

I guess instructables is still true to its reputation of what you find on it will probably not work :p.

Gonna look up a bit more on opamps to understand why this is (and what "he op-amp is configured as a transconductance amplifier, a current-to-voltage converter." means).

From what i observe: with the -9V, the output goes from 0V to ~ -7V so it really needs this negative voltage as that is its output?

Boardburner2


hmm, it's currently wired up with 10k resistors on pins 14 & 15, and tried with 1k, 10k and 100k resistors from pin 4 to ground, but it makes no difference, stays at 0.05V >_<

so still no luck :(


Thats dissapointing i expected it to swing negative respect to ground.

Best bet i think is get correct value components and try pancakes circuit.

Boardburner2

We crossed over again, but pancakes circuit will invert the voltage to be posotive again.

racemaniac



hmm, it's currently wired up with 10k resistors on pins 14 & 15, and tried with 1k, 10k and 100k resistors from pin 4 to ground, but it makes no difference, stays at 0.05V >_<

so still no luck :(


Thats dissapointing i expected it to swing negative respect to ground.

Best bet i think is get correct value components and try pancakes circuit.

yup, with the -9V iso the 0V it does come to life. So that was probably the issue. Now i'm going to try to understand why that is, and going to look into ways to produce such a negative voltage :). (and i'm also going to see if there are DAC's available that don't need this).

I've still got a lot of experimenting & researching to do :).

racemaniac


We crossed over again, but pancakes circuit will invert the voltage to be posotive again.
yup, but you still need a negative voltage to get the DAC to work :)
i'm thinking of putting it into something battery operated, so it would be nice if i don't need too many batteries to get it to work ^^. But it's also a lot of fun just discovering how everything works, and learning along the way.

What exactly is the simplest DAC you can come by that's easy to use? i picked that one since i could easily find example circuits with it, and it's pretty cheap. but maybe it's just not the best one to use for my purpose.

Boardburner2

Look for a single rail dac, they exist.


runaway_pancake


What exactly is the simplest DAC you can come by that's easy to use?
.... my purpose.


simplest --
see R-2R resistor ladder network (digital to analog conversion, or DAC)
http://en.wikipedia.org/wiki/Resistor_ladder
-------
http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/dac.html
http://www.tek.com/blog/tutorial-digital-analog-conversion-%E2%80%93-r-2r-dac
http://www.irctt.com/pdf/LADDERNETWORKS.pdf

Anyway, you only get something for nothing on "Instructables".
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

Jiggy-Ninja

I would recommend NOT using a DAC0808 if you can avoid it, for 3 reasons:

1) Parallel input uses a lot of pins. An SPI DAC will only use 3 (Clock, Data, and Chip select).

2) It requires a negative voltage to bias the output circuitry. My DAC0808 datasheet says it requires a minimum of -4.5 V on Vee. Grounding it won't cut it.

3) It is a current output DAC. Measuring the open-circuit voltage on pin 4 will tell you nothing. You need something to convert the current into a voltage. A resistor works, but gives you negative voltages because the device sinks current (ie, pulls it in). The op-amp transconductance amplifier in the example circuit will give you positive voltages.

Use an SPI DAC from Microchip (http://www.mouser.com/Semiconductors/Integrated-Circuits-ICs/Data-Converter-ICs/Digital-to-Analog-Converters-DAC/_/N-6j74u?P=1z0z63x&Ns=Pricing%7c0). They're cheap, can have up to 12 bits resolution, come in single and dual packages, and have a direct voltage output instead of a current output. The only downside is that they're slower than parallel DACs (Not a concern at Arduino speeds), and harder to use since you can't just hook up some switches, you need a microcontroller that can shift out the data.

Go Up