Shop OBEX P1 Docs P2 Docs Learn Events
Need for Speed: Digital to analog converter — Parallax Forums

Need for Speed: Digital to analog converter

FlyingFishFingerFlyingFishFinger Posts: 461
edited 2009-02-25 17:58 in General Discussion
Hi-
We've got a laser projector we would like to interface with. Basically we can do this, but we ran into a problem, our conversions are too slow. We determined the bottleneck to be the DA we're using (MiniLab 1008 from Measurement Computing).
The need for speed goes 2 ways:

1) It seems the minilab can only handle about 100 conversion per second. We need something on the order of several (ideally about 10) Khz...
2) We have a deadline on Friday...

Is there a good fast way we can get a 0-5V, several Khz digital to analog converter? We have a Propeller if that helps.
Any suggestions are greatly appreciated[noparse]:)[/noparse]
Thanks alot

Rafael

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~

Comments

  • Tricky NekroTricky Nekro Posts: 218
    edited 2009-02-24 22:21
    I don't know about your deadline but this will do....
    It's almost military grade..... Cheers!!!!!!!!!

    MAX189



    Regards,
    Lefteris,
    GReece

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Rule your destiny.... Be Good.... Be Bad.... Be Tricky!!!

    LiPo.... Nice batteries, but hard to use?
    No prob...
    www.societyofrobots.com/member_tutorials/node/302
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2009-02-24 22:55
    Thanks for the suggestion, that's AD, not DA (which is what we need) though...

    Rafael

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You've got to play the game.
    You can't win.
    You can't break even, except on a very cold day.
    It doesn't get that cold.
    ~Laws of Thermodynamics~
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-02-24 23:01
    If you can spare the pins, you can make an n-bit DA with n outout pins and n resistors. It'll be exceedingly fast, perhaps 5 to 10 ns .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Tricky NekroTricky Nekro Posts: 218
    edited 2009-02-24 23:34
    Too much coffee is a problem.... really...... Sorry.......

    Choose!!!!!!
    http://www.analog.com/en/digital-to-analog-converters/da-converters/products/index.html


    Lefteris, Greece

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Rule your destiny.... Be Good.... Be Bad.... Be Tricky!!!

    LiPo.... Nice batteries, but hard to use?
    No prob...
    www.societyofrobots.com/member_tutorials/node/302
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2009-02-24 23:38
    Hmm. What would that look like, circuit-wise? The other problem is I only have a Propeller Demo board (8 free pins) and we need two channels (x, y)...

    Rafael

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You've got to play the game.
    You can't win.
    You can't break even, except on a very cold day.
    It doesn't get that cold.
    ~Laws of Thermodynamics~
  • PropabilityPropability Posts: 142
    edited 2009-02-24 23:51
    Maybe 2 shift registers with the r2r on the ports.

    Here is a read on it.

    http://www.bitechnologies.com/pdfs/resistorladder.pdf
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-02-24 23:52
    I think a DAC0808, a golden oldie, is solid out to 100kHz.

    Post Edit --
    http://forums.parallax.com/attachment.php?attachmentid=41213

    Post Edited (PJ Allen) : 2/25/2009 12:46:51 AM GMT
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-02-25 00:21
    Here are two ways.

    In the first, all the resistors are of different values.· It's a current source, so you need an op-amp to make it a voltage source.

    In the second, there are only two values of resistance (this is called an R-2R ladder)·and it doesn't necessarily need an op-amp, but it needs more resistors, the load must be constant, and the output·voltage depends on the load.·

    There are many other ways to buld a cheap DA.· In these particular circuits, if the inputs (MSB through LSB) are microcomputer outputs, the accuracy, linearity, and differential linearity, and even the monotonicity,·depend on close matching of the characteristics of the output pins that are feeding it.· Probably it's OK for outputs of a single chip if the value of R is not so small that the output impedance of the pin, which is in series after all, affects the value.· Or, in the second circuit, you could use 2(R+Zpin) if the pin impedance is known.·

    Anyway, if you don't need pinpoint accuracy and want to save money, give these a try.

    If you're short of pins, there are various ways of deriving multiple outputs from fewer pins (shift registers, 3-to-8 decoders, etc.).

    The first circuit is as fast as the op-amp you use, and the second is as fast as stray capacitances will allow it to be.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net

    Post Edited (Carl Hayes) : 2/25/2009 2:29:04 AM GMT
    1000 x 597 - 5K
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-02-25 02:11
    I committed an error.· I said:

    you could use 2(R+Zpin) if the pin impedance is known

    but since it is the 2R, not the R, that is in series with the pin internal impedance, I should have said

    you could use (2R-Zpin) if the pin impedance is known

    and in either case the bottom resistor ("terminating" resistor) should be exactly 2R since it isn't in series with a pin impedance.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • LawsonLawson Posts: 870
    edited 2009-02-25 04:42
    One of the counter modules running in duty mode would also work. In this case one pin would drive a RC low pass filter to average the pulses from the pin and an op-amp (preferably a rail to rail op-amp) would be used to boost the 0-3.3v range to 0-5v and buffer any load. Theoretically, averaging 2^12 clock intervals would give 12-bit resolution. At 80MHz that's a sample rate of ~19.5KHz.

    Lawson

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lunch cures all problems! have you had lunch?

    Post Edited (Lawson) : 2/25/2009 4:48:16 AM GMT
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2009-02-25 06:14
    Never mind the pin limitation. I was a little absent minded earlier.
    The MiniLab 1008 has 28 digital IO...plenty for two channels of 12-bit resolution.
    Assuming I want to go with the first circuit Carl suggested, do the resistance values matter if I follow the pattern? Seems like that's something I can put together in a couple minutes.
    Also, why are we grounding the + input of the OP amp and applying the voltage to the - input? (I'm not too good with logic...sorries [noparse]:)[/noparse])

    Rafael

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You've got to play the game.
    You can't win.
    You can't break even, except on a very cold day.
    It doesn't get that cold.
    ~Laws of Thermodynamics~
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-02-25 07:04
    Yow.· 12-bit resolution you can get, maybe, if you're lucky, but not with the first method, because the resistors vary so greatly in value.· 12-bit accuracy requires that the smallest (MSB) resistor be of about 0.024% precision (with either circuit), because 12 bits gives 4096 output values.· One out of 4096 is 0.0244%.· Such resistors will be hard to find.

    If all resistors are closely matched (have the same error), and you use two R resistors to make each 2R resistor, you can get 12-bit resolution.· 12-bit accuracy is a pipe dream, even with expensive commercial equipment, even in a constant-temperature oven.

    The output is tied back to the negative input to give negative feedback.· The positive is tied to ground to give a reference.· With the positive at ground, the output is a negative voltage.· You could (with many op-amps) tie it to +ref (five volts, maybe, or your Vdd) to avoid going negative at the output.· In either case, the larger the input number, the more negative the output of the op-amp.

    You could instead·feed the positive input and just tie the output back to the negative.· That's a follower, and will give you positive output, to which you may be more accustomed.

    I'm curious -- are you doing audio?· That requires pretty good resolution, but not much accuracy.· It also requires good linearity.· It doesn't require very good differential linearity, which is a good thing, because differential linearity is very diffficult to achieve at high speeds.

    Actually, you don't really need the op-amp, even with the first circuit, if your load is·linear.··For the first circuit, you might use, say,·2K on MSB, 4K on the next, etc., all the way to 4.096 megohms on the LSB.· You see the problem with circuit one.

    With circuit two, you could use 37 identical 1K resistors (using two of them in series for each 2K), much easier to buy, and more likely to be matched if all purchased in a batch.

    It's cheap and easy to try, anyway.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net

    Post Edited (Carl Hayes) : 2/25/2009 7:10:37 AM GMT
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2009-02-25 07:32
    Well, the application is a 24K laser projector (24K points per second). We don't need that much, but we need something where we don't see each data point being drawn ( as we can with the current resolution of 100 pps). The bottleneck is in the D/A converter.
    I don't actually know the load the projector presents, but I assume it's some sort of logic-drivable circuitry. Technically the input is +-10V on each channel. but since our projection space is limited anyway, we can get by with 0-5V (first quadrant only).
    I'll give it a try with method 2 then, I suppose.
    Thanks!

    Rafael

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You've got to play the game.
    You can't win.
    You can't break even, except on a very cold day.
    It doesn't get that cold.
    ~Laws of Thermodynamics~
  • LawsonLawson Posts: 870
    edited 2009-02-25 15:43
    I would not be too surprised if the 100hz limitation also applied to updating the digital IO on the miniLAB 1008. I'd test this before committing too much time.

    Lawson

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lunch cures all problems! have you had lunch?

    Post Edited (Lawson) : 2/25/2009 3:48:28 PM GMT
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-02-25 15:53
    For initial concept-testing, you can use many fewer bits, say 4 or 5. If that appears to work, then you can build the rest. Good luck!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-25 16:44
    Flyfisherman,

    Geez... are you free to discuss your laser set up? There are some medical apps out there[noparse]:)[/noparse]

    Rich
  • skylightskylight Posts: 1,915
    edited 2009-02-25 17:58
    would 54 MHZ be fast enough for you? Or perhaps 297 MHZ?smile.gif

    http://www.analog.com/en/digital-to-analog-converters/video-encoders/adv7190/products/product.html

    Post Edited (skylight) : 2/25/2009 6:03:22 PM GMT
Sign In or Register to comment.