TheBinarySheep
Posts: 5
Joined: Tue Sep 13, 2016 4:51 pm

Why use a resistor across IO pins?

Tue Sep 13, 2016 4:56 pm

I'm new to the Raspberry Pi, and have come across a couple of projects where there's a resistor across two of the pin and wondered why this would be?

For example, I think the first was a temperature sensor (DHT22/11), where there was a resistor across the data and the gnd connections.

I've seen another project where you interface the Raspberry Pi with trigger pins on an alarm system, and again there's a resistor bridged across the data and gnd connections.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5621
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Why use a resistor across IO pins?

Tue Sep 13, 2016 6:21 pm

TheBinarySheep wrote:I'm new to the Raspberry Pi, and have come across a couple of projects where there's a resistor across two of the pin and wondered why this would be?
For example, I think the first was a temperature sensor (DHT22/11), where there was a resistor across the data and the gnd connections.
I've seen another project where you interface the Raspberry Pi with trigger pins on an alarm system, and again there's a resistor bridged across the data and gnd connections.
Without any info. from the sensor and/or alarm data sheets my guess would be as a "stronger" pull-down than can be set by programming the SoC appropriately. (IRCC, "programmable" pull-ups/pull-downs are ~50k ohms ... so, what are the resistor values)
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Graymalk
Posts: 55
Joined: Wed Nov 11, 2015 8:33 pm

Re: Why use a resistor across IO pins?

Wed Sep 14, 2016 2:15 am

I honestly think a lot of people just don't know there's a built-in resistor.

ElEscalador
Posts: 839
Joined: Tue Dec 15, 2015 4:55 pm
Location: Detroit, MI USA
Contact: Website

Elescalador

Wed Sep 14, 2016 4:29 am

Without more details, I'm going with "old habits die hard." I've had to with every other microcontroller because they'd happily pull too much current and fry. Now I've learned I don't generally need to with the Pi, but it still feels weird not to.
Robotics tips, hacks, book extras https://youtube.com/practicalrobotics

User avatar
PeterO
Posts: 5878
Joined: Sun Jul 22, 2012 4:14 pm

Re: Elescalador

Wed Sep 14, 2016 6:32 am

ElEscalador wrote:Without more details, I'm going with "old habits die hard." I've had to with every other microcontroller because they'd happily pull too much current and fry. Now I've learned I don't generally need to with the Pi, but it still feels weird not to.
I think you might be mixing up "pull-up" and "pull-down" resistors with "current limit" resistors which are in series with the GPIO pin not in parallel.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “General discussion”