I fried a Raspberry Pis and I have no idea why. Please help me understand.

Thread Starter

carlosc

Joined Feb 2, 2018
24
Please refer to the picture attached.

When the switch closes the circuit, the buck converter at the bottom of the image turns on (as expected) and the code I have running in the Raspberry Pi detects a low signal going into the Raspberry Pi pin the transistor's emitter is connected to (also as expected). Now here's where things get really confusing for me...

When the switch opens the circuit, I expect the buck converter at the bottom of the image to turn off, but it doesn't! Can someone explain why?

To try to figure things out, I disconnected both wires going into the Raspberry Pi and then reconnected the wire going from the transistor's emitter back into the pin it was connected to in the Raspberry Pi. The screen went dark and now the Raspberry Pi seems to be fried. I have zero clue why this happened!

Here's what I am trying to do: When the switch closes the circuit, I want the buck converter at the bottom of the image to turn on so I can detect that the circuit was closed in the Raspberry Pi code. When the switch opens the circuit, I want the buck converter to turn off so I can detect that the circuit is open in the Raspberry Pi code.

I didn't have anything connected to the 24 VAC relay and I did not a signal wire connected to the 5 VDC relay when this happened (those components are in the image just so you guys can see the whole thing as I have it).

Any help here is greatly appreciated. I am going nuts trying to understand this and can't :-(
 

Attachments

dl324

Joined Mar 30, 2015
16,846
What does "fried a Raspberry Pi" mean? Did it smoke? Did it stop working? Did a GPIO stop working?

Your drawing is dreadful. I'll clean it up and post something others might be able to understand more easily.

EDIT: I couldn't do it. What do the terminals on the 5V relay mean? 1, 2, and 3 aren't standard nomenclature. What is sig?

clipimage.jpg
 
Last edited:

Thread Starter

carlosc

Joined Feb 2, 2018
24
My apologies for the drawing! I'm sure there are much better ways to show a circuit but I'm not familiar with any them.

By fried I meant the Raspberry Pi is no longer working (nothing appears on the screen when I connect it to a monitor and it gets very hot very quickly). There was no smoke.

Regarding the pin numbers on the 5 VDC relay, I just put them there to show which pins connect when the relay is active and not active. The sig pin is the signal pin, what I use to activate or deactivate the relay.
 

dl324

Joined Mar 30, 2015
16,846
Regarding the pin numbers on the 5 VDC relay,
I assume you're using those inexpensive relay modules from Ali Express. A part number would be helpful.

1581807160296.png

What Raspberry Pi are you using? If you're burning them up because you don't know what you're doing, hopefully you're using the cheap ones (Zero or ZeroW).
 
Last edited:

Thread Starter

carlosc

Joined Feb 2, 2018
24
I assume you're using those inexpensive relay modules from Ali Express. A part number would be helpful.

What Raspberry Pi are you using? If you're burning them up because you don't know what you're doing, hopefully you're using the cheap ones (Zero or ZeroW).
This is the 5 VDC relay: SainSmart 2-Channel Relay Module https://www.amazon.com/dp/B0057OC6D8/ref=cm_sw_r_cp_apa_i_3thsEbW34YJHM

This is the 24 VAC relay: Emerson 90 380 Fan Relay 24 Volt Coil, 1 https://www.amazon.com/dp/B000LDCPQS/ref=cm_sw_r_cp_apa_i_9uhsEb096DNDK

I was using a Raspberry Pi Zero.
 

Thread Starter

carlosc

Joined Feb 2, 2018
24
I would start by putting diodes across your relay coils.
Can you elaborate? My understanding is that a diode allows current in only one direction. Since I'm dealing with AC voltage to trigger the 24 VAC relay, wouldn't the diodes only allow half of the AC signal to pass?
 

dl324

Joined Mar 30, 2015
16,846
Can you elaborate? My understanding is that a diode allows current in only one direction. Since I'm dealing with AC voltage to trigger the 24 VAC relay, wouldn't the diodes only allow half of the AC signal to pass?
He's referring to a snubber diode to prevent back EMF from the coil from generating voltage spikes that can damage other components when the coil is switched.
 

be80be

Joined Jul 5, 2008
2,072
Can you elaborate? My understanding is that a diode allows current in only one direction. Since I'm dealing with AC voltage to trigger the 24 VAC relay, wouldn't the diodes only allow half of the AC signal to pass?
And everyone is wondering why you burnt up a PI your drawing kind of shows some of that AC on gpio pin
 

Thread Starter

carlosc

Joined Feb 2, 2018
24
And everyone is wondering why you burnt up a PI your drawing kind of shows some of that AC on gpio pin
How come? Only the output of the buck converter, which is DC, is going to the transistor and Raspberry Pi according to the drawing. Can you explain what made you say the drawing shows AC going into the GPIO pin?
 

be80be

Joined Jul 5, 2008
2,072
A buck converter (step-down converter) is a DC-to-DC power converter which steps down voltage (while stepping up current) from its input (supply) to its output (load)
 

Alec_t

Joined Sep 17, 2013
14,280
A wiring error is the only thing I can see which would prevent the bottom converter switching off.
What is the purpose of the transistor? A simple potential divider would get the 5V from the bottom converter down to 3.3V to suit the RPi pin. If 5V was applied to the RPi pin, that may well be what fried the RPi.
 

Thread Starter

carlosc

Joined Feb 2, 2018
24
A wiring error is the only thing I can see which would prevent the bottom converter switching off.
What is the purpose of the transistor? A simple potential divider would get the 5V from the bottom converter down to 3.3V to suit the RPi pin. If 5V was applied to the RPi pin, that may well be what fried the RPi.
The purpose of the transistor is to allow a low (ground) signal into the Raspberry Pi pin when the switch in the diagram closes the circuit. When the switch closes the circuit, there's 24 VAC voltage going around that I need to detect through the Raspberry Pi. The transistor serves that purpose along with the buck converter. Can you tell me how to make a potential divider?
 

danadak

Joined Mar 10, 2018
4,057
One practice I use when working with processors is add a serial 1K ohm to each gpio pin,
so that if I ever over stress a pin the current is throttled so chip burnout does not occur.
I do this primarily in designs where there are voltages >> Vdd of processor chip primarily.
That does not solve power pin issues, like polarity reversal, and depending on GPIO interface
may not be able to use that approach, but I have been frying less processors during dev than
I used to.

Another truly devilish problem is scope probe ground clip leads shorting stuff accidentally to
ground. I generally "remote" the ground with an insulated lead to keep the probe ground
clip away from circuits. Not ideal, especially if you are debugging timing issues in fast circuits,
due to added L in the probing path, but will also save you some boards. I do not care to remember
how many boards I fried from ground clip shorts. I also use diff probes sometimes to avoid this
problem.


Regards, Dana.
 
Top