0

I am actually a software engineer and not really familiar with wiring. I've been playing around with a Raspberry Pi Model B, and am looking to hook up a 2 PRONG Extension Cable to a Sainsmart 8 Channel Solid State Relay.

I am driving the GPIO pins from RPIO (Python). What I want to do is hook up a basic night light as the first channel output from the SSR and control it from GPIO pin 17. The problem is, I can't even get this to work. I am able to get the LED to light up pretty easily, but there seems to be no output. I've tried driving the relay on a HIGH and LOW signal, but no dice.

My wiring diagram is shown below... Apologies for it being very rudimentary... Any ideas what may be wrong? Is my relay bad?

Also note, I've several mechanical relays too and they all seem to do the same thing.

Also, I've been told that the GROUND side of a 2 PRONG cable is the side where the insulation has labeling. I'm assuming the GROUND part of the 2 prong cable is plugged into the top part of the output channel of the relay and VCC on the bottom. Can someone confirm with me?

I've also tried this with an Arduino, and it doesn't seem to work either. Sorry for the convoluted post, but this has been driving me nuts for the past couple of weeks!

EDIT: The LED on the board does turn on, but I haven't had luck powering something separate off from the port. And yes, I have tried powering it from a separate 5V supply.

enter image description here

6
  • 2
    I don't understand the business about the two prong cable and VCC. The thing you want to power is connected through the OUT part of the relay. When on there will be a connection between the two out terminals. Does the relay operate when IN1 is connected to one of the ground, 3V3, or 5V pins?
    – joan
    Commented Dec 4, 2015 at 14:32
  • 3
    can we see a photo of the connections to the output (you need to connect only one side of the extension cord to the relay). Basically you splice the relay between one wire of the two wire cord. Also, can we see the code you are using to control the relay. Commented Dec 4, 2015 at 14:54
  • @joan Hi Joan, the relay does light up the LED when connected to a pin. However, nothing comes out of the relay when I connect an extension cord to it. Commented Dec 4, 2015 at 16:32
  • @SteveRobillard Hi Steve, what do you mean by this? Do you mean that when I splice my extension cable, I really only need to plug in one part of it to the OUT port? Commented Dec 4, 2015 at 16:33
  • No you have a 2 wire extension cord. Separate the 2 wires, then cut one of them, take the 2 cut ends and plug them into the relay outputs. Commented Dec 4, 2015 at 16:34

4 Answers 4

1

Based on your photo of the AC side wiring [your AC side wiring[1] that is where your problem lies. Please forgive my kindergarten art skills but the AC side wiring should look like this:

correct ac wiring

1
  • 1
    Steve, +1 for crude schematics. Would you mind if I take that to meta to make the case a schematics editor?
    – Ghanima
    Commented Dec 17, 2015 at 14:10
1

You should not attempt to directly drive a relay off of the GPIO voltage, as they can only output about 18mA, which is not enough for most relays. The way I have done this is to get a NPN transistor, have the GPIO drive the transistor, and use the transistor to switch the relay on and off.

In wiring terms, you would do: 5V source (probably the Pi's built in one) -> relay inputs -> NPN -> ground. Hooking the GPIO straight to the middle pin of the NPN seems to work (at least for me).

1
  • Take a look at Mike's answer, as that has the schematics for what I was talking about (with a much better implementation than what I use).
    – dpdt
    Commented Dec 17, 2015 at 21:14
1

I've been using the non-SS relay board with great success, however these SS devices are a bit different. You can get some documentation for them at the SainSmart.com web site if you dig around.You would need to verify this is the same module you have: Sainsmart 8 Channel 5V Solid State Relay Module Board

8 SS Relay diagram for SainSmart

0

I've successfully used a transistor array (ULN2803) with 8 transistors. That simplifies the circuit dramatically and allows to reliably drive all 8 relais of a sainsmart relay board. If that is still interesting for anybody I can post the schema.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.