Multimeter readings in TriState of a pin

Go To Last Post
22 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello

 

to my understanding when switching to TriState of a pin  the pin on multi-meter should read infinity voltage and/or 0 voltages to any source (that 0 voltage between pin and VCC and 0 voltage between pin and GND )

 

however setting PORTB=0 and switching DDRB i see readings , specifically in bread board i see switching from 0 to 4 volts compared to GND and  4.8 to 0.3 compared to VCC

also in STK500 i see switching 11.5 to about 6.5 compared to +12v input

 

offcourse LED blinks. but isn't "logical" to read 11.5 and infinity

 

 

[ EDIT] typo correction in infinity

Last Edited: Sat. Aug 27, 2016 - 09:00 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I doubt the multimeter could read infinite voltage - Ohms maybe. What the meter will read is indeterminate - there is leakage and capacitance to consider. What are you wanting to achieve?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Originally, plouf wrote:
 infinitive voltage

Sorry, that makes no sense.

 

http://www.oxforddictionaries.co...

 

Did you mean "infinitesimal", perhaps?

 

http://www.oxforddictionaries.co...

 

 

The fact is that in "TriState" the pin is effectively open-circuit - so your meter will just pick up whatever noise happens to be around. 

 

And any leakage will cause the voltage to drift up or down.

 

 

Edit:

Since writing the above, the OP has changed it to say, "infinite voltage" - which still can't be right!

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Sat. Aug 27, 2016 - 09:01 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

driving an external ADC input from 0 to infinιty reading (like wire cut)

 

 

i mean no readings (aka when you have multimeter in voltage and lead to air says something like   1.[space]

 

 

 

 

 

[ EDIT] typo correction in infinity

Last Edited: Sat. Aug 27, 2016 - 09:00 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

plouf wrote:
 infinitive (sic) reading

You've done it again - "infinitive" is meaningless here!

 

plouf wrote:
driving an external ADC input

As already noted, leakage at that external ADC input is likely to be the deciding factor in what your meter is measuring

 

There was recently a long discussion on the meaning of "tri-state" here: https://www.avrfreaks.net/comment...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're talking about the Ohms function on the multimeter, not the volts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I ?

 

talking about volts, in ohms i read more "as expected" readings
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

plouf wrote:
i mean no readings (aka when you have multimeter in voltage and lead to air says something like   1.[space]

If you're going to edit you post after people have replied, please make sure that it is clear where & what you have changed - otherwise the whole thread makes no sense!

 

A better approach would be to add a Reply with the clarification.

 

As Kartman said, what you're describing there is the meter indicating "infinite" resistance - that is, a resistance beyond its currently-selected measurement range

 

http://www.oxforddictionaries.co...

 

That is a very different thing from infinite voltage !!

 

surprise

 

As I said before, a voltmeter with the leads unconnected will just pick up whatever noise happens to be around; and any leakage will cause the voltage to drift up or down.

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

plouf wrote:
talking about volts

No - that can't be right!

 

What you described is what digital multimeters do when set to resistance (ohms) - not volts.

 

plouf wrote:
typo correction in infinity

Infinity is still wrong - it cannot possibly be infinite voltage!!

 

But infinite resistance (ohms) does make sense.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Tristate is high impedance. DMM in volts range should also be high impedance. The voltage reading will be indeterminate and dependant on induced noise and other factors but likely to read as low voltage near zero.  DMM in resistance range should read as very high resistance. 

 

however setting PORTB=0 and switching DDRB i see readings , specifically in bread board i see switching from 0 to 4 volts compared to GND and  4.8 to 0.3 compared to VCC

 

What is connected to the pin?  It is not normal practice to measure voltage referenced to VCC however if you do you need to state what VCC is.

driving an external ADC input from 0 to infinιty reading (like wire cut)

 

Driving an input with what?  If you meant reading an ADC with nothing connected then depending on the input impedance and what exactly is connected it could read anything although typically it will read a value near zero.  If you have a long bit of wire connected to it you are likely to pick up mains hum and RF but it also depends on you reference (Analogue ground).  If you power your circuit from an Earth referenced supply you are likely to reference all your readings to earth.  If you power from an isolated supply or battery then your reference will float.

 

I hope this helps.

 

David

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thats correct !

 

i read 0.00 with probes in air ! my mistake

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DAFlippers wrote:
 an ADC with nothing connected ... typically it will read a value near zero.  

There could be leakages around - both inside the ADC chip itself, and in external wiring, etc - which could make it drift towards a "high" voltage. So you could actually get a reading near maximum ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

plouf wrote:
i read 0.00 with probes in air ! my mistake

With the meter in Volts mode.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hopefully the confusion has been cleared up. Is there still something unexplained?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

firstly thank all for your time

 

i have done more tests, and it seems that STK500 have some leakage to somewhere. Even if i believed that i have seen similar results in "bare chip on breadboard" most probably i have done something wrong

 

i have noticed thought that

a) not all pins react the same some have better results

b) even in tristate it goes up to VCC (of chip aka 5v) therefore in ultra external impedance circuit it obvious will affect this external circuit

c) dont trust STK500 ;)

d) my cheap multimeter i bought yesterday at 13euro has significant clearer view/results (1) (maybe its brand new)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lets back up a bit. Lets analyze what a meter OUGHT to read. It is not completely intuitive. And, it will vary with the meter type (electronic "digital" meter vs analog "needle" meter).

 

1. Pin = low output with no load: Meters (either type) on voltage scale should read a few hundred millivolts, at most, when measured with respect to ground. 

 

2. Pin = high output with no load: Meters (either type) on voltage scale should read a few hundred millivolts, at most, LESS THAN Vcc when measured with respect to ground. If you measure between Vcc and the pin (positive probe to Vcc), you should read no more than a few hundred millivolts.

 

3. Pin = low or high output with DC load (not another CMOS input): depending on the value of the load current and whether that current is flowing to ground or Vcc, you can measure more than a few hundred millivolts drop between the supply rail (ground or Vcc) and the output pin.

 

4. Pin = low or high output: meters (either type) on resistance scale will give misleading results. This is NOT a useful measurement because the meter will convert any voltage, present, into what it thinks should be the resistance, except it won't be the actual resistance. 

 

5. Pin = input with no pull-up resistance (internal or external): A digital meter may give a "floating" voltage reading; that is, it may vary up and down unpredictably, much like measuring with the probe leads NOT connected to anything. With an analog meter, it will vary with how it is connected, and the results will be contradictory. If you measure voltage between the pin and ground, it will read zero volts. If you measure between the pin and Vcc, it will also read zero volts. How can that be? The relatively low input resistance of the analog meter will cause the output to float to the voltage that the other probe of the meter is connected. 

 

6. Pin = input with pull-up resistance: If the pull-up is to Vcc, then a digital meter referenced to ground will read Vcc, or very close to it. An analog meter referenced to ground may read somewhat less than Vcc, depending on the value of the pull-up resistor AND the input resistance of the meter (which depends on the voltage scale).

 

7. Pin = input with no pull-up resistance (internal or external): A digital meter resistance measurement MAY show nearly infinite resistance or might not. That is because infinite resistance is when the meter input voltage is allowed to rise to several volts (maybe 4 or 5). If you connect it to something which is highly nonlinear, like a CMOS input, the voltage may rise to the level where the ESD protection diode in the CMOS input turns on. This voltage depends on the Vcc of the system. What the resistance meter will indicate is anyone's guess. But, my strong guess is that it WILL NOT show "infinite". In the case of an analog meter resistance measurement, it depends on the battery voltage used for resistance. If it is a 9V battery, the terminal voltage needs to rise to nearly 9V to show "infinite". It can never do that in a low voltage powered logic system. So, it will show something less than infinite, even when there is nothing else in the circuit besides that open input.

 

The take-away from this list OUGHT to include the following conclusion: resistance measurements in logic-level circuits are, at best, not very useful. At worst, resistance measurements can result in misleading or erroneous readings. Maybe that meter is the only measuring instrument you have. But, even if it is, trying to get information from what you think is a "resistance" measurement is probably not worth the time and effort to do it.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I typically don't measure the voltage of a non-connected pin in tri-state.

However, if the voltage on the pin (with nothing connected) appeared to be near VCC, I would first determine if the pull up for that pin had been enabled.

A way to determine if a pin is truly tri-state would be to measure the voltage on a pin when a resistor (20K to 47K) is connected between the pin & GND and then measuring again with the resistor between the pin & VCC.

1) If the voltage at the pin is near the supply rails in both cases, then it is (probably) tri-state.

2) If the voltage is near the middle of range with the resistor to GND, then the pull up is (probably) active.

3) If the voltage is always high, the pin is (probably) set as an output being driven high.

4) If the voltage is always low, the pin is (probably) set as an output being driven low.

5) Other results are possible, (probably) indicating a bad pin.

 

I say probably a lot, because I have come to realize just how many times a general statement is taken as an absolute (e.g. case 2 above could be due to a square wave output on the pin.) smiley

 

Edit: Jim replied as I was typing...

David (aka frog_jr)

Last Edited: Sat. Aug 27, 2016 - 05:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The other thing to remember is...

 

your meter has a 'resistance' ie to your circuit it appears as a resistor connected across the input leads. You need to know what this resistance is to make sense of any reading you take.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Correct. For a digital meter,m that resistance tends to be constant (that is, it does not change with the voltage range) and can often be in the MegOhm range. For an analog meter, the input resistance is given in "ohms per volt", often stamped right on the face of the mater. A 20,000 ohms per volt meter on a 1V scale will have an input resistance of 20K. On a 10V scale of the same meter,m the input resistance will be 200K. 

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And another thing to remember is that meters (analogue or digital) will only give meaningful readings for steady state signal - or signals that change only very slowly.

 

If the pin is oscillating or varying at anything above, say, 1 Hz a meter reading is not going to be helpful.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've lost the identification of the quarry of this hunt.

 

In the opening post, OP seems to indicate fairly large voltage drops, but not many details.  "STK500" voltage drops, but surely that cannot be VTG.

 

Raw nominal 12VDC from an unregulated wall-wart?  Of course that will show a biggish drop from very-light to normal load.

 

"of course the LED lights" -- STK500 LED, or a high-current LED attached to an AVR pin without a current limiting resistor?  If the latter, of course there will be a voltage drop.

 

I suggest that OP make a table of tests and results.  Tell the test conditions for each.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

plouf wrote:

...also in STK500 i see switching 11.5 to about 6.5 compared to +12v input

 

Which, when measured properly, ie WRT 0V, gives us 500mV and 5.5V which is entirely believable.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss