0
\$\begingroup\$

I came across a circuit similar to that depicted below which scales a battery voltage which can range from 11-22Vdc to 0-3.3Vdc for a MCU ADC input. In the circuit I came across, the diode used is a ST Micro BAT30KFILM Schottky Diode. I am struggling to understand the circuit theory behind this. Ignoring the right hand side of this circuit you have a simple voltage divider between R1 and R2. In this example the voltage across R2 should be ~2.117Vdc; however when the right hand portion of the circuit is added, the voltage is actually higher, in this simulation it is 2.164Vdc. Could someone explain what is happening here? Why is the diode there?

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

I would call it a rookie error. In theory if C1 was present before the ADC uC was turned on with sufficient current to exceed 5mA or 0.3V above the supply rail, CMOS latchup may occur. But CMOS ESD internal protection has 10k current limiting resistors cascaded with 2 diodes to each rail to prevent this, so the circuit offers no protection or correction, just an offset error.

schematic

simulate this circuit – Schematic created using CircuitLab

If you wanted full scale to 3.3V the R ratios are not appropriate.

Furthermore, it appears to an inaccurate 10:1 divider, ideally with 2.10 V / 22.0 Vin.

\$\endgroup\$
3
  • \$\begingroup\$ I'll take a look at the documentation for the MCU...which by the way is a STM32F303CB. The voltage range the application can run on can exceed 22V and go up to 30ish volts. I don't intend to go beyond the 22. \$\endgroup\$
    – mike
    Commented Oct 9, 2021 at 21:17
  • 1
    \$\begingroup\$ So to reiterate, if I understand you correctly, of the MCU has the depicted internal circuitry, the external clamping diode is not necessary and just adds an offset error. Am I understanding you correctly? \$\endgroup\$
    – mike
    Commented Oct 9, 2021 at 21:19
  • 1
    \$\begingroup\$ Yes you got it. Tony from Richmond Hill..... you may wish to convert 22V to Vref if = 3.3V then 22/3.3 ratio, but it is also possible to change ratio and offset to convert 11:22 to 0 : 3.3 with a Vref for offset to the reference input of an Op Amp. Then the ratio is (Vmax-Vmin=11) so 11:3.3 and the offset is Vmin/3.3= 3.333V \$\endgroup\$ Commented Oct 9, 2021 at 22:59
1
\$\begingroup\$

Look at the specs for the Schottky diode - it can leak up to 1 mA at room temperature. This leakage current pulls up the resistor divider.

Your Schottky may leak less, but why is it there ?

\$\endgroup\$
6
  • \$\begingroup\$ That's my question...why is it there? I ran this circuit in Multisim and Vout varies based on the selected diode. My only guess is that it clamps the maximum voltage to the ADC input to 3.3V... but I am seeking expert opinion on this. \$\endgroup\$
    – mike
    Commented Oct 9, 2021 at 18:37
  • 1
    \$\begingroup\$ Yes, it will clamp the max. voltage. Is that necessary ? Can the input exceed about 30 V ? Even if it does, the ADC itself likely has an internal diode to VDD which will clamp also. \$\endgroup\$
    – jp314
    Commented Oct 9, 2021 at 18:44
  • \$\begingroup\$ There was no explanation for the design choice. I am just trying to interpret something someone else did. This is a battery driven application, and it is possible that someone could use a battery larger than intended. This could have been placed there to prevent layer 8 issues. \$\endgroup\$
    – mike
    Commented Oct 9, 2021 at 18:49
  • \$\begingroup\$ The Schottky is there to protect the ADC input from over-voltage damage. \$\endgroup\$
    – user57037
    Commented Oct 9, 2021 at 19:12
  • \$\begingroup\$ If "why is the diode there" part of your question, please edit your question to clarify that point. \$\endgroup\$
    – TimWescott
    Commented Oct 9, 2021 at 19:40

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.