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

2 Answers 2

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.

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.

1
  • what external hardware are you thinking of?
    – acroscene
    May 4, 2023 at 12:14

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.