I have an arduino uno. it is being powered by a 12 adapter thru the barrel jack.
there in no wire , no resistor connected to the arduino uno . literally an empty ardunio uno . nothing is connected to it.
i have used INPUT_PULLUP to pull up pin 4,5 internally.
pin 4,5 are shorting to the gnd sometimes. even though there is no wire connected to it.
I have measured the voltage at pin 4,5. at both pin voltage is ranging from 0.8v to 1.2v .(even though they are pulled up internally .)
In the serial monitor. i saw fluctuations in the both pin 4, 5 .
manveen_singh:
I have measured the voltage at pin 4,5. at both pin voltage is ranging from 0.8v to 1.2v .(even though they are pulled up internally .)
The pins have a weak pull up of about 200 uA.
I assume you didn't measure that voltage with a cheap 2kohm/volt analogue meter, because that would explain things.
Leo..
Wawa:
The pins have a weak pull up of about 200 uA.
I assume you didn't measure that voltage with a cheap 2kohm/volt analogue meter, because that would explain things.
Leo..
Using the OP code, I also get all 1's on pins 4 & 5. And I am measuring +5.01 V.
OP- What are you using to measure the voltage on the pin?
so this proves my volt meter is reading correct value .
I think you're missing the point.
A cheap analogue voltmeter can put a heavy load on the circuit.
VCC might measure 5volt, but if you measure that same 5volt through a ~30k pull up resistor, it's not reading 5volt anymore. Digital meters (even cheap ones) don't have that 'problem' because their input impedance is usually >=10Megohm.
Try measuring a 9volt battery through a 10Megohm resistor. You most likely will measure 4.5volt with a DMM.
Because the resistor and DMM are now a 1:1 voltage divider.
And yes, if the Uno reads a '0' with nothing connected, then there is something fishy going on.
Did they (clones?) come with pinheaders already soldered on, or did you do that yourself.
Leo..
Maybe the Arduino is on some conducting surface? I put Uno on a brass plate once and was wondering why nothing works. It was powered from a laptop USB and its overcurrent protection was fast enough to prevent any damage.
manveen_singh:
I have measured the voltage at pin 4,5. at both pin voltage is ranging from 0.8v to 1.2v .(even though they are pulled up internally .)
When your DVM measures 0.8V to 1.2V, you get random 1, 0, 1, ... on the display. What you have observed can be interpreted from the electrical characteristics (Fig-1) of ATmega328P.
Fig-1 says that maximum value of VIL is 1.5V (0.3xVcc); the value you have measured is 1.2V which is very close to 1.5V; so, the corresponding logic could be LOW (0) or in the forbidden zone (>=1.5V) which could be HIGH (1).
Now, the question is: when you have grounded the inputs, how could it be that there is so much (0.8 to 1.2V) voltage at the input unless your grounding jumper is long and picking up some environmental noise or somother electrical fault which deserves investigation. For my MEGA the input voltage is almost 0V and stable for DPin-4 (mode: INPUT_PULLUP; input is shorted to GND).
Wawa:
I think you're missing the point.
A cheap analogue voltmeter can put a heavy load on the circuit.
VCC might measure 5volt, but if you measure that same 5volt through a ~30k pull up resistor, it's not reading 5volt anymore. Digital meters (even cheap ones) don't have that 'problem' because their input impedance is usually >=10Megohm.
i actually got your point .
my cheap dmm does not even have correct porbes . my probes broke . so i just cut the heads of the probes and soldered jumper wires on the ends .
I was using this voltmeter generally to test the continuity. and sometimes the voltage .
My point being that my arduino's "pulled up pin" was not being pulledup even before measuring the voltage with my DMM.
So someting is wrong with my arduino.
GolamMostafa:
Now, the question is: when you have grounded the inputs
I have NOT grounded the pin 4,5 . they are not shorted or connected to anything .
GolamMostafa:
how could it be that there is so much (0.8 to 1.2V) voltage
this voltage is at those 2 pins when they are left floating . (despite being internally pulled up.) (when no jumper , no wire , nothing is connected to them. )