A cheap and cheerful DAC?

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just bought one of these on ebay:

but want to add MIDI input to it. So I'm using a design posted in Japan http://www.rjblog.net/sx-150mod/... but replacing the MIDI input side TLP522 with a 6N138.

I'm then trying to decide what to do for a DAC on the output side. In that PDF they just put PWM from OC1A through a simple filter but in another design:

they use an Microchip (spit, spit!) MCP4921. So do I:

1) use PWM with simple filter

2) use an R-2R off 8 pins built with discrete resistors (though there maybe accuracy issues as I probably only have 1% on hand)

3) use an MCP4921

4) use a TLC5615 which is another SPI DAC I'm considering

5) use some other form of DAC ?

If so, what? It only needs to be 8/10/12 bit I guess but DIP would make this old verboard hackers life easier! I'd prefer a serial rather than parallel interface.

Oh and it wants to be cheap (which is part of the appeal of the 4921). On RS I saw some £100 24 bit DACs listed!

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Depends on the frequency response you want to get out of the DAC.

PWM+RC will work fine for slow changing values, and relatively low resolution. The filtering gets much more complex for faster signals.

The R2R would work, you may want to filter this a bit as well. But matching may be important. It really depends on how accurate you need it to be.

Another option would be to use an external digital pot. (AD5160)

How much resolution are you wanting to get? You're not going to get 24bits from a PWM. You'll also get a slight phase stepping error with the R2R as you can only set 8 bits at a time.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The output is virtually DC - it's the control voltage into the front end of:

So the voltage level only changes when a different NOTE-ON arrives over MIDI (it's monophonic)

As for resolution. A MIDI NOTE-ON can only carry 127 discrete values from C 5 octaves below middle C to G five octaves above. In fact the actual range of this device is only about 1 octave. So the resolution doesn't have to be that great (it's an analog synth so probably won't be making pure "notes" anyway!)

Thanks for the digital pot. idea - that's definitely got legs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe an LTC1661CN8, although it already exceeds your specs. Dual 10 bit DAC, serial interface. The N8 is the 8 pin DIP version, but the MSOP 8 package is worth a look, too.

Newark wants $3.12 single qty, Digikey $3.38.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the AD5160 is < $2 (USD) in single piece quantities from digikey.

But as the value is virtually DC, PWM should be fine, just run the PWM fairly fast (as fast as you can allow), and use an RC with a fairly long time constant (as long as you can afford). If the synth input presents a heavy load, you may need to place an op-amp in between, just to buffer the signal. You may get some "ramping" at note edges though.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://www.oakleysound.co.uk/mididac.htm

This design uses the MAX551ACPA which is 12 bits. The author recommends using at least a 10 bits converter, but 12 bits ones are easier to get. The exact reasons are explained in the userguide for this project.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have used the MAXIM SPI DACs (MAX551 DIP) with great success. I would recommend them.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's probably over-engineering but I went for the 12bit MCP4921 at £2.49+VAT in the end. Just got to wait for the Farnell delivery now (and the SX-150 of course)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm not sure if it's over-engineering, the reasons given by that Oakley guy seem very reasonable if you don't want your instrument to sound badly detuned.

It's not like the 1970-80's when such converter could easily cost tens or hunderds of pounds :) I have this book from Analog Devices from 1986 or so, with photos of hybrid three chip modules for simple 8 bit ADC's :).