User avatar
PeterO
Posts: 4297
Joined: Sun Jul 22, 2012 4:14 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 8:29 am

And yet people are doing it.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
rpdom
Posts: 12954
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 8:39 am

It is 3V3 logic. That's simple enough for most people to understand and get things working 100% of the time. Try not to go over 3.3V, or under 0V and you should be fine. Keep to within 0V6 of those values and it will work. If you feel the need to wander around the 2V0 area you need to rethink your interface.

Don't assume you can draw/sink 361000000A from the pins. Design for 1mA. That is guaranteed to work. Why are you even contemplating using high mA values without suitable buffers anyway?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20944
Joined: Sat Jul 30, 2011 7:41 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 8:43 am

Calm down everyone!

I spoke to people who know, there is a document that contains this information, but it's currently under NDA. Foundation agree it needs to be published, is looking in to how to get that NDA lifted.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

gwideman
Posts: 45
Joined: Tue Mar 01, 2016 8:18 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 9:40 am

jamesh wrote:I spoke to people who know, there is a document that contains this information, but it's currently under NDA. Foundation agree it needs to be published, is looking in to how to get that NDA lifted.
This is great news! Well done jamesh! Dare I ask for a guesstimate on timeframe?

(I'll refrain from answering other posters' ideas of how to get along without such specs. When the real specs appear, we will no doubt see calculations posted for typical scenarios, illustrating why these specs are so useful.)

User avatar
RaTTuS
Posts: 10123
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 9:43 am

gwideman wrote:...Dare I ask for a guesstimate on timeframe?...)
:lol: :lol: :lol: :D
you know that sting right ....
not even do we not know its length, we don't even know what its made of ... ;)
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
PeterO
Posts: 4297
Joined: Sun Jul 22, 2012 4:14 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 9:52 am

rpdom wrote:It is 3V3 logic. That's simple enough for most people to understand and get things working 100% of the time. Try not to go over 3.3V, or under 0V and you should be fine. Keep to within 0V6 of those values and it will work. If you feel the need to wander around the 2V0 area you need to rethink your interface.

Don't assume you can draw/sink 361000000A from the pins. Design for 1mA. That is guaranteed to work. Why are you even contemplating using high mA values without suitable buffers anyway?
Exactly. Make sensible assumptions, don't stress things. Simples !

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

gwideman
Posts: 45
Joined: Tue Mar 01, 2016 8:18 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 10:00 am

So, PeterO and rpdom will enjoy seeing the specs, since at the moment they feel they are limited as follows:

-- Can't attach an LED to RPi GPIO (even with suitable resistor) due to belief that max safe output current is 1mA

-- Can't use just a transistor to drive a load of >100mA for the same reason.

-- Can't use RPi GPIO input to read TTL signals, due to belief that VIH = 2.7V, < TTL VOH=2.4V

Good illustration of why the specs will be valuable.

clivem
Posts: 79
Joined: Sun Aug 03, 2014 11:18 am

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 6:51 pm

jamesh wrote: Pi have been used extensively in industrial control, despite the lack of 'openness', although a lot of projects remain under the radar. 5 Ninja's Slice device is a available example, which uses the compute module.
LOL. 5 Ninjas..... Yep, the PiF heads of Hardware and Software engineering only had the publicly available datasheet to rely on when designing their Slice product, the same as everyone else.......
Last edited by clivem on Tue Mar 08, 2016 10:35 pm, edited 1 time in total.

clivem
Posts: 79
Joined: Sun Aug 03, 2014 11:18 am

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 6:54 pm

jamesh wrote:There is a binary blob to run the GPU (and actually now another one to drive the Wifi chip pn Pi3), and the schematics are not yet available (although might be later on).
Seen as you bring that up and I am still struggling to get an answer as to whether the wifi/BT firmware is re-distributable, and under which license, maybe you could tell me?

User avatar
PeterO
Posts: 4297
Joined: Sun Jul 22, 2012 4:14 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 8:38 pm

gwideman wrote:So, PeterO and rpdom will enjoy seeing the specs, since at the moment they feel they are limited as follows:

-- Can't attach an LED to RPi GPIO (even with suitable resistor) due to belief that max safe output current is 1mA

-- Can't use just a transistor to drive a load of >100mA for the same reason.

-- Can't use RPi GPIO input to read TTL signals, due to belief that VIH = 2.7V, < TTL VOH=2.4V

Good illustration of why the specs will be valuable.
It's not the specs that you need !

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 9:10 pm

PeterO wrote:It's not the specs that you need !
Agreed. Information has been in the public domain for years recommending a maximum current limit of 5mA out of any I/O pin. The same source tells us not to exceed a total of 30mA across all I/O pins simultaneously. We have also been told numerous times to assume typical 3V3 logic levels. We also know what the maximum clock speeds/baud rates we can expect to reach are likely to be because we've been told.

Before you ask me the exact source of this data, I neither know nor care as it's proven to be true by everyone's competent designs that are based on this information working flawlessly, always. It's only those who've insisted on farting around in logic "no man's land" between a clearly defined '0' or '1' who've tied themselves up in knots by asking the question, "Why isn't it working when it obviously shouldn't?"

I'd be very disappointed with my design skills if anything I designed based on those simple but sufficient specifications didn't work perfectly first time, every time. I'm with Peter on this one. TMI is not necessary to anyone who can design electronics with the competence that could be reasonably expected from a qualified electronics design engineer. Teach a student to follow the same basics and it WILL work.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

rgarvin1
Posts: 2
Joined: Sat Mar 05, 2016 3:29 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 10:03 pm

My mistake on the Open Source status of the RPi devices. I never imagined anyone seriously considering using a system PCB for a project without the schematic at least.
BUT the data for the output pin characteristics could be released without compromising any sensitive or proprietary information of the SOC.
Again, I apologize if I offended anyone.

gwideman
Posts: 45
Joined: Tue Mar 01, 2016 8:18 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 11:23 pm

To be sure, the specs we've been discussing are superfluous for applications where you just conservatively connect RPi to 3.3V logic.

But PeterO and GTR2Fan think that these specs are never needed. This judgement apparently without actually knowing how we want to use the specs, or alternatively judging that applications that need the specs should be avoided. (So, no LEDs, transistors, level shifters, other logic families and so on).

Readers can draw their own conclusions.

To some specific points:

PeterO mentioned his early experiences designing with TTL. Perhaps he remembers the necessity of calculating fanouts, which rely on exactly the electrical specs discussed here. Even more needed when interfacing between families, such as with S, LS, HCT, ACT and so on. And still needed today if we want to interface RPi to other logic families.

rpdom says just add buffers. This helps because said buffers actually do have electrical specs so you can choose ones that meet the task. So this advice is to add parts count to solve the problem of lack of RPi specs.

GTR2Fan describes parameters widely known in the public domain, but could not find references to them, and feels it's unimportant where they came from. Yet figures like "5mA per I/O" and "total 30mA" do not reconcile with published references that I actually can cite and have already linked to (Adjustable 2-16mA, and total 50mA source). These references do seem to conflict with each other and with industry standards in various regards, so I don't entirely believe them. Again a reason in favor of official specs.

On a meta note, I don't entirely understand why a few posters on here argue so strongly against publication of these specs, and our asking for them. If you don't want them for your applications, great, don't use them. But calling the rest of us incompetent for practicing engineering using calculations and margins, is, to say the least, wearing.

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 11:33 pm

gwideman wrote:To be sure, the specs we've been discussing are superfluous for applications where you just conservatively connect RPi to 3.3V logic.
My point exactly, although it appears to have been missed. I believe this was Peter's point too. Follow exactly the same conventions as you would for connecting up to any other 3.3V logic and there won't be any issues.

The fact that you can do other things with it is a bonus but should never be taken for granted any more than you would take it for granted with any other 3.3V logic device.
Last edited by GTR2Fan on Tue Mar 08, 2016 11:35 pm, edited 1 time in total.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

clivem
Posts: 79
Joined: Sun Aug 03, 2014 11:18 am

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 11:34 pm

gwideman wrote: On a meta note, I don't entirely understand why a few posters on here argue so strongly against publication of these specs, and our asking for them. If you don't want them for your applications, great, don't use them. But calling the rest of us incompetent for practicing engineering using calculations and margins, is, to say the least, wearing.
Don't take it personally! PiF, for whatever reason, do not publish the info you ask for..... The "fanboys" will tell you to the ends-of-the-earth and back again, that there is something wrong with you and your logic, for asking for something that the PiF have determined you don't need.

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 11:38 pm

clivem wrote:[Don't take it personally! ..... The "fanboys" will tell you to the ends-of-the-earth and back again, that there is something wrong with you and your logic, for asking for something that the PiF have determined you don't need.
It's neither intended rudeness nor fanboyism to suggest that someone follows best practice when it comes to electronics design.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

clivem
Posts: 79
Joined: Sun Aug 03, 2014 11:18 am

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 11:39 pm

GTR2Fan wrote: The fact that you can do other things with it is a bonus but should never be taken for granted any more than you would take it for granted with any other 3.3V logic device.
I think the belt and braces EE types, would make the point that by having a full set of specifications, they don't need to guess or take anything for granted! ;)
Last edited by clivem on Tue Mar 08, 2016 11:47 pm, edited 1 time in total.

gwideman
Posts: 45
Joined: Tue Mar 01, 2016 8:18 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 11:44 pm

clivem wrote: Don't take it personally! PiF, for whatever reason, do not publish the info you ask for.....
Actually in an earlier pose, jamesh tells us that PiF acknowledges that these specs are needed, and are looking into getting them un-NDA'ed, and publishing them. I just would hate to see PiF talked out of it!

viewtopic.php?p=923312#p923312

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 11:47 pm

clivem wrote:I think the belt and braces EE types, would make the point by having a full set of specifications, they don't need to guess or take anything for granted! ;)
I am the belt and braces EE type and am happy to treat 3.3V logic as 3.3V logic and nothing else without the expectation of possibly pulling it out of spec. ;)
Last edited by GTR2Fan on Wed Mar 09, 2016 12:26 am, edited 1 time in total.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

gwideman
Posts: 45
Joined: Tue Mar 01, 2016 8:18 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 11:50 pm

> belt and braces

Why are you guys focusing only on the pull-ups?

clivem
Posts: 79
Joined: Sun Aug 03, 2014 11:18 am

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Tue Mar 08, 2016 11:58 pm

gwideman wrote:> belt and braces
Why are you guys focusing only on the pull-ups?
Pull-ups are important! Belt's and braces..... Some of us prefer not to be wandering around with our pants round our ankles, whether we have a spec sheet in our hands or not! ;)

Anyway, seriously, I hope James manages to get released, the info you have asked for.

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Wed Mar 09, 2016 12:24 am

gwideman wrote:> belt and braces

Why are you guys focusing only on the pull-ups?
You garter laugh out of that one. :lol:
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11098
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Wed Mar 09, 2016 1:31 am

gwideman wrote:So, PeterO and rpdom will enjoy seeing the specs, since at the moment they feel they are limited as follows:

-- Can't attach an LED to RPi GPIO (even with suitable resistor) due to belief that max safe output current is 1mA

-- Can't use just a transistor to drive a load of >100mA for the same reason.

-- Can't use RPi GPIO input to read TTL signals, due to belief that VIH = 2.7V, < TTL VOH=2.4V

Good illustration of why the specs will be valuable.
You are making things up, nobody has made these claims, and they are absurd.
  • Yes, you can drive a LED, and a 1 mA limit (which is actually a 5mA limit) is not a problem.
  • Yes, you can drive a transistor, to drive 100mA, with a 5mA drive and a transistor gain of 20 this is easy.
  • No! You cannot input a larger voltage than about 4V, or it could cause a latchup, so no you cannot directly connect a TTL signal to a GPIO, that the PI's GPIO's are NOT 5V tolerant is well know, and also that dividing the 5V signal to 3/5th (3V) with 2K2 and 3K3 resistors will work reliably is well known and you can read that in very many posts.

gwideman
Posts: 45
Joined: Tue Mar 01, 2016 8:18 pm

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Wed Mar 09, 2016 3:08 am

mahjongg wrote:You are making things up, nobody has made these claims, and they are absurd.
Not making it up:
viewtopic.php?p=923320#p923320
"Design for 1mA".

I agree with you that obviously RPi can actually drive an LED and a transistor, and that 1mA limit would be a difficult constraint.
No! You cannot input a larger voltage than about 4V, or it could cause a latchup, so no you cannot directly connect a TTL signal to a GPIO, that the PI's GPIO's are NOT 5V tolerant is well know, and also that dividing the 5V signal to 3/5th (3V) with 2K2 and 3K3 resistors will work reliably is well known and you can read that in very many posts.[/list]
Well, actually 5V TTL (as in 7400 and 74LS00 series) has a minimum VOH of 2.4V at 0.4mA, and typical VOH at 0.4mA of 3.4V. TTL has very low output current source capability, diminishing rapidly within 2 diode drops of VCC (ie: > 3.6V), and which can probably be handled by the RPi protection diodes, optionally aided by a pull-down resistor, or an external clamp diode.

If, as I suspect, RPi VIH < 2.4V, then it would be possible for RPi to read (non-buffer) TTL just fine, with no additional components, or just one. This is of some interest when using the RPi to retrofit additional functionality into old equipment.

Your approach of adding a 2K2 + 3K3 divider won't work in this case, as that will load the TTL output well below 3.4V (and possibly below 2.4V), and then multiply that by 3.3/5.5.

However, I realize that you probably had a more recent "CMOS TTL" family in mind.

User avatar
rpdom
Posts: 12954
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Wed Mar 09, 2016 3:27 am

gwideman wrote:
mahjongg wrote:You are making things up, nobody has made these claims, and they are absurd.
Not making it up:
viewtopic.php?p=923320#p923320
"Design for 1mA".
Which was just an example, and you know it. Yes, we know that you can take more than that. Yes, I do drive LEDs directly from the pins with a suitable resistor to bring the current down to about 5mA which is enough to get a reasonable output. Where I am using high current white LEDs (3.3V 100mA) I use a FET to handle the high current, so the GPIO doesn't have to do any hard work.

I'm not arguing against having the full specs available. They may be interesting (I've got a stack of books of specs on all sorts of things from TTL to EPROMs), but it sounds like you want to know how close to the edge you can push things.

Return to “Advanced users”