Shop OBEX P1 Docs P2 Docs Learn Events
d/a conversion — Parallax Forums

d/a conversion

CyberpagemanCyberpageman Posts: 4
edited 2007-08-03 18:15 in BASIC Stamp
I need to produce reasonably precise voltages between 0 and, say, 5 volts to control an x-y recorder. Is it possible to use the BASIC Stamp to do this directly, or through a d/a converter chip?

Thanks

Comments

  • pwillardpwillard Posts: 321
    edited 2007-08-02 20:29
    There is no analog out, per se.· PWM is not what you·want.· Actually, there really is very limited analog I/O built in.

    You have pretty much answered your own query.· You want an external·D/A solution.· Now it comes down to how accurate you need to be.

    You could use and R/2R Ladder with a voltage follower at the cost of a lot of I/O pins, or you could use a simple two wire (AKA I2C)·protocol·MAXIM part called MAX518.

    http://www.ortodoxism.ro/datasheets/maxim/MAX517-MAX519.pdf


    Me?· I'd go for using the MAX518 or something similar.· I've also been playing with real obscure parts like the I2C TDA8444· (No results to show for it yet)



    Post Edited (pwillard) : 8/2/2007 8:35:20 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-02 20:32
    What do you consider reasonably precise? How fast does this voltage need to change?

    You probably will need to use an external DAC. The Stamp can put out voltages from near zero volts to near Vdd (about 5V) to about 2 significant places using a resistor and capacitor.
  • CyberpagemanCyberpageman Posts: 4
    edited 2007-08-02 22:45
    Thank you both for your help. I'll take your advice and use a DAC--that is just the information I needed.

    Cyberpageman
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-08-02 23:02
    Well, Cyberpageman has probably left the building, but...

    attachment.php?attachmentid=41213
  • pwillardpwillard Posts: 321
    edited 2007-08-03 01:05
    Honestly... you might actually have some trouble finding an MC1408 nowadays since it's pretty well obsolete. You might find a NTE2056 equivalent, but... look at how many I/O pins you need. I2C starts to make more sense.
  • CyberpagemanCyberpageman Posts: 4
    edited 2007-08-03 02:48
    Thanks for the NTE2056 suggestion. I have a lot to learn.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-08-03 03:32
    Yep, the ol' DAC0808, scarcer'n hens' teeth... don't get much call for them round these here parts, stranger...·probably have to hunt them up at·some niche outlet...

    http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=14947
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-08-03 06:21
    Gents -

    The DAC0808 is not quite as scarce as hen's teeth, as the trusty FindChips search engine
    [noparse][[/noparse] http://www.findchips.com/ ] indicates there are at least 10 distributors who carry them, including Jameco.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • OzStampOzStamp Posts: 377
    edited 2007-08-03 07:31
    Hi

    What about the R2R method with a OPAMP follower.
    Has worked for me on several occasions...

    cheers

    Ronald Nollet Australia
  • CyberpagemanCyberpageman Posts: 4
    edited 2007-08-03 11:38
    There is a discussion of a R2R Ladder DAC at file:///C:/Documents%20and%20Settings/HP_Administrator/Desktop/Ultrasonics/dac.htm. Maybe this would be enough to position the pen of an x-y plotter.

    I looked up the DAC0808, and it seems like an elegant solution too.

    I suppose I can use the STAMP to supply the binary input. I haven't had a chance to study how.


    Tony Russell
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-08-03 16:06
    Since you have to control an x-y recorder, you probably need a dual output. Have you considered a serial DAC that use the SHIFTOUT command? Here are links to code for the TLV5618 and the MAX5722. These are 12 bit dual DACs in 8 pin packages. TI and MAXIM are both helpful with free samples.

    http://forums.parallax.com/showthread.php?p=555268
    http://forums.parallax.com/showthread.php?p=553090

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • pwillardpwillard Posts: 321
    edited 2007-08-03 18:15
    Just to clarify what I mentioned earlier.

    The MAX518 is a dual DAC with rail-to-rail 5V output·that uses I2C serial communication (IE; Data Pin & a Clock pin) so only 2 I/O pins on the stamp are needed.· Jon Williams did some excellent Nuts&Volts articles on using I2C style devices so you don't even have to re-invent the wheel on this one. Easily obtainable from DIGIKEY for about $6.00 each.
Sign In or Register to comment.