mrioso
Posts: 18
Joined: Sat Dec 01, 2012 1:20 am

Some GPIO pins do not work

Thu Dec 06, 2012 6:05 pm

Hello. I am using the wiringPi library which works great! I had some problems with my pi when trying to control a DC motor. I think I connected 4 pins by mistake to 7V and now I cannot control them anymore. It is most probably a hardware issue.

Any idea how to approach this problem?

Thank you in advance!

Wendo
Posts: 142
Joined: Sun Jun 10, 2012 8:27 pm

Re: Some GPIO pins do not work

Thu Dec 06, 2012 6:13 pm

If you connected them to 7V they are dead.

The easiest test is probably to setup a simple circuit with an LED and a resister and see if they can toggle the LED, but more than likely you have fried those pins

mrioso
Posts: 18
Joined: Sat Dec 01, 2012 1:20 am

Re: Some GPIO pins do not work

Thu Dec 06, 2012 10:35 pm

crap.. is there any way how to fix this?

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: Some GPIO pins do not work

Fri Dec 07, 2012 11:37 am

mrioso wrote:crap.. is there any way how to fix this?
Yeah, buy another pi.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

mrioso
Posts: 18
Joined: Sat Dec 01, 2012 1:20 am

Re: Some GPIO pins do not work

Fri Dec 07, 2012 12:55 pm

Haha, it is already on its way.

Thank you!

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Some GPIO pins do not work

Fri Dec 07, 2012 1:07 pm

Also be very careful when poking around with a multimeter or logic probe or similar. I have shorted out pins on PIC micros by accidentally touching two at once, and depending what's on which pin it is possible to short them out and damage them that way too. Even more so with the raspi as I gather the outputs are low current an not buffered?

mrioso
Posts: 18
Joined: Sat Dec 01, 2012 1:20 am

Re: Some GPIO pins do not work

Sun Dec 09, 2012 12:03 pm

thanks for sharing this! could a z—diode be used to prevent too high voltges to fry some pins?

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

Re: Some GPIO pins do not work

Sun Dec 09, 2012 12:07 pm

You may find this article on a ruggedised Arduino to be of interest.

http://ruggedcircuits.com/html/ruggeduino.html

mrioso
Posts: 18
Joined: Sat Dec 01, 2012 1:20 am

Re: Some GPIO pins do not work

Sun Dec 09, 2012 2:20 pm

Everything was working perfectly with a power supply (12V, 1A) controlling two motors with a L239D. When I tried to replace the power supply for a battery the connected pins fried.

Why could this have happened? I am sure that the power supply was connected correctly.

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

Re: Some GPIO pins do not work

Sun Dec 09, 2012 3:02 pm

The answers given above were based on you saying that you connected 7V to the GPIO pins, and that was what fried them. If you are telling us now that wasn't what happened, then all answers above are also invalid.........

mrioso
Posts: 18
Joined: Sat Dec 01, 2012 1:20 am

Re: Some GPIO pins do not work

Sun Dec 09, 2012 4:19 pm

I did no connect them to 7V on purpose. But eventually 7V got into the GPIO port, yes.
Sorry for the unclarity.

- I tried with a power supply with 7V - 12V, where everything went fine
- I tried it with a battery of 7V, and a few GPIO pins got fried

Loading the emergency kernel worked well for getting the raspberry to run again.

Again, sorry for confusing you guys with my previous post. Back to my question: Why does a battery cause an overcurrent whereas a power supply works fine?

Thank you all for your great effort to help me!!

Reini

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

Re: Some GPIO pins do not work

Sun Dec 09, 2012 7:53 pm

on purpose, or not on purpose hardware doesn't care about such matters. :twisted:
If there has been 7V on a GPIO that, (as all CMOS type inherently drivers do) has a protection diode from the GPIO to the 3V3 lead, and another one to GND, (both obviously orientated so that no current flows through them under normal circumstances), then if you put 7V on such a GPIO current will flow from the +7V to the +3V3 through the first of these two diodes (the other one tries to protect against negative voltages), and if you are lucky only that diode burns out, instead of all the 3V3 logic that suddenly got powered with 7V coming in through that diode. After the diode has gone up in smoke it turns into a short, and this means there will always be 3V3 on the GPIO pin afterwards.

Of course it all depends on how much current that 7V source can deliver, if its just a few hundred milliamps the diode might survive, and if its a voltage below what the lower output transistor can handle it might stay intact.

If the voltages you put onto the GPIO pins are reasonable low, (say 5V, or perhaps even 7V) all you need to do to efficiently protect the GPIO pin is to place a current limiting resistor (say 1K) in series with the GPIO, so that the current flowing into the GPIO pin is limited to a few dozen mA or so, instead of a few amperes.
Why does a battery cause an overcurrent whereas a power supply works fine?
Perhaps the power supply has an over-current protection, that limits its output current, while a battery has no such thing, if its something like a lithium ion battery it can deliver dozen of amperes for a short time. or another factor you are not aware of has happened, like touching a wire with a pin without you noticing...

mrioso
Posts: 18
Joined: Sat Dec 01, 2012 1:20 am

Re: Some GPIO pins do not work

Mon Dec 10, 2012 8:44 pm

ok, thank you for the explanation!

Return to “Troubleshooting”