Resistance of digital pin configured as INPUT on DUE (ARM based) board

Hi.

I couldn't find any information in the datasheets about what the input resistance of the digital I/O pins configured as INPUT were on DUE:

pinMode(PIN, INPUT);

https://www.arduino.cc/en/Tutorial/DigitalPins says:

Arduino (Atmega) pins default to inputs, so they don't need to be explicitly declared as inputs with pinMode() when you're using them as inputs. Pins configured this way are said to be in a high-impedance state. Input pins make extremely small demands on the circuit that they are sampling, equivalent to a series resistor of 100 megohm in front of the pin.

It's about Atmega μC, but how does it look with DUE (ARM μC)?

Thanks for your help.

It's all CMOS, inputs float unless internal pull ups enabled

It's about Atmega μC, but how does it look with DUE (ARM μC)?

Exactly the same.
If you want to know the exact input resistance of an input pin then you have got some concepts wrong because you never need to know the exact value.

Grumpy_Mike:
If you want to know the exact input resistance of an input pin then you have got some concepts wrong because you never need to know the exact value.

Follow-up question: wouldn't I need to know the pin's input resistance R1 to know the voltage across the input pin and across resistor R2?

According to Atmel, it can be anywhere from 50K to 150K, typically 100K. That doesn't help very much for what you are wanting to do though.

http://www.atmel.com/Images/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf

Grumpy_Mike:
Exactly the same.

Which means 100 MΩ according to OP's post and https://www.arduino.cc/en/Tutorial/DigitalPins

rmetzner49:
According to Atmel, it can be anywhere from 50K to 150K, typically 100K. That doesn't help very much for what you are wanting to do though.

You're quoting the manufacturer's PDF with ~100 kΩ. So, that's quite a difference there... :confused:

However, me personally - I don't really need to know the value right now. I'm just taken aback by Grumpy_Mike's statement that you'd never need the exact value of the input pin's impedance.

EDIT: For example, to choose a proper pull-up resistor, it would definitely be necessary to know the impedance of the input pin. I don't get what Grumpy_Mike is trying to say.

The input resistance, is, for all practical purposes, infinite unless you use the INPUT_PULLUP instruction.

Allan

rmetzner49:
According to Atmel, it can be anywhere from 50K to 150K, typically 100K. That doesn't help very much for what you are wanting to do though.

http://www.atmel.com/Images/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf

You're reading that wrong. On page 1380 that's the spec for the pullup resistors, not the input buffer.

A CMOS input is not a simple resistance since it's composed of the MOSFET gates and the reversed biased clamping diodes, so that won't quote it as such in the datasheet. Instead they give the input leakage current, which is quoted as 2-5 nanoamps typical.

Liam918:
Follow-up question: wouldn't I need to know the pin's input resistance R1 to know the voltage across the input pin and across resistor R2?

If you're considering something like that, go back to the drawing board.

It won't work, unless the microcontroller has a pulldown built in. Even then the value of the pulldown is not tightly controlled because it isn't critical. It would be a waste of money laser trimming a digital pullup/down resistor to a precise value. If you need to have a voltage divider, make it external to the microcontroller so that you can control the values and tolerances of the resistors involved.

Liam918:
I'm just taken aback by Grumpy_Mike's statement that you'd never need the exact value of the input pin's impedance.

You never need to know it because it is so high it is irrelevant. As others have pointed out your concepts are just wrong.

What ever the value ( a practical value ) of R2 you use, you will always measure no voltage across it, because R1 is so high then virtually no current flows through it.

If you are worried about pull up resistors you are worrying about the wrong thing. The whole point of a pull up resistor is to reduce the input impedance to a point where it can not pick up stray interference. To this end the weak internal pull ups of about 40K are just about sufficient. However in many cases where you have a long wires you might want to use an external pull up resistance of 10K, 4K7 or even 1K.

allanhurst:
The input resistance, is, for all practical purposes, infinite unless you use the INPUT_PULLUP instruction.

Allan

Indeed, it can be as high as 10^12 ohms at room temperature for an unprotected CMOS input (such as 4000
series logic chips). More typically its 10^10 ohms or so (due to protection circuitry leakage). Such leakage
increases rapidly with temperature so you will find the datasheets quote input leakage as nA to uA range
across the full temperature range, though it is more likely to be in the pA range at room temp.

As an interesting aside, the units of electrical resistance has the second highest range of any measurable physical property.

No prizes for the highest, but who is the first to get it right?

Well, capacitors run from farads to femto-farads - that's 10^15 :1 .....Iv'e used them...

Allan

Distance?

You didn't specify electrical property.

Or EM wavelength/frequency ? from VLF radio to gamma rays ?

Km to 10^ -19 m for 10TeV gammas. That's 10^22 or more.

Allan

ps has anyone else noticed how nicely LED's voltage ties up with quantum theory?

Red light has an energy of about 1.8eV and blue about 3.6eV - and that's how many volts the LED needs to emit that colour..

Planck and Einstein were right!

A

No I will put out of your misery, it is radioactive half life.

It is 10-24 to 1030 seconds according to this:-

But that is only for isotopes. If you extend this to things like proton decay then you get to 1032 years

Grumpy_Mike:
What ever the value ( a practical value ) of R2 you use, you will always measure no voltage across it, because R1 is so high then virtually no current flows through it.

Getting back on track here from that diversion, I think the reason a spec isn't given for input resistance is because a CMOS input is not a simple resistance, especially with ESD protection diodes. Maximum leakage current is basically the only thing they can give there.

Should you model the "input resistance" of an analogue pin to ground?
The "resistance" of an analogue pin seems connected to a virtual point of about 0.3*VCC.
A/D reading of about 350 from a "floating" pin, even on a pin with a cap to ground.
Leo..

Yeah..... maybe input impedance. Could do some things to measure it. As everybody says here.... the resistive portion is going to be so large..... to not worry about.

Last time I tried that it was >1000Megohm.
Try it yourself by measuring voltage between pin and ground and pin and VCC. DMM on 200mV.
The DMM is really a 10Megohm resistor with a voltmeter across.
Ohms law will give you leakage current and input impedance.
Leo..

Jiggy-Ninja:
If you're considering something like that, go back to the drawing board.

Grumpy_Mike:
As others have pointed out your concepts are just wrong.

A little bit harsh there, don't you think? ::slight_smile:

allanhurst:
The input resistance, is, for all practical purposes, infinite unless you use the INPUT_PULLUP instruction.

Grumpy_Mike:
What ever the value ( a practical value ) of R2 you use, you will always measure no voltage across it, because R1 is so high then virtually no current flows through it.

My example might not seem practical to you. However, if we're talking about an electrical circuit (the one from my schematic above) which I could easily build on my desk right now - I consider this to be very practical. And if you will use a ≫1 MΩ resistor it will still behave in a certain way. It might not be what the overwhelming majority is concerned about, but I still like to think about what if. I really dislike the generalizing statement "never need to know the exact value for the resistance" - even if there isn't an exact value for this to begin with.

However, in between all this, you explained some things about the "composition" of digital input pins, which I found very interesting. I need to read up on that. So thank you for that. I appreciate it. :wink: