stecklars
Posts: 27
Joined: Sat Mar 03, 2012 5:42 pm

Accidently connected 5V with GPIO Pin - nothing happened?

Mon Jul 15, 2013 10:24 am

Hi,

I accidently connected the 5 Volt output of the Raspberry Pi with a GPIO Input Pin (#23) a few minutes ago, but the Pi just continued to work fine and it seems as if nothing had happened.
Also I noticed that I was using the following set-up for quite some time and nothing occured: 5v --> 10k Pull-up Resistor --> GPIO --> Button --> GND

I'm just wondering whether this could've damaged my Pi in some way that I wouldn't immediately notice and how I could check for this kind of damage. And I'm wondering why my Pi seemed to work just fine on 5V levels at the GPIO pins (using the button)? I'd be very thankful if you could help me.
Thanks!

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Accidently connected 5V with GPIO Pin - nothing happened

Mon Jul 15, 2013 10:53 am

Perhaps gpio#23 is now knackered? 5V through a 10K resistor to a gpio suggests a 0.5mA worse case current flow. I suspect that could be tolerated by the gpio protection circuits indefinitely. I may have misremembered though.

Have a look through http://www.raspberrypi.org/phpBB3/viewt ... 9&p=375202

User avatar
Burngate
Posts: 6290
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Accidently connected 5V with GPIO Pin - nothing happened

Mon Jul 15, 2013 10:57 am

The GPIOs are protected by internal diodes, normally reverse-biased and connected to the power rails - 3v3 and ground.

In the case of "5v --> 10k Pull-up Resistor --> GPIO --> Button --> GND", when the button isn't pressed, current from the 5v through the 10k goes into the GPIO and through the internal diode to the 3v3 rail. Since there's only ~1v across the 10k resistor (the other ~0v7 is across the internal diode) there's only 0.1mA flowing, which that diode can handle quite happily, and the GPIO circuitry only sees ~4v which it seems to not mind.

When you connected 5V directly to the GPIO pin, with no series resistor, then quite a large current tried to flow through the internal diode. What happened next is in the lap of the gods.
It could be that the diode fried. Then the GPIO circuitry fried. Then distruction spread through the rest of the SoC. How far it spread depends on how long you left it attached.
Or maybe, before to much distruction spread, your PSU decided it'd had enough, and reduced its voltage to what turned out to be a safe level. Or maybe the poly-fuse on the Pi limited everything by half-blowing.

So you may be alright. Or the internal diode may be fried. Or more damage. You'll have to try testing things to see what if anything broke.

stecklars
Posts: 27
Joined: Sat Mar 03, 2012 5:42 pm

Re: Accidently connected 5V with GPIO Pin - nothing happened

Mon Jul 15, 2013 11:15 am

Well, everything seems to work just fine, GPIO Pin #23, too.
I'll do some testing and report back but it looks good.

User avatar
Burngate
Posts: 6290
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Accidently connected 5V with GPIO Pin - nothing happened

Mon Jul 15, 2013 3:47 pm

Burngate wrote:... distruction ... distruction ...
I've reread what I wrote several times, and only now have I worked out what was wrong.
destruction! Destruction!
Sorry to all pedants.

Also see http://www.raspberrypi.org/phpBB3/viewt ... 37&t=47959 where Gert van Loo gives a better description

drgeoff
Posts: 10676
Joined: Wed Jan 25, 2012 6:39 pm

Re: Accidently connected 5V with GPIO Pin - nothing happened

Mon Jul 15, 2013 4:06 pm

Burngate wrote:
Burngate wrote:... distruction ... distruction ...
I've reread what I wrote several times, and only now have I worked out what was wrong.
destruction! Destruction!
Sorry to all pedants.
Perhaps you were distracted by thoughts of destruction.

boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Accidently connected 5V with GPIO Pin - nothing happened

Tue Jul 16, 2013 1:44 pm

I don't think that you have damaged you Pi by connecting the 5v output to
A GPIO Input pin through a 10k resister, using Ohms Law this would only let
0.0005 amp pass. I think your project will have still have worked when
The button is pressed to GND ( 0v-)
A GPIO pin can be programmed to three Logic states,

State 1 GPIO = Logic 1 ( H )

State 2 GPIO = Logic 0 ( L )

State 3 GPIO = TRY-STATE ( Floating ) neither HIGH or LOW
This is when a Pull-up or a Pull-down resister is used to set a Logic in-put level
This state is used as a Logic in-put to what the Pi programme want to see
A Logic 1 or a Logic 0
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Accidently connected 5V with GPIO Pin - nothing happened

Thu Jul 18, 2013 9:55 pm

To calculate the voltage drop across a single resister,
You must know the load (resistance) you are feeding into.
You are interfacing 5v in to the GPIO pin that will only
Tolerate 3.3v to do this you must 5v minus 3.3v = 1.7v
To calculate the resister to drop 1.7v you must know
The internal resistance ( Load ) you feeding in to, not very good.
My suggestion is use a Opto Isolator. This will give
Compleat isolation between 5v & 3.3v[img][img][img][/img][/img][/img]
Attachments
Optos.jpg 1.jpg
Opto Isolater
Optos.jpg 1.jpg (19.96 KiB) Viewed 9181 times
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Return to “Troubleshooting”