0
\$\begingroup\$

I have to make a simple system that measures the output voltages from a power supply. In total there are 8 voltages from 3V to 32 V to measure. The system is based on an STM32 microcontroller. The sampling frequency will give very low, say around 500Hz. The analog input (the measurement input) will be very simple, a simple resistive divider and then directly into the ADC.

  1. Can I safely use the internal ADC of the MCU (single internal ADC + AMUX) or is it better to use an external ADC?
  2. Between the resistive divider and the ADC, is it necessary (advisable) to use an op-amp as a buffer?
  3. In the system, I have two DC-DC power supplies available, one at 3.3V and one at 5V. For the analog part is it better to use the 5V directly from the DCDC or is it better to insert an LDO that brings the voltage to 3/4V? Is it better to have a higher voltage but directly from a DCDC or a lower voltage but from an LDO?
\$\endgroup\$
1
  • 1
    \$\begingroup\$ What makes you unsure about the safety of Q1? \$\endgroup\$
    – Andy aka
    Commented Mar 28, 2023 at 9:49

1 Answer 1

1
\$\begingroup\$

Q1/2 "Safety" is a very variable thing, and really a better question is will my circuit survive all reasonable faults/circumstances?
You can use the internal mux, that's what it's there for. You could put an external opamp to act as a buffer, but that might be overkill. The main concern I would have is an over-voltage transient causing damage to your uController, so you could add a transient suppression diode to limit this.

Q3, you haven't said why you might want one over the other. What are you concerned about? Typically you might choose to limit the number of regulators to bring down the cost and increase the overall efficiency, or you might want to add an LDO to get a lower noise supply in order to improve your measurements.

\$\endgroup\$
2
  • \$\begingroup\$ Q1/2: OK, from what I understand what you recommend is to use the MCU internat ADC with an opamp as a buffer, and add ESD protection before the opamp? Q3: Maybe I didn't explain myself well, the system already has 3.3V DCDC and 5V DCDC for other reasons. So I have these two regulators available in all cases, I just have to choose whether to power my analog part directly from 5V DCDC or if it is better to add an LDO to have a cleaner voltage. \$\endgroup\$ Commented Mar 28, 2023 at 14:21
  • 1
    \$\begingroup\$ Yes, that's the tradeoff. A cleaner supply might result in better readings, but at a space, price, and efficiency cost. Which one is better depends on your project, are you trying to keep costs down, or is the quality of the measurement paramount? How noisy will the DC2DC be, what impact will that have on the measurement, and can the design tolerate that - these are the questions. \$\endgroup\$
    – LordTeddy
    Commented Mar 29, 2023 at 16:24

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.