ReVolt
Posts: 4
Joined: Fri Apr 24, 2020 8:48 pm

Testing GPIO with multimeter

Mon Apr 27, 2020 6:50 pm

Can someone explain to me like a child how I would go about testing the current/voltage of GPIO pins using a multimeter?

User avatar
neilgl
Posts: 2111
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Testing GPIO with multimeter

Mon Apr 27, 2020 7:12 pm

Voltage: Put one wire (black) of the digital multimeter to pi Ground (see pinout link below) e.g. physical pin 39. Then use the DMM red wire to look at one other GPIO pin. Be careful not to short two pins with your probe! https://pinout.xyz/ Might be best to use male to female “DuPont” cables to connect to the pi pins, then to multimeter.
You can also look at the state of all pins using software commands raspi-gpio get

Current - depends what you have connected - limit is 16mA max for one GPIO I think.

ReVolt
Posts: 4
Joined: Fri Apr 24, 2020 8:48 pm

Re: Testing GPIO with multimeter

Mon Apr 27, 2020 7:36 pm

Thanks for the info.
careful not to short two pins with your probe!
What exactly is shorting the pins? Does that mean touching multiple pins with the same probe?


Few more questions...
- Should the pins be in INPUT or OUTPUT mode when testing?
- Is `raspi-gpio` get similar to `gpio readall`
- Should I have the voltage on the PIO configured? (eg `gpio write 29 1`)
- What readings should I be expecting?

User avatar
neilgl
Posts: 2111
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Testing GPIO with multimeter

Mon Apr 27, 2020 7:56 pm

What exactly is shorting the pins? Does that mean touching multiple pins with the same probe? - yes, with the metal part of the probe (plastic is ok as non-conducting)

Few more questions...
- Should the pins be in INPUT or OUTPUT mode when testing? - depends what you are looking to do - e.g. check outpout voltgae is 3.3V, so should use an output
- Is `raspi-gpio` get similar to `gpio readall` - No as gpio readall is using GH wiringpi (deprecated)
- Should I have the voltage on the PIO configured? (eg `gpio write 29 1`) - if you want to see the output voltage - yes - use raspi-gpio set 20 dl Set GPIO20 to output low/zero (must already be set as an output)
- What readings should I be expecting? - depends what you have set on input/output and some pins are set by enabled interfaces, serial, I2C, PWM etc.
Install via sudo apt install raspi-gpio
I thought this was a beginner question?

ReVolt
Posts: 4
Joined: Fri Apr 24, 2020 8:48 pm

Re: Testing GPIO with multimeter

Mon Apr 27, 2020 11:27 pm

I thought this was a beginner question?
Heh.. Is this not considered beginner?

So I am pretty sure I answered this with the user of the multimeter but I should be testing DC voltage correct? Are there any good guides on all of the terminology and what not (eg wtf is a pull-up/pull-down, what is ground used for, what are the 3.3 and 5.0 v used for, etc). Basically I have no clue on how all of these related to each other.

Thanks again


boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Testing GPIO with multimeter

Tue Apr 28, 2020 4:12 pm

I will give you some very good advice , Put you Pi back in Its box, until you have learnt some VERY basic Electronics
After you have learnt some basics you will under stand what you are being told. Learning basic Electronics you will
need the Following
0 / 12volt 3/4 amp power supply, Breadboard Jumper wires Collection of component's Book on Ohms Law
Book on starter circuits to build ( Do Not Use The Pi as Your Power Supply ) You must start from the very bottom
Reading your post tells me this

Regards BoyOH Retired Electrical Electronics Technician
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Testing GPIO with multimeter

Wed Apr 29, 2020 10:34 pm

THIS WILL EXPLIAN THE USE OF PULL UP AND PULL DOWN RESISTORS


You are given the option of setting the GPIO I/P
To a impedance level that the processor can
Respond to. In its high impedance state floating
It will not sink or source a working level signal
This being a logic level 0 low or 1 high, So you
MUST set it to a working impedance level by
Setting the internal resistance 50k or using a
External resister of 10k . If you want it to respond
To a logic 1 high you connect it to the 0v rail
If you want it to respond to a logic 0 low you
Connect it to the 3.3v rail
One point is if you have the pull-up resistor
To low a value this will set the IN/Put impedance
To low , Ok for noise suppression ,but will degrade
THE SIGNAL

REGARDS BOYOH
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

hippy
Posts: 7459
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Testing GPIO with multimeter

Thu Apr 30, 2020 12:14 pm

boyoh wrote:
Wed Apr 29, 2020 10:34 pm
In its high impedance state floating
It will not sink or source a working level signal
This being a logic level 0 low or 1 high, So you
MUST set it to a working impedance level by
Setting the internal resistance 50k or using a
External resister of 10k
That seems a very confusing way to describe things. It may be true when using an external switch, short to 0V or 3V3, but I have not noticed any issues when driving a Pi input pin from an output pin without a pull-up or pull-down.

boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Testing GPIO with multimeter

Thu Apr 30, 2020 3:39 pm

hippy wrote:
Thu Apr 30, 2020 12:14 pm
boyoh wrote:
Wed Apr 29, 2020 10:34 pm
In its high impedance state floating
It will not sink or source a working level signal
This being a logic level 0 low or 1 high, So you
MUST set it to a working impedance level by
Setting the internal resistance 50k or using a
External resister of 10k
That seems a very confusing way to describe things. It may be true when using an external switch, short to 0V or 3V3, but I have not noticed any issues when driving a Pi input pin from an output pin without a pull-up or pull-down.
From BoyOh

Introduction
In reading about using the GPIO pins of either a [Raspberry Pi][rpi], an Arduino, or some other single-board computer or micro-controller, you have probably seen reference to pull-up and pull-down resistors. But what are they and why do we need them?

Before explaining their use, we need to understand the nature of a general-purpose input/output pin (GPIO pin).

Logic Levels and GPIO Pin States
The purpose of a GPIO pin is to either influence the action of an external circuit, by toggling the high or low state of the pin used as an output, or to monitor the state of some external circuit on a pin configured as an input.

But what do we mean by high or low?

The general-purpose input/output pins on the Raspberry Pi have a high logic level of 3.3 Volts.

In reality there will be a level somewhere between zero volts and 3.3 which represents the threshold above and below which the state is said to be either low (below the threshold) or high (above the threshold).

Let’s assume this threshold is 1.65 volts, half-way between zero and 3.3 volts.

Now let’s assume we have configured one of the pins as an input, to monitor the state of a momentary press button. That is, a button which does not latch, but which has contacts which are closed when it is pressed and open when it is not.

How should we wire this button to the pin, so that when it is pressed, the state of the pin is low, and when it is not pressed, it is high.

The answer is to wire the button so that it forms one part of a potential divider with either a pull-up or a pull-down resistor.

A Potential Divider
What
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Return to “Beginners”