Hi all,
I'm testing inputs on the pi and even when activating the pull-up resistors I get 100's of high/low changes per second.
I've tried all pins and the only couple that work are the I2C pins, GPIO 0/1 or GPIO 2/3 for those of you with a revision 2 board. I know these have pull-up resistors permanently attached.
Does owning a revision 1 board make a difference here?
Thanks for any help,
Kev
-
- Posts: 5
- Joined: Sat Nov 30, 2013 9:19 pm
Re: Which gpio pins have pull-up/down resistors?
All 54 gpios have internal pull-up/down resistors which may be set programmatically.
The user accessible* ones, with the exception of SDA/SCL should all work as expected. Perhaps your testing is faulty?
* User accessible
rev.1 board gpios 0, 1, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25
rev.2 board gpios 2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 22, 23, 24, 25, 27, 28, 29, 30, 31
The user accessible* ones, with the exception of SDA/SCL should all work as expected. Perhaps your testing is faulty?
* User accessible
rev.1 board gpios 0, 1, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25
rev.2 board gpios 2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 22, 23, 24, 25, 27, 28, 29, 30, 31
Re: Which gpio pins have pull-up/down resistors?
The behaviour of pins going up and down is normally due to having no pull-up resistors.
Enabling pull-ups is what I do to STOP spurious state changes.
is this happening with your RPi just sitting there with nothing attached or is it when you've got something plugged into it?
Simon
Enabling pull-ups is what I do to STOP spurious state changes.
is this happening with your RPi just sitting there with nothing attached or is it when you've got something plugged into it?
Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
http://cymplecy.wordpress.com/ @cymplecy on twitter
-
- Posts: 5
- Joined: Sat Nov 30, 2013 9:19 pm
Re: Which gpio pins have pull-up/down resistors?
Yes I'm trying to use the pull-up function correctly. I'm programming in ruby using pi_piper. After setting a pin as input/pull-up I attach it to earth using a 20cm cable. When removing it from earth I get the floating on/off while the wire is indeed floating. It's a pretty basic test.
Anyway to confirm that pi_piper is setting the pull_up correctly?
I'm doing this on Raspbian btw.
Anyway to confirm that pi_piper is setting the pull_up correctly?
I'm doing this on Raspbian btw.
Re: Which gpio pins have pull-up/down resistors?
In effect you connect a 20cm aerial to the gpio?
The pull-up/downs are of the order of 60Kohms.
There is no software read-back of the pull up/down setting.
The most likely explanation is the software is setting the pull-up on a different gpio to the one you expected. Personally I only use Broadcom gpio numbers. Depending on the software you use it may be referring to pin numbers, Broadcom gpio numbers, or "logical" gpio numbers.
The pull-up/downs are of the order of 60Kohms.
There is no software read-back of the pull up/down setting.
The most likely explanation is the software is setting the pull-up on a different gpio to the one you expected. Personally I only use Broadcom gpio numbers. Depending on the software you use it may be referring to pin numbers, Broadcom gpio numbers, or "logical" gpio numbers.
Re: Which gpio pins have pull-up/down resistors?
And a 20 cm loose wire in a hostile EM environment might over-come the software pull-ups 
You might have to use real resistors
Simon

You might have to use real resistors

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
http://cymplecy.wordpress.com/ @cymplecy on twitter
Re: Which gpio pins have pull-up/down resistors?
I have done an experiment which demonstrates the amount of mutual interference that there can be between gpios. It may all be down to my poor wiring techniques (ribbon cable, unshielded wires etc.).
http://www.youtube.com/watch?v=IHqaM9hdgJ0
Only one gpio (22) is being actively driven.
In the later part of the video a 20 cm wire is inserted in gpio 25 and a nice regular square wave appears (10ms on, 10 ms off, mains hum?).
http://www.youtube.com/watch?v=IHqaM9hdgJ0
Only one gpio (22) is being actively driven.
In the later part of the video a 20 cm wire is inserted in gpio 25 and a nice regular square wave appears (10ms on, 10 ms off, mains hum?).
Last edited by joan on Fri Dec 20, 2013 10:32 am, edited 1 time in total.
-
- Posts: 5
- Joined: Sat Nov 30, 2013 9:19 pm
Re: Which gpio pins have pull-up/down resistors?
I was thinking there maybe interference from other pins too. I'm using 14 pins in my project. 8 connected to a relay module and 6 used as inputs. I'm designing a PCB using fritzing (awesome app BTW!) so have now included some external pull up resistors. It seems that a 10k pull up is pretty normal? Just need to work out if [email protected] is too much for the pi.
Thanks for your help guys.
Thanks for your help guys.
Re: Which gpio pins have pull-up/down resistors?
10k @ 3v3 gives 0.33mAJumpMaster wrote:... It seems that a 10k pull up is pretty normal? Just need to work out if [email protected] is too much for the pi...
So 6 x 10k gives 1.98mA - well within the nominal 50mA budget.
Though it will depend on what else is drawing current.
Re: Which gpio pins have pull-up/down resistors?
10K resistors would be fine as pull-ups. At most they would take (3.3 V/10,000 Ohms = 0.00033 A) 0.33mA each, which is about 2mA for 6 - well within what is allowed from the GPIOs.
... and Burngate beat me to it
... and Burngate beat me to it

-
- Posts: 5
- Joined: Sat Nov 30, 2013 9:19 pm
Re: Which gpio pins have pull-up/down resistors?
Thanks guys.
Nothing else drawing current from the 3.3v rail. The relay module has it's own 5v power supply for the relays themselves, and uses 5v from the pi for the circuitry activating the relays.
It's all coming together nicely
Nothing else drawing current from the 3.3v rail. The relay module has it's own 5v power supply for the relays themselves, and uses 5v from the pi for the circuitry activating the relays.
It's all coming together nicely
