Minimum Input Current

gdenehy

Member
Hi,
What is the minimum current that counts as a 1 on an input?
And therefore what is the maximum value of resistor between 5V and the input pin?
 

leftyretro

New Member
Hi,
What is the minimum current that counts as a 1 on an input?
And therefore what is the maximum value of resistor between 5V and the input pin?
That is a valid question but I don't think you will find it as a published specification. A digital input will have a given internal input resistance (impedance) and the logic voltage impressed by a pull up resistor will divide between the pull up resistor and the internal input impedance. If it divides down lower then the published minimum voltage of a HIGH then you can have problems.

Anyway whatever the internal impedance is, it's probably somewhat temperature dependent and of course the logic voltage levels themselves are dependeant of the Vcc voltage the chip is being powered from. An easy method to see if a external pull up resistor is too large of a resistance is to wire it up and then read the voltage at the I/O pin with a high impedance digital multimeter, most are 10 megohm or higher. If the measured voltage is higher then the minimum required for a valid HIGH for the Vcc chip voltage be used, then you are OK.

So what is the reason for the question? There really is not much current that is going to be flowing into a digital input so I don't think there is much power going to be saved by drastically increasing the value of a typical external pull up resistors.
 
Last edited:

BeanieBots

Moderator
It's actually a little more complex than that. Not only is the magnitude of the input current indeterminate, it's direction is also indeterminate.

The more important question is WHY do you need to know?
If it is purely for academic reasons, then read up on "current mirror" and "long tailed pair". These will give insights on how input circuitry works.

If you need to know because of issues you are having with a driving circuit, then please explain further because there is almost certainly soemthing else you will need to consider at impedances close to those of an input.
 

moxhamj

New Member
I tend to use 10k or 100k. I'll bet 1M works fine too. Higher values work in theory. But the resistance of a finger is a few hundred k. And there is a real resistance from a greasy fingerprint on a board, and other dirt. So if you build a board and clean it with that that cleaning fluid you can get high on, and then spray the board with lacquer, you can be sure that the resistance between pins is many hundreds of megohms. But if you build it on a protoboard, that big greasy fingerprint and the beer you spilt on the board etc will all be acting as resistors too, and even 100k might not pull a pin definitely to where you want it.
 

gengis

New Member
Like everyone is telling you, you're more concerned with the input impedence.

The microchip specifications show a 1 microamp input current in a chart (at 5 volts) and 500 nano amperes in the diagram of the input circuit equivalent. Those are likely the worst case values and will change with supply voltage and temperature.

So a one megohm should be good to go . . .
 

hippy

Ex-Staff (retired)
There have been cases were people have had problems with programming PICAXE's from laptops on 0v/5V serial where it has been suggested to either lower the 22K or run the PICAXE on a lower voltage ( lowering VIL ). This effectively increases the voltage drop across and the current through the '22K' and into the input.

I'm not sure if anyone ever reported back if either trick worked, but if it does it suggests there is a minimum R in practice.

Simplest way is perhaps to experiment; feed a PICAXE output via a big R and check an input follows the toggling output.
 

BeanieBots

Moderator
There's more than just DC resistance to consider. That's why it is referred to as "impedance". Circuits such as the dowload circuit also need to take into account the input capacitance. A typical input capacitance might only be a few pF but it can make all the difference when things are "close to the edge".

Capacitance is the largest contributor to the maximum "fan-out". The maximum number of inputs an output can drive at the specified frequency.
 

premelec

Senior Member
float?

We've been warned about floating inputs and many of us have been tripped up by them - the practical question is how much resistance at what operating temperature keeps an input from "floating" - and perhaps if you do use 1meg you better put a small capacitor across that resistor to kill some of the RF and AC around the circuits - wicked ubiquity... :)
 

gdenehy

Member
Just asking out of curiosity. I didnt think of the input resistance (or impedance).
So it really makes no difference if you use a 1k, 10k or 100k?
 

moxhamj

New Member
It does make a difference to current consumption, and this could be a factor if you are running on batteries. Say you used 1k to pull an input pin low, but something was feeding 5V into that pin most of the time. You are wasting 5mA. 10k is 0.5mA etc.
 

stanb112

New Member
Bad Chip?

Do I have a bad 08m chip? I want to switch PIN2 high through a resistor and push button to +V. I tied the pin to ground through a 15k resistor but had to use less then 47 ohms (not 47K) between the pin and +5v to get it up over the 80% level. The manual states all pins are set as INPUT pins on power up and this doesn't make sense to me. What could be wrong? Stan
 

BCJKiwi

Senior Member
Check the suggested circuit on Page 25 section three of the manual - Is this how the circuit is configured?
Ensure the 1k equivalent is between the switch and the pin, not between V+ and the switch.

Presumably when you say PIN2 this is physical LEG5/in2 - is this the pin - please confirm.

Not sure where the 15k and 47k values came from but they are not the usual values of 10k and 1k as per the manual.
The 10K (in your case 15K) is the 'pulldown' to ensure the input is low (or off) when the switch is open.

If the 47k or 47R or 1k is between V+ and the switch then a voltage divider with the 10k is created resulting in a lowered voltage at the pin - certainly much too low when using 47K
 

Andrew Cowan

Senior Member
You are creating a voltage divider of 47R and 15K - this gives 4.98V on the output.

Increasing the 47R resistor's resistance will decrease that voltage. Most circuits use no resistor at the top - a switch has 0 ohms resistance when it is on (idealy).

A
 

Dippy

Moderator
Hi Stan,

Firstly, if you keep to the pin names as used in Manual 1 then we don't have to go through the question/answer sequence of confirming which physical leg/pin you use.
Its a useful 'convention' which disambiguifies descriptions.

As BCJ wants you now to confirm; are you talking about "In2" (physical leg 5 as shown in the PINOUT diagram in Manual1) ?

Secondly, it is HIGHLY unlikely that you have a duff PICAXE. Obviously not impossible, but most faults where people question the chip usually find it's themselves to blame or they (or a 'friend') have damaged it.

Thirdly, with the 47R and 15K you should be easily OK; the voltage calc by Andrew is correct.

Lastly, you say 80%... is that using a multimeter? Or is that using BASIC code to test the 'logic' level of the pin.
Have you tried an 'Input' statement to make sure the pin/leg is an input?

Post your code and wiring diagram (aka 'schematic')

If you are using a multimeter, then take the PICAXE out of the equation - just connect your resistors and P/B switch and connect Multimeter.
If you are only getting to 80% of 5V (with P/B pressed) then you have something else going wrong.
Have you double-checked component values?
Have you checked resistance of switch (when closed)? I assume it is push-to-make?
(Was it hacked from Grandpa's 1954 radiogramme? Or bought from Ebay?)
 

Dippy

Moderator
Why does everyone keep saying 47K?

Stan's post says: "I tied the pin to ground through a 15k resistor but had to use less then 47 ohms (not 47K) between ..."

I assume as it went quiet that the problem is sorted?
 

BCJKiwi

Senior Member
Hmm semantics again,

Assumed Stanb112's "had to use less then 47 ohms (not 47K)" meant 47K didn't work as intended so had to change to 47R).
 

Dippy

Moderator
Ummm... try as I may, I cannot read it any way other than:
"..had to use less then 47 ohms (No, not 47K before you lot ask me whether I'm sure!)...."
:)

I'd still check component with multimeter though as something is wrong and I'd bet 10p that it's not the PICAXE ;)
 

BCJKiwi

Senior Member
Well the real story is that neither 47R nor 47K are required so the Qs asked before still stand unanswered.

I guess gdenehy got his answers but stanb112 has still to let us know whats happening on his circuit.
 
Top