1

This can of course be done by using a resistor and in that way changing the actual voltage for the GPIO digital input pins on the RPi. But is it possible to set/change the actual threshhold on the RPi itself? According to what I have messured

HIGH > 1.5v and LOW < 1.5v

Ideal would be to rise the threshold to around 1.8 volt

acroscene
  • 115
  • 3

2 Answers2

1

It is not possible to set GPIO thresholds.
Input and Output levels are published in Voltage specifications

The I/O ports have two parameters which deal with the input level:

VIL: The maximum low level voltage.  
VIH: The minimum high level voltage.

Input levels are typically

Low should be <= 0.9V.  
High should be >= 1.6V.

I have done tests on a number of Pi to detect thresholds and to determine hysteresis.
These are basically normal CMOS levels.
The actual threshold is ~ 1.2V.
There is a small variation between individual Pi and the actual levels vary when rising & falling as hysteresis is enabled by default.

When designing circuitry I design for 0.8V to ensure LOW and 2.2V to ensure HIGH. This allows for normal component tolerances.

Milliways
  • 59,890
  • 31
  • 101
  • 209
0

No. The Pi provides no mechanism for varying the voltage thresholds for a GPIO being seen as high or low.

You will need to use external hardware.

joan
  • 71,024
  • 5
  • 73
  • 106