How to use a DAC0808 with the arduino

I wanted to experiment with a DAC, so i bought this little DAC0808 IC, found this nice little diagram of how to use it: But when i wire it up like that... it does absolutely nothing. On pin 4 i measure 0.05V compared to the ground, and it doesn't matter what the input pins have, it stays at 0.05V (well, sometimes it goes all the way up to 0.07V, but that's not quite an improvement) What i'm not entirely sure about is the 0V in the diagram (i connected this also to the ground).

And i'm just trying to get this DAC to work, my last test setup simply was this chip getting its 5V from the arduino, and the input pins directly connected to ground or 5V. No sketch or anything that could go wrong.

Which package do you have , i think the pinouts differ

From the datasheet

OUTPUT VOLTAGE RANGE The voltage on pin 4 is restricted to a range of ?0.55 to 0.4V when VEE = ?5V due to the current switching methods employed in the DAC0808.

I am unfamiliar with that chip but i thing this is possibly the case.

Try making vee a negative voltage.

Boardburner2: Which package do you have , i think the pinouts differ

Full text on the IC: M9736AD DAC0808LCN MC1408P8

From what i can find this is just a normal DAC0808, and the pin numbers from that diagram should be correct

Cross post, see previous msg again.

If the package is dil and not surface mount the circuit should be correct.

racemaniac: But when i wire it up like that... it does absolutely nothing.

Having to ask, since I don't know your skill-set like, but the dwg doesn't show the op-amp's power pins. So, in case you did exactly what's shown [u]and[/u] nothing more... Do you have the op-amp's power pins connected (to anything)?

adding dwg of my own

[quote author=Runaway Pancake link=topic=261312.msg1844536#msg1844536 date=1408203185]

racemaniac: But when i wire it up like that... it does absolutely nothing.

Having to ask, since I don't know your skill-set like, but the dwg doesn't show the op-amp's power pins. So, in case you did exactly what's shown [u]and[/u] nothing more... Do you have the op-amp's power pins connected (to anything)? [/quote]i'm currently wiring it without the opamp, just to see the result on pin4, once it does something i'll try to put an opamp behind it again (although, not even sure if it's required, from the datasheet, i see it has its own opamp internally as last step, and i found some diagrams that just skip the opamp).

Boardburner2: Cross post, see previous msg again.

If the package is dil and not surface mount the circuit should be correct.

yup, it's a regular DIP package, checked with the datasheet to make sure the pinout matches this diagram (and measured every pin already a dozen of times to be really really REALLY sure that every pin is wired the same). the only difference i have with the diagram is the resistors. don't have 2K resistors atm, so i tried with 1K and 10K, but googling circuits with this DAC, i find them with just about every imaginable resistor value... so i don't think that'll be the issue either. I've also got 3 of these dacs, so i tried switching it with another one to make sure it's not a defective chip, but the others do exactly the same.

what i'm currently wondering is: most diagrams show this thing being hooked up to systems that provide positive & negative voltages to pins 3 & 13 (like +12v and -12V), since i'm hoping to just use it with an arduino and without an extra power supply, i was glad to find the above diagram that simply uses it with 0 and 5V, but could that be the issue?

0 to 5 v issue ? Im not sure if i interpreded the datasheet correctly.

However have you a resistor from pin 4 to ground ?

Its a current output and a resistor is needed to develop the voltage.

Boardburner2: 0 to 5 v issue ? Im not sure if i interpreded the datasheet correctly.

However have you a resistor from pin 4 to ground ?

Its a current output and a resistor is needed to develop the voltage.

that'll probably be the issue. First time i encounter a current output, it's indeed logical that you need to allow the current to flow. i'm gonna give this a try & hope it'll work :). (and i'll have learned something new today :) )

thanks for the help :)

The op-amp is configured as a transconductance amplifier, a current-to-voltage converter.

Boardburner2: since i'm hoping to just use it with an arduino and without an extra power supply, i was glad to find the above diagram that simply uses it with 0 and 5V, but could that be the issue?

Two 9V transistor batteries make a dandy dual-ended supply. In fact, you could "get by" with one for the negative supply (so you'd have a +5/-9V supply, big whip.) Then decide what you want to do going forward (excuse the biz-speak.)

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 :frowning:

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

[quote author=Runaway Pancake link=topic=261312.msg1844559#msg1844559 date=1408205316]
The op-amp is configured as a transconductance amplifier, a current-to-voltage converter.

Boardburner2:
since i’m hoping to just use it with an arduino and without an extra power supply, i was glad to find the above diagram that simply uses it with 0 and 5V, but could that be the issue?

Two 9V transistor batteries make a dandy dual-ended supply.
In fact, you could “get by” with one for the negative supply (so you’d have a +5/-9V supply, big whip.)
Then decide what you want to do going forward (excuse the biz-speak.)
[/quote]i know that’s an option. Is it really required though? i know i should learn a bit more about opamps so i could answer questions like this myself. The diagram i posted above suggested that it’s possible without having a -5V, but maybe it’s incorrect?
(i’ve also found a solution that uses 0 , 2.5 and 5V as inputs, with the 2.5V being the “ground” to simulate negative voltage without actually needing a -5V, but that’s a lot of voltage dividers to do it on all those pins >_< )

Boardburner2: 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 :)

I’m not good with the DAC IC’s VEE being at 0V/Gnd (missed that) either.

I vouch for my design shown.

racemaniac:

Boardburner2: 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?

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 :frowning:

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

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

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

Boardburner2:

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 :frowning:

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 :).

Boardburner2: 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.