2
\$\begingroup\$

I've read in my research that most microcontrollers are not built with DAC outputs as they are expensive to include on silicon chips. Also applications that require analogue outputs typically need a higher resolution than is feasible on a microcontroller and would probably use a dedicated IC anyway.

I am planning to build an analogue synthesizer with patch memory(storage and recall of voltage states). Apparently these functioned by reading the voltage of an analogue potentiometer into a microcontroller and applying a control voltage to the synthesizer using a DAC. This state could then be saved and recalled as 'presets'.

What I would like to know is a suitable way to control multiple analogue outputs to a circuit from a microcontroller.

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

You could use DACs or you could use PWM outputs from the MCU. Quad DACs are available and I've used one recently from MAXIM - it was a 12-bit version and was controlled from the MCU via a serial link. You could easily add several of these depending on how many voltage outputs you need to generate. I believe MAXIM also produce a DAC with 32 outputs!! Just checked - it's a MAX5773 (edited) 14 bit DAC

\$\endgroup\$
2
  • \$\begingroup\$ do you mean AD5373? \$\endgroup\$
    – blarg
    Apr 14, 2013 at 12:52
  • \$\begingroup\$ oops (!!) I meant MAX5773 but there are 12 bit version too \$\endgroup\$
    – Andy aka
    Apr 14, 2013 at 13:16
2
\$\begingroup\$

Re: Apparently these functioned by reading the voltage of an analogue potentiometer into a microcontroller and applying a control voltage to the synthesizer using a DAC.

Not all digitally controlled analog gear is made exactly this way, and yours doesn't have to.

Since you're not actually passing audio through the potentiometers, there is no reason to use them out of audio purism. Reading the voltage on an analogue potentiometer has issues. Aside from knob flakiness which translates to glitchy readings (which can be addressed by using an expensive conductive plastic knob and additional complexity in the circuit) there is the problem that the knob has an absolute position which corresponds to a voltage. When you recall a preset, the preset is out of sync with the potentiometer. For instance, say the knob is at 10%, and the recalled preset is at 90%. When programming a new value, as soon as the user moves the knob, the value jumps from 10% to around 90%. Consider using a rotary encoder to obtain the change in rotation of the knob directly. Rotary encoders spin freely: they have no zero, and so allow for relative adjustment. This also means that you can easily multiplex a rotary encoder among multiple parameters. For instance the user can use buttons to go back and forth through a list of parameters, and tweak them with the rotary knob, which she only has to turn by the relative amount of the adjustment: turn this one up a little, turn that one down a little ...

About the control side, while it makes perfect sense to use a DAC chip to drive a voltage-controlled circuit, also do not forget about digital pots. Sections of an analog synthesizer design that originally contain plain old potentiometers can be digitally parametrized if those pots are replaced by digital pots. Just the voltage-controlled circuits benefit from using a DAC. Digital pots can also be combined with op-amps to construct DAC's. For instance see the application note in the datasheet for the AD5290. You don't necessarily get the resolution (many digital pots are restricted to just 7 or 8 bits, and if you want more, other parameters may have to be compromised due to the reduced part choice). But, say, if a design needs 5 digital pots, and one DAC, it could be more convenient, if other considerations allow, to just to make the DAC using the same digital pot, and then just program 6 identical digital pots in the firmware.

Things to watch out for: digital pots are not purely ohmic: they add some small amount of distortion. In general, higher voltage supply reduces it. Furthermore, the input voltages presented to the resistive terminals are restricted to within the supply voltage. So you cannot connect a 0 to 5V digital pot into an audio circuit where voltages can swing +/- 15V.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.