macgomes
Posts: 12
Joined: Tue Apr 02, 2019 5:24 am

Why would this circuit fry my board?

Thu Sep 05, 2019 8:01 am

Hello everyone,,
spam links discovered spammer banned and his posts deleted.
Last edited by macgomes on Fri Sep 06, 2019 6:06 pm, edited 1 time in total.

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

Re: Why would this circuit fry my board?

Thu Sep 05, 2019 8:14 am

My suspicion would fall on the unspecified LCD display you mention.

You are powering it with 5 volts from the RPi.

The i2c interface from the LCD is being connected to 3.3volt GPIO pins on the RPi.

Do you have any reason to believe that the LCD is reducing the signal level to be gpio-safe?

{I haven't been able to review your image: maybe you have used a voltage divider that you haven't itemised.}

pcmanbob
Posts: 7712
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Why would this circuit fry my board?

Thu Sep 05, 2019 12:47 pm

Looking at your pictures I can see nothing that would damage your pi in the way you have the switches wired.

I would suggest you use 1K resistors instead of the 100 ohm resistors to protect your gpio in the event you have them set as outputs.

I agree with B.Goode in suspecting the LCD you are powering with 5V.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Timescale
Posts: 24
Joined: Wed Jun 26, 2019 5:09 pm

Re: Why would this circuit fry my board?

Thu Sep 05, 2019 2:35 pm

I think the minimum resistance needed in this diagram is 220Ohms using the 3.3v output. In this diagram I would also have added a 10KOhm pull-down resistor to ground.

You could also try to connect the GPIO to the button and switch to ground and measure the state of the GPIO that way. I think there is video tutorial on that method somewhere.

pcmanbob
Posts: 7712
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Why would this circuit fry my board?

Thu Sep 05, 2019 2:52 pm

Timescale wrote:
Thu Sep 05, 2019 2:35 pm
I think the minimum resistance needed in this diagram is 220Ohms using the 3.3v output. In this diagram I would also have added a 10KOhm pull-down resistor to ground.
The reason 1k resistor is recommend is it limits the possible current flow to 3.3mA in the event that you connect the 3.3v pin to a gpio set to output and low so preventing any damage, were as your 220 ohm resistor would only limit it to 15mA which is rather close to the limit for a single gpio pin.

There is no need for a 10K pull down resistor if the pull-down is being set in software.

https://sourceforge.net/p/raspberry-gpi ... ki/Inputs/
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

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

Re: Why would this circuit fry my board?

Thu Sep 05, 2019 3:45 pm

pcmanbob wrote:
Thu Sep 05, 2019 12:47 pm
I agree with B.Goode in suspecting the LCD you are powering with 5V.
And I would agree as well. The buttons, if not pushed, might as well not be there, so the only thing it can be are the LCD connection, unless there is something else we are not being told about.

I can only guess that it's 5V on the SDA/SCL lines, SDA/SCL being above the allowed GPIO pin voltage due to the LCD 5V powering up before the 3V3 voltage of the SoC does (*), or SDA/SCL presenting on output voltage which the LCD side is shorting to 0V before those pins become the I2C bus.

(*) Most people forget that input voltages are usually rated in terms of 'Vdd plus a bit' and, when Vdd is held at 0V or a low voltage, any input voltage may exceed those ratings. I am not sure if that particular DC Characteristic of the Pi has ever been stated so don't know what that 'plus a bit' would be.
macgomes wrote:
Thu Sep 05, 2019 8:01 am
Also might be worth noting that this worked just fine with one button, but as soon as I hooked up the other 2 and powered on the boards, they died.
That seems counter to the above. It might therefore be some other issue. It might though be coincidental that the failure occurred when adding the extra buttons rather than causal.

If this were a commercial development project the course might be to engage in structured, and potentially destructive, testing to determine what actually caused the issue. But I guess that's not acceptable in these circumstances.

Unfortunately that just leaves 'guessing' as to what the problem was or is.

Timescale
Posts: 24
Joined: Wed Jun 26, 2019 5:09 pm

Re: Why would this circuit fry my board?

Thu Sep 05, 2019 6:33 pm

pcmanbob wrote:
Thu Sep 05, 2019 2:52 pm


There is no need for a 10K pull down resistor if the pull-down is being set in software.
That makes sense. Not used to things that can bet configured in software like that.

Still wondering why the GPIO to ground method isn't used. Would that not protect the GPIO pins better from both a hard- and software point of view?

User avatar
davidcoton
Posts: 4409
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Why would this circuit fry my board?

Thu Sep 05, 2019 7:37 pm

Timescale wrote:
Thu Sep 05, 2019 6:33 pm
Still wondering why the GPIO to ground method isn't used. Would that not protect the GPIO pins better from both a hard- and software point of view?
No. The problem just arises in different circumstances, when the GPIO is accidentally set to output, high and the button connects it to ground.

The 1K resistor is series with the input should always give sufficient protection, while giving the greatest chance of working with weak pulls, long cables, etc.
Signature retired

Return to “Troubleshooting”