Jump to content

I have a Raspberry Pi driving a SainSmart 12v relay


G+_Kyle Boyington
 Share

Recommended Posts

I have a Raspberry Pi driving a SainSmart 12v relay. Whenever I power the relay with a load on it, and then turn off the power, the RPi crashes. I am using a 12v 100w power supply for the relay.

 

Should there be a diode somewhere on the relay, to prevent power back to the RPi? I thought that the SainSmart relay would prevent that from happening?

Link to comment
Share on other sites

I think what you are looking for can be answered by the JD-VCC VCC GND jumper. I don't remember how all of it works, but that jumper (either on, or removed) should take care of your issue. I just don't remember what the setting should be. But do some googling along the lines of the JD-VCC jumper and you should find your answer. Hope that helps.

Link to comment
Share on other sites

Kyle Boyington, what are you switching on and off with this relay? As I'm studying about this for my own purposes, I see that I am making an assumption that may not be true. I'v only switched on and off 110V mains with my relays. Is that what you are doing, or are you switching on and off the 12V that is attached?

Link to comment
Share on other sites

Ok. I think I have it now. I thought your 12V comment was an extra power supply going into the relay. What you need is to remove the jumper from the JD-VCC / VCC pin and use an additional 5V supply. +5V to the JD-VCC side and ground to GND (if your board has that in the same header). You are done and can test.

 

However, if your board is like the one you linked to at Amazon, there is not a second GND header pin. (And this is where I am not completely confident). From what I understand is that you will removed your Pi's GND from the GND on the main header and plug the new 5V supply's ground to that single GND pin.

 

The JD-VCC power supply input is what is needed to run the optocoupler in the relay module. This will give your Pi complete separation from what is happening inside the relays (i.e., creation and collapsing of the magnetic field).

 

Hope this helps.

Link to comment
Share on other sites

 Share

×
×
  • Create New...