This comes from the Raspberry Pi "fart detector" project. It says to place a 47k Ohm resistor connected to ground in order to siphon off a certain amount of voltage so that the voltage read from the GPIO pin is less.

Given that the row in a breadboard is connected by the same metallic element (thereby electrically common), why doesn't the majority of current flow through to the GPIO pin? Is this because the GPIO pin is acting as voltmeter and thus providing very high resistance? If this logic is true then could the resistor theoretically be placed at J1 and have the same effect?

EDIT: Experimenting with this configuration I found that modifying the arrangement of the resistor relative to the GPIO input didn't make a difference which fundamentally makes sense. When completing everything even moving the resistor ladder around didn't matter as well. The best way I can explain this to myself is that the voltage is present in the same form as long as you are on a common ground.

I wasn't able to find out much about how the input of a GPIO actually works but it seems like it basically draws barely any current and acts as a voltmeter. This allows all 5 resistors to do their job to regulate the current.

(source: raspberrypi.org)

(source: raspberrypi.org)

  • \$\begingroup\$ Yellow-Purple-Red resistors are 4.7k (shown in diagram) rather than 47k (described in text). \$\endgroup\$
    – JYelton
    Oct 4, 2014 at 19:22
  • \$\begingroup\$ I am referring to the 47k resistor which is R0. R1-4 should be irrelevant but that was the only schematic I can find. \$\endgroup\$
    – edaniels
    Oct 4, 2014 at 19:25
  • \$\begingroup\$ I see, I just saw it on the Fritzing diagram and thought I would point it out in case it was causing issues. \$\endgroup\$
    – JYelton
    Oct 4, 2014 at 19:27
  • \$\begingroup\$ Oh no worries. The Fritzing diagram is actually showing a 47k as well but the orange is hard to distinguish from the red. \$\endgroup\$
    – edaniels
    Oct 4, 2014 at 19:36

1 Answer 1


Well, there's a problem with this instructable, in that voltage does not leach off to anywhere. Voltage does not posses the ability to leach. Only current does.

In fact, nothing is being leached, by its official definition.

The sensor acts like a variable resistor on its sensor pins. So by adding another resistor to ground you just allow a current to flow, from the supply through the sensor and through the resistor to ground. The point between the sensor and the resistor then become the centre point of a voltage divider, the exact voltage of which is determined by the resistance of the sensor. This resistance is in turn determined by the amount of contamination in the air/gas inside the sensor.

Without the external resistor you would just measure 3.3V, as the current into the input pin is microscopic and would not cause a measurable voltage drop.

EDIT1: Add to that the fact that to make a full-range adjustability, according to the later section on the resistive ladder R-2R network on the other pins (homework: verify), the resistor would be much better chosen to be about double the value, let's say about 91kOhm. (Or stay at 47kOhm and the whole ladder divided by two, depending on whether you want higher sensitivity (91kOhm and same ladder) or deeper measurement (47kOhm and all ladder values halved)).

  • \$\begingroup\$ Seems I didn't use the question's wording, but as my answer is true for both the words leaching and siphoning, I'll leave it with this note instead of an edit. \$\endgroup\$
    – Asmyldof
    Oct 4, 2014 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.