Raspberry Pi Measurement of voltage and current at the GPIO output with high level under load
If you connect a high-level GPIO output to a Raspberry Pi, then you expect a voltage of 3.3 volts. Unfortunately, a GPIO output changes its voltage and current behavior under load.
How exactly can be determined with a series of measurements.
|Volt (V)||Amps (A)||ohm||ohm||Amps (A)||Volt (V)||Amps (A)|
|0||3.3||Comparative measurement without resistance||3,309||deleted|
The table consists of a total of 3 parts. The first part consists of the voltage of 3.3 volts (column 2) applied to the GPIO output (high) and a current from 0.001 A to 0.016 A (column 3). In order for the given current to be set below the specified voltage, a corresponding resistor must be used for this purpose, which was calculated for this purpose (column 4).
The second part of the table is that the calculated resistance values are not real resistances, but real resistances with other values have to be used. In this case from the E12 series (column 5). In some cases, there are overlaps with the calculated resistance values (between columns 4 and 5). Since a given current is set at a specified voltage at a given voltage, it was calculated (column 6). This current is what would be expected at the specified voltage of 3.3 volts.
The third part of the table deals with the actual measurement of voltage and current (columns 7 and 8). Here, first the voltage at the GPIO output (high level) was measured (column 7) to see if there are really 3.3 volts at the resistor. The current measurement was then performed (column 8) to see if the calculated current actually flows through the resistor.
The measurement 0 was made to check whether there really is a high level at the GPIO output and how high the high level is to be expected. The current measurement is omitted here, because there is no closed circuit here. Subsequently, the measurement was carried out 1 to 25. Once each for the GPIO output voltage and the GPIO output current.
Observation and evaluation of the measurements
- As the resistance decreases, the output voltage at the GPIO decreases.
- As the resistance decreases, the output current at the GPIO increases.
- As the output current increases, the output voltage at the GPIO drops.
While a stable voltage and current ratio is set up until measurement 22, from measurement 23 the measured value can only be read off the meter with difficulty. From 0.016 A or 16 mA, a GPIO output starts to float. The values for voltage and current fluctuate.
Findings and conclusion
The measurements show that a GPIO output under load has a lower output voltage than expected. When a current flows, the voltage drops. However, the actual output current remains behind the calculated current.
A GPIO output is a digital output that should not be loaded because the output voltage drops due to the output current. That is, the subsequent wiring must also be able to detect a voltage below 3.3 volts as a high level. That is to be tested. Or you have to make sure that the GPIO output is not loaded.
Basically, the output current must be limited. It would be better, however, to understand the GPIO output as a digital output, which you cannot remove power, but may only pick up the voltage level. A subsequent switch stage should be voltage and not current controlled. So a FET instead of a bipolar transistor.