1
\$\begingroup\$

Part searching in microcontrollers, it looks like most small ones have at most one DAC. What is the just way or ways to output multiple slow signals from a microcontroller with at most a single DAC?

For instance, what if I'm trying to output 4 signals with up to 100Hz bandwidth and 8 bits of resolution?

Here are the solutions I've come up with:

  1. Use an analog switch with an amplifier doing track and hold for each output. Unfortunately, this requires the most board space probably, and the charge injection from the switch and bias current of the amplifiers require some moderately large capacitors (at least nF).

  2. Use a dedicated sample and hold amplifier for each output. Unfortunately, the cheapest ones are in the 70 cent range at quantity, and I'd need at least two.

  3. Just buy a DAC with multiple outputs. Unfortunately, the cheapest 2-output DAC seems to be in the 60-70 cent range at quantity, the same as the microcontroller.

\$\endgroup\$
  • 3
    \$\begingroup\$ Use a PWM type signal and RC low pass filter if accuracy isn’t the top of the list. \$\endgroup\$ – Andy aka Jan 17 at 19:33
  • 1
    \$\begingroup\$ yeah, how to multiplex something is usually a question of what you need to achieve: what's the necessary bandwidth of your outputs, what's their purpose? \$\endgroup\$ – Marcus Müller Jan 17 at 19:42
3
\$\begingroup\$

Depending on your need for accuracy it might be cheaper to just buy more dac outputs or use a chip that has many dac outputs on it. More analog electronics will just cost more money. More chips = longer BOM and potentially more points of failure. An analog MUX and a sample and hold circuit, would like have the same cost as a just adding another DAC output.

EDIT: I just did a search on Digikey:

  • Cheapest single quantity single channel sample and hold amp $1.65 LF398MX
  • 4 Channel 12 bit buffered I2C DAC is $1.89 (less than $0.50 per channel) MCP4728T-E/UN

So its easy to see how using a MUX + sample and hold amplifiers can be much more costly than buying more DAC channels. This is true for most situations.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Use a 4:1 demux or analog switch, and continuously cycle thru all 4 output values faster than the ripple or RC decay time needed for those outputs (similar to PWM, except distributing the 4 output pulses).

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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