1
\$\begingroup\$

I am designing a custom STM32F303-based PCB and need to get several analog outputs from the microcontroller. STM32 has two DAC channels which I suppose I can use for this purpose to avoid getting PWM pseudo-analog signals, but rather the analog ones. If I need more of those outputs, should I also include external DACs between MCU and the final outputs?

\$\endgroup\$
2
  • \$\begingroup\$ What you should do depends on what are your requirements for the analog outputs so it's impossible to say how the requirements could be met. \$\endgroup\$
    – Justme
    Oct 20, 2022 at 7:13
  • 1
    \$\begingroup\$ Are these analog outputs static? Or are they dynamic? If static you can use digital pots. \$\endgroup\$
    – DKNguyen
    Oct 20, 2022 at 13:10

2 Answers 2

2
\$\begingroup\$

Yes, you should add external chips via SPI or I2C as you stated yourself; you don't want a pseudo-analog PWM signal and you want more than two outputs.

I've found one at Adafruit which has four channels.

\$\endgroup\$
4
  • \$\begingroup\$ Thanks! And as for the digital outputs, it is not really necessary to add ADC between the STM32 and the outputs, right? \$\endgroup\$
    – Valeriya
    Oct 20, 2022 at 8:46
  • \$\begingroup\$ I don't understand your question. If you want an analog output created from a digital signal you'll need to pass this "pattern" via the I2C layer to the external IC. You might choose the option to feed back the signal to the controller (ADC ) in order to check and correct it. But this depends on the application. \$\endgroup\$
    – Whois_me
    Oct 20, 2022 at 9:08
  • \$\begingroup\$ What about other solutions than adding DACs? Why do you suggest adding DACs if you don't know why they are needed? \$\endgroup\$
    – Justme
    Oct 20, 2022 at 9:54
  • \$\begingroup\$ I answered a question with a limited scope. I presume the OP knows what a DAC is and why he wants them, because this would yielded a different question otherwise. \$\endgroup\$
    – Whois_me
    Oct 20, 2022 at 10:32
0
\$\begingroup\$

Contrary to another answer, you don't necessarily need to add more DAC chips.

Depending on your needs, you can simply demultiplex the MCU DAC outputs into sample/hold circuits to have more analog outputs.

\$\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.