2
\$\begingroup\$

I'm working on a low power design using SAM D21 microcontroller (Adafruit Feather M0). I would like to take advantage of configurable I/O and have it normally in high impedance state, but reconfigure it temporarily to an input with built-in pull-down resistance in order to take a measurement once in a while, when the microcontroller is awakened from sleep state. Looking at the data sheet Pull-up - Pull-down resistance is listed as 20kΩ to 60kΩ. I don't mind the wide range, I can calibrate, but is the value as stable as a typical external resistor would be? BTW, I don't need very high accuracy.

EDIT

By stability, I mean low drift. For this project, change of 5% per year due to aging is acceptable. Thermal change of 5% in consumer electronic temperature range is acceptable too.

EDIT'

SAM D21 data sheet indicates that the pull-up and pull-down are disabled in analog mode. Thanks to @BruceAbbott for pointing it out.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ but is the value as stable as a typical external resistor would be? Explain what you mean by "stable". Do you mean low drift as in that you measure it today and it measures 30.3 komh and you use the chip one year and measure again, now it's 30.4 kohm (low drift) or it is 36.3 k ohm (higher drift)? On-chip resistors are generally less stable than an external resistor, it depends on what accuracy you need if that is OK. If the drift is 1% per year but you need 0.1% drift then you have an issue. If you just re-calibrate then it might be no issue. \$\endgroup\$ Jun 5 at 20:15
  • 1
    \$\begingroup\$ No, it is not stable. It varies with temperature and voltage and probably with time, also. Normally, you would disable all pullups and pulldowns if you are reading an ADC input. So I am not sure what measurement you would be taking. \$\endgroup\$
    – mkeith
    Jun 5 at 21:13
  • 2
    \$\begingroup\$ I agree that for measuring purposes, if you want a decent level of accuracy (better than 10%, which is quite poor) then you would not want to use the internal pull up resistor. They're not designed to be accurate. \$\endgroup\$ Jun 5 at 21:25
  • 3
    \$\begingroup\$ Have you verified that the pull up/down resistor can be enabled in analog mode? \$\endgroup\$ Jun 5 at 22:16
  • 1
    \$\begingroup\$ @BruceAbbott Excellent point. I checked the data sheet and indeed the pull-up or pull-down is disabled in analog mode. Thank you. \$\endgroup\$ Jun 6 at 4:34
6
\$\begingroup\$

No, you should not expect an internal pull-up or pull-down "resistor" to behave like an external resistor. The internal device may actually be a very weak MOSFET or an implanted silicon resistor. The effective resistance is likely to vary with applied voltage. I would also expect a large temperature coefficient, and of course a very large variation in manufacturing.

\$\endgroup\$
2
  • \$\begingroup\$ The effective resistance is likely to vary with applied voltage - you mean voltage applied to the I/O pin, right? Is there a way to find out how it is actually implemented in SAM D21? \$\endgroup\$ Jun 5 at 21:19
  • \$\begingroup\$ Yes, with the voltage applied to the pin. But if a MOSFET is used then the effective resistance could also vary due to changes in the supply voltage. If you want to know how the "resistor" is actually made then you should ask the manufacturer. \$\endgroup\$ Jun 5 at 22:02

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.