It is obvious, that 3,3 V is a HIGH, and 0 V is a LOW at a GPIO input pin. But I am looking for the exact voltage thresholds for the GPIO input pins. I have a Pi B+ and a Pi 2.

Watching this video (for an older Pi) I get:

  • LOW: 0 - 1.19 V
  • HIGH: 1.34 - 3.30 V

Based on this, I connected 1 V to the GPIO input. The GPIO was still a HIGH.

This artice (linked here) sais:

  • VIL=0.8V means that if the output is Low it will be <= 0.8V.
  • VIL=1.3V means that if the output is High it will be >= 1.3V

These values are coming from the BCM2835, which the Pi until B+ is having.

I continued reading this article:

  • "Normally the voltage threshold is about 1.8V, but it isn't guaranteed; it can be anywhere between the maximum input low and minimum input high, that is, between about 0.8 and 2.0V."

These values are coming from the ARM1176JZF, which the Pi until B+ is having.

Looking at the table, I get:

  • Input high voltage VIH > 2.00 V
  • Input low voltage VIL < 0.80 V

So: what are the real thresholds? Are they coming from the BCM2835 or the ARM1176JZF? How about the Pi 2? Are the thresholds still the same as for the Pi B+?

EDIT: This article sais, "The GPIO pins are connected directly to the BCM2835 chip at the heart of the Raspberry Pi". Because of this I guess, the values are coming from the BCM2835 and they are 0,8 V and 2 V.

EDIT2: I using wiringPI with the following code to read the LOW/HIGH value:

gpio -g mode 21 in
gpio -g read 21
  • You should clarify how you have set the pin as an input and how you are reading the state. – goldilocks Apr 24 '15 at 16:01
  • I added the informations – Dennis Apr 24 '15 at 16:15
  • I do not agree that there will be one threshold consistent between Pis - it doesn't seem to make any sense - wouldn't each chip respond uniquely? – joan Apr 24 '15 at 16:52
  • And it might depend on what else is going on within the chip, or how warm it is, or stray EM, cosmic rays etc (as per the interesting photoelectric effect with the pi2 power supply) – paddyg Apr 24 '15 at 18:33
  • 1
    Yesterday I just had an analogue signal, e.g. a photoresistor. "High Low is detected on falling or rising edge" - this makes a lot of sense. Therefore I added a Schmitt-Trigger between the photoresistor and the Pi. Now I am getting perfect falling and rising edges. Thanks for the hint @ppumkin – Dennis Apr 25 '15 at 14:01

High Low is detected on falling or rising edge, just putting 1v doesn't produce and edge so to speak and may be inconsistent.

The GPIO inputs are floating on boot but then usually Pulled Down by default when everything is loaded up, so technically applying 1v will produce a rising edge and trigger the HIGH Input value.

If the GPIO is already pulled up or has an voltage of ~3.3v, falling from 3.3v to 1v produces a falling edge and produces a LOW. So you can see how 1v can be HIGH and LOW because its based on the Rising or Falling Edges.

This is useful for high frequency communications where the signal will rapidly change between the thresholds you mention but only edges will determine the actual value. This is why its called a Digital Input.

In logic LOW = 0 and HIGH = 1 ... what's in between? Floating uncertainty with random noise. As mentioned, these are digital inputs not analogue, you can't tell if the input is 1V or 1.5v, only 1 or 0.

Analogue inputs (don't exist on the Pi) will tell you exactly how much voltage has been applied if that is what you need.

  • I have to ask again: "GPIO input hysteresis (Schmitt trigger) can be on or off". Because of the hysteresis, the input pins must have a voltage threshold to detect LOW or HIGH. See elinux.org/… – Dennis May 5 '15 at 12:04
  • Sorry, was that a question? The GPIO is usually pulled down to 0v (after boot and set to LOW) when nothing is connected, but hysteresis is about lag between detecting these voltages, and usually has to do with high speed Pulse Width Modulation problems. Not sure what you mean. – Piotr Kula May 5 '15 at 18:19
  • Certainly there has to be some voltage limit below which it is always considered 0 and another above which it is always 1? It would make no sense that fluctuation e.g. between 0-0.5V would be considered jumping between 0 and 1. This page states that the limits are not properly specified, but provides guidance: mosaic-industries.com/embedded-systems/microcontroller-projects/… – Sampo Dec 22 '18 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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