The original post has been removed because it was out of date.
The original post contained input voltage and input current measurements taken on Raspberry Pi model A and model B boards. The GPIO (general purpose inputs/outputs) circuitry appears to have changed, probably since the introduction of the A+, B+ and subsequent models.
The original post argued that the measurement data indicated that the gpio, when operated as inputs, were probably 5V safe. The input current didn't show much of an increase (with input voltage increase) until the input reached about 5.8V. So my assertion is that there is probably input protection operating somewhere around 5.8V on these early models.
Therefore using pull-up resistors between inputs and 5V supply on model A & B Pi boards should be OK, and I have not had any failures.
What about newer Pi models?
I continue to use input pull-up resistors to 5V, but I've noticed that even relatively high resistance values result in almost the full 5V level appearing at the input.
So it looks like the input impedance is now much higher on the newer models (A+, B+, Pi2 & Pi3). I've noticed that the input current is much lower (approx 2uA against maybe 60uA for the earlier models).
As there are probably more of the newer design in circulation than the original models, I've crossed out much of the original text below (it is still readable, but remember it relates to the early models).
When I can find time to do a proper evaluation on a newer Pi, I'll come back an update this page.
My take on this
|This is a great illustration, but is it accurate?|With an input voltage near to the ideal 3.3V, the input current is approx 61uA. Increasing the input voltage to 4.7V only increases the input current by approximately 3uA. Therefore I conclude that the circuit does not include a diode clamp operating in the range 3.3 to 4.7V. Also, the small change in input current indicates that nothing bad is happening (i.e. nothing is conducting much more at 4.7V than it was at 3.3V, and the chip is not going to heat-up due to the extra 3uA).
Let's push it a bit further!
...but I'd be very interested to hear your interpretation!
OK, this is a good analysis of what is probably going on behind the Pi's GPIO pins. I've been interfacing microcontrollers to Pi's since the Pi has been on the market, and I've been using resistor voltage dividers to get 5V talking to 3.3V. I just believed the mantra like everyone else!ReplyDelete
Things may change in my designs now that I've read your analysis. Thanks.
The sudden rise in current at about 5.8V suggests that there is an overvoltage protection diode, but that it is tied to 5V instead of 3.3V.ReplyDelete
I agree. A silicon diode with a low current flowing through it often shows a volt drop of 800-900mV. So that fits with diode protection between gpio inputs and the 5V rail.Delete
It is now over 3 years since I started "abusing" the Pi gpio, and I have not damaged any of my boards (I currently have 13).
BTW I like your article on rebuilding a valve (vacuum tube) amp: http://www.stefanv.com/electronics/rebuilding-a-hammond-ao-29-amplifier-from-the-ground-up.html
I need to push the rebuild of my 1950's Bush radio further up my job list!