undy
Posts: 6
Joined: Wed May 16, 2018 9:51 am

All pins fried, don't know why

Wed May 16, 2018 9:58 am

Hi, I'm currently working on a project that includes a raspberry pi 3 B, I'm supplying 5v via a power supply on pin #2 and ground via pin #6, the only other pin I'm using is pin #8 for serial writing. Somehow I ended up frying literally every last pin on my pi the other day but I can't for the life of me figure out how that could have happened. Ran gpiotest two times, results stay the same, the pi is still operating, if it weren't for it not writing via serial anymore I wouldn't even have noticed anything was wrong.

Any ideas on what might have been the cause and if there's a possibility of fixing it without a replacement would be much appreciated. I'm quite new to working with the rpi so please be gentle.

hippy
Posts: 3158
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: All pins fried, don't know why

Wed May 16, 2018 12:01 pm

As GPIO signals go straight from the connector to the SoC, if they are fried the damage is inside the SoC and there's nothing you can do to fix them.

B.Goode
Posts: 6006
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: All pins fried, don't know why

Wed May 16, 2018 12:11 pm

Welcome to the Raspberry Pi forums.

I'm supplying 5v via a power supply on pin #2 and ground via pin #6, the only other pin I'm using is pin #8 for serial writing.


There is nothing there that looks problematic.

But that assumes it was done correctly.

Putting a live 5volt supply onto any of the gpio pins even momentarily would be fatal.

Similarly, but a little more obscure - an rs232 balanced (bipolar) signal can have an absolute signal level that is not gpio safe, and can swing negative wrt ground which is also not gpio safe. So temporarily connecting RPi transmit to the transmit Output from the other device could also be fatal.

But these can only be guesses at what might have caused your problem.

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

Re: All pins fried, don't know why

Wed May 16, 2018 2:12 pm

Are you sure you have a good earth connection to the PI ?
You say every pin is "fried" (not a really useful description!) but that suggests the common connection (or ground) to your test equipment (you don't say how you have determined they are fried) could be at fault.

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

undy
Posts: 6
Joined: Wed May 16, 2018 9:51 am

Re: All pins fried, don't know why

Wed May 16, 2018 2:37 pm

PeterO wrote:
Wed May 16, 2018 2:12 pm
Are you sure you have a good earth connection to the PI ?
You say every pin is "fried" (not a really useful description!) but that suggests the common connection (or ground) to your test equipment (you don't say how you have determined they are fried) could be at fault.

PeterO
What I used for testing the pins was this bash script, output was that all user pin tests failed. Furthermore when I attempt to send serial data via pin #8 it is not received by the serial receiver (this is not a wiring issue).

I am also certain I have a good earth connection, this setup had been working for the past few days and nothing about the way I supplied power/earth has changed.

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

Re: All pins fried, don't know why

Wed May 16, 2018 2:43 pm

I've not heard of that before, I assumed it toggled all the pins so you could look at them with a scope/meter/led+resistor.
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
joan
Posts: 13408
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: All pins fried, don't know why

Wed May 16, 2018 2:59 pm

As @B.Goode says a likely possibility is that RX (pin 10, GPIO 15) received more than 3V3 for a sustained period. What is connected to the serial link?

B.Goode
Posts: 6006
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: All pins fried, don't know why

Wed May 16, 2018 3:19 pm

joan wrote:
Wed May 16, 2018 2:59 pm
As @B.Goode says a likely possibility is that RX (pin 10, GPIO 15) received more than 3V3 for a sustained period. What is connected to the serial link?


Not quite. OP @undy claims to be using only Pin #8 gpio14 for serial TXD.

But that is "just another GPIO" for which there is no inbuilt protection on the RPi. If due to a wiring mixup/experiment/confusion the two serial ports had been momentarily connected Tx-to-Tx, that would expose the gpio on the RPi to an unsafe level of input voltage

hippy
Posts: 3158
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: All pins fried, don't know why

Wed May 16, 2018 3:21 pm

joan wrote:
Wed May 16, 2018 2:59 pm
As @B.Goode says a likely possibility is that RX (pin 10, GPIO 15) received more than 3V3 for a sustained period.
Though the OP does say; "I'm supplying 5v via a power supply on pin #2 and ground via pin #6, the only other pin I'm using is pin #8 for serial writing".

It may be that not all pins have been fried, just that the specific test run reports it that way. We don't have enough information to go on.

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

Re: All pins fried, don't know why

Wed May 16, 2018 4:24 pm

If all the GPIO's are "fried", (that is they are all defective due to some external damaging force) then they would all get very hot, and you would definitely notice that the SoC would get too hot to touch. I know of no situations with any "fried" GPIO's where that was not the case.


its very difficult to disable/damage some part of a chip (the GPIO drivers inside the SoC) while the rest of the chip continues working normally, in practice it always means there are internal shorts somewhere in the chip, and such damage tends to spread.

So I suspect the GPIO's are actually okay, but something else is going on.

no idea what though.

undy
Posts: 6
Joined: Wed May 16, 2018 9:51 am

Re: All pins fried, don't know why

Thu May 17, 2018 7:03 am

Just to clarify, I'm using an arduino with the raspberry pi, I know the arduino has 5v output and has potential to damage the rpi however I am strictly connecting the tx of the rpi to the rx of the arduino and there is no chance of me having connected them tx -> tx as I'm actually using the tx of the arduino to send data to an led strip and that pin is occupied at all times. I did not use a resistor or level converter between the tx of the rpi and the rx of the arduino as I did not have one on hand at the time, but as far as I'm aware this doesn't have potential to damage the rpi since it's a one way road from 3.3v to 5v unlike connecting arduino tx to rpi rx which is 5v to 3.3v which would obviously cause damage, correct me if I'm wrong though.

Also regarding heat, I did notice this rpi getting unusually warm to the touch after the issues started, not hot exactly but warmer than before for sure.

User avatar
DougieLawson
Posts: 33005
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: All pins fried, don't know why

Thu May 17, 2018 7:43 am

Time to order a new RPi, that one is dying. The overheating will get worse as the damaged GPIO pins spreads.

You can run Arduinos at 3V3, if not you should use a level shifter between the Arduino TX/RX and the RPi RX/TX. Or connect the Arduino USB to your RPi and use /dev/ttyAMC0 or /dev/ttyUSB0 to communicate with it.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

undy
Posts: 6
Joined: Wed May 16, 2018 9:51 am

Re: All pins fried, don't know why

Thu May 17, 2018 8:13 am

DougieLawson wrote:
Thu May 17, 2018 7:43 am
Time to order a new RPi, that one is dying. The overheating will get worse as the damaged GPIO pins spreads.
I already have, I'm just trying to figure out what caused the problem in the first place so I can avoid it in the future.
DougieLawson wrote:
Thu May 17, 2018 7:43 am
You can run Arduinos at 3V3, if not you should use a level shifter between the Arduino TX/RX and the RPi RX/TX. Or connect the Arduino USB to your RPi and use /dev/ttyAMC0 or /dev/ttyUSB0 to communicate with it.
This is what I planned on doing, however I was under the impression that wiring rpi tx -> arduino rx directly would not cause any damage to either of them (at least in the short-term), am I wrong about that?

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

Re: All pins fried, don't know why

Thu May 17, 2018 8:22 am

undy wrote:
Thu May 17, 2018 8:13 am
... however I was under the impression that wiring rpi tx -> arduino rx directly would not cause any damage to either of them (at least in the short-term), am I wrong about that?
the arduino will be outputting 5V on those lines 5V is a killer on gpio on the RPI , if you where running the Arduino @3V then it would be fine but your not so it's not
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

undy
Posts: 6
Joined: Wed May 16, 2018 9:51 am

Re: All pins fried, don't know why

Thu May 17, 2018 8:32 am

I was not outputting anything via pin 0 from the arduino though, I was using strictly as read-only, unless the arduino sends output via pin 0 by itself without being instructed to do.

User avatar
DougieLawson
Posts: 33005
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: All pins fried, don't know why

Thu May 17, 2018 8:34 am

It only needs 5V on the RPi RX pin for a nanosecond to fry your RPi.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

undy
Posts: 6
Joined: Wed May 16, 2018 9:51 am

Re: All pins fried, don't know why

Thu May 17, 2018 8:44 am

And that's something that happens in these circumstances?

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

Re: All pins fried, don't know why

Thu May 17, 2018 9:16 am

The damage could have been done weeks ago in a moment of inattention. My understanding is that it spreads like a virus from the point of infection, no idea why.

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

Re: All pins fried, don't know why

Thu May 17, 2018 9:18 am

IGNORE THIS POST!
The serial protocol requires the lines to be driven by an open-collector output - high is open-circuit, low is pull-down to gnd.
At one end of the line (probably the rx end) there should be a pull-up resistor.

The Pi emulates this by changing between input (high impedance) for high and output 0 for low.
If the Arduino has a pull-up resistor to 5v, that is what is going to kill the Pi.
Last edited by Burngate on Thu May 17, 2018 5:40 pm, edited 1 time in total.

hippy
Posts: 3158
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: All pins fried, don't know why

Thu May 17, 2018 10:28 am

undy wrote:
Thu May 17, 2018 8:13 am
I was under the impression that wiring rpi tx -> arduino rx directly would not cause any damage to either of them (at least in the short-term), am I wrong about that?
No; you are right. It is what would be expected, what many people have done and are doing, with Arduino and other micros, without any problem.

There may be some potential issues if your Arduino is powered from 5V, more so if it has is a pull-up to 5V on its RX input, but, as Dougie notes, the Pi will be damaged in a nanosecond if there is an adverse situation, and it seemed to be working perfectly well for at least some time.

I do not think we will ever discover what has caused the problem. We can all take guesses but we'll never know for sure.

I am not however convinced that the IGPIO are all fried. Maybe they are, but perhaps not. I think you should undertake further tests to determine or confirm what the situation is.

Find a new or spare SD Card and start with a fresh install of Raspbian and don't add or install anything so you can be sure nothing else is messing with GPIO. Write two simple Python programs; one to toggle an output pin and check if that works, a second with an internal pulled-up input to see if that can read a short-to-0V on a pin.

That should give you a better idea whether GPIO are fried or not.

hippy
Posts: 3158
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: All pins fried, don't know why

Thu May 17, 2018 10:32 am

Burngate wrote:
Thu May 17, 2018 9:18 am
The serial protocol requires the lines to be driven by an open-collector output - high is open-circuit, low is pull-down to gnd.
At one end of the line (probably the rx end) there should be a pull-up resistor.
I am not convinced that is the case; that 3V3 UART serial protocol is an open-collector scheme or that it is this way on a Pi.

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

Re: All pins fried, don't know why

Thu May 17, 2018 10:37 am

hippy wrote:
Thu May 17, 2018 10:32 am
Burngate wrote:
Thu May 17, 2018 9:18 am
The serial protocol requires the lines to be driven by an open-collector output - high is open-circuit, low is pull-down to gnd.
At one end of the line (probably the rx end) there should be a pull-up resistor.
I am not convinced that is the case; that 3V3 UART serial protocol is an open-collector scheme or that it is this way on a Pi.
No serial lines (USART) normally use push-pull drivers (actively driven high and low).
I think you mean I2C lines, as they indeed use open-collector outputs.
Or perhaps you are thinking about a bus-based serial line with drivers that can tri-state (RS485).

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

Re: All pins fried, don't know why

Thu May 17, 2018 5:39 pm

mahjongg wrote:
Thu May 17, 2018 10:37 am
hippy wrote:
Thu May 17, 2018 10:32 am
Burngate wrote:
Thu May 17, 2018 9:18 am
...
I am not convinced that is the case
No serial lines (USART) normally use push-pull drivers (actively driven high and low).
I think you mean I2C lines, as they indeed use open-collector outputs.
Or perhaps you are thinking about a bus-based serial line with drivers that can tri-state (RS485).
You're probably right ... so ignore me. :)

Idahowalker
Posts: 239
Joined: Wed Jan 03, 2018 5:43 pm

Re: All pins fried, don't know why

Thu May 17, 2018 6:40 pm

undy wrote:
Thu May 17, 2018 8:13 am

This is what I planned on doing, however I was under the impression that wiring rpi tx -> arduino rx directly would not cause any damage to either of them (at least in the short-term), am I wrong about that?
Yes. For a very short time 'things' were probably OK but, for things working at or near the speed of light that time, in human terms, was very short.

Image

I got 7 bi bi-directional connections from a RPi3 and an Arduino Mega, including Rx and Tx.. Each of 7 connections run through the above circuit.
Being a programmer: She says go to the store get 1 bottle of milk, if they have eggs bring back 6. She gets mad cause I brought back 6 bottles of milk.

User avatar
Z80 Refugee
Posts: 353
Joined: Sun Feb 09, 2014 1:53 pm

Re: All pins fried, don't know why

Fri May 18, 2018 7:43 am

"don't know why"!!!

You must regard wiring any RPi signal directly (ie without hardware protection) to any assembly powered by a voltage in excess of 3.3V as a risk. Just because people get away with it doesn't mean they will always get away with it. The I/O characteristics of pins (at both ends) are established by program, so could be anything before they are established. AT THE VERY LEAST, always include a current-limiting resistor (and preferably voltage protection too).
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

Return to “Troubleshooting”

Who is online

Users browsing this forum: Baidu [Spider], barus, smartroad and 44 guests